diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/cmdline.c /tmp/e3X06Fy51n/crash-4.0-4.9/cmdline.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/cmdline.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/cmdline.c 2007-11-19 15:01:37.000000000 -0600 @@ -70,8 +70,35 @@ * program invocation. * 4. from a terminal. * 5. from a pipe, if stdin is a pipe rather than a terminal. + * + * But first, handle the interruption of an input file caused + * by a FATAL error in one of its commands. + * */ - if (pc->flags & RCHOME_IFILE) { + if (pc->ifile_in_progress) { + switch (pc->ifile_in_progress) + { + case RCHOME_IFILE: + pc->flags |= INIT_IFILE|RCHOME_IFILE; + sprintf(pc->command_line, "< %s/.%src", + pc->home, pc->program_name); + break; + case RCLOCAL_IFILE: + sprintf(pc->command_line, "< .%src", pc->program_name); + pc->flags |= INIT_IFILE|RCLOCAL_IFILE; + break; + case CMDLINE_IFILE: + sprintf(pc->command_line, "< %s", pc->input_file); + pc->flags |= INIT_IFILE|CMDLINE_IFILE; + break; + case RUNTIME_IFILE: + sprintf(pc->command_line, "%s", pc->runtime_ifile_cmd); + pc->flags |= IFILE_ERROR; + break; + default: + error(FATAL, "invalid input file\n"); + } + } else if (pc->flags & RCHOME_IFILE) { sprintf(pc->command_line, "< %s/.%src", pc->home, pc->program_name); pc->flags |= INIT_IFILE; @@ -279,6 +306,108 @@ } /* + * Pager arguments. + */ + +static char *less_argv[5] = { + "/usr/bin/less", + "-E", + "-X", + "-Ps -- MORE -- forward\\: , or j backward\\: b or k quit\\: q", + NULL +}; + +static char *more_argv[2] = { + "/bin/more", + NULL +}; + +static char **CRASHPAGER_argv = NULL; + +int +CRASHPAGER_valid(void) +{ + int i, c; + char *env, *CRASHPAGER_buf; + char *arglist[MAXARGS]; + + if (CRASHPAGER_argv) + return TRUE; + + if (!(env = getenv("CRASHPAGER"))) + return FALSE; + + if (strstr(env, "|") || strstr(env, "<") || strstr(env, ">")) { + error(INFO, + "CRASHPAGER ignored: contains invalid character: \"%s\"\n", + env); + return FALSE; + } + + if ((CRASHPAGER_buf = (char *)malloc(strlen(env)+1)) == NULL) + return FALSE; + + strcpy(CRASHPAGER_buf, env); + + if (!(c = parse_line(CRASHPAGER_buf, arglist)) || + !file_exists(arglist[0], NULL) || access(arglist[0], X_OK) || + !(CRASHPAGER_argv = (char **)malloc(sizeof(char *) * (c+1)))) { + free(CRASHPAGER_buf); + if (strlen(env)) + error(INFO, + "CRASHPAGER ignored: \"%s\"\n", env); + return FALSE; + } + + for (i = 0; i < c; i++) + CRASHPAGER_argv[i] = arglist[i]; + CRASHPAGER_argv[i] = NULL; + + return TRUE; +} + +/* + * Set up a command string buffer for error/help output. + */ +char * +setup_scroll_command(void) +{ + char *buf; + long i, len; + + if (!(pc->flags & SCROLL)) + return NULL; + + switch (pc->scroll_command) + { + case SCROLL_LESS: + buf = GETBUF(strlen(less_argv[0])+1); + strcpy(buf, less_argv[0]); + break; + case SCROLL_MORE: + buf = GETBUF(strlen(more_argv[0])+1); + strcpy(buf, more_argv[0]); + break; + case SCROLL_CRASHPAGER: + for (i = len = 0; CRASHPAGER_argv[i]; i++) + len += strlen(CRASHPAGER_argv[i])+1; + + buf = GETBUF(len); + + for (i = 0; CRASHPAGER_argv[i]; i++) { + sprintf(&buf[strlen(buf)], "%s%s", + i ? " " : "", + CRASHPAGER_argv[i]); + } + break; + default: + return NULL; + } + + return buf; +} + +/* * Parse the command line for pipe or redirect characters: * * 1. if a "|" character is found, popen() what comes after it, and @@ -418,6 +547,9 @@ return REDIRECT_FAILURE; } + if (pc->flags & IFILE_ERROR) + append = TRUE; + if ((ofile = fopen(p, append ? "a+" : "w+")) == NULL) { error(INFO, "unable to open %s\n", p); @@ -467,10 +599,13 @@ switch (pc->scroll_command) { case SCROLL_LESS: - strcpy(pc->pipe_command, "/usr/bin/less"); + strcpy(pc->pipe_command, less_argv[0]); break; case SCROLL_MORE: - strcpy(pc->pipe_command, "/bin/more"); + strcpy(pc->pipe_command, more_argv[0]); + break; + case SCROLL_CRASHPAGER: + strcpy(pc->pipe_command, CRASHPAGER_argv[0]); break; } @@ -842,13 +977,15 @@ restore_sanity(void) { int fd, waitstatus; + struct extension_table *ext; + struct command_table_entry *cp; if (pc->stdpipe) { close(fileno(pc->stdpipe)); pc->stdpipe = NULL; if (pc->stdpipe_pid && PID_ALIVE(pc->stdpipe_pid)) { while (!waitpid(pc->stdpipe_pid, &waitstatus, WNOHANG)) - ; + stall(1000); } pc->stdpipe_pid = 0; } @@ -858,12 +995,16 @@ console("wait for redirect %d->%d to finish...\n", pc->pipe_shell_pid, pc->pipe_pid); if (pc->pipe_pid) - while (PID_ALIVE(pc->pipe_pid)) + while (PID_ALIVE(pc->pipe_pid)) { waitpid(pc->pipe_pid, &waitstatus, WNOHANG); + stall(1000); + } if (pc->pipe_shell_pid) - while (PID_ALIVE(pc->pipe_shell_pid)) + while (PID_ALIVE(pc->pipe_shell_pid)) { waitpid(pc->pipe_shell_pid, &waitstatus, WNOHANG); + stall(1000); + } pc->pipe_pid = 0; } if (pc->ifile_pipe) { @@ -875,12 +1016,16 @@ (FROM_INPUT_FILE|REDIRECT_TO_PIPE|REDIRECT_PID_KNOWN))) { console("wait for redirect %d->%d to finish...\n", pc->pipe_shell_pid, pc->pipe_pid); - while (PID_ALIVE(pc->pipe_pid)) + while (PID_ALIVE(pc->pipe_pid)) { waitpid(pc->pipe_pid, &waitstatus, WNOHANG); + stall(1000); + } if (pc->pipe_shell_pid) - while (PID_ALIVE(pc->pipe_shell_pid)) + while (PID_ALIVE(pc->pipe_shell_pid)) { waitpid(pc->pipe_shell_pid, &waitstatus, WNOHANG); + stall(1000); + } if (pc->redirect & (REDIRECT_MULTI_PIPE)) wait_for_children(ALL_CHILDREN); } @@ -921,7 +1066,7 @@ wait_for_children(ZOMBIES_ONLY); - pc->flags &= ~(INIT_IFILE|RUNTIME_IFILE|_SIGINT_|PLEASE_WAIT); + pc->flags &= ~(INIT_IFILE|RUNTIME_IFILE|IFILE_ERROR|_SIGINT_|PLEASE_WAIT); pc->sigint_cnt = 0; pc->redirect = 0; pc->pipe_command[0] = NULLCHAR; @@ -952,6 +1097,16 @@ clear_vma_cache(); clear_active_set(); + /* + * Call the cleanup() function of any extension. + */ + for (ext = extension_table; ext; ext = ext->next) { + for (cp = ext->command_table; cp->name; cp++) { + if (cp->flags & CLEANUP) + (*cp->func)(); + } + } + if (CRASHDEBUG(4)) { dump_filesys_table(0); dump_vma_cache(0); @@ -971,6 +1126,8 @@ { int fd; + pc->flags &= ~IFILE_ERROR; + if (pc->ifile_pipe) { close(fileno(pc->ifile_pipe)); pc->ifile_pipe = NULL; @@ -1086,7 +1243,6 @@ } else this = 0; - if (pc->flags & RUNTIME_IFILE) { error(INFO, "embedded input files not allowed!\n"); return; @@ -1121,6 +1277,28 @@ pc->flags |= RUNTIME_IFILE; incoming_fp = fp; + /* + * Handle runtime commands that use input files. + */ + if ((pc->ifile_in_progress = this) == 0) { + if (!pc->runtime_ifile_cmd) { + if (!(pc->runtime_ifile_cmd = (char *)malloc(BUFSIZE))) { + error(INFO, + "cannot malloc input file command line buffer\n"); + return; + } + } + strcpy(pc->runtime_ifile_cmd, pc->orig_line); + pc->ifile_in_progress = RUNTIME_IFILE; + } + + /* + * If there's an offset, then there was a FATAL error caused + * by the last command executed from the input file. + */ + if (pc->ifile_offset) + fseek(pc->ifile, (long)pc->ifile_offset, SEEK_SET); + while (fgets(buf, BUFSIZE-1, pc->ifile)) { /* * Restore normal environment. @@ -1130,6 +1308,8 @@ BZERO(pc->command_line, BUFSIZE); BZERO(pc->orig_line, BUFSIZE); + pc->ifile_offset = ftell(pc->ifile); + if (STRNEQ(buf, "#") || STREQ(buf, "\n")) continue; @@ -1178,6 +1358,10 @@ fclose(pc->ifile); pc->ifile = NULL; pc->flags &= ~RUNTIME_IFILE; + pc->ifile_offset = 0; + if (pc->runtime_ifile_cmd) + BZERO(pc->runtime_ifile_cmd, BUFSIZE); + pc->ifile_in_progress = 0; } /* @@ -1844,19 +2028,6 @@ * Set up the standard output pipe using whichever was selected during init. */ -static char *less_argv[5] = { - "/usr/bin/less", - "-E", - "-X", - "-Ps -- MORE -- forward\\: , or j backward\\: b or k quit\\: q", - NULL -}; - -static char *more_argv[2] = { - "/bin/more", - NULL -}; - static int setup_stdpipe(void) { @@ -1892,6 +2063,9 @@ case SCROLL_MORE: strcpy(pc->pipe_command, more_argv[0]); break; + case SCROLL_CRASHPAGER: + strcpy(pc->pipe_command, CRASHPAGER_argv[0]); + break; } if (CRASHDEBUG(2)) @@ -1920,10 +2094,16 @@ path = more_argv[0]; execv(path, more_argv); break; + + case SCROLL_CRASHPAGER: + path = CRASHPAGER_argv[0]; + execv(path, CRASHPAGER_argv); + break; } - perror("child execv failed"); - return(clean_exit(1)); + perror(path); + fprintf(stderr, "execv of scroll command failed\n"); + exit(1); } } @@ -1954,5 +2134,6 @@ fprintf(fp, "wait_for_children: reaped %d\n", pid); break; } + stall(1000); } } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/configure.c /tmp/e3X06Fy51n/crash-4.0-4.9/configure.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/configure.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/configure.c 2007-11-19 15:01:37.000000000 -0600 @@ -1175,6 +1175,17 @@ printf("netdump, diskdump and kdump facilities from Red Hat Linux, the mcore kernel patch\n"); printf("offered by Mission Critical Linux, or the LKCD kernel patch.\n"); printf("\n"); + printf("%%package devel\n"); + printf("Requires: %%{name} = %%{version}\n"); + printf("Summary: crash utility for live systems; netdump, diskdump, kdump, LKCD or mcore dumpfiles\n"); + printf("Group: Development/Debuggers\n"); + printf("\n"); + printf("%%description devel\n"); + printf("The core analysis suite is a self-contained tool that can be used to\n"); + printf("investigate either live systems, kernel core dumps created from the\n"); + printf("netdump, diskdump and kdump packages from Red Hat Linux, the mcore kernel patch\n"); + printf("offered by Mission Critical Linux, or the LKCD kernel patch.\n"); + printf("\n"); printf("%%prep\n"); printf("%%setup -n %%{name}-%%{version}-%%{release}\n"); printf("# %%patch0 -p1 -b .install (patch example)\n"); @@ -1189,6 +1200,8 @@ printf("make DESTDIR=%%{buildroot} install\n"); printf("mkdir -p %%{buildroot}%%{_mandir}/man8\n"); printf("cp crash.8 %%{buildroot}%%{_mandir}/man8/crash.8\n"); + printf("mkdir -p %%{buildroot}%%{_includedir}/crash\n"); + printf("cp defs.h %%{buildroot}%%{_includedir}/crash\n"); printf("\n"); printf("%%clean\n"); printf("rm -rf %%{buildroot}\n"); @@ -1198,6 +1211,10 @@ printf("%%{_mandir}/man8/crash.8*\n"); /* printf("/usr/bin/crashd\n"); */ printf("%%doc README\n"); + printf("\n"); + printf("%%files devel\n"); + printf("%%defattr(-,root,root)\n"); + printf("%%{_includedir}/*\n"); } /* diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/crash.8 /tmp/e3X06Fy51n/crash-4.0-4.9/crash.8 --- /tmp/9GqrqL2m5z/crash-4.0-4.1/crash.8 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/crash.8 2007-11-19 15:01:37.000000000 -0600 @@ -5,7 +5,7 @@ .TH CRASH 8 .SH NAME crash \- Analyze Linux crash data or a live system -.SH SYNAPSIS +.SH SYNOPSIS .B crash [ .B -h @@ -42,9 +42,13 @@ is a tool for interactively analyzing the state of the Linux system while it is running, or after a kernel crash has occurred and a core dump has been created by the Red Hat -.I netdump -facility. It is loosely based on the SVR4 UNIX crash -command, but has been signficantly enhanced +.I netdump, +.I diskdump, +.I kdump, +or +.I xendump +facilities. It is loosely based on the SVR4 UNIX crash +command, but has been significantly enhanced by completely merging it with the .I gdb debugger. The marriage of the two effectively combines the @@ -207,15 +211,15 @@ .I dis disassembles memory, either entire kernel functions, from a location for a specified number of instructions, or from the start of a -fuction up to a specified memory location. +function up to a specified memory location. .TP .I eval evalues an expression or numeric type and displays the result -in hexidecimal, decimal, octal and binary. +in hexadecimal, decimal, octal and binary. .TP .I exit causes -.I crash +.B crash to exit. .TP .I extend @@ -230,7 +234,7 @@ in the system. .TP .I fuser -displays the tasks using the specifed file or socket. +displays the tasks using the specified file or socket. .TP .I gdb passes its argument to the underlying @@ -274,7 +278,7 @@ display various network related data. .TP .I p -passes its argumnts to the +passes its arguments to the .I gdb "print" command for evaluation and display. .TP @@ -361,11 +365,85 @@ .I wr modifies the contents of memory. When writing to memory on a live system, this command should obviously be used with great care. +.SH FILES +.TP +.I .crashrc +Initialization commands. The file can be located in the user's +.B HOME +directory and/or the current directory. Commands found in the +.I .crashrc +file in the +.B HOME +directory are executed before those in the current directory's +.I .crashrc +file. +.SH ENVIRONMENT +.TP +.B EDITOR +Command input is read using +.BR readline(3). +If +.B EDITOR +is set to +.I emacs +or +.I vi +then suitable keybindings are used. If +.B EDITOR +is not set, then +.I vi +is used. This can be overridden by +.B set vi +or +.B set emacs +commands located in a +.IR .crashrc +file, or by entering +.B -e emacs +on the +.B crash +command line. +.TP +.B CRASHPAGER +If +.B CRASHPAGER +is set, its value is used as the name of the program to which command output will be sent. +If not, then command output is sent to +.B /usr/bin/less -E -X +by default. +.SH NOTES +.PP +If +.B crash +does not work, look for a newer version: kernel evolution frequently makes +.B crash +updates necessary. +.PP +The command +.B set scroll off +will cause output to be sent directly to +the terminal rather than through a paging program. This is useful, +for example, if you are running +.B crash +in a window of +.BR emacs . .SH AUTHOR Dave Anderson wrote -.B Crash +.B crash .TP Jay Fenlason wrote this man page. .SH "SEE ALSO" -netdump(8) -gdb(1) +.PP +The +.I help +command within +.B crash +provides more complete and accurate documentation than this man page. +.PP +.I http://people.redhat.com/anderson +- the home page of the +.B crash +utility. +.PP +.BR netdump (8), +.BR gdb (1) diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/changelog /tmp/e3X06Fy51n/crash-4.0-4.9/debian/changelog --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/changelog 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/changelog 2007-11-20 19:29:52.000000000 -0600 @@ -1,3 +1,109 @@ +crash (4.0-4.9-1ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - LP: #164229 + - debian/patches/01_spu_commands.dpatch: + + SPU extension support + - debian/rules: + + Build SPU on powerpc + - 01_task_info_to_stack.dpatch: + + Applied upstream, removed. + - debian/control: + + Set Maintainer to Ubuntu MOTU Developers. + + Set XSBC-Original-Maintainer. + + -- Kenneth Drake Tue, 20 Nov 2007 21:57:10 +0000 + +crash (4.0-4.9-1) unstable; urgency=low + + * New upstream version 4.0-4.9 (see + http://people.redhat.com/anderson/crash.changelog) + - kmem -p fix for kernels using anonymous structure + - kmem -p fir for SPARSEMEM kernels + - mod command now looks in /lib/module//updates first + - SAIL fix for "operation on 'v1' may be undefined" + - Fix for 'crash -h [command] > outfile' failures + - LKCD compiler warning fixups + - kmem -s fix to display a non-fatal warning message + - LKCD ia64 get physical start from dump header + - s390[x] 4 level page table support + - LKCD do not abort() on phys mem zone error, use non-fatal warning + instead. + + -- Troy Heber Tue, 20 Nov 2007 09:33:25 -0700 + +crash (4.0-4.8-1) unstable; urgency=low + + * New upstream version 4.0-4.8 (see + http://people.redhat.com/anderson/crash.changelog) + - Add support for kernel with the SLUB allocator + - Pull backtrace registers on LKCD v8 and later LKCD dumps + - SAIL support for ia64, ppc, s390 and s390x + - Output the kernel ring buffer in the proper order + + -- Troy Heber Tue, 30 Oct 2007 12:49:08 -0600 + +crash (4.0-4.7-1) unstable; urgency=low + + * New upstream version 4.0-4.7 (see + http://people.redhat.com/anderson/crash.changelog) + - Add SAIL (Simple Image Access Language) interpreter + - Removed hardwired-dependencies in the top-level and extensions + directories + - Enhance the "kmem Tue, 09 Oct 2007 13:30:44 -0600 + +crash (4.0-4.6-1) unstable; urgency=low + + * New upstream version 4.0-4.6 (see + http://people.redhat.com/anderson/crash.changelog) + - support "runq" on 2.6.20 and > kernles + - inital support for LKCD kerntypes created by dwarfextract + - "xencrash" update to handle dom0 kdumps. + + -- Troy Heber Mon, 27 Aug 2007 13:25:57 -0600 + +crash (4.0-4.5-1) unstable; urgency=low + + * New upstream version 4.0-4.5 (see + http://people.redhat.com/anderson/crash.changelog) + - support for PHYSICAL_START / relocation mismatch + - 2.6.22 slub support + - lkcd kerntypes support + - CFS scheduler support + + -- Troy Heber Tue, 21 Aug 2007 08:27:22 -0600 + +crash (4.0-4.3-1) unstable; urgency=low + + * New upstream version 4.0-4.3 (see + http://people.redhat.com/anderson/crash.changelog) + - fixed "keme -f" command on DISCONTIGMEM kernels + - Fixed segmentation violation when using the wrong vmlinux + + * New upstream version 4.0-4.2 (see + http://people.redhat.com/anderson/crash.changelog) + - Added support for 2.6.22 kernels + - account for case when number of pgdata nodes < nr_cpus + - implement support for ia64 dom0/HV kdump dumpfile support + - add --no_panic command line option to skip panic-task search + - new "ps -r" command + - implement CLEANUP extenson commands for "help -e" + - implement new symbol_value_module() lookup for extensions + + -- Troy Heber Tue, 17 Jul 2007 12:40:37 -0600 + crash (4.0-4.1-2ubuntu2) gutsy; urgency=low * debian/rules(clean): Don't remove gdb-6.1. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/control /tmp/e3X06Fy51n/crash-4.0-4.9/debian/control --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/control 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/control 2007-11-20 19:29:52.000000000 -0600 @@ -1,7 +1,8 @@ Source: crash Section: utils Priority: optional -Maintainer: Troy Heber +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Troy Heber Uploaders: Build-Depends: debhelper (>= 4), binutils-dev, zlib1g-dev, libncurses5-dev, dpatch Standards-Version: 3.7.2.2 diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/dwarf2read.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/dwarf2read.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/dwarf2read.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/dwarf2read.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,8077 @@ +/* DWARF 2 debugging format support for GDB. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, + Inc. with support from Florida State University (under contract + with the Ada Joint Program Office), and Silicon Graphics, Inc. + Initial contribution by Brent Benson, Harris Computer Systems, Inc., + based on Fred Fish's (Cygnus Support) implementation of DWARF 1 + support in dwarfread.c + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "objfiles.h" +#include "elf/dwarf2.h" +#include "buildsym.h" +#include "demangle.h" +#include "expression.h" +#include "filenames.h" /* for DOSish file names */ +#include "macrotab.h" +#include "language.h" +#include "complaints.h" +#include "bcache.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" +#include "cp-support.h" + +#include +#include "gdb_string.h" +#include "gdb_assert.h" +#include + +#ifndef DWARF2_REG_TO_REGNUM +#define DWARF2_REG_TO_REGNUM(REG) (REG) +#endif + +#if 0 +/* .debug_info header for a compilation unit + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct comp_unit_header + { + unsigned int length; /* length of the .debug_info + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int abbrev_offset; /* offset into .debug_abbrev section */ + unsigned char addr_size; /* byte size of an address -- 4 */ + } +_COMP_UNIT_HEADER; +#define _ACTUAL_COMP_UNIT_HEADER_SIZE 11 +#endif + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct pubnames_header + { + unsigned int length; /* length of the .debug_pubnames + contribution */ + unsigned char version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned int info_size; /* byte size of .debug_info section + portion */ + } +_PUBNAMES_HEADER; +#define _ACTUAL_PUBNAMES_HEADER_SIZE 13 + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct aranges_header + { + unsigned int length; /* byte len of the .debug_aranges + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned char addr_size; /* byte size of an address */ + unsigned char seg_size; /* byte size of segment descriptor */ + } +_ARANGES_HEADER; +#define _ACTUAL_ARANGES_HEADER_SIZE 12 + +/* .debug_line statement program prologue + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct statement_prologue + { + unsigned int total_length; /* byte length of the statement + information */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int prologue_length; /* # bytes between prologue & + stmt program */ + unsigned char minimum_instruction_length; /* byte size of + smallest instr */ + unsigned char default_is_stmt; /* initial value of is_stmt + register */ + char line_base; + unsigned char line_range; + unsigned char opcode_base; /* number assigned to first special + opcode */ + unsigned char *standard_opcode_lengths; + } +_STATEMENT_PROLOGUE; + +/* offsets and sizes of debugging sections */ + +static unsigned int dwarf_info_size; +static unsigned int dwarf_abbrev_size; +static unsigned int dwarf_line_size; +static unsigned int dwarf_pubnames_size; +static unsigned int dwarf_aranges_size; +static unsigned int dwarf_loc_size; +static unsigned int dwarf_macinfo_size; +static unsigned int dwarf_str_size; +static unsigned int dwarf_ranges_size; +unsigned int dwarf_frame_size; +unsigned int dwarf_eh_frame_size; + +static asection *dwarf_info_section; +static asection *dwarf_abbrev_section; +static asection *dwarf_line_section; +static asection *dwarf_pubnames_section; +static asection *dwarf_aranges_section; +static asection *dwarf_loc_section; +static asection *dwarf_macinfo_section; +static asection *dwarf_str_section; +static asection *dwarf_ranges_section; +asection *dwarf_frame_section; +asection *dwarf_eh_frame_section; + +/* names of the debugging sections */ + +#define INFO_SECTION ".debug_info" +#define ABBREV_SECTION ".debug_abbrev" +#define LINE_SECTION ".debug_line" +#define PUBNAMES_SECTION ".debug_pubnames" +#define ARANGES_SECTION ".debug_aranges" +#define LOC_SECTION ".debug_loc" +#define MACINFO_SECTION ".debug_macinfo" +#define STR_SECTION ".debug_str" +#define RANGES_SECTION ".debug_ranges" +#define FRAME_SECTION ".debug_frame" +#define EH_FRAME_SECTION ".eh_frame" + +/* local data types */ + +/* We hold several abbreviation tables in memory at the same time. */ +#ifndef ABBREV_HASH_SIZE +#define ABBREV_HASH_SIZE 121 +#endif + +/* The data in a compilation unit header, after target2host + translation, looks like this. */ +struct comp_unit_head + { + unsigned long length; + short version; + unsigned int abbrev_offset; + unsigned char addr_size; + unsigned char signed_addr_p; + unsigned int offset_size; /* size of file offsets; either 4 or 8 */ + unsigned int initial_length_size; /* size of the length field; either + 4 or 12 */ + + /* Offset to the first byte of this compilation unit header in the + * .debug_info section, for resolving relative reference dies. */ + + unsigned int offset; + + /* Pointer to this compilation unit header in the .debug_info + * section */ + + char *cu_head_ptr; + + /* Pointer to the first die of this compilatio unit. This will + * be the first byte following the compilation unit header. */ + + char *first_die_ptr; + + /* Pointer to the next compilation unit header in the program. */ + + struct comp_unit_head *next; + + /* DWARF abbreviation table associated with this compilation unit */ + + struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE]; + + /* Base address of this compilation unit. */ + + CORE_ADDR base_address; + + /* Non-zero if base_address has been set. */ + + int base_known; + }; + +/* Internal state when decoding a particular compilation unit. */ +struct dwarf2_cu +{ + /* The objfile containing this compilation unit. */ + struct objfile *objfile; + + /* The header of the compilation unit. + + FIXME drow/2003-11-10: Some of the things from the comp_unit_head + should be moved to the dwarf2_cu structure; for instance the abbrevs + hash table. */ + struct comp_unit_head header; + + struct function_range *first_fn, *last_fn, *cached_fn; + + /* The language we are debugging. */ + enum language language; + const struct language_defn *language_defn; + + /* The generic symbol table building routines have separate lists for + file scope symbols and all all other scopes (local scopes). So + we need to select the right one to pass to add_symbol_to_list(). + We do it by keeping a pointer to the correct list in list_in_scope. + + FIXME: The original dwarf code just treated the file scope as the + first local scope, and all other local scopes as nested local + scopes, and worked fine. Check to see if we really need to + distinguish these in buildsym.c. */ + struct pending **list_in_scope; + + /* Maintain an array of referenced fundamental types for the current + compilation unit being read. For DWARF version 1, we have to construct + the fundamental types on the fly, since no information about the + fundamental types is supplied. Each such fundamental type is created by + calling a language dependent routine to create the type, and then a + pointer to that type is then placed in the array at the index specified + by it's FT_ value. The array has a fixed size set by the + FT_NUM_MEMBERS compile time constant, which is the number of predefined + fundamental types gdb knows how to construct. */ + struct type *ftypes[FT_NUM_MEMBERS]; /* Fundamental types */ +}; + +/* The line number information for a compilation unit (found in the + .debug_line section) begins with a "statement program header", + which contains the following information. */ +struct line_header +{ + unsigned int total_length; + unsigned short version; + unsigned int header_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + + /* standard_opcode_lengths[i] is the number of operands for the + standard opcode whose value is i. This means that + standard_opcode_lengths[0] is unused, and the last meaningful + element is standard_opcode_lengths[opcode_base - 1]. */ + unsigned char *standard_opcode_lengths; + + /* The include_directories table. NOTE! These strings are not + allocated with xmalloc; instead, they are pointers into + debug_line_buffer. If you try to free them, `free' will get + indigestion. */ + unsigned int num_include_dirs, include_dirs_size; + char **include_dirs; + + /* The file_names table. NOTE! These strings are not allocated + with xmalloc; instead, they are pointers into debug_line_buffer. + Don't try to free them directly. */ + unsigned int num_file_names, file_names_size; + struct file_entry + { + char *name; + unsigned int dir_index; + unsigned int mod_time; + unsigned int length; + } *file_names; + + /* The start and end of the statement program following this + header. These point into dwarf_line_buffer. */ + char *statement_program_start, *statement_program_end; +}; + +/* When we construct a partial symbol table entry we only + need this much information. */ +struct partial_die_info + { + enum dwarf_tag tag; + unsigned char has_children; + unsigned char is_external; + unsigned char is_declaration; + unsigned char has_type; + unsigned int offset; + unsigned int abbrev; + char *name; + int has_pc_info; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct dwarf_block *locdesc; + unsigned int language; + char *sibling; + }; + +/* This data structure holds the information of an abbrev. */ +struct abbrev_info + { + unsigned int number; /* number identifying abbrev */ + enum dwarf_tag tag; /* dwarf tag */ + int has_children; /* boolean */ + unsigned int num_attrs; /* number of attributes */ + struct attr_abbrev *attrs; /* an array of attribute descriptions */ + struct abbrev_info *next; /* next in chain */ + }; + +struct attr_abbrev + { + enum dwarf_attribute name; + enum dwarf_form form; + }; + +/* This data structure holds a complete die structure. */ +struct die_info + { + enum dwarf_tag tag; /* Tag indicating type of die */ + unsigned int abbrev; /* Abbrev number */ + unsigned int offset; /* Offset in .debug_info section */ + unsigned int num_attrs; /* Number of attributes */ + struct attribute *attrs; /* An array of attributes */ + struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ + struct die_info *child; /* Its first child, if any. */ + struct die_info *sibling; /* Its next sibling, if any. */ + struct die_info *parent; /* Its parent, if any. */ + + struct type *type; /* Cached type information */ + }; + +/* Attributes have a name and a value */ +struct attribute + { + enum dwarf_attribute name; + enum dwarf_form form; + union + { + char *str; + struct dwarf_block *blk; + unsigned long unsnd; + long int snd; + CORE_ADDR addr; + } + u; + }; + +struct function_range +{ + const char *name; + CORE_ADDR lowpc, highpc; + int seen_line; + struct function_range *next; +}; + +/* Get at parts of an attribute structure */ + +#define DW_STRING(attr) ((attr)->u.str) +#define DW_UNSND(attr) ((attr)->u.unsnd) +#define DW_BLOCK(attr) ((attr)->u.blk) +#define DW_SND(attr) ((attr)->u.snd) +#define DW_ADDR(attr) ((attr)->u.addr) + +/* Blocks are a bunch of untyped bytes. */ +struct dwarf_block + { + unsigned int size; + char *data; + }; + +#ifndef ATTR_ALLOC_CHUNK +#define ATTR_ALLOC_CHUNK 4 +#endif + +/* A hash table of die offsets for following references. */ +#ifndef REF_HASH_SIZE +#define REF_HASH_SIZE 1021 +#endif + +static struct die_info *die_ref_table[REF_HASH_SIZE]; + +/* Obstack for allocating temporary storage used during symbol reading. */ +static struct obstack dwarf2_tmp_obstack; + +/* Allocate fields for structs, unions and enums in this size. */ +#ifndef DW_FIELD_ALLOC_CHUNK +#define DW_FIELD_ALLOC_CHUNK 4 +#endif + +/* Actually data from the sections. */ +static char *dwarf_info_buffer; +static char *dwarf_abbrev_buffer; +static char *dwarf_line_buffer; +static char *dwarf_str_buffer; +static char *dwarf_macinfo_buffer; +static char *dwarf_ranges_buffer; +static char *dwarf_loc_buffer; + +/* A zeroed version of a partial die for initialization purposes. */ +static struct partial_die_info zeroed_partial_die; + +/* FIXME: decode_locdesc sets these variables to describe the location + to the caller. These ought to be a structure or something. If + none of the flags are set, the object lives at the address returned + by decode_locdesc. */ + +static int isreg; /* Object lives in register. + decode_locdesc's return value is + the register number. */ + +/* We put a pointer to this structure in the read_symtab_private field + of the psymtab. + The complete dwarf information for an objfile is kept in the + objfile_obstack, so that absolute die references can be handled. + Most of the information in this structure is related to an entire + object file and could be passed via the sym_private field of the objfile. + It is however conceivable that dwarf2 might not be the only type + of symbols read from an object file. */ + +struct dwarf2_pinfo + { + /* Pointer to start of dwarf info buffer for the objfile. */ + + char *dwarf_info_buffer; + + /* Offset in dwarf_info_buffer for this compilation unit. */ + + unsigned long dwarf_info_offset; + + /* Pointer to start of dwarf abbreviation buffer for the objfile. */ + + char *dwarf_abbrev_buffer; + + /* Size of dwarf abbreviation section for the objfile. */ + + unsigned int dwarf_abbrev_size; + + /* Pointer to start of dwarf line buffer for the objfile. */ + + char *dwarf_line_buffer; + + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + + /* Pointer to start of dwarf string buffer for the objfile. */ + + char *dwarf_str_buffer; + + /* Size of dwarf string section for the objfile. */ + + unsigned int dwarf_str_size; + + /* Pointer to start of dwarf macro buffer for the objfile. */ + + char *dwarf_macinfo_buffer; + + /* Size of dwarf macinfo section for the objfile. */ + + unsigned int dwarf_macinfo_size; + + /* Pointer to start of dwarf ranges buffer for the objfile. */ + + char *dwarf_ranges_buffer; + + /* Size of dwarf ranges buffer for the objfile. */ + + unsigned int dwarf_ranges_size; + + /* Pointer to start of dwarf locations buffer for the objfile. */ + + char *dwarf_loc_buffer; + + /* Size of dwarf locations buffer for the objfile. */ + + unsigned int dwarf_loc_size; + }; + +#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private) +#define DWARF_INFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_info_buffer) +#define DWARF_INFO_OFFSET(p) (PST_PRIVATE(p)->dwarf_info_offset) +#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) +#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) +#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) +#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) +#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) +#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer) +#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size) +#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer) +#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size) +#define DWARF_LOC_BUFFER(p) (PST_PRIVATE(p)->dwarf_loc_buffer) +#define DWARF_LOC_SIZE(p) (PST_PRIVATE(p)->dwarf_loc_size) + +/* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, + but this would require a corresponding change in unpack_field_as_long + and friends. */ +static int bits_per_byte = 8; + +/* The routines that read and process dies for a C struct or C++ class + pass lists of data member fields and lists of member function fields + in an instance of a field_info structure, as defined below. */ +struct field_info + { + /* List of data member and baseclasses fields. */ + struct nextfield + { + struct nextfield *next; + int accessibility; + int virtuality; + struct field field; + } + *fields; + + /* Number of fields. */ + int nfields; + + /* Number of baseclasses. */ + int nbaseclasses; + + /* Set if the accesibility of one of the fields is not public. */ + int non_public_fields; + + /* Member function fields array, entries are allocated in the order they + are encountered in the object file. */ + struct nextfnfield + { + struct nextfnfield *next; + struct fn_field fnfield; + } + *fnfields; + + /* Member function fieldlist array, contains name of possibly overloaded + member function, number of overloaded member functions and a pointer + to the head of the member function field chain. */ + struct fnfieldlist + { + char *name; + int length; + struct nextfnfield *head; + } + *fnfieldlists; + + /* Number of entries in the fnfieldlists array. */ + int nfnfields; + }; + +/* Various complaints about symbol reading that don't abort the process */ + +static void +dwarf2_statement_list_fits_in_line_number_section_complaint (void) +{ + complaint (&symfile_complaints, + "statement list doesn't fit in .debug_line section"); +} + +static void +dwarf2_complex_location_expr_complaint (void) +{ + complaint (&symfile_complaints, "location expression too complex"); +} + +static void +dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, + int arg3) +{ + complaint (&symfile_complaints, + "const value length mismatch for '%s', got %d, expected %d", arg1, + arg2, arg3); +} + +static void +dwarf2_macros_too_long_complaint (void) +{ + complaint (&symfile_complaints, + "macro info runs off end of `.debug_macinfo' section"); +} + +static void +dwarf2_macro_malformed_definition_complaint (const char *arg1) +{ + complaint (&symfile_complaints, + "macro debug info contains a malformed macro definition:\n`%s'", + arg1); +} + +static void +dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2) +{ + complaint (&symfile_complaints, + "invalid attribute class or form for '%s' in '%s'", arg1, arg2); +} + +/* local function prototypes */ + +static void dwarf2_locate_sections (bfd *, asection *, void *); + +#if 0 +static void dwarf2_build_psymtabs_easy (struct objfile *, int); +#endif + +static void dwarf2_build_psymtabs_hard (struct objfile *, int); + +static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *, + const char *namespace); + +static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *, + const char *namespace); + +static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace); + +static char *add_partial_namespace (struct partial_die_info *pdi, + char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_structure (struct partial_die_info *struct_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_enumeration (struct partial_die_info *enum_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *locate_pdi_sibling (struct partial_die_info *orig_pdi, + char *info_ptr, + bfd *abfd, + struct dwarf2_cu *cu); + +static void dwarf2_psymtab_to_symtab (struct partial_symtab *); + +static void psymtab_to_symtab_1 (struct partial_symtab *); + +char *dwarf2_read_section (struct objfile *, asection *); + +static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu); + +static void dwarf2_empty_abbrev_table (void *); + +static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int, + struct dwarf2_cu *); + +static char *read_partial_die (struct partial_die_info *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_full_die (struct die_info **, bfd *, char *, + struct dwarf2_cu *, int *); + +static char *read_attribute (struct attribute *, struct attr_abbrev *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_attribute_value (struct attribute *, unsigned, + bfd *, char *, struct dwarf2_cu *); + +static unsigned int read_1_byte (bfd *, char *); + +static int read_1_signed_byte (bfd *, char *); + +static unsigned int read_2_bytes (bfd *, char *); + +static unsigned int read_4_bytes (bfd *, char *); + +static unsigned long read_8_bytes (bfd *, char *); + +static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *, + int *bytes_read); + +static LONGEST read_initial_length (bfd *, char *, + struct comp_unit_head *, int *bytes_read); + +static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *, + int *bytes_read); + +static char *read_n_bytes (bfd *, char *, unsigned int); + +static char *read_string (bfd *, char *, unsigned int *); + +static char *read_indirect_string (bfd *, char *, const struct comp_unit_head *, + unsigned int *); + +static unsigned long read_unsigned_leb128 (bfd *, char *, unsigned int *); + +static long read_signed_leb128 (bfd *, char *, unsigned int *); + +static void set_cu_language (unsigned int, struct dwarf2_cu *); + +static struct attribute *dwarf2_attr (struct die_info *, unsigned int, + struct dwarf2_cu *); + +static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); + +static struct die_info *die_specification (struct die_info *die, + struct dwarf2_cu *); + +static void free_line_header (struct line_header *lh); + +static struct line_header *(dwarf_decode_line_header + (unsigned int offset, + bfd *abfd, struct dwarf2_cu *cu)); + +static void dwarf_decode_lines (struct line_header *, char *, bfd *, + struct dwarf2_cu *); + +static void dwarf2_start_subfile (char *, char *); + +static struct symbol *new_symbol (struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_const_value (struct attribute *, struct symbol *, + struct dwarf2_cu *); + +static void dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits); + +static struct type *die_type (struct die_info *, struct dwarf2_cu *); + +static struct type *die_containing_type (struct die_info *, + struct dwarf2_cu *); + +#if 0 +static struct type *type_at_offset (unsigned int, struct objfile *); +#endif + +static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *); + +static void read_type_die (struct die_info *, struct dwarf2_cu *); + +static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); + +static char *typename_concat (const char *prefix, const char *suffix); + +static void read_typedef (struct die_info *, struct dwarf2_cu *); + +static void read_base_type (struct die_info *, struct dwarf2_cu *); + +static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu); + +static void read_file_scope (struct die_info *, struct dwarf2_cu *); + +static void read_func_scope (struct die_info *, struct dwarf2_cu *); + +static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *); + +static int dwarf2_get_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *); + +static void get_scope_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *); + +static void dwarf2_add_field (struct field_info *, struct die_info *, + struct dwarf2_cu *); + +static void dwarf2_attach_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void dwarf2_add_member_fn (struct field_info *, + struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_attach_fn_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); + +static void read_common_block (struct die_info *, struct dwarf2_cu *); + +static void read_namespace (struct die_info *die, struct dwarf2_cu *); + +static const char *namespace_name (struct die_info *die, + int *is_anonymous, struct dwarf2_cu *); + +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); + +static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); + +static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *); + +static void read_array_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_ptr_to_member_type (struct die_info *, + struct dwarf2_cu *); + +static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_const_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_string_type (struct die_info *, struct dwarf2_cu *); + +static void read_subroutine_type (struct die_info *, struct dwarf2_cu *); + +static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *); + +static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static void free_die_list (struct die_info *); + +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + +static void process_die (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_linkage_name (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_name (struct die_info *die, struct dwarf2_cu *); + +static struct die_info *dwarf2_extension (struct die_info *die, + struct dwarf2_cu *); + +static char *dwarf_tag_name (unsigned int); + +static char *dwarf_attr_name (unsigned int); + +static char *dwarf_form_name (unsigned int); + +static char *dwarf_stack_op_name (unsigned int); + +static char *dwarf_bool_name (unsigned int); + +static char *dwarf_type_encoding_name (unsigned int); + +#if 0 +static char *dwarf_cfi_name (unsigned int); + +struct die_info *copy_die (struct die_info *); +#endif + +static struct die_info *sibling_die (struct die_info *); + +static void dump_die (struct die_info *); + +static void dump_die_list (struct die_info *); + +static void store_in_ref_table (unsigned int, struct die_info *); + +static void dwarf2_empty_hash_tables (void); + +static unsigned int dwarf2_get_ref_die_offset (struct attribute *, + struct dwarf2_cu *); + +static int dwarf2_get_attr_constant_value (struct attribute *, int); + +static struct die_info *follow_die_ref (unsigned int); + +static struct type *dwarf2_fundamental_type (struct objfile *, int, + struct dwarf2_cu *); + +/* memory allocation interface */ + +static void dwarf2_free_tmp_obstack (void *); + +static struct dwarf_block *dwarf_alloc_block (void); + +static struct abbrev_info *dwarf_alloc_abbrev (void); + +static struct die_info *dwarf_alloc_die (void); + +static void initialize_cu_func_list (struct dwarf2_cu *); + +static void add_to_cu_func_list (const char *, CORE_ADDR, CORE_ADDR, + struct dwarf2_cu *); + +static void dwarf_decode_macros (struct line_header *, unsigned int, + char *, bfd *, struct dwarf2_cu *); + +static int attr_form_is_block (struct attribute *); + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu); + +/* Try to locate the sections we need for DWARF 2 debugging + information and return true if we have enough to do something. */ + +int +dwarf2_has_info (bfd *abfd) +{ + dwarf_info_section = 0; + dwarf_abbrev_section = 0; + dwarf_line_section = 0; + dwarf_str_section = 0; + dwarf_macinfo_section = 0; + dwarf_frame_section = 0; + dwarf_eh_frame_section = 0; + dwarf_ranges_section = 0; + dwarf_loc_section = 0; + + bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); + return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL); +} + +/* This function is mapped across the sections and remembers the + offset and size of each of the debugging sections we are interested + in. */ + +static void +dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) +{ + if (strcmp (sectp->name, INFO_SECTION) == 0) + { + dwarf_info_size = bfd_get_section_size_before_reloc (sectp); + dwarf_info_section = sectp; + } + else if (strcmp (sectp->name, ABBREV_SECTION) == 0) + { + dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp); + dwarf_abbrev_section = sectp; + } + else if (strcmp (sectp->name, LINE_SECTION) == 0) + { + dwarf_line_size = bfd_get_section_size_before_reloc (sectp); + dwarf_line_section = sectp; + } + else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0) + { + dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp); + dwarf_pubnames_section = sectp; + } + else if (strcmp (sectp->name, ARANGES_SECTION) == 0) + { + dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_aranges_section = sectp; + } + else if (strcmp (sectp->name, LOC_SECTION) == 0) + { + dwarf_loc_size = bfd_get_section_size_before_reloc (sectp); + dwarf_loc_section = sectp; + } + else if (strcmp (sectp->name, MACINFO_SECTION) == 0) + { + dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp); + dwarf_macinfo_section = sectp; + } + else if (strcmp (sectp->name, STR_SECTION) == 0) + { + dwarf_str_size = bfd_get_section_size_before_reloc (sectp); + dwarf_str_section = sectp; + } + else if (strcmp (sectp->name, FRAME_SECTION) == 0) + { + dwarf_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_frame_section = sectp; + } + else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0) + { + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } + } + else if (strcmp (sectp->name, RANGES_SECTION) == 0) + { + dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_ranges_section = sectp; + } +} + +/* Build a partial symbol table. */ + +void +dwarf2_build_psymtabs (struct objfile *objfile, int mainline) +{ + + /* We definitely need the .debug_info and .debug_abbrev sections */ + + dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section); + dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section); + + if (dwarf_line_section) + dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section); + else + dwarf_line_buffer = NULL; + + if (dwarf_str_section) + dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section); + else + dwarf_str_buffer = NULL; + + if (dwarf_macinfo_section) + dwarf_macinfo_buffer = dwarf2_read_section (objfile, + dwarf_macinfo_section); + else + dwarf_macinfo_buffer = NULL; + + if (dwarf_ranges_section) + dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section); + else + dwarf_ranges_buffer = NULL; + + if (dwarf_loc_section) + dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section); + else + dwarf_loc_buffer = NULL; + + if (mainline + || (objfile->global_psymbols.size == 0 + && objfile->static_psymbols.size == 0)) + { + init_psymbol_list (objfile, 1024); + } + +#if 0 + if (dwarf_aranges_offset && dwarf_pubnames_offset) + { + /* Things are significantly easier if we have .debug_aranges and + .debug_pubnames sections */ + + dwarf2_build_psymtabs_easy (objfile, mainline); + } + else +#endif + /* only test this case for now */ + { + /* In this case we have to work a bit harder */ + dwarf2_build_psymtabs_hard (objfile, mainline); + } +} + +#if 0 +/* Build the partial symbol table from the information in the + .debug_pubnames and .debug_aranges sections. */ + +static void +dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + char *aranges_buffer, *pubnames_buffer; + char *aranges_ptr, *pubnames_ptr; + unsigned int entry_length, version, info_offset, info_size; + + pubnames_buffer = dwarf2_read_section (objfile, + dwarf_pubnames_section); + pubnames_ptr = pubnames_buffer; + while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size) + { + struct comp_unit_head cu_header; + int bytes_read; + + entry_length = read_initial_length (abfd, pubnames_ptr, &cu_header, + &bytes_read); + pubnames_ptr += bytes_read; + version = read_1_byte (abfd, pubnames_ptr); + pubnames_ptr += 1; + info_offset = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + info_size = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + } + + aranges_buffer = dwarf2_read_section (objfile, + dwarf_aranges_section); + +} +#endif + +/* Read in the comp unit header information from the debug_info at + info_ptr. */ + +static char * +read_comp_unit_head (struct comp_unit_head *cu_header, + char *info_ptr, bfd *abfd) +{ + int signed_addr; + int bytes_read; + cu_header->length = read_initial_length (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->version = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + cu_header->abbrev_offset = read_offset (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->addr_size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + signed_addr = bfd_get_sign_extend_vma (abfd); + if (signed_addr < 0) + internal_error (__FILE__, __LINE__, + "read_comp_unit_head: dwarf from non elf file"); + cu_header->signed_addr_p = signed_addr; + return info_ptr; +} + +/* Build the partial symbol table by doing a quick pass through the + .debug_info and .debug_abbrev sections. */ + +static void +dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) +{ + /* Instead of reading this into a big buffer, we should probably use + mmap() on architectures that support it. (FIXME) */ + bfd *abfd = objfile->obfd; + char *info_ptr, *abbrev_ptr; + char *beg_of_comp_unit; + struct partial_die_info comp_unit_die; + struct partial_symtab *pst; + struct cleanup *back_to; + CORE_ADDR lowpc, highpc, baseaddr; + + info_ptr = dwarf_info_buffer; + abbrev_ptr = dwarf_abbrev_buffer; + + /* We use dwarf2_tmp_obstack for objects that don't need to survive + the partial symbol scan, like attribute values. + + We could reduce our peak memory consumption during partial symbol + table construction by freeing stuff from this obstack more often + --- say, after processing each compilation unit, or each die --- + but it turns out that this saves almost nothing. For an + executable with 11Mb of Dwarf 2 data, I found about 64k allocated + on dwarf2_tmp_obstack. Some investigation showed: + + 1) 69% of the attributes used forms DW_FORM_addr, DW_FORM_data*, + DW_FORM_flag, DW_FORM_[su]data, and DW_FORM_ref*. These are + all fixed-length values not requiring dynamic allocation. + + 2) 30% of the attributes used the form DW_FORM_string. For + DW_FORM_string, read_attribute simply hands back a pointer to + the null-terminated string in dwarf_info_buffer, so no dynamic + allocation is needed there either. + + 3) The remaining 1% of the attributes all used DW_FORM_block1. + 75% of those were DW_AT_frame_base location lists for + functions; the rest were DW_AT_location attributes, probably + for the global variables. + + Anyway, what this all means is that the memory the dwarf2 + reader uses as temporary space reading partial symbols is about + 0.5% as much as we use for dwarf_*_buffer. That's noise. */ + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ + while (info_ptr < dwarf_info_buffer + dwarf_info_size) + { + struct dwarf2_cu cu; + beg_of_comp_unit = info_ptr; + + cu.objfile = objfile; + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + if (cu.header.version != 2) + { + error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd)); + return; + } + if (cu.header.abbrev_offset >= dwarf_abbrev_size) + { + error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]", + (long) cu.header.abbrev_offset, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size + > dwarf_info_buffer + dwarf_info_size) + { + error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]", + (long) cu.header.length, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + /* Complete the cu_header */ + cu.header.offset = beg_of_comp_unit - dwarf_info_buffer; + cu.header.first_die_ptr = info_ptr; + cu.header.cu_head_ptr = beg_of_comp_unit; + + cu.list_in_scope = &file_symbols; + + /* Read the abbrevs for this compilation unit into a table */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + /* Read the compilation unit die */ + info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr, + &cu); + + /* Set the language we're debugging */ + set_cu_language (comp_unit_die.language, &cu); + + /* Allocate a new partial symbol table structure */ + pst = start_psymtab_common (objfile, objfile->section_offsets, + comp_unit_die.name ? comp_unit_die.name : "", + comp_unit_die.lowpc, + objfile->global_psymbols.next, + objfile->static_psymbols.next); + + pst->read_symtab_private = (char *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo)); + DWARF_INFO_BUFFER (pst) = dwarf_info_buffer; + DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf_info_buffer; + DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; + DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; + DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; + DWARF_STR_BUFFER (pst) = dwarf_str_buffer; + DWARF_STR_SIZE (pst) = dwarf_str_size; + DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer; + DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size; + DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer; + DWARF_RANGES_SIZE (pst) = dwarf_ranges_size; + DWARF_LOC_BUFFER (pst) = dwarf_loc_buffer; + DWARF_LOC_SIZE (pst) = dwarf_loc_size; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Store the function that reads in the rest of the symbol table */ + pst->read_symtab = dwarf2_psymtab_to_symtab; + + /* Check if comp unit has_children. + If so, read the rest of the partial symbols from this comp unit. + If not, there's no more debug_info for this comp unit. */ + if (comp_unit_die.has_children) + { + lowpc = ((CORE_ADDR) -1); + highpc = ((CORE_ADDR) 0); + + info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc, + &cu, NULL); + + /* If we didn't find a lowpc, set it to highpc to avoid + complaints from `maint check'. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + + /* If the compilation unit didn't have an explicit address range, + then use the information extracted from its child dies. */ + if (! comp_unit_die.has_pc_info) + { + comp_unit_die.lowpc = lowpc; + comp_unit_die.highpc = highpc; + } + } + pst->textlow = comp_unit_die.lowpc + baseaddr; + pst->texthigh = comp_unit_die.highpc + baseaddr; + + pst->n_global_syms = objfile->global_psymbols.next - + (objfile->global_psymbols.list + pst->globals_offset); + pst->n_static_syms = objfile->static_psymbols.next - + (objfile->static_psymbols.list + pst->statics_offset); + sort_pst_symbols (pst); + + /* If there is already a psymtab or symtab for a file of this + name, remove it. (If there is a symtab, more drastic things + also happen.) This happens in VxWorks. */ + free_named_symtabs (pst->filename); + + info_ptr = beg_of_comp_unit + cu.header.length + + cu.header.initial_length_size; + } + do_cleanups (back_to); +} + +/* Read in all interesting dies to the end of the compilation unit or + to the end of the current namespace. NAMESPACE is NULL if we + haven't yet encountered any DW_TAG_namespace entries; otherwise, + it's the name of the current namespace. In particular, it's the + empty string if we're currently in the global namespace but have + previously encountered a DW_TAG_namespace. */ + +static char * +scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu, + const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + /* Now, march along the PDI's, descending into ones which have + interesting children but skipping the children of the other ones, + until we reach the end of the compilation unit. */ + + while (1) + { + /* This flag tells whether or not info_ptr has gotten updated + inside the loop. */ + int info_ptr_updated = 0; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + /* Anonymous namespaces have no name but have interesting + children, so we need to look at them. Ditto for anonymous + enums. */ + + if (pdi.name != NULL || pdi.tag == DW_TAG_namespace + || pdi.tag == DW_TAG_enumeration_type) + { + switch (pdi.tag) + { + case DW_TAG_subprogram: + if (pdi.has_pc_info) + { + if (pdi.lowpc < *lowpc) + { + *lowpc = pdi.lowpc; + } + if (pdi.highpc > *highpc) + { + *highpc = pdi.highpc; + } + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + } + break; + case DW_TAG_variable: + case DW_TAG_typedef: + case DW_TAG_union_type: + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_structure (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_enumeration_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_enumeration (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + /* File scope base type definitions are added to the partial + symbol table. */ + add_partial_symbol (&pdi, cu, namespace); + break; + case DW_TAG_namespace: + /* We've hit a DW_TAG_namespace entry, so we know this + file has been compiled using a compiler that + generates them; update NAMESPACE to reflect that. */ + if (namespace == NULL) + namespace = ""; + info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc, + cu, namespace); + info_ptr_updated = 1; + break; + default: + break; + } + } + + if (pdi.tag == 0) + break; + + /* If the die has a sibling, skip to the sibling, unless another + function has already updated info_ptr for us. */ + + /* NOTE: carlton/2003-06-16: This is a bit hackish, but whether + or not we want to update this depends on enough stuff (not + only pdi.tag but also whether or not pdi.name is NULL) that + this seems like the easiest way to handle the issue. */ + + if (!info_ptr_updated) + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } + + return info_ptr; +} + +static void +add_partial_symbol (struct partial_die_info *pdi, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + CORE_ADDR addr = 0; + char *actual_name = pdi->name; + const struct partial_symbol *psym = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* If we're not in the global namespace and if the namespace name + isn't encoded in a mangled actual_name, add it. */ + + if (pdi_needs_namespace (pdi->tag, namespace)) + { + actual_name = alloca (strlen (pdi->name) + 2 + strlen (namespace) + 1); + strcpy (actual_name, namespace); + strcat (actual_name, "::"); + strcat (actual_name, pdi->name); + } + + switch (pdi->tag) + { + case DW_TAG_subprogram: + if (pdi->is_external) + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->global_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + else + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_file_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->static_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_variable: + if (pdi->is_external) + { + /* Global Variable. + Don't enter into the minimal symbol tables as there is + a minimal symbol table entry from the ELF symbols already. + Enter into partial symbol table if it has a location + descriptor or a type. + If the location descriptor is missing, new_symbol will create + a LOC_UNRESOLVED symbol, the address of the variable will then + be determined from the minimal symbol table whenever the variable + is referenced. + The address for the partial symbol table entry is not + used by GDB, but it comes in handy for debugging partial symbol + table building. */ + + if (pdi->locdesc) + addr = decode_locdesc (pdi->locdesc, cu); + if (pdi->locdesc || pdi->has_type) + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->global_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + else + { + /* Static Variable. Skip symbols without location descriptors. */ + if (pdi->locdesc == NULL) + return; + addr = decode_locdesc (pdi->locdesc, cu); + /*prim_record_minimal_symbol (actual_name, addr + baseaddr, + mst_file_data, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->static_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_typedef: + case DW_TAG_base_type: + case DW_TAG_subrange_type: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + /* Skip aggregate types without children, these are external + references. */ + /* NOTE: carlton/2003-10-07: See comment in new_symbol about + static vs. global. */ + if (pdi->has_children == 0) + return; + add_psymbol_to_list (actual_name, strlen (actual_name), + STRUCT_DOMAIN, LOC_TYPEDEF, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + + if (cu->language == language_cplus) + { + /* For C++, these implicitly act as typedefs as well. */ + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + } + break; + case DW_TAG_enumerator: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_CONST, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + default: + break; + } + + /* Check to see if we should scan the name for possible namespace + info. Only do this if this is C++, if we don't have namespace + debugging info in the file, if the psym is of an appropriate type + (otherwise we'll have psym == NULL), and if we actually had a + mangled name to begin with. */ + + if (cu->language == language_cplus + && namespace == NULL + && psym != NULL + && SYMBOL_CPLUS_DEMANGLED_NAME (psym) != NULL) + cp_check_possible_namespace_symbols (SYMBOL_CPLUS_DEMANGLED_NAME (psym), + objfile); +} + +/* Determine whether a die of type TAG living in the C++ namespace + NAMESPACE needs to have the name of the namespace prepended to the + name listed in the die. */ + +static int +pdi_needs_namespace (enum dwarf_tag tag, const char *namespace) +{ + if (namespace == NULL || namespace[0] == '\0') + return 0; + + switch (tag) + { + case DW_TAG_typedef: + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + case DW_TAG_enumerator: + return 1; + default: + return 0; + } +} + +/* Read a partial die corresponding to a namespace; also, add a symbol + corresponding to that namespace to the symbol table. NAMESPACE is + the name of the enclosing namespace. */ + +static char * +add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + const char *new_name = pdi->name; + char *full_name; + + /* Calculate the full name of the namespace that we just entered. */ + + if (new_name == NULL) + new_name = "(anonymous namespace)"; + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + strcpy (full_name, namespace); + if (*namespace != '\0') + strcat (full_name, "::"); + strcat (full_name, new_name); + + /* FIXME: carlton/2003-10-07: We can't just replace this by a call + to add_partial_symbol, because we don't have a way to pass in the + full name to that function; that might be a flaw in + add_partial_symbol's interface. */ + + add_psymbol_to_list (full_name, strlen (full_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, 0, cu->language, objfile); + + /* Now scan partial symbols in that namespace. */ + + if (pdi->has_children) + info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name); + + return info_ptr; +} + +/* Read a partial die corresponding to a class or structure. */ + +static char * +add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace) +{ + bfd *abfd = cu->objfile->obfd; + char *actual_class_name = NULL; + + if (cu->language == language_cplus + && (namespace == NULL || namespace[0] == '\0') + && struct_pdi->name != NULL + && struct_pdi->has_children) + { + /* See if we can figure out if the class lives in a namespace + (or is nested within another class.) We do this by looking + for a member function; its demangled name will contain + namespace info, if there is any. */ + + /* NOTE: carlton/2003-10-07: Getting the info this way changes + what template types look like, because the demangler + frequently doesn't give the same name as the debug info. We + could fix this by only using the demangled name to get the + prefix (but see comment in read_structure_type). */ + + /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have + the appropriate debug information, so it would be nice to be + able to avoid this hack. But NAMESPACE may not be the + namespace where this class was defined: NAMESPACE reflects + where STRUCT_PDI occurs in the tree of dies, but because of + DW_AT_specification, that may not actually tell us where the + class is defined. (See the comment in read_func_scope for an + example of how this could occur.) + + Unfortunately, our current partial symtab data structures are + completely unable to deal with DW_AT_specification. So, for + now, the best thing to do is to get nesting information from + places other than the tree structure of dies if there's any + chance that a DW_AT_specification is involved. :-( */ + + char *next_child = info_ptr; + + while (1) + { + struct partial_die_info child_pdi; + + next_child = read_partial_die (&child_pdi, abfd, next_child, + cu); + if (!child_pdi.tag) + break; + if (child_pdi.tag == DW_TAG_subprogram) + { + actual_class_name = class_name_from_physname (child_pdi.name); + if (actual_class_name != NULL) + struct_pdi->name = actual_class_name; + break; + } + else + { + next_child = locate_pdi_sibling (&child_pdi, next_child, + abfd, cu); + } + } + } + + add_partial_symbol (struct_pdi, cu, namespace); + xfree (actual_class_name); + + return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu); +} + +/* Read a partial die corresponding to an enumeration type. */ + +static char * +add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + if (enum_pdi->name != NULL) + add_partial_symbol (enum_pdi, cu, namespace); + + while (1) + { + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + if (pdi.tag == 0) + break; + if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL) + complaint (&symfile_complaints, "malformed enumerator DIE ignored"); + else + add_partial_symbol (&pdi, cu, namespace); + } + + return info_ptr; +} + +/* Locate ORIG_PDI's sibling; INFO_PTR should point to the next DIE + after ORIG_PDI. */ + +static char * +locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr, + bfd *abfd, struct dwarf2_cu *cu) +{ + /* Do we know the sibling already? */ + + if (orig_pdi->sibling) + return orig_pdi->sibling; + + /* Are there any children to deal with? */ + + if (!orig_pdi->has_children) + return info_ptr; + + /* Okay, we don't know the sibling, but we have children that we + want to skip. So read children until we run into one without a + tag; return whatever follows it. */ + + while (1) + { + struct partial_die_info pdi; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + if (pdi.tag == 0) + return info_ptr; + else + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } +} + +/* Expand this partial symbol table into a full symbol table. */ + +static void +dwarf2_psymtab_to_symtab (struct partial_symtab *pst) +{ + /* FIXME: This is barely more than a stub. */ + if (pst != NULL) + { + if (pst->readin) + { + warning ("bug: psymtab for %s is already read in.", pst->filename); + } + else + { + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + gdb_flush (gdb_stdout); + } + + psymtab_to_symtab_1 (pst); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); + } + } +} + +static void +psymtab_to_symtab_1 (struct partial_symtab *pst) +{ + struct objfile *objfile = pst->objfile; + bfd *abfd = objfile->obfd; + struct dwarf2_cu cu; + struct die_info *dies; + unsigned long offset; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + char *info_ptr; + struct symtab *symtab; + struct cleanup *back_to; + struct attribute *attr; + CORE_ADDR baseaddr; + + /* Set local variables from the partial symbol table info. */ + offset = DWARF_INFO_OFFSET (pst); + dwarf_info_buffer = DWARF_INFO_BUFFER (pst); + dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); + dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); + dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); + dwarf_str_buffer = DWARF_STR_BUFFER (pst); + dwarf_str_size = DWARF_STR_SIZE (pst); + dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst); + dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst); + dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst); + dwarf_ranges_size = DWARF_RANGES_SIZE (pst); + dwarf_loc_buffer = DWARF_LOC_BUFFER (pst); + dwarf_loc_size = DWARF_LOC_SIZE (pst); + info_ptr = dwarf_info_buffer + offset; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* We're in the global namespace. */ + processing_current_prefix = ""; + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + buildsym_init (); + make_cleanup (really_free_pendings, NULL); + + cu.objfile = objfile; + + /* read in the comp_unit header */ + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + /* Read the abbrevs for this compilation unit */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + cu.header.offset = offset; + + cu.list_in_scope = &file_symbols; + + dies = read_comp_unit (info_ptr, abfd, &cu); + + make_cleanup_free_die_list (dies); + + /* Find the base address of the compilation unit for range lists and + location lists. It will normally be specified by DW_AT_low_pc. + In DWARF-3 draft 4, the base address could be overridden by + DW_AT_entry_pc. It's been removed, but GCC still uses this for + compilation units with discontinuous ranges. */ + + cu.header.base_known = 0; + cu.header.base_address = 0; + + attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + else + { + attr = dwarf2_attr (dies, DW_AT_low_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + } + + /* Do line number decoding in read_file_scope () */ + process_die (dies, &cu); + + /* Some compilers don't define a DW_AT_high_pc attribute for the + compilation unit. If the DW_AT_high_pc is missing, synthesize + it, by scanning the DIE's below the compilation unit. */ + get_scope_pc_bounds (dies, &lowpc, &highpc, &cu); + + symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + + /* Set symtab language to language from DW_AT_language. + If the compilation is from a C file generated by language preprocessors, + do not set the language if it was already deduced by start_subfile. */ + if (symtab != NULL + && !(cu.language == language_c && symtab->language != language_c)) + { + symtab->language = cu.language; + } + pst->symtab = symtab; + pst->readin = 1; + + do_cleanups (back_to); +} + +/* Process a die and its children. */ + +static void +process_die (struct die_info *die, struct dwarf2_cu *cu) +{ + switch (die->tag) + { + case DW_TAG_padding: + break; + case DW_TAG_compile_unit: + read_file_scope (die, cu); + break; + case DW_TAG_subprogram: + read_subroutine_type (die, cu); + read_func_scope (die, cu); + break; + case DW_TAG_inlined_subroutine: + /* FIXME: These are ignored for now. + They could be used to set breakpoints on all inlined instances + of a function and make GDB `next' properly over inlined functions. */ + break; + case DW_TAG_lexical_block: + case DW_TAG_try_block: + case DW_TAG_catch_block: + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); + process_structure_scope (die, cu); + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); + break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + /* END FIXME */ + + case DW_TAG_base_type: + read_base_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_common_block: + read_common_block (die, cu); + break; + case DW_TAG_common_inclusion: + break; + case DW_TAG_namespace: + processing_has_namespace_info = 1; + read_namespace (die, cu); + break; + case DW_TAG_imported_declaration: + case DW_TAG_imported_module: + /* FIXME: carlton/2002-10-16: Eventually, we should use the + information contained in these. DW_TAG_imported_declaration + dies shouldn't have children; DW_TAG_imported_module dies + shouldn't in the C++ case, but conceivably could in the + Fortran case, so we'll have to replace this gdb_assert if + Fortran compilers start generating that info. */ + processing_has_namespace_info = 1; + gdb_assert (die->child == NULL); + break; + default: + new_symbol (die, NULL, cu); + break; + } +} + +static void +initialize_cu_func_list (struct dwarf2_cu *cu) +{ + cu->first_fn = cu->last_fn = cu->cached_fn = NULL; +} + +static void +read_file_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct cleanup *back_to = make_cleanup (null_cleanup, 0); + CORE_ADDR lowpc = ((CORE_ADDR) -1); + CORE_ADDR highpc = ((CORE_ADDR) 0); + struct attribute *attr; + char *name = ""; + char *comp_dir = NULL; + struct die_info *child_die; + bfd *abfd = objfile->obfd; + struct line_header *line_header = 0; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + get_scope_pc_bounds (die, &lowpc, &highpc, cu); + + /* If we didn't find a lowpc, set it to highpc to avoid complaints + from finish_block. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + lowpc += baseaddr; + highpc += baseaddr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr) + { + name = DW_STRING (attr); + } + attr = dwarf2_attr (die, DW_AT_comp_dir, cu); + if (attr) + { + comp_dir = DW_STRING (attr); + if (comp_dir) + { + /* Irix 6.2 native cc prepends .: to the compilation + directory, get rid of it. */ + char *cp = strchr (comp_dir, ':'); + + if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/') + comp_dir = cp + 1; + } + } + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.deprecated_entry_file_lowpc = lowpc; + objfile->ei.deprecated_entry_file_highpc = highpc; + } + + attr = dwarf2_attr (die, DW_AT_language, cu); + if (attr) + { + set_cu_language (DW_UNSND (attr), cu); + } + + /* We assume that we're processing GCC output. */ + processing_gcc_compilation = 2; +#if 0 + /* FIXME:Do something here. */ + if (dip->at_producer != NULL) + { + handle_producer (dip->at_producer); + } +#endif + + /* The compilation unit may be in a different language or objfile, + zero out all remembered fundamental types. */ + memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *)); + + start_symtab (name, comp_dir, lowpc); + record_debugformat ("DWARF 2"); + + initialize_cu_func_list (cu); + + /* Process all dies in compilation unit. */ + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + /* Decode line number information if present. */ + attr = dwarf2_attr (die, DW_AT_stmt_list, cu); + if (attr) + { + unsigned int line_offset = DW_UNSND (attr); + line_header = dwarf_decode_line_header (line_offset, abfd, cu); + if (line_header) + { + make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) line_header); + dwarf_decode_lines (line_header, comp_dir, abfd, cu); + } + } + + /* Decode macro information, if present. Dwarf 2 macro information + refers to information in the line number info statement program + header, so we can only read it if we've read the header + successfully. */ + attr = dwarf2_attr (die, DW_AT_macro_info, cu); + if (attr && line_header) + { + unsigned int macro_offset = DW_UNSND (attr); + dwarf_decode_macros (line_header, macro_offset, + comp_dir, abfd, cu); + } + do_cleanups (back_to); +} + +static void +add_to_cu_func_list (const char *name, CORE_ADDR lowpc, CORE_ADDR highpc, + struct dwarf2_cu *cu) +{ + struct function_range *thisfn; + + thisfn = (struct function_range *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct function_range)); + thisfn->name = name; + thisfn->lowpc = lowpc; + thisfn->highpc = highpc; + thisfn->seen_line = 0; + thisfn->next = NULL; + + if (cu->last_fn == NULL) + cu->first_fn = thisfn; + else + cu->last_fn->next = thisfn; + + cu->last_fn = thisfn; +} + +static void +read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct die_info *child_die; + struct attribute *attr; + char *name; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + name = dwarf2_linkage_name (die, cu); + + /* Ignore functions with missing or empty names and functions with + missing or invalid low and high pc attributes. */ + if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + + if (cu->language == language_cplus) + { + struct die_info *spec_die = die_specification (die, cu); + + /* NOTE: carlton/2004-01-23: We have to be careful in the + presence of DW_AT_specification. For example, with GCC 3.4, + given the code + + namespace N { + void foo() { + // Definition of N::foo. + } + } + + then we'll have a tree of DIEs like this: + + 1: DW_TAG_compile_unit + 2: DW_TAG_namespace // N + 3: DW_TAG_subprogram // declaration of N::foo + 4: DW_TAG_subprogram // definition of N::foo + DW_AT_specification // refers to die #3 + + Thus, when processing die #4, we have to pretend that we're + in the context of its DW_AT_specification, namely the contex + of die #3. */ + + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + } + + lowpc += baseaddr; + highpc += baseaddr; + + /* Record the function range for dwarf_decode_lines. */ + add_to_cu_func_list (name, lowpc, highpc, cu); + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.entry_func_lowpc = lowpc; + objfile->ei.entry_func_highpc = highpc; + } + + new = push_context (0, lowpc); + new->name = new_symbol (die, die->type, cu); + + /* If there is a location expression for DW_AT_frame_base, record + it. */ + attr = dwarf2_attr (die, DW_AT_frame_base, cu); + if (attr) + /* FIXME: cagney/2004-01-26: The DW_AT_frame_base's location + expression is being recorded directly in the function's symbol + and not in a separate frame-base object. I guess this hack is + to avoid adding some sort of frame-base adjunct/annex to the + function's symbol :-(. The problem with doing this is that it + results in a function symbol with a location expression that + has nothing to do with the location of the function, ouch! The + relationship should be: a function's symbol has-a frame base; a + frame-base has-a location expression. */ + dwarf2_symbol_mark_computed (attr, new->name, cu); + + cu->list_in_scope = &local_symbols; + + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + new = pop_context (); + /* Make a block for the local symbols within. */ + finish_block (new->name, &local_symbols, new->old_blocks, + lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + + /* If we've finished processing a top-level function, subsequent + symbols go in the file symbol list. */ + if (outermost_context_p ()) + cu->list_in_scope = &file_symbols; + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +/* Process all the DIES contained within a lexical block scope. Start + a new scope, process the dies, and then close the scope. */ + +static void +read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Ignore blocks with missing or invalid low and high pc attributes. */ + /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges + as multiple lexical blocks? Handling children in a sane way would + be nasty. Might be easier to properly extend generic blocks to + describe ranges. */ + if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + lowpc += baseaddr; + highpc += baseaddr; + + push_context (0, lowpc); + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + new = pop_context (); + + if (local_symbols != NULL) + { + finish_block (0, &local_symbols, new->old_blocks, new->start_addr, + highpc, objfile); + } + local_symbols = new->locals; +} + +/* Get low and high pc attributes from a die. Return 1 if the attributes + are present and valid, otherwise, return 0. Return -1 if the range is + discontinuous, i.e. derived from DW_AT_ranges information. */ +static int +dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct attribute *attr; + bfd *obfd = objfile->obfd; + CORE_ADDR low = 0; + CORE_ADDR high = 0; + int ret = 0; + + attr = dwarf2_attr (die, DW_AT_high_pc, cu); + if (attr) + { + high = DW_ADDR (attr); + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + low = DW_ADDR (attr); + else + /* Found high w/o low attribute. */ + return 0; + + /* Found consecutive range of addresses. */ + ret = 1; + } + else + { + attr = dwarf2_attr (die, DW_AT_ranges, cu); + if (attr != NULL) + { + unsigned int addr_size = cu_header->addr_size; + CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1)); + /* Value of the DW_AT_ranges attribute is the offset in the + .debug_ranges section. */ + unsigned int offset = DW_UNSND (attr); + /* Base address selection entry. */ + CORE_ADDR base; + int found_base; + int dummy; + char *buffer; + CORE_ADDR marker; + int low_set; + + found_base = cu_header->base_known; + base = cu_header->base_address; + + if (offset >= dwarf_ranges_size) + { + complaint (&symfile_complaints, + "Offset %d out of bounds for DW_AT_ranges attribute", + offset); + return 0; + } + buffer = dwarf_ranges_buffer + offset; + + /* Read in the largest possible address. */ + marker = read_address (obfd, buffer, cu, &dummy); + if ((marker & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + buffer += 2 * addr_size; + offset += 2 * addr_size; + found_base = 1; + } + + low_set = 0; + + while (1) + { + CORE_ADDR range_beginning, range_end; + + range_beginning = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + range_end = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + offset += 2 * addr_size; + + /* An end of list marker is a pair of zero addresses. */ + if (range_beginning == 0 && range_end == 0) + /* Found the end of list entry. */ + break; + + /* Each base address selection entry is a pair of 2 values. + The first is the largest possible address, the second is + the base address. Check for a base address here. */ + if ((range_beginning & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + found_base = 1; + continue; + } + + if (!found_base) + { + /* We have no valid base address for the ranges + data. */ + complaint (&symfile_complaints, + "Invalid .debug_ranges data (no base address)"); + return 0; + } + + range_beginning += base; + range_end += base; + + /* FIXME: This is recording everything as a low-high + segment of consecutive addresses. We should have a + data structure for discontiguous block ranges + instead. */ + if (! low_set) + { + low = range_beginning; + high = range_end; + low_set = 1; + } + else + { + if (range_beginning < low) + low = range_beginning; + if (range_end > high) + high = range_end; + } + } + + if (! low_set) + /* If the first entry is an end-of-list marker, the range + describes an empty scope, i.e. no instructions. */ + return 0; + + ret = -1; + } + } + + if (high < low) + return 0; + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0) + return 0; + + *lowpc = low; + *highpc = high; + return ret; +} + +/* Get the low and high pc's represented by the scope DIE, and store + them in *LOWPC and *HIGHPC. If the correct values can't be + determined, set *LOWPC to -1 and *HIGHPC to 0. */ + +static void +get_scope_pc_bounds (struct die_info *die, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu) +{ + CORE_ADDR best_low = (CORE_ADDR) -1; + CORE_ADDR best_high = (CORE_ADDR) 0; + CORE_ADDR current_low, current_high; + + if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu)) + { + best_low = current_low; + best_high = current_high; + } + else + { + struct die_info *child = die->child; + + while (child && child->tag) + { + switch (child->tag) { + case DW_TAG_subprogram: + if (dwarf2_get_pc_bounds (child, ¤t_low, ¤t_high, cu)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + case DW_TAG_namespace: + /* FIXME: carlton/2004-01-16: Should we do this for + DW_TAG_class_type/DW_TAG_structure_type, too? I think + that current GCC's always emit the DIEs corresponding + to definitions of methods of classes as children of a + DW_TAG_compile_unit or DW_TAG_namespace (as opposed to + the DIEs giving the declarations, which could be + anywhere). But I don't see any reason why the + standards says that they have to be there. */ + get_scope_pc_bounds (child, ¤t_low, ¤t_high, cu); + + if (current_low != ((CORE_ADDR) -1)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + default: + /* Ignore. */ + break; + } + + child = sibling_die (child); + } + } + + *lowpc = best_low; + *highpc = best_high; +} + +/* Add an aggregate field to the field list. */ + +static void +dwarf2_add_field (struct field_info *fip, struct die_info *die, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct nextfield *new_field; + struct attribute *attr; + struct field *fp; + char *fieldname = ""; + + /* Allocate a new field list entry and link it in. */ + new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield)); + make_cleanup (xfree, new_field); + memset (new_field, 0, sizeof (struct nextfield)); + new_field->next = fip->fields; + fip->fields = new_field; + fip->nfields++; + + /* Handle accessibility and virtuality of field. + The default accessibility for members is public, the default + accessibility for inheritance is private. */ + if (die->tag != DW_TAG_inheritance) + new_field->accessibility = DW_ACCESS_public; + else + new_field->accessibility = DW_ACCESS_private; + new_field->virtuality = DW_VIRTUALITY_none; + + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + new_field->accessibility = DW_UNSND (attr); + if (new_field->accessibility != DW_ACCESS_public) + fip->non_public_fields = 1; + attr = dwarf2_attr (die, DW_AT_virtuality, cu); + if (attr) + new_field->virtuality = DW_UNSND (attr); + + fp = &new_field->field; + + if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu)) + { + /* Data member other than a C++ static data member. */ + + /* Get type of field. */ + fp->type = die_type (die, cu); + + FIELD_STATIC_KIND (*fp) = 0; + + /* Get bit size of field (zero if none). */ + attr = dwarf2_attr (die, DW_AT_bit_size, cu); + if (attr) + { + FIELD_BITSIZE (*fp) = DW_UNSND (attr); + } + else + { + FIELD_BITSIZE (*fp) = 0; + } + + /* Get bit offset of field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + { + FIELD_BITPOS (*fp) = + decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte; + } + else + FIELD_BITPOS (*fp) = 0; + attr = dwarf2_attr (die, DW_AT_bit_offset, cu); + if (attr) + { + if (BITS_BIG_ENDIAN) + { + /* For big endian bits, the DW_AT_bit_offset gives the + additional bit offset from the MSB of the containing + anonymous object to the MSB of the field. We don't + have to do anything special since we don't need to + know the size of the anonymous object. */ + FIELD_BITPOS (*fp) += DW_UNSND (attr); + } + else + { + /* For little endian bits, compute the bit offset to the + MSB of the anonymous object, subtract off the number of + bits from the MSB of the field to the MSB of the + object, and then subtract off the number of bits of + the field itself. The result is the bit offset of + the LSB of the field. */ + int anonymous_size; + int bit_offset = DW_UNSND (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + /* The size of the anonymous object containing + the bit field is explicit, so use the + indicated size (in bytes). */ + anonymous_size = DW_UNSND (attr); + } + else + { + /* The size of the anonymous object containing + the bit field must be inferred from the type + attribute of the data member containing the + bit field. */ + anonymous_size = TYPE_LENGTH (fp->type); + } + FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp); + } + } + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + fp->name = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + + /* Change accessibility for artificial fields (e.g. virtual table + pointer or virtual base class pointer) to private. */ + if (dwarf2_attr (die, DW_AT_artificial, cu)) + { + new_field->accessibility = DW_ACCESS_private; + fip->non_public_fields = 1; + } + } + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) + { + /* C++ static member. */ + + /* NOTE: carlton/2002-11-05: It should be a DW_TAG_member that + is a declaration, but all versions of G++ as of this writing + (so through at least 3.2.1) incorrectly generate + DW_TAG_variable tags. */ + + char *physname; + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get physical name. */ + physname = dwarf2_linkage_name (die, cu); + + SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname), + &objfile->objfile_obstack)); + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + } + else if (die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); + FIELD_BITSIZE (*fp) = 0; + FIELD_STATIC_KIND (*fp) = 0; + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = type_name_no_tag (fp->type); + fip->nbaseclasses++; + } +} + +/* Create the vector of fields, and attach it to the type. */ + +static void +dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + int nfields = fip->nfields; + + /* Record the field count, allocate space for the array of fields, + and create blank accessibility bitfields if necessary. */ + TYPE_NFIELDS (type) = nfields; + TYPE_FIELDS (type) = (struct field *) + TYPE_ALLOC (type, sizeof (struct field) * nfields); + memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + + if (fip->non_public_fields) + { + ALLOCATE_CPLUS_STRUCT_TYPE (type); + + TYPE_FIELD_PRIVATE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields); + + TYPE_FIELD_PROTECTED_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields); + + TYPE_FIELD_IGNORE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields); + } + + /* If the type has baseclasses, allocate and clear a bit vector for + TYPE_FIELD_VIRTUAL_BITS. */ + if (fip->nbaseclasses) + { + int num_bytes = B_BYTES (fip->nbaseclasses); + char *pointer; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + pointer = (char *) TYPE_ALLOC (type, num_bytes); + TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; + B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses); + TYPE_N_BASECLASSES (type) = fip->nbaseclasses; + } + + /* Copy the saved-up fields into the field vector. Start from the head + of the list, adding to the tail of the field array, so that they end + up in the same order in the array in which they were added to the list. */ + while (nfields-- > 0) + { + TYPE_FIELD (type, nfields) = fip->fields->field; + switch (fip->fields->accessibility) + { + case DW_ACCESS_private: + SET_TYPE_FIELD_PRIVATE (type, nfields); + break; + + case DW_ACCESS_protected: + SET_TYPE_FIELD_PROTECTED (type, nfields); + break; + + case DW_ACCESS_public: + break; + + default: + /* Unknown accessibility. Complain and treat it as public. */ + { + complaint (&symfile_complaints, "unsupported accessibility %d", + fip->fields->accessibility); + } + break; + } + if (nfields < fip->nbaseclasses) + { + switch (fip->fields->virtuality) + { + case DW_VIRTUALITY_virtual: + case DW_VIRTUALITY_pure_virtual: + SET_TYPE_FIELD_VIRTUAL (type, nfields); + break; + } + } + fip->fields = fip->fields->next; + } +} + +/* Add a member function to the proper fieldlist. */ + +static void +dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, + struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + struct fnfieldlist *flp; + int i; + struct fn_field *fnp; + char *fieldname; + char *physname; + struct nextfnfield *new_fnfield; + + /* Get name of member function. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get the mangled name. */ + physname = dwarf2_linkage_name (die, cu); + + /* Look up member function name in fieldlist. */ + for (i = 0; i < fip->nfnfields; i++) + { + if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0) + break; + } + + /* Create new list element if necessary. */ + if (i < fip->nfnfields) + flp = &fip->fnfieldlists[i]; + else + { + if ((fip->nfnfields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fip->fnfieldlists = (struct fnfieldlist *) + xrealloc (fip->fnfieldlists, + (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct fnfieldlist)); + if (fip->nfnfields == 0) + make_cleanup (free_current_contents, &fip->fnfieldlists); + } + flp = &fip->fnfieldlists[fip->nfnfields]; + flp->name = fieldname; + flp->length = 0; + flp->head = NULL; + fip->nfnfields++; + } + + /* Create a new member function field and chain it to the field list + entry. */ + new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield)); + make_cleanup (xfree, new_fnfield); + memset (new_fnfield, 0, sizeof (struct nextfnfield)); + new_fnfield->next = flp->head; + flp->head = new_fnfield; + flp->length++; + + /* Fill in the member function field info. */ + fnp = &new_fnfield->fnfield; + fnp->physname = obsavestring (physname, strlen (physname), + &objfile->objfile_obstack); + fnp->type = alloc_type (objfile); + if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC) + { + int nparams = TYPE_NFIELDS (die->type); + + /* TYPE is the domain of this method, and DIE->TYPE is the type + of the method itself (TYPE_CODE_METHOD). */ + smash_to_method_type (fnp->type, type, + TYPE_TARGET_TYPE (die->type), + TYPE_FIELDS (die->type), + TYPE_NFIELDS (die->type), + TYPE_VARARGS (die->type)); + + /* Handle static member functions. + Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We obtain this information + from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */ + if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (die->type, 0) == 0) + fnp->voffset = VOFFSET_STATIC; + } + else + complaint (&symfile_complaints, "member function type missing for '%s'", + physname); + + /* Get fcontext from DW_AT_containing_type if present. */ + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + fnp->fcontext = die_containing_type (die, cu); + + /* dwarf2 doesn't have stubbed physical names, so the setting of is_const + and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */ + + /* Get accessibility. */ + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + { + switch (DW_UNSND (attr)) + { + case DW_ACCESS_private: + fnp->is_private = 1; + break; + case DW_ACCESS_protected: + fnp->is_protected = 1; + break; + } + } + + /* Check for artificial methods. */ + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr && DW_UNSND (attr) != 0) + fnp->is_artificial = 1; + + /* Get index in virtual function table if it is a virtual member function. */ + attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2; + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location", + fieldname); + } + } +} + +/* Create the vector of member function fields, and attach it to the type. */ + +static void +dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + struct fnfieldlist *flp; + int total_length = 0; + int i; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *) + TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * fip->nfnfields); + + for (i = 0, flp = fip->fnfieldlists; i < fip->nfnfields; i++, flp++) + { + struct nextfnfield *nfp = flp->head; + struct fn_fieldlist *fn_flp = &TYPE_FN_FIELDLIST (type, i); + int k; + + TYPE_FN_FIELDLIST_NAME (type, i) = flp->name; + TYPE_FN_FIELDLIST_LENGTH (type, i) = flp->length; + fn_flp->fn_fields = (struct fn_field *) + TYPE_ALLOC (type, sizeof (struct fn_field) * flp->length); + for (k = flp->length; (k--, nfp); nfp = nfp->next) + fn_flp->fn_fields[k] = nfp->fnfield; + + total_length += flp->length; + } + + TYPE_NFN_FIELDS (type) = fip->nfnfields; + TYPE_NFN_FIELDS_TOTAL (type) = total_length; +} + +/* Called when we find the DIE that starts a structure or union scope + (definition) to process all dies that define the members of the + structure or union. + + NOTE: we need to call struct_type regardless of whether or not the + DIE has an at_name attribute, since it might be an anonymous + structure or union. This gets the type entered into our set of + user defined types. + + However, if the structure is incomplete (an opaque struct/union) + then suppress creating a symbol table entry for it since gdb only + wants to find the one with the complete definition. Note that if + it is complete, we just call new_symbol, which does it's own + checking about whether the struct/union is anonymous or not (and + suppresses creating a symbol table entry itself). */ + +static void +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + + if (die->type) + return; + + type = alloc_type (objfile); + + INIT_CPLUS_SPECIFIC (type); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + if (cu->language == language_cplus) + { + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); + processing_current_prefix = new_prefix; + } + else + { + TYPE_TAG_NAME (type) = DW_STRING (attr); + } + } + + if (die->tag == DW_TAG_structure_type) + { + TYPE_CODE (type) = TYPE_CODE_STRUCT; + } + else if (die->tag == DW_TAG_union_type) + { + TYPE_CODE (type) = TYPE_CODE_UNION; + } + else + { + /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT + in gdbtypes.h. */ + TYPE_CODE (type) = TYPE_CODE_CLASS; + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + /* We need to add the type field to the die immediately so we don't + infinitely recurse when dealing with pointers to the structure + type within the structure itself. */ + die->type = type; + + if (die->child != NULL && ! die_is_declaration (die, cu)) + { + struct field_info fi; + struct die_info *child_die; + struct cleanup *back_to = make_cleanup (null_cleanup, NULL); + + memset (&fi, 0, sizeof (struct field_info)); + + child_die = die->child; + + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable) + { + /* NOTE: carlton/2002-11-05: A C++ static data member + should be a DW_TAG_member that is a declaration, but + all versions of G++ as of this writing (so through at + least 3.2.1) incorrectly generate DW_TAG_variable + tags for them instead. */ + dwarf2_add_field (&fi, child_die, cu); + } + else if (child_die->tag == DW_TAG_subprogram) + { + /* C++ member function. */ + read_type_die (child_die, cu); + dwarf2_add_member_fn (&fi, child_die, type, cu); + } + else if (child_die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + dwarf2_add_field (&fi, child_die, cu); + } + child_die = sibling_die (child_die); + } + + /* Attach fields and member functions to the type. */ + if (fi.nfields) + dwarf2_attach_fields_to_type (&fi, type, cu); + if (fi.nfnfields) + { + dwarf2_attach_fn_fields_to_type (&fi, type, cu); + + /* Get the type which refers to the base class (possibly this + class itself) which contains the vtable pointer for the current + class from the DW_AT_containing_type attribute. */ + + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + { + struct type *t = die_containing_type (die, cu); + + TYPE_VPTR_BASETYPE (type) = t; + if (type == t) + { + static const char vptr_name[] = + {'_', 'v', 'p', 't', 'r', '\0'}; + int i; + + /* Our own class provides vtbl ptr. */ + for (i = TYPE_NFIELDS (t) - 1; + i >= TYPE_N_BASECLASSES (t); + --i) + { + char *fieldname = TYPE_FIELD_NAME (t, i); + + if ((strncmp (fieldname, vptr_name, + strlen (vptr_name) - 1) + == 0) + && is_cplus_marker (fieldname[strlen (vptr_name)])) + { + TYPE_VPTR_FIELDNO (type) = i; + break; + } + } + + /* Complain if virtual function table field not found. */ + if (i < TYPE_N_BASECLASSES (t)) + complaint (&symfile_complaints, + "virtual function table pointer not found when defining class '%s'", + TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) : + ""); + } + else + { + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); + } + } + } + + do_cleanups (back_to); + } + else + { + /* No children, must be stub. */ + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + } + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; + + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); + + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ + +static void +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + type = alloc_type (objfile); + + TYPE_CODE (type) = TYPE_CODE_ENUM; + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + const char *name = DW_STRING (attr); + + if (processing_has_namespace_info) + { + TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + processing_current_prefix[0] == '\0' + ? "" : "::", + name); + } + else + { + TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), + &objfile->objfile_obstack); + } + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + + num_fields = 0; + fields = NULL; + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag != DW_TAG_enumerator) + { + process_die (child_die, cu); + } + else + { + attr = dwarf2_attr (child_die, DW_AT_name, cu); + if (attr) + { + sym = new_symbol (child_die, die->type, cu); + if (SYMBOL_VALUE (sym) < 0) + unsigned_enum = 0; + + if ((num_fields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fields = (struct field *) + xrealloc (fields, + (num_fields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct field)); + } + + FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym); + FIELD_TYPE (fields[num_fields]) = NULL; + FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + FIELD_BITSIZE (fields[num_fields]) = 0; + FIELD_STATIC_KIND (fields[num_fields]) = 0; + + num_fields++; + } + } + + child_die = sibling_die (child_die); + } + + if (num_fields) + { + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, + sizeof (struct field) * num_fields); + xfree (fields); + } + if (unsigned_enum) + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; + } + + new_symbol (die, die->type, cu); +} + +/* Extract all information from a DW_TAG_array_type DIE and put it in + the DIE's type field. For now, this only handles one dimensional + arrays. */ + +static void +read_array_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct type *type = NULL; + struct type *element_type, *range_type, *index_type; + struct type **range_types = NULL; + struct attribute *attr; + int ndim = 0; + struct cleanup *back_to; + + /* Return if we've already decoded this type. */ + if (die->type) + { + return; + } + + element_type = die_type (die, cu); + + /* Irix 6.2 native cc creates array types without children for + arrays with unspecified length. */ + if (die->child == NULL) + { + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 0, -1); + die->type = create_array_type (NULL, element_type, range_type); + return; + } + + back_to = make_cleanup (null_cleanup, NULL); + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_subrange_type) + { + read_subrange_type (child_die, cu); + + if (child_die->type != NULL) + { + /* The range type was succesfully read. Save it for + the array type creation. */ + if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0) + { + range_types = (struct type **) + xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct type *)); + if (ndim == 0) + make_cleanup (free_current_contents, &range_types); + } + range_types[ndim++] = child_die->type; + } + } + child_die = sibling_die (child_die); + } + + /* Dwarf2 dimensions are output from left to right, create the + necessary array types in backwards order. */ + type = element_type; + while (ndim-- > 0) + type = create_array_type (NULL, type, range_types[ndim]); + + /* Understand Dwarf2 support for vector types (like they occur on + the PowerPC w/ AltiVec). Gcc just adds another attribute to the + array type. This is not part of the Dwarf2/3 standard yet, but a + custom vendor extension. The main difference between a regular + array and the vector variant is that vectors are passed by value + to functions. */ + attr = dwarf2_attr (die, DW_AT_GNU_vector, cu); + if (attr) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; + + do_cleanups (back_to); + + /* Install the type in the die. */ + die->type = type; +} + +/* First cut: install each common block member as a global variable. */ + +static void +read_common_block (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *child_die; + struct attribute *attr; + struct symbol *sym; + CORE_ADDR base = (CORE_ADDR) 0; + + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + base = decode_locdesc (DW_BLOCK (attr), cu); + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "common block member"); + } + } + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + sym = new_symbol (child_die, NULL, cu); + attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = + base + decode_locdesc (DW_BLOCK (attr), cu); + add_symbol_to_list (sym, &global_symbols); + } + child_die = sibling_die (child_die); + } + } +} + +/* Read a C++ namespace. */ + +static void +read_namespace (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + const char *name; + int is_anonymous; + struct die_info *current_die; + + name = namespace_name (die, &is_anonymous, cu); + + /* Now build the name of the current namespace. */ + + if (previous_prefix[0] == '\0') + { + processing_current_prefix = name; + } + else + { + /* We need temp_name around because processing_current_prefix + is a const char *. */ + char *temp_name = alloca (strlen (previous_prefix) + + 2 + strlen(name) + 1); + strcpy (temp_name, previous_prefix); + strcat (temp_name, "::"); + strcat (temp_name, name); + + processing_current_prefix = temp_name; + } + + /* Add a symbol associated to this if we haven't seen the namespace + before. Also, add a using directive if it's an anonymous + namespace. */ + + if (dwarf2_extension (die, cu) == NULL) + { + struct type *type; + + /* FIXME: carlton/2003-06-27: Once GDB is more const-correct, + this cast will hopefully become unnecessary. */ + type = init_type (TYPE_CODE_NAMESPACE, 0, 0, + (char *) processing_current_prefix, + objfile); + TYPE_TAG_NAME (type) = TYPE_NAME (type); + + new_symbol (die, type, cu); + die->type = type; + + if (is_anonymous) + cp_add_using_directive (processing_current_prefix, + strlen (previous_prefix), + strlen (processing_current_prefix)); + } + + if (die->child != NULL) + { + struct die_info *child_die = die->child; + + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + processing_current_prefix = previous_prefix; +} + +/* Return the name of the namespace represented by DIE. Set + *IS_ANONYMOUS to tell whether or not the namespace is an anonymous + namespace. */ + +static const char * +namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu) +{ + struct die_info *current_die; + const char *name = NULL; + + /* Loop through the extensions until we find a name. */ + + for (current_die = die; + current_die != NULL; + current_die = dwarf2_extension (die, cu)) + { + name = dwarf2_name (current_die, cu); + if (name != NULL) + break; + } + + /* Is it an anonymous namespace? */ + + *is_anonymous = (name == NULL); + if (*is_anonymous) + name = "(anonymous namespace)"; + + return name; +} + +/* Extract all information from a DW_TAG_pointer_type DIE and add to + the user defined type vector. */ + +static void +read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr_byte_size; + struct attribute *attr_address_class; + int byte_size, addr_class; + + if (die->type) + { + return; + } + + type = lookup_pointer_type (die_type (die, cu)); + + attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr_byte_size) + byte_size = DW_UNSND (attr_byte_size); + else + byte_size = cu_header->addr_size; + + attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu); + if (attr_address_class) + addr_class = DW_UNSND (attr_address_class); + else + addr_class = DW_ADDR_none; + + /* If the pointer size or address class is different than the + default, create a type variant marked as such and set the + length accordingly. */ + if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) + { + if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + { + int type_flags; + + type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); + type = make_type_with_address_space (type, type_flags); + } + else if (TYPE_LENGTH (type) != byte_size) + { + complaint (&symfile_complaints, "invalid pointer size %d", byte_size); + } + else { + /* Should we also complain about unhandled address classes? */ + } + } + + TYPE_LENGTH (type) = byte_size; + die->type = type; +} + +/* Extract all information from a DW_TAG_ptr_to_member_type DIE and add to + the user defined type vector. */ + +static void +read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct type *to_type; + struct type *domain; + + if (die->type) + { + return; + } + + type = alloc_type (objfile); + to_type = die_type (die, cu); + domain = die_containing_type (die, cu); + smash_to_member_type (type, domain, to_type); + + die->type = type; +} + +/* Extract all information from a DW_TAG_reference_type DIE and add to + the user defined type vector. */ + +static void +read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr; + + if (die->type) + { + return; + } + + type = lookup_reference_type (die_type (die, cu)); + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = cu_header->addr_size; + } + die->type = type; +} + +static void +read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); +} + +static void +read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0); +} + +/* Extract all information from a DW_TAG_string_type DIE and add to + the user defined type vector. It isn't really a user defined type, + but it behaves like one, with other DIE's using an AT_user_def_type + attribute to reference it. */ + +static void +read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type, *range_type, *index_type, *char_type; + struct attribute *attr; + unsigned int length; + + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_string_length, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + /* check for the DW_AT_byte_size attribute */ + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + length = 1; + } + } + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 1, length); + if (cu->language == language_fortran) + { + /* Need to create a unique string type for bounds + information */ + type = create_string_type (0, range_type); + } + else + { + char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu); + type = create_string_type (char_type, range_type); + } + die->type = type; +} + +/* Handle DIES due to C code like: + + struct foo + { + int (*funcp)(int a, long l); + int b; + }; + + ('funcp' generates a DW_TAG_subroutine_type DIE) + */ + +static void +read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; /* Type that this function returns */ + struct type *ftype; /* Function that returns above type */ + struct attribute *attr; + + /* Decode the type that this subroutine returns */ + if (die->type) + { + return; + } + type = die_type (die, cu); + ftype = lookup_function_type (type); + + /* All functions in C++ have prototypes. */ + attr = dwarf2_attr (die, DW_AT_prototyped, cu); + if ((attr && (DW_UNSND (attr) != 0)) + || cu->language == language_cplus) + TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED; + + if (die->child != NULL) + { + struct die_info *child_die; + int nparams = 0; + int iparams = 0; + + /* Count the number of parameters. + FIXME: GDB currently ignores vararg functions, but knows about + vararg member functions. */ + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + nparams++; + else if (child_die->tag == DW_TAG_unspecified_parameters) + TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS; + child_die = sibling_die (child_die); + } + + /* Allocate storage for parameters and fill them in. */ + TYPE_NFIELDS (ftype) = nparams; + TYPE_FIELDS (ftype) = (struct field *) + TYPE_ALLOC (ftype, nparams * sizeof (struct field)); + + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + { + /* Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We pass this information + to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL. */ + attr = dwarf2_attr (child_die, DW_AT_artificial, cu); + if (attr) + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr); + else + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; + TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu); + iparams++; + } + child_die = sibling_die (child_die); + } + } + + die->type = ftype; +} + +static void +read_typedef (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + char *name = NULL; + + if (!die->type) + { + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + name = DW_STRING (attr); + } + die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB, name, objfile); + TYPE_TARGET_TYPE (die->type) = die_type (die, cu); + } +} + +/* Find a representation of a given base type and install + it in the TYPE field of the die. */ + +static void +read_base_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + int encoding = 0, size = 0; + + /* If we've already decoded this die, this is a no-op. */ + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_encoding, cu); + if (attr) + { + encoding = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + size = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + enum type_code code = TYPE_CODE_INT; + int type_flags = 0; + + switch (encoding) + { + case DW_ATE_address: + /* Turn DW_ATE_address into a void * pointer. */ + code = TYPE_CODE_PTR; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_boolean: + code = TYPE_CODE_BOOL; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_complex_float: + code = TYPE_CODE_COMPLEX; + break; + case DW_ATE_float: + code = TYPE_CODE_FLT; + break; + case DW_ATE_signed: + case DW_ATE_signed_char: + break; + case DW_ATE_unsigned: + case DW_ATE_unsigned_char: + type_flags |= TYPE_FLAG_UNSIGNED; + break; + default: + complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'", + dwarf_type_encoding_name (encoding)); + break; + } + type = init_type (code, size, type_flags, DW_STRING (attr), objfile); + if (encoding == DW_ATE_address) + TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID, + cu); + else if (encoding == DW_ATE_complex_float) + { + if (size == 32) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu); + else if (size == 16) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + else if (size == 8) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + } + else + { + type = dwarf_base_type (encoding, size, cu); + } + die->type = type; +} + +/* Read the given DW_AT_subrange DIE. */ + +static void +read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + struct type *range_type; + struct attribute *attr; + int low = 0; + int high = -1; + + /* If we have already decoded this die, then nothing more to do. */ + if (die->type) + return; + + base_type = die_type (die, cu); + if (base_type == NULL) + { + complaint (&symfile_complaints, + "DW_AT_type missing from DW_TAG_subrange_type"); + return; + } + + if (TYPE_CODE (base_type) == TYPE_CODE_VOID) + base_type = alloc_type (NULL); + + if (cu->language == language_fortran) + { + /* FORTRAN implies a lower bound of 1, if not given. */ + low = 1; + } + + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); + if (attr) + low = dwarf2_get_attr_constant_value (attr, 0); + + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (attr) + { + if (attr->form == DW_FORM_block1) + { + /* GCC encodes arrays with unspecified or dynamic length + with a DW_FORM_block1 attribute. + FIXME: GDB does not yet know how to handle dynamic + arrays properly, treat them as arrays with unspecified + length for now. + + FIXME: jimb/2003-09-22: GDB does not really know + how to handle arrays of unspecified length + either; we just represent them as zero-length + arrays. Choose an appropriate upper bound given + the lower bound we've computed above. */ + high = low - 1; + } + else + high = dwarf2_get_attr_constant_value (attr, 1); + } + + range_type = create_range_type (NULL, base_type, low, high); + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + TYPE_NAME (range_type) = DW_STRING (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + TYPE_LENGTH (range_type) = DW_UNSND (attr); + + die->type = range_type; +} + + +/* Read a whole compilation unit into a linked list of dies. */ + +static struct die_info * +read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu) +{ + /* Reset die reference table; we are + building new ones now. */ + dwarf2_empty_hash_tables (); + + return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL); +} + +/* Read a single die and all its descendents. Set the die's sibling + field to NULL; set other fields in the die correctly, and set all + of the descendents' fields correctly. Set *NEW_INFO_PTR to the + location of the info_ptr after reading all of those dies. PARENT + is the parent of the die in question. */ + +static struct die_info * +read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *die; + char *cur_ptr; + int has_children; + + cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children); + store_in_ref_table (die->offset, die); + + if (has_children) + { + die->child = read_die_and_siblings (cur_ptr, abfd, cu, + new_info_ptr, die); + } + else + { + die->child = NULL; + *new_info_ptr = cur_ptr; + } + + die->sibling = NULL; + die->parent = parent; + return die; +} + +/* Read a die, all of its descendents, and all of its siblings; set + all of the fields of all of the dies correctly. Arguments are as + in read_die_and_children. */ + +static struct die_info * +read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *first_die, *last_sibling; + char *cur_ptr; + + cur_ptr = info_ptr; + first_die = last_sibling = NULL; + + while (1) + { + struct die_info *die + = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent); + + if (!first_die) + { + first_die = die; + } + else + { + last_sibling->sibling = die; + } + + if (die->tag == 0) + { + *new_info_ptr = cur_ptr; + return first_die; + } + else + { + last_sibling = die; + } + } +} + +/* Free a linked list of dies. */ + +static void +free_die_list (struct die_info *dies) +{ + struct die_info *die, *next; + + die = dies; + while (die) + { + if (die->child != NULL) + free_die_list (die->child); + next = die->sibling; + xfree (die->attrs); + xfree (die); + die = next; + } +} + +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + +/* Read the contents of the section at OFFSET and of size SIZE from the + object file specified by OBJFILE into the objfile_obstack and return it. */ + +char * +dwarf2_read_section (struct objfile *objfile, asection *sectp) +{ + bfd *abfd = objfile->obfd; + char *buf, *retbuf; + bfd_size_type size = bfd_get_section_size_before_reloc (sectp); + + if (size == 0) + return NULL; + + buf = (char *) obstack_alloc (&objfile->objfile_obstack, size); + retbuf + = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf); + if (retbuf != NULL) + return retbuf; + + if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 + || bfd_bread (buf, size, abfd) != size) + error ("Dwarf Error: Can't read DWARF data from '%s'", + bfd_get_filename (abfd)); + + return buf; +} + +/* In DWARF version 2, the description of the debugging information is + stored in a separate .debug_abbrev section. Before we read any + dies from a section we read in all abbreviations and install them + in a hash table. */ + +static void +dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + char *abbrev_ptr; + struct abbrev_info *cur_abbrev; + unsigned int abbrev_number, bytes_read, abbrev_name; + unsigned int abbrev_form, hash_number; + + /* Initialize dwarf2 abbrevs */ + memset (cu_header->dwarf2_abbrevs, 0, + ABBREV_HASH_SIZE*sizeof (struct abbrev_info *)); + + abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + + /* loop until we reach an abbrev number of 0 */ + while (abbrev_number) + { + cur_abbrev = dwarf_alloc_abbrev (); + + /* read in abbrev header */ + cur_abbrev->number = abbrev_number; + cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + abbrev_ptr += 1; + + /* now read in declarations */ + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + while (abbrev_name) + { + if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) + { + cur_abbrev->attrs = (struct attr_abbrev *) + xrealloc (cur_abbrev->attrs, + (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK) + * sizeof (struct attr_abbrev)); + } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; + cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + } + + hash_number = abbrev_number % ABBREV_HASH_SIZE; + cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number]; + cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev; + + /* Get next abbreviation. + Under Irix6 the abbreviations for a compilation unit are not + always properly terminated with an abbrev number of 0. + Exit loop if we encounter an abbreviation which we have + already read (which means we are about to read the abbreviations + for the next compile unit) or if the end of the abbreviation + table is reached. */ + if ((unsigned int) (abbrev_ptr - dwarf_abbrev_buffer) + >= dwarf_abbrev_size) + break; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL) + break; + } +} + +/* Empty the abbrev table for a new compilation unit. */ + +static void +dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table) +{ + int i; + struct abbrev_info *abbrev, *next; + struct abbrev_info **abbrevs; + + abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table; + + for (i = 0; i < ABBREV_HASH_SIZE; ++i) + { + next = NULL; + abbrev = abbrevs[i]; + while (abbrev) + { + next = abbrev->next; + xfree (abbrev->attrs); + xfree (abbrev); + abbrev = next; + } + abbrevs[i] = NULL; + } +} + +/* Lookup an abbrev_info structure in the abbrev hash table. */ + +static struct abbrev_info * +dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int hash_number; + struct abbrev_info *abbrev; + + hash_number = number % ABBREV_HASH_SIZE; + abbrev = cu_header->dwarf2_abbrevs[hash_number]; + + while (abbrev) + { + if (abbrev->number == number) + return abbrev; + else + abbrev = abbrev->next; + } + return NULL; +} + +/* Read a minimal amount of information into the minimal die structure. */ + +static char * +read_partial_die (struct partial_die_info *part_die, bfd *abfd, + char *info_ptr, struct dwarf2_cu *cu) +{ + unsigned int abbrev_number, bytes_read, i; + struct abbrev_info *abbrev; + struct attribute attr; + struct attribute spec_attr; + int found_spec_attr = 0; + int has_low_pc_attr = 0; + int has_high_pc_attr = 0; + + *part_die = zeroed_partial_die; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + return info_ptr; + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + bfd_get_filename (abfd)); + } + part_die->offset = info_ptr - dwarf_info_buffer; + part_die->tag = abbrev->tag; + part_die->has_children = abbrev->has_children; + part_die->abbrev = abbrev_number; + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu); + + /* Store the data if it is of an attribute we want to keep in a + partial symbol table. */ + switch (attr.name) + { + case DW_AT_name: + + /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ + if (part_die->name == NULL) + part_die->name = DW_STRING (&attr); + break; + case DW_AT_MIPS_linkage_name: + part_die->name = DW_STRING (&attr); + break; + case DW_AT_low_pc: + has_low_pc_attr = 1; + part_die->lowpc = DW_ADDR (&attr); + break; + case DW_AT_high_pc: + has_high_pc_attr = 1; + part_die->highpc = DW_ADDR (&attr); + break; + case DW_AT_location: + /* Support the .debug_loc offsets */ + if (attr_form_is_block (&attr)) + { + part_die->locdesc = DW_BLOCK (&attr); + } + else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "partial symbol information"); + } + break; + case DW_AT_language: + part_die->language = DW_UNSND (&attr); + break; + case DW_AT_external: + part_die->is_external = DW_UNSND (&attr); + break; + case DW_AT_declaration: + part_die->is_declaration = DW_UNSND (&attr); + break; + case DW_AT_type: + part_die->has_type = 1; + break; + case DW_AT_abstract_origin: + case DW_AT_specification: + found_spec_attr = 1; + spec_attr = attr; + break; + case DW_AT_sibling: + /* Ignore absolute siblings, they might point outside of + the current compile unit. */ + if (attr.form == DW_FORM_ref_addr) + complaint (&symfile_complaints, "ignoring absolute DW_AT_sibling"); + else + part_die->sibling = + dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu); + break; + default: + break; + } + } + + /* If we found a reference attribute and the die has no name, try + to find a name in the referred to die. */ + + if (found_spec_attr && part_die->name == NULL) + { + struct partial_die_info spec_die; + char *spec_ptr; + + spec_ptr = dwarf_info_buffer + + dwarf2_get_ref_die_offset (&spec_attr, cu); + read_partial_die (&spec_die, abfd, spec_ptr, cu); + if (spec_die.name) + { + part_die->name = spec_die.name; + + /* Copy DW_AT_external attribute if it is set. */ + if (spec_die.is_external) + part_die->is_external = spec_die.is_external; + } + } + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (has_low_pc_attr && has_high_pc_attr + && part_die->lowpc < part_die->highpc + && (part_die->lowpc != 0 + || (bfd_get_file_flags (abfd) & HAS_RELOC))) + part_die->has_pc_info = 1; + return info_ptr; +} + +/* Read the die from the .debug_info section buffer. Set DIEP to + point to a newly allocated die with its information, except for its + child, sibling, and parent fields. Set HAS_CHILDREN to tell + whether the die has children or not. */ + +static char * +read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu, int *has_children) +{ + unsigned int abbrev_number, bytes_read, i, offset; + struct abbrev_info *abbrev; + struct die_info *die; + + offset = info_ptr - dwarf_info_buffer; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + { + die = dwarf_alloc_die (); + die->tag = 0; + die->abbrev = abbrev_number; + die->type = NULL; + *diep = die; + *has_children = 0; + return info_ptr; + } + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: could not find abbrev number %d [in module %s]", + abbrev_number, + bfd_get_filename (abfd)); + } + die = dwarf_alloc_die (); + die->offset = offset; + die->tag = abbrev->tag; + die->abbrev = abbrev_number; + die->type = NULL; + + die->num_attrs = abbrev->num_attrs; + die->attrs = (struct attribute *) + xmalloc (die->num_attrs * sizeof (struct attribute)); + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i], + abfd, info_ptr, cu); + } + + *diep = die; + *has_children = abbrev->has_children; + return info_ptr; +} + +/* Read an attribute value described by an attribute form. */ + +static char * +read_attribute_value (struct attribute *attr, unsigned form, + bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int bytes_read; + struct dwarf_block *blk; + + attr->form = form; + switch (form) + { + case DW_FORM_addr: + case DW_FORM_ref_addr: + DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block2: + blk = dwarf_alloc_block (); + blk->size = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block4: + blk = dwarf_alloc_block (); + blk->size = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_data4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_data8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_string: + DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block: + blk = dwarf_alloc_block (); + blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block1: + blk = dwarf_alloc_block (); + blk->size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_flag: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_sdata: + DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_ref1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_ref2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_ref4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_ref8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_ref_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); + break; + default: + error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + dwarf_form_name (form), + bfd_get_filename (abfd)); + } + return info_ptr; +} + +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (struct attribute *attr, struct attr_abbrev *abbrev, + bfd *abfd, char *info_ptr, struct dwarf2_cu *cu) +{ + attr->name = abbrev->name; + return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu); +} + +/* read dwarf information from a buffer */ + +static unsigned int +read_1_byte (bfd *abfd, char *buf) +{ + return bfd_get_8 (abfd, (bfd_byte *) buf); +} + +static int +read_1_signed_byte (bfd *abfd, char *buf) +{ + return bfd_get_signed_8 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_2_bytes (bfd *abfd, char *buf) +{ + return bfd_get_16 (abfd, (bfd_byte *) buf); +} + +static int +read_2_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_16 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_4_bytes (bfd *abfd, char *buf) +{ + return bfd_get_32 (abfd, (bfd_byte *) buf); +} + +static int +read_4_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_32 (abfd, (bfd_byte *) buf); +} + +static unsigned long +read_8_bytes (bfd *abfd, char *buf) +{ + return bfd_get_64 (abfd, (bfd_byte *) buf); +} + +static CORE_ADDR +read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read) +{ + struct comp_unit_head *cu_header = &cu->header; + CORE_ADDR retval = 0; + + if (cu_header->signed_addr_p) + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_signed_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_signed_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, signed [in module %s]", + bfd_get_filename (abfd)); + } + } + else + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, unsigned [in module %s]", + bfd_get_filename (abfd)); + } + } + + *bytes_read = cu_header->addr_size; + return retval; +} + +/* Read the initial length from a section. The (draft) DWARF 3 + specification allows the initial length to take up either 4 bytes + or 12 bytes. If the first 4 bytes are 0xffffffff, then the next 8 + bytes describe the length and all offsets will be 8 bytes in length + instead of 4. + + An older, non-standard 64-bit format is also handled by this + function. The older format in question stores the initial length + as an 8-byte quantity without an escape value. Lengths greater + than 2^32 aren't very common which means that the initial 4 bytes + is almost always zero. Since a length value of zero doesn't make + sense for the 32-bit format, this initial zero can be considered to + be an escape value which indicates the presence of the older 64-bit + format. As written, the code can't detect (old format) lengths + greater than 4GB. If it becomes necessary to handle lengths somewhat + larger than 4GB, we could allow other small values (such as the + non-sensical values of 1, 2, and 3) to also be used as escape values + indicating the presence of the old format. + + The value returned via bytes_read should be used to increment + the relevant pointer after calling read_initial_length(). + + As a side effect, this function sets the fields initial_length_size + and offset_size in cu_header to the values appropriate for the + length field. (The format of the initial length field determines + the width of file offsets to be fetched later with fetch_offset().) + + [ Note: read_initial_length() and read_offset() are based on the + document entitled "DWARF Debugging Information Format", revision + 3, draft 8, dated November 19, 2001. This document was obtained + from: + + http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf + + This document is only a draft and is subject to change. (So beware.) + + Details regarding the older, non-standard 64-bit format were + determined empirically by examining 64-bit ELF files produced + by the SGI toolchain on an IRIX 6.5 machine. + + - Kevin, July 16, 2002 + ] */ + +static LONGEST +read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + + if (retval == 0xffffffff) + { + retval = bfd_get_64 (abfd, (bfd_byte *) buf + 4); + *bytes_read = 12; + if (cu_header != NULL) + { + cu_header->initial_length_size = 12; + cu_header->offset_size = 8; + } + } + else if (retval == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats such as that used + by IRIX. */ + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + if (cu_header != NULL) + { + cu_header->initial_length_size = 8; + cu_header->offset_size = 8; + } + } + else + { + *bytes_read = 4; + if (cu_header != NULL) + { + cu_header->initial_length_size = 4; + cu_header->offset_size = 4; + } + } + + return retval; +} + +/* Read an offset from the data stream. The size of the offset is + given by cu_header->offset_size. */ + +static LONGEST +read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + switch (cu_header->offset_size) + { + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + *bytes_read = 4; + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + break; + default: + internal_error (__FILE__, __LINE__, + "read_offset: bad switch [in module %s]", + bfd_get_filename (abfd)); + } + + return retval; +} + +static char * +read_n_bytes (bfd *abfd, char *buf, unsigned int size) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the buffer, otherwise we have to copy the data to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + return buf; +} + +static char * +read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the string, otherwise we have to copy the string to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + if (*buf == '\0') + { + *bytes_read_ptr = 1; + return NULL; + } + *bytes_read_ptr = strlen (buf) + 1; + return buf; +} + +static char * +read_indirect_string (bfd *abfd, char *buf, + const struct comp_unit_head *cu_header, + unsigned int *bytes_read_ptr) +{ + LONGEST str_offset = read_offset (abfd, buf, cu_header, + (int *) bytes_read_ptr); + + if (dwarf_str_buffer == NULL) + { + error ("DW_FORM_strp used without .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + if (str_offset >= dwarf_str_size) + { + error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + gdb_assert (HOST_CHAR_BIT == 8); + if (dwarf_str_buffer[str_offset] == '\0') + return NULL; + return dwarf_str_buffer + str_offset; +} + +static unsigned long +read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + unsigned long result; + unsigned int num_read; + int i, shift; + unsigned char byte; + + result = 0; + shift = 0; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((unsigned long)(byte & 127) << shift); + if ((byte & 128) == 0) + { + break; + } + shift += 7; + } + *bytes_read_ptr = num_read; + return result; +} + +static long +read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + long result; + int i, shift, size, num_read; + unsigned char byte; + + result = 0; + shift = 0; + size = 32; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((long)(byte & 127) << shift); + shift += 7; + if ((byte & 128) == 0) + { + break; + } + } + if ((shift < size) && (byte & 0x40)) + { + result |= -(1 << shift); + } + *bytes_read_ptr = num_read; + return result; +} + +static void +set_cu_language (unsigned int lang, struct dwarf2_cu *cu) +{ + switch (lang) + { + case DW_LANG_C89: + case DW_LANG_C: + cu->language = language_c; + break; + case DW_LANG_C_plus_plus: + cu->language = language_cplus; + break; + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + cu->language = language_fortran; + break; + case DW_LANG_Mips_Assembler: + cu->language = language_asm; + break; + case DW_LANG_Java: + cu->language = language_java; + break; + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + default: + cu->language = language_minimal; + break; + } + cu->language_defn = language_def (cu->language); +} + +/* Return the named attribute or NULL if not there. */ + +static struct attribute * +dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) +{ + unsigned int i; + struct attribute *spec = NULL; + + for (i = 0; i < die->num_attrs; ++i) + { + if (die->attrs[i].name == name) + { + return &die->attrs[i]; + } + if (die->attrs[i].name == DW_AT_specification + || die->attrs[i].name == DW_AT_abstract_origin) + spec = &die->attrs[i]; + } + if (spec) + { + struct die_info *ref_die = + follow_die_ref (dwarf2_get_ref_die_offset (spec, cu)); + + if (ref_die) + return dwarf2_attr (ref_die, name, cu); + } + + return NULL; +} + +static int +die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) +{ + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); +} + +/* Return the die giving the specification for DIE, if there is + one. */ + +static struct die_info * +die_specification (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu); + + if (spec_attr == NULL) + return NULL; + else + return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu)); +} + +/* Free the line_header structure *LH, and any arrays and strings it + refers to. */ +static void +free_line_header (struct line_header *lh) +{ + if (lh->standard_opcode_lengths) + xfree (lh->standard_opcode_lengths); + + /* Remember that all the lh->file_names[i].name pointers are + pointers into debug_line_buffer, and don't need to be freed. */ + if (lh->file_names) + xfree (lh->file_names); + + /* Similarly for the include directory names. */ + if (lh->include_dirs) + xfree (lh->include_dirs); + + xfree (lh); +} + + +/* Add an entry to LH's include directory table. */ +static void +add_include_dir (struct line_header *lh, char *include_dir) +{ + /* Grow the array if necessary. */ + if (lh->include_dirs_size == 0) + { + lh->include_dirs_size = 1; /* for testing */ + lh->include_dirs = xmalloc (lh->include_dirs_size + * sizeof (*lh->include_dirs)); + } + else if (lh->num_include_dirs >= lh->include_dirs_size) + { + lh->include_dirs_size *= 2; + lh->include_dirs = xrealloc (lh->include_dirs, + (lh->include_dirs_size + * sizeof (*lh->include_dirs))); + } + + lh->include_dirs[lh->num_include_dirs++] = include_dir; +} + + +/* Add an entry to LH's file name table. */ +static void +add_file_name (struct line_header *lh, + char *name, + unsigned int dir_index, + unsigned int mod_time, + unsigned int length) +{ + struct file_entry *fe; + + /* Grow the array if necessary. */ + if (lh->file_names_size == 0) + { + lh->file_names_size = 1; /* for testing */ + lh->file_names = xmalloc (lh->file_names_size + * sizeof (*lh->file_names)); + } + else if (lh->num_file_names >= lh->file_names_size) + { + lh->file_names_size *= 2; + lh->file_names = xrealloc (lh->file_names, + (lh->file_names_size + * sizeof (*lh->file_names))); + } + + fe = &lh->file_names[lh->num_file_names++]; + fe->name = name; + fe->dir_index = dir_index; + fe->mod_time = mod_time; + fe->length = length; +} + + +/* Read the statement program header starting at OFFSET in + dwarf_line_buffer, according to the endianness of ABFD. Return a + pointer to a struct line_header, allocated using xmalloc. + + NOTE: the strings in the include directory and file name tables of + the returned object point into debug_line_buffer, and must not be + freed. */ +static struct line_header * +dwarf_decode_line_header (unsigned int offset, bfd *abfd, + struct dwarf2_cu *cu) +{ + struct cleanup *back_to; + struct line_header *lh; + char *line_ptr; + int bytes_read; + int i; + char *cur_dir, *cur_file; + + if (dwarf_line_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_line section"); + return 0; + } + + /* Make sure that at least there's room for the total_length field. That + could be 12 bytes long, but we're just going to fudge that. */ + if (offset + 4 >= dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + + lh = xmalloc (sizeof (*lh)); + memset (lh, 0, sizeof (*lh)); + back_to = make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) lh); + + line_ptr = dwarf_line_buffer + offset; + + /* read in the header */ + lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read); + line_ptr += bytes_read; + if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + lh->statement_program_end = line_ptr + lh->total_length; + lh->version = read_2_bytes (abfd, line_ptr); + line_ptr += 2; + lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read); + line_ptr += bytes_read; + lh->minimum_instruction_length = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->default_is_stmt = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_base = read_1_signed_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_range = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->opcode_base = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->standard_opcode_lengths + = (unsigned char *) xmalloc (lh->opcode_base * sizeof (unsigned char)); + + lh->standard_opcode_lengths[0] = 1; /* This should never be used anyway. */ + for (i = 1; i < lh->opcode_base; ++i) + { + lh->standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + line_ptr += 1; + } + + /* Read directory table */ + while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + line_ptr += bytes_read; + add_include_dir (lh, cur_dir); + } + line_ptr += bytes_read; + + /* Read file name table */ + while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + unsigned int dir_index, mod_time, length; + + line_ptr += bytes_read; + dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + line_ptr += bytes_read; + lh->statement_program_start = line_ptr; + + if (line_ptr > dwarf_line_buffer + dwarf_line_size) + complaint (&symfile_complaints, + "line number info header doesn't fit in `.debug_line' section"); + + discard_cleanups (back_to); + return lh; +} + +/* This function exists to work around a bug in certain compilers + (particularly GCC 2.95), in which the first line number marker of a + function does not show up until after the prologue, right before + the second line number marker. This function shifts ADDRESS down + to the beginning of the function if necessary, and is called on + addresses passed to record_line. */ + +static CORE_ADDR +check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu) +{ + struct function_range *fn; + + /* Find the function_range containing address. */ + if (!cu->first_fn) + return address; + + if (!cu->cached_fn) + cu->cached_fn = cu->first_fn; + + fn = cu->cached_fn; + while (fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + fn = cu->first_fn; + while (fn && fn != cu->cached_fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + return address; + + found: + if (fn->seen_line) + return address; + if (address != fn->lowpc) + complaint (&symfile_complaints, + "misplaced first line number at 0x%lx for '%s'", + (unsigned long) address, fn->name); + fn->seen_line = 1; + return fn->lowpc; +} + +/* Decode the line number information for the compilation unit whose + line number info is at OFFSET in the .debug_line section. + The compilation directory of the file is passed in COMP_DIR. */ + +static void +dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *line_ptr; + char *line_end; + unsigned int bytes_read; + unsigned char op_code, extended_op, adj_opcode; + CORE_ADDR baseaddr; + struct objfile *objfile = cu->objfile; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + line_ptr = lh->statement_program_start; + line_end = lh->statement_program_end; + + /* Read the statement sequences until there's nothing left. */ + while (line_ptr < line_end) + { + /* state machine registers */ + CORE_ADDR address = 0; + unsigned int file = 1; + unsigned int line = 1; + unsigned int column = 0; + int is_stmt = lh->default_is_stmt; + int basic_block = 0; + int end_sequence = 0; + + /* Start a subfile for the current file of the state machine. */ + if (lh->num_file_names >= file) + { + /* lh->include_dirs and lh->file_names are 0-based, but the + directory and file name numbers in the statement program + are 1-based. */ + struct file_entry *fe = &lh->file_names[file - 1]; + char *dir; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + + /* Decode the table. */ + while (!end_sequence) + { + op_code = read_1_byte (abfd, line_ptr); + line_ptr += 1; + + if (op_code >= lh->opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh->opcode_base; + address += (adj_opcode / lh->line_range) + * lh->minimum_instruction_length; + line += lh->line_base + (adj_opcode % lh->line_range); + /* append row to matrix using current values */ + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 1; + } + else switch (op_code) + { + case DW_LNS_extended_op: + line_ptr += 1; /* ignore length */ + extended_op = read_1_byte (abfd, line_ptr); + line_ptr += 1; + switch (extended_op) + { + case DW_LNE_end_sequence: + end_sequence = 1; + record_line (current_subfile, 0, address); + break; + case DW_LNE_set_address: + address = read_address (abfd, line_ptr, cu, &bytes_read); + line_ptr += bytes_read; + address += baseaddr; + break; + case DW_LNE_define_file: + { + char *cur_file; + unsigned int dir_index, mod_time, length; + + cur_file = read_string (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + dir_index = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + break; + default: + complaint (&symfile_complaints, + "mangled .debug_line section"); + return; + } + break; + case DW_LNS_copy: + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 0; + break; + case DW_LNS_advance_pc: + address += lh->minimum_instruction_length + * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_advance_line: + line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_set_file: + { + /* lh->include_dirs and lh->file_names are 0-based, + but the directory and file name numbers in the + statement program are 1-based. */ + struct file_entry *fe; + char *dir; + file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + fe = &lh->file_names[file - 1]; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + break; + case DW_LNS_set_column: + column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_negate_stmt: + is_stmt = (!is_stmt); + break; + case DW_LNS_set_basic_block: + basic_block = 1; + break; + /* Add to the address register of the state machine the + address increment value corresponding to special opcode + 255. Ie, this value is scaled by the minimum instruction + length since special opcode 255 would have scaled the + the increment. */ + case DW_LNS_const_add_pc: + address += (lh->minimum_instruction_length + * ((255 - lh->opcode_base) / lh->line_range)); + break; + case DW_LNS_fixed_advance_pc: + address += read_2_bytes (abfd, line_ptr); + line_ptr += 2; + break; + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh->standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } + } + } + } +} + +/* Start a subfile for DWARF. FILENAME is the name of the file and + DIRNAME the name of the source directory which contains FILENAME + or NULL if not known. + This routine tries to keep line numbers from identical absolute and + relative file names in a common subfile. + + Using the `list' example from the GDB testsuite, which resides in + /srcdir and compiling it with Irix6.2 cc in /compdir using a filename + of /srcdir/list0.c yields the following debugging information for list0.c: + + DW_AT_name: /srcdir/list0.c + DW_AT_comp_dir: /compdir + files.files[0].name: list0.h + files.files[0].dir: /srcdir + files.files[1].name: list0.c + files.files[1].dir: /srcdir + + The line number information for list0.c has to end up in a single + subfile, so that `break /srcdir/list0.c:1' works as expected. */ + +static void +dwarf2_start_subfile (char *filename, char *dirname) +{ + /* If the filename isn't absolute, try to match an existing subfile + with the full pathname. */ + + if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) + { + struct subfile *subfile; + char *fullname = concat (dirname, "/", filename, NULL); + + for (subfile = subfiles; subfile; subfile = subfile->next) + { + if (FILENAME_CMP (subfile->name, fullname) == 0) + { + current_subfile = subfile; + xfree (fullname); + return; + } + } + xfree (fullname); + } + start_subfile (filename, dirname); +} + +static void +var_decode_location (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + + /* NOTE drow/2003-01-30: There used to be a comment and some special + code here to turn a symbol with DW_AT_external and a + SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was + necessary for platforms (maybe Alpha, certainly PowerPC GNU/Linux + with some versions of binutils) where shared libraries could have + relocations against symbols in their debug information - the + minimal symbol would have the right address, but the debug info + would not. It's no longer necessary, because we will explicitly + apply relocations when we read in the debug information now. */ + + /* A DW_AT_location attribute with no contents indicates that a + variable has been optimized away. */ + if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0) + { + SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; + return; + } + + /* Handle one degenerate form of location expression specially, to + preserve GDB's previous behavior when section offsets are + specified. If this is just a DW_OP_addr then mark this symbol + as LOC_STATIC. */ + + if (attr_form_is_block (attr) + && DW_BLOCK (attr)->size == 1 + cu_header->addr_size + && DW_BLOCK (attr)->data[0] == DW_OP_addr) + { + int dummy; + + SYMBOL_VALUE_ADDRESS (sym) = + read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy); + fixup_symbol_section (sym, objfile); + SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, + SYMBOL_SECTION (sym)); + SYMBOL_CLASS (sym) = LOC_STATIC; + return; + } + + /* NOTE drow/2002-01-30: It might be worthwhile to have a static + expression evaluator, and use LOC_COMPUTED only when necessary + (i.e. when the value of a register or memory location is + referenced, or a thread-local block, etc.). Then again, it might + not be worthwhile. I'm assuming that it isn't unless performance + or memory numbers show me otherwise. */ + + dwarf2_symbol_mark_computed (attr, sym, cu); + SYMBOL_CLASS (sym) = LOC_COMPUTED; +} + +/* Given a pointer to a DWARF information entry, figure out if we need + to make a symbol table entry for it, and if so, create a new entry + and return a pointer to it. + If TYPE is NULL, determine symbol type from the die, otherwise + used the passed type. */ + +static struct symbol * +new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct symbol *sym = NULL; + char *name; + struct attribute *attr = NULL; + struct attribute *attr2 = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + + if (name) + { + sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + OBJSTAT (objfile, n_syms++); + memset (sym, 0, sizeof (struct symbol)); + + /* Cache this symbol's name and the name's demangled form (if any). */ + SYMBOL_LANGUAGE (sym) = cu->language; + SYMBOL_SET_NAMES (sym, name, strlen (name), objfile); + + /* Default assumptions. + Use the passed type or decode it from the die. */ + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_CLASS (sym) = LOC_STATIC; + if (type != NULL) + SYMBOL_TYPE (sym) = type; + else + SYMBOL_TYPE (sym) = die_type (die, cu); + attr = dwarf2_attr (die, DW_AT_decl_line, cu); + if (attr) + { + SYMBOL_LINE (sym) = DW_UNSND (attr); + } + switch (die->tag) + { + case DW_TAG_label: + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = DW_ADDR (attr) + baseaddr; + } + SYMBOL_CLASS (sym) = LOC_LABEL; + break; + case DW_TAG_subprogram: + /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by + finish_block. */ + SYMBOL_CLASS (sym) = LOC_BLOCK; + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + { + add_symbol_to_list (sym, &global_symbols); + } + else + { + add_symbol_to_list (sym, cu->list_in_scope); + } + break; + case DW_TAG_variable: + /* Compilation with minimal debug info may result in variables + with missing type entries. Change the misleading `void' type + to something sensible. */ + if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID) + SYMBOL_TYPE (sym) = init_type (TYPE_CODE_INT, + TARGET_INT_BIT / HOST_CHAR_BIT, 0, + "", + objfile); + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + break; + } + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + } + else + { + /* We do not know the address of this symbol. + If it is an external symbol and we have type information + for it, enter the symbol as a LOC_UNRESOLVED symbol. + The address of the variable will then be determined from + the minimal symbol table whenever the variable is + referenced. */ + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0) + && dwarf2_attr (die, DW_AT_type, cu) != NULL) + { + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; + add_symbol_to_list (sym, &global_symbols); + } + } + break; + case DW_TAG_formal_parameter: + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_unspecified_parameters: + /* From varargs functions; gdb doesn't seem to have any + interest in this information, so just ignore it for now. + (FIXME?) */ + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; + + /* Make sure that the symbol includes appropriate enclosing + classes/namespaces in its name. These are calculated in + read_structure_type, and the correct name is saved in + the type. */ + + if (cu->language == language_cplus) + { + struct type *type = SYMBOL_TYPE (sym); + + if (TYPE_TAG_NAME (type) != NULL) + { + /* FIXME: carlton/2003-11-10: Should this use + SYMBOL_SET_NAMES instead? (The same problem also + arises a further down in the function.) */ + SYMBOL_LINKAGE_NAME (sym) + = obsavestring (TYPE_TAG_NAME (type), + strlen (TYPE_TAG_NAME (type)), + &objfile->objfile_obstack); + } + } + + { + /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't + really ever be static objects: otherwise, if you try + to, say, break of a class's method and you're in a file + which doesn't mention that class, it won't work unless + the check for all static symbols in lookup_symbol_aux + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + + /* The semantics of C++ state that "struct foo { ... }" also + defines a typedef for "foo". Synthesize a typedef symbol so + that "ptype foo" works as expected. */ + if (cu->language == language_cplus) + { + struct symbol *typedef_sym = (struct symbol *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + *typedef_sym = *sym; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; + if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + TYPE_NAME (SYMBOL_TYPE (sym)) = + obsavestring (SYMBOL_NATURAL_NAME (sym), + strlen (SYMBOL_NATURAL_NAME (sym)), + &objfile->objfile_obstack); + add_symbol_to_list (typedef_sym, list_to_add); + } + } + break; + case DW_TAG_typedef: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_enumerator: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + { + /* NOTE: carlton/2003-11-10: See comment above in the + DW_TAG_class_type, etc. block. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + } + break; + case DW_TAG_namespace: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + add_symbol_to_list (sym, &global_symbols); + break; + default: + /* Not a tag we recognize. Hopefully we aren't processing + trash data, but since we must specifically ignore things + we don't recognize, there is nothing else we should do at + this point. */ + complaint (&symfile_complaints, "unsupported tag: '%s'", + dwarf_tag_name (die->tag)); + break; + } + } + return (sym); +} + +/* Copy constant value from an attribute to a symbol. */ + +static void +dwarf2_const_value (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct dwarf_block *blk; + + switch (attr->form) + { + case DW_FORM_addr: + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + cu_header->addr_size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); + /* NOTE: cagney/2003-05-09: In-lined store_address call with + it's body - store_unsigned_integer. */ + store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, + DW_ADDR (attr)); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + blk = DW_BLOCK (attr); + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + blk->size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, blk->size); + memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + + /* The DW_AT_const_value attributes are supposed to carry the + symbol's value "represented as it would be on the target + architecture." By the time we get here, it's already been + converted to host endianness, so we just need to sign- or + zero-extend it as appropriate. */ + case DW_FORM_data1: + dwarf2_const_value_data (attr, sym, 8); + break; + case DW_FORM_data2: + dwarf2_const_value_data (attr, sym, 16); + break; + case DW_FORM_data4: + dwarf2_const_value_data (attr, sym, 32); + break; + case DW_FORM_data8: + dwarf2_const_value_data (attr, sym, 64); + break; + + case DW_FORM_sdata: + SYMBOL_VALUE (sym) = DW_SND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + case DW_FORM_udata: + SYMBOL_VALUE (sym) = DW_UNSND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + default: + complaint (&symfile_complaints, + "unsupported const value attribute form: '%s'", + dwarf_form_name (attr->form)); + SYMBOL_VALUE (sym) = 0; + SYMBOL_CLASS (sym) = LOC_CONST; + break; + } +} + + +/* Given an attr with a DW_FORM_dataN value in host byte order, sign- + or zero-extend it as appropriate for the symbol's type. */ +static void +dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits) +{ + LONGEST l = DW_UNSND (attr); + + if (bits < sizeof (l) * 8) + { + if (TYPE_UNSIGNED (SYMBOL_TYPE (sym))) + l &= ((LONGEST) 1 << bits) - 1; + else + l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits); + } + + SYMBOL_VALUE (sym) = l; + SYMBOL_CLASS (sym) = LOC_CONST; +} + + +/* Return the type of the die in question using its DW_AT_type attribute. */ + +static struct type * +die_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *type_attr; + struct die_info *type_die; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_type, cu); + if (!type_attr) + { + /* A missing DW_AT_type represents a void type. */ + return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu); + } + else + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", + ref, cu->objfile->name); + return NULL; + } + } + type = tag_type_to_type (type_die, cu); + if (!type) + { + dump_die (type_die); + error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +/* Return the containing type of the die in question using its + DW_AT_containing_type attribute. */ + +static struct type * +die_containing_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type = NULL; + struct attribute *type_attr; + struct die_info *type_die = NULL; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_containing_type, cu); + if (type_attr) + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref, + cu->objfile->name); + return NULL; + } + type = tag_type_to_type (type_die, cu); + } + if (!type) + { + if (type_die) + dump_die (type_die); + error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +#if 0 +static struct type * +type_at_offset (unsigned int offset, struct dwarf2_cu *cu) +{ + struct die_info *die; + struct type *type; + + die = follow_die_ref (offset); + if (!die) + { + error ("Dwarf Error: Cannot find type referent at offset %d.", offset); + return NULL; + } + type = tag_type_to_type (die, cu); + return type; +} +#endif + +static struct type * +tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) +{ + if (die->type) + { + return die->type; + } + else + { + read_type_die (die, cu); + if (!die->type) + { + dump_die (die); + error ("Dwarf Error: Cannot find type of die [in module %s]", + cu->objfile->name); + } + return die->type; + } +} + +static void +read_type_die (struct die_info *die, struct dwarf2_cu *cu) +{ + char *prefix = determine_prefix (die, cu); + const char *old_prefix = processing_current_prefix; + struct cleanup *back_to = make_cleanup (xfree, prefix); + processing_current_prefix = prefix; + + switch (die->tag) + { + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +#ifdef CRASH_MERGE + process_structure_scope (die, cu); +#endif + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); +#ifdef CRASH_MERGE + process_enumeration_scope (die, cu); +#endif + break; + case DW_TAG_subprogram: + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_const_type: + read_tag_const_type (die, cu); + break; + case DW_TAG_volatile_type: + read_tag_volatile_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + case DW_TAG_typedef: + read_typedef (die, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + break; + case DW_TAG_base_type: + read_base_type (die, cu); +#ifdef CRASH_MERGE + new_symbol (die, die->type, cu); +#endif + break; + default: + complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'", + dwarf_tag_name (die->tag)); + break; + } + + processing_current_prefix = old_prefix; + do_cleanups (back_to); +} + +/* Return the name of the namespace/class that DIE is defined within, + or "" if we can't tell. The caller should xfree the result. */ + +/* NOTE: carlton/2004-01-23: See read_func_scope (and the comment + therein) for an example of how to use this function to deal with + DW_AT_specification. */ + +static char * +determine_prefix (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *parent; + + if (cu->language != language_cplus) + return NULL; + + parent = die->parent; + + if (parent == NULL) + { + return xstrdup (""); + } + else + { + switch (parent->tag) { + case DW_TAG_namespace: + { + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } + } + default: + return determine_prefix (parent, cu); + } + } +} + +/* Return a newly-allocated string formed by concatenating PREFIX, + "::", and SUFFIX, except that if PREFIX is NULL or the empty + string, just return a copy of SUFFIX. */ + +static char * +typename_concat (const char *prefix, const char *suffix) +{ + if (prefix == NULL || prefix[0] == '\0') + return xstrdup (suffix); + else + { + char *retval = xmalloc (strlen (prefix) + 2 + strlen (suffix) + 1); + + strcpy (retval, prefix); + strcat (retval, "::"); + strcat (retval, suffix); + + return retval; + } +} + +static struct type * +dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + + /* FIXME - this should not produce a new (struct type *) + every time. It should cache base types. */ + struct type *type; + switch (encoding) + { + case DW_ATE_address: + type = dwarf2_fundamental_type (objfile, FT_VOID, cu); + return type; + case DW_ATE_boolean: + type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu); + return type; + case DW_ATE_complex_float: + if (size == 16) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu); + } + return type; + case DW_ATE_float: + if (size == 8) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + return type; + case DW_ATE_signed: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_signed_char: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + return type; + case DW_ATE_unsigned: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_unsigned_char: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + return type; + default: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + return type; + } +} + +#if 0 +struct die_info * +copy_die (struct die_info *old_die) +{ + struct die_info *new_die; + int i, num_attrs; + + new_die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (new_die, 0, sizeof (struct die_info)); + + new_die->tag = old_die->tag; + new_die->has_children = old_die->has_children; + new_die->abbrev = old_die->abbrev; + new_die->offset = old_die->offset; + new_die->type = NULL; + + num_attrs = old_die->num_attrs; + new_die->num_attrs = num_attrs; + new_die->attrs = (struct attribute *) + xmalloc (num_attrs * sizeof (struct attribute)); + + for (i = 0; i < old_die->num_attrs; ++i) + { + new_die->attrs[i].name = old_die->attrs[i].name; + new_die->attrs[i].form = old_die->attrs[i].form; + new_die->attrs[i].u.addr = old_die->attrs[i].u.addr; + } + + new_die->next = NULL; + return new_die; +} +#endif + +/* Return sibling of die, NULL if no sibling. */ + +static struct die_info * +sibling_die (struct die_info *die) +{ + return die->sibling; +} + +/* Get linkage name of a die, return NULL if not found. */ + +static char * +dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Get name of a die, return NULL if not found. */ + +static char * +dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Return the die that this die in an extension of, or NULL if there + is none. */ + +static struct die_info * +dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + struct die_info *extension_die; + unsigned int ref; + + attr = dwarf2_attr (die, DW_AT_extension, cu); + if (attr == NULL) + return NULL; + + ref = dwarf2_get_ref_die_offset (attr, cu); + extension_die = follow_die_ref (ref); + if (!extension_die) + { + error ("Dwarf Error: Cannot find referent at offset %d.", ref); + } + + return extension_die; +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (unsigned tag) +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_dwarf_procedure: + return "DW_TAG_dwarf_procedure"; + case DW_TAG_restrict_type: + return "DW_TAG_restrict_type"; + case DW_TAG_interface_type: + return "DW_TAG_interface_type"; + case DW_TAG_namespace: + return "DW_TAG_namespace"; + case DW_TAG_imported_module: + return "DW_TAG_imported_module"; + case DW_TAG_unspecified_type: + return "DW_TAG_unspecified_type"; + case DW_TAG_partial_unit: + return "DW_TAG_partial_unit"; + case DW_TAG_imported_unit: + return "DW_TAG_imported_unit"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (unsigned attr) +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + case DW_AT_allocated: + return "DW_AT_allocated"; + case DW_AT_associated: + return "DW_AT_associated"; + case DW_AT_data_location: + return "DW_AT_data_location"; + case DW_AT_stride: + return "DW_AT_stride"; + case DW_AT_entry_pc: + return "DW_AT_entry_pc"; + case DW_AT_use_UTF8: + return "DW_AT_use_UTF8"; + case DW_AT_extension: + return "DW_AT_extension"; + case DW_AT_ranges: + return "DW_AT_ranges"; + case DW_AT_trampoline: + return "DW_AT_trampoline"; + case DW_AT_call_column: + return "DW_AT_call_column"; + case DW_AT_call_file: + return "DW_AT_call_file"; + case DW_AT_call_line: + return "DW_AT_call_line"; +#ifdef MIPS + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; +#endif + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + default: + return "DW_AT_"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (unsigned form) +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (unsigned op) +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + /* DWARF 3 extensions. */ + case DW_OP_push_object_address: + return "DW_OP_push_object_address"; + case DW_OP_call2: + return "DW_OP_call2"; + case DW_OP_call4: + return "DW_OP_call4"; + case DW_OP_call_ref: + return "DW_OP_call_ref"; + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + return "DW_OP_GNU_push_tls_address"; + default: + return "OP_"; + } +} + +static char * +dwarf_bool_name (unsigned mybool) +{ + if (mybool) + return "TRUE"; + else + return "FALSE"; +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (unsigned enc) +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + case DW_ATE_imaginary_float: + return "DW_ATE_imaginary_float"; + default: + return "DW_ATE_"; + } +} + +/* Convert a DWARF call frame info operation to its string name. */ + +#if 0 +static char * +dwarf_cfi_name (unsigned cfi_opc) +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ + case DW_CFA_def_cfa_expression: + return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + case DW_CFA_GNU_negative_offset_extended: + return "DW_CFA_GNU_negative_offset_extended"; + + default: + return "DW_CFA_"; + } +} +#endif + +static void +dump_die (struct die_info *die) +{ + unsigned int i; + + fprintf_unfiltered (gdb_stderr, "Die: %s (abbrev = %d, offset = %d)\n", + dwarf_tag_name (die->tag), die->abbrev, die->offset); + fprintf_unfiltered (gdb_stderr, "\thas children: %s\n", + dwarf_bool_name (die->child != NULL)); + + fprintf_unfiltered (gdb_stderr, "\tattributes:\n"); + for (i = 0; i < die->num_attrs; ++i) + { + fprintf_unfiltered (gdb_stderr, "\t\t%s (%s) ", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); + switch (die->attrs[i].form) + { + case DW_FORM_ref_addr: + case DW_FORM_addr: + fprintf_unfiltered (gdb_stderr, "address: "); + print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr); + break; + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_block1: + fprintf_unfiltered (gdb_stderr, "block: size %d", DW_BLOCK (&die->attrs[i])->size); + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_udata: + case DW_FORM_sdata: + fprintf_unfiltered (gdb_stderr, "constant: %ld", DW_UNSND (&die->attrs[i])); + break; + case DW_FORM_string: + case DW_FORM_strp: + fprintf_unfiltered (gdb_stderr, "string: \"%s\"", + DW_STRING (&die->attrs[i]) + ? DW_STRING (&die->attrs[i]) : ""); + break; + case DW_FORM_flag: + if (DW_UNSND (&die->attrs[i])) + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + else + fprintf_unfiltered (gdb_stderr, "flag: FALSE"); + break; + case DW_FORM_indirect: + /* the reader will have reduced the indirect form to + the "base form" so this form should not occur */ + fprintf_unfiltered (gdb_stderr, "unexpected attribute form: DW_FORM_indirect"); + break; + default: + fprintf_unfiltered (gdb_stderr, "unsupported attribute form: %d.", + die->attrs[i].form); + } + fprintf_unfiltered (gdb_stderr, "\n"); + } +} + +static void +dump_die_list (struct die_info *die) +{ + while (die) + { + dump_die (die); + if (die->child != NULL) + dump_die_list (die->child); + if (die->sibling != NULL) + dump_die_list (die->sibling); + } +} + +static void +store_in_ref_table (unsigned int offset, struct die_info *die) +{ + int h; + struct die_info *old; + + h = (offset % REF_HASH_SIZE); + old = die_ref_table[h]; + die->next_ref = old; + die_ref_table[h] = die; +} + + +static void +dwarf2_empty_hash_tables (void) +{ + memset (die_ref_table, 0, sizeof (die_ref_table)); +} + +static unsigned int +dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu) +{ + unsigned int result = 0; + + switch (attr->form) + { + case DW_FORM_ref_addr: + result = DW_ADDR (attr); + break; + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_ref8: + case DW_FORM_ref_udata: + result = cu->header.offset + DW_UNSND (attr); + break; + default: + complaint (&symfile_complaints, + "unsupported die ref attribute form: '%s'", + dwarf_form_name (attr->form)); + } + return result; +} + +/* Return the constant value held by the given attribute. Return -1 + if the value held by the attribute is not constant. */ + +static int +dwarf2_get_attr_constant_value (struct attribute *attr, int default_value) +{ + if (attr->form == DW_FORM_sdata) + return DW_SND (attr); + else if (attr->form == DW_FORM_udata + || attr->form == DW_FORM_data1 + || attr->form == DW_FORM_data2 + || attr->form == DW_FORM_data4 + || attr->form == DW_FORM_data8) + return DW_UNSND (attr); + else + { + complaint (&symfile_complaints, "Attribute value is not a constant (%s)", + dwarf_form_name (attr->form)); + return default_value; + } +} + +static struct die_info * +follow_die_ref (unsigned int offset) +{ + struct die_info *die; + int h; + + h = (offset % REF_HASH_SIZE); + die = die_ref_table[h]; + while (die) + { + if (die->offset == offset) + { + return die; + } + die = die->next_ref; + } + return NULL; +} + +static struct type * +dwarf2_fundamental_type (struct objfile *objfile, int typeid, + struct dwarf2_cu *cu) +{ + if (typeid < 0 || typeid >= FT_NUM_MEMBERS) + { + error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + typeid, objfile->name); + } + + /* Look for this particular type in the fundamental type vector. If + one is not found, create and install one appropriate for the + current language and the current target machine. */ + + if (cu->ftypes[typeid] == NULL) + { + cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid); + } + + return (cu->ftypes[typeid]); +} + +/* Decode simple location descriptions. + Given a pointer to a dwarf block that defines a location, compute + the location and return the value. + + NOTE drow/2003-11-18: This function is called in two situations + now: for the address of static or global variables (partial symbols + only) and for offsets into structures which are expected to be + (more or less) constant. The partial symbol case should go away, + and only the constant case should remain. That will let this + function complain more accurately. A few special modes are allowed + without complaint for global variables (for instance, global + register values and thread-local values). + + A location description containing no operations indicates that the + object is optimized out. The return value is 0 for that case. + FIXME drow/2003-11-16: No callers check for this case any more; soon all + callers will only want a very basic result and this can become a + complaint. + + When the result is a register number, the global isreg flag is set, + otherwise it is cleared. + + Note that stack[0] is unused except as a default error return. + Note that stack overflow is not yet handled. */ + +static CORE_ADDR +decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + int i; + int size = blk->size; + char *data = blk->data; + CORE_ADDR stack[64]; + int stacki; + unsigned int bytes_read, unsnd; + unsigned char op; + + i = 0; + stacki = 0; + stack[stacki] = 0; + isreg = 0; + + while (i < size) + { + op = data[i++]; + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + stack[++stacki] = op - DW_OP_lit0; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + isreg = 1; + stack[++stacki] = op - DW_OP_reg0; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_regx: + isreg = 1; + unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + stack[++stacki] = unsnd; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_addr: + stack[++stacki] = read_address (objfile->obfd, &data[i], + cu, &bytes_read); + i += bytes_read; + break; + + case DW_OP_const1u: + stack[++stacki] = read_1_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const1s: + stack[++stacki] = read_1_signed_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const2u: + stack[++stacki] = read_2_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const2s: + stack[++stacki] = read_2_signed_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const4u: + stack[++stacki] = read_4_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_const4s: + stack[++stacki] = read_4_signed_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_constu: + stack[++stacki] = read_unsigned_leb128 (NULL, (data + i), + &bytes_read); + i += bytes_read; + break; + + case DW_OP_consts: + stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_dup: + stack[stacki + 1] = stack[stacki]; + stacki++; + break; + + case DW_OP_plus: + stack[stacki - 1] += stack[stacki]; + stacki--; + break; + + case DW_OP_plus_uconst: + stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_minus: + stack[stacki - 1] -= stack[stacki]; + stacki--; + break; + + case DW_OP_deref: + /* If we're not the last op, then we definitely can't encode + this using GDB's address_class enum. This is valid for partial + global symbols, although the variable's address will be bogus + in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_GNU_push_tls_address: + /* The top of the stack has the offset from the beginning + of the thread control block at which the variable is located. */ + /* Nothing should follow this operator, so the top of stack would + be returned. */ + /* This is valid for partial global symbols, but the variable's + address will be bogus in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + default: + complaint (&symfile_complaints, "unsupported stack op: '%s'", + dwarf_stack_op_name (op)); + return (stack[stacki]); + } + } + return (stack[stacki]); +} + +/* memory allocation interface */ + +static void +dwarf2_free_tmp_obstack (void *ignore) +{ + obstack_free (&dwarf2_tmp_obstack, NULL); +} + +static struct dwarf_block * +dwarf_alloc_block (void) +{ + struct dwarf_block *blk; + + blk = (struct dwarf_block *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct dwarf_block)); + return (blk); +} + +static struct abbrev_info * +dwarf_alloc_abbrev (void) +{ + struct abbrev_info *abbrev; + + abbrev = (struct abbrev_info *) xmalloc (sizeof (struct abbrev_info)); + memset (abbrev, 0, sizeof (struct abbrev_info)); + return (abbrev); +} + +static struct die_info * +dwarf_alloc_die (void) +{ + struct die_info *die; + + die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (die, 0, sizeof (struct die_info)); + return (die); +} + + +/* Macro support. */ + + +/* Return the full name of file number I in *LH's file name table. + Use COMP_DIR as the name of the current directory of the + compilation. The result is allocated using xmalloc; the caller is + responsible for freeing it. */ +static char * +file_full_name (int file, struct line_header *lh, const char *comp_dir) +{ + struct file_entry *fe = &lh->file_names[file - 1]; + + if (IS_ABSOLUTE_PATH (fe->name)) + return xstrdup (fe->name); + else + { + const char *dir; + int dir_len; + char *full_name; + + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + + if (dir) + { + dir_len = strlen (dir); + full_name = xmalloc (dir_len + 1 + strlen (fe->name) + 1); + strcpy (full_name, dir); + full_name[dir_len] = '/'; + strcpy (full_name + dir_len + 1, fe->name); + return full_name; + } + else + return xstrdup (fe->name); + } +} + + +static struct macro_source_file * +macro_start_file (int file, int line, + struct macro_source_file *current_file, + const char *comp_dir, + struct line_header *lh, struct objfile *objfile) +{ + /* The full name of this source file. */ + char *full_name = file_full_name (file, lh, comp_dir); + + /* We don't create a macro table for this compilation unit + at all until we actually get a filename. */ + if (! pending_macros) + pending_macros = new_macro_table (&objfile->objfile_obstack, + objfile->macro_cache); + + if (! current_file) + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + else + current_file = macro_include (current_file, line, full_name); + + xfree (full_name); + + return current_file; +} + + +/* Copy the LEN characters at BUF to a xmalloc'ed block of memory, + followed by a null byte. */ +static char * +copy_string (const char *buf, int len) +{ + char *s = xmalloc (len + 1); + memcpy (s, buf, len); + s[len] = '\0'; + + return s; +} + + +static const char * +consume_improper_spaces (const char *p, const char *body) +{ + if (*p == ' ') + { + complaint (&symfile_complaints, + "macro definition contains spaces in formal argument list:\n`%s'", + body); + + while (*p == ' ') + p++; + } + + return p; +} + + +static void +parse_macro_definition (struct macro_source_file *file, int line, + const char *body) +{ + const char *p; + + /* The body string takes one of two forms. For object-like macro + definitions, it should be: + + " " + + For function-like macro definitions, it should be: + + "() " + or + "(" ( "," ) * ") " + + Spaces may appear only where explicitly indicated, and in the + . + + The Dwarf 2 spec says that an object-like macro's name is always + followed by a space, but versions of GCC around March 2002 omit + the space when the macro's definition is the empty string. + + The Dwarf 2 spec says that there should be no spaces between the + formal arguments in a function-like macro's formal argument list, + but versions of GCC around March 2002 include spaces after the + commas. */ + + + /* Find the extent of the macro name. The macro name is terminated + by either a space or null character (for an object-like macro) or + an opening paren (for a function-like macro). */ + for (p = body; *p; p++) + if (*p == ' ' || *p == '(') + break; + + if (*p == ' ' || *p == '\0') + { + /* It's an object-like macro. */ + int name_len = p - body; + char *name = copy_string (body, name_len); + const char *replacement; + + if (*p == ' ') + replacement = body + name_len + 1; + else + { + dwarf2_macro_malformed_definition_complaint (body); + replacement = body + name_len; + } + + macro_define_object (file, line, name, replacement); + + xfree (name); + } + else if (*p == '(') + { + /* It's a function-like macro. */ + char *name = copy_string (body, p - body); + int argc = 0; + int argv_size = 1; + char **argv = xmalloc (argv_size * sizeof (*argv)); + + p++; + + p = consume_improper_spaces (p, body); + + /* Parse the formal argument list. */ + while (*p && *p != ')') + { + /* Find the extent of the current argument name. */ + const char *arg_start = p; + + while (*p && *p != ',' && *p != ')' && *p != ' ') + p++; + + if (! *p || p == arg_start) + dwarf2_macro_malformed_definition_complaint (body); + else + { + /* Make sure argv has room for the new argument. */ + if (argc >= argv_size) + { + argv_size *= 2; + argv = xrealloc (argv, argv_size * sizeof (*argv)); + } + + argv[argc++] = copy_string (arg_start, p - arg_start); + } + + p = consume_improper_spaces (p, body); + + /* Consume the comma, if present. */ + if (*p == ',') + { + p++; + + p = consume_improper_spaces (p, body); + } + } + + if (*p == ')') + { + p++; + + if (*p == ' ') + /* Perfectly formed definition, no complaints. */ + macro_define_function (file, line, name, + argc, (const char **) argv, + p + 1); + else if (*p == '\0') + { + /* Complain, but do define it. */ + dwarf2_macro_malformed_definition_complaint (body); + macro_define_function (file, line, name, + argc, (const char **) argv, + p); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + + xfree (name); + { + int i; + + for (i = 0; i < argc; i++) + xfree (argv[i]); + } + xfree (argv); + } + else + dwarf2_macro_malformed_definition_complaint (body); +} + + +static void +dwarf_decode_macros (struct line_header *lh, unsigned int offset, + char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *mac_ptr, *mac_end; + struct macro_source_file *current_file = 0; + + if (dwarf_macinfo_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_macinfo section"); + return; + } + + mac_ptr = dwarf_macinfo_buffer + offset; + mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size; + + for (;;) + { + enum dwarf_macinfo_record_type macinfo_type; + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + macinfo_type = read_1_byte (abfd, mac_ptr); + mac_ptr++; + + switch (macinfo_type) + { + /* A zero macinfo type indicates the end of the macro + information. */ + case 0: + return; + + case DW_MACINFO_define: + case DW_MACINFO_undef: + { + int bytes_read; + int line; + char *body; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + body = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + if (! current_file) + complaint (&symfile_complaints, + "debug info gives macro %s outside of any file: %s", + macinfo_type == + DW_MACINFO_define ? "definition" : macinfo_type == + DW_MACINFO_undef ? "undefinition" : + "something-or-other", body); + else + { + if (macinfo_type == DW_MACINFO_define) + parse_macro_definition (current_file, line, body); + else if (macinfo_type == DW_MACINFO_undef) + macro_undef (current_file, line, body); + } + } + break; + + case DW_MACINFO_start_file: + { + int bytes_read; + int line, file; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + current_file = macro_start_file (file, line, + current_file, comp_dir, + lh, cu->objfile); + } + break; + + case DW_MACINFO_end_file: + if (! current_file) + complaint (&symfile_complaints, + "macro debug info has an unmatched `close_file' directive"); + else + { + current_file = current_file->included_by; + if (! current_file) + { + enum dwarf_macinfo_record_type next_type; + + /* GCC circa March 2002 doesn't produce the zero + type byte marking the end of the compilation + unit. Complain if it's not there, but exit no + matter what. */ + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + /* We don't increment mac_ptr here, so this is just + a look-ahead. */ + next_type = read_1_byte (abfd, mac_ptr); + if (next_type != 0) + complaint (&symfile_complaints, + "no terminating 0-type entry for macros in `.debug_macinfo' section"); + + return; + } + } + break; + + case DW_MACINFO_vendor_ext: + { + int bytes_read; + int constant; + char *string; + + constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + string = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + /* We don't recognize any vendor extensions. */ + } + break; + } + } +} + +/* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ +static int +attr_form_is_block (struct attribute *attr) +{ + return (attr == NULL ? 0 : + attr->form == DW_FORM_block1 + || attr->form == DW_FORM_block2 + || attr->form == DW_FORM_block4 + || attr->form == DW_FORM_block); +} + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + struct dwarf2_loclist_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_loclist_baton)); + baton->objfile = cu->objfile; + + /* We don't know how long the location list is, but make sure we + don't run off the edge of the section. */ + baton->size = dwarf_loc_size - DW_UNSND (attr); + baton->data = dwarf_loc_buffer + DW_UNSND (attr); + baton->base_address = cu->header.base_address; + if (cu->header.base_known == 0) + complaint (&symfile_complaints, + "Location list used without specifying the CU base address."); + + SYMBOL_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } + else + { + struct dwarf2_locexpr_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_locexpr_baton)); + baton->objfile = cu->objfile; + + if (attr_form_is_block (attr)) + { + /* Note that we're just copying the block's data pointer + here, not the actual data. We're still pointing into the + dwarf_info_buffer for SYM's objfile; right now we never + release that buffer, but when we do clean up properly + this may need to change. */ + baton->size = DW_BLOCK (attr)->size; + baton->data = DW_BLOCK (attr)->data; + } + else + { + dwarf2_invalid_attrib_class_complaint ("location description", + SYMBOL_NATURAL_NAME (sym)); + baton->size = 0; + baton->data = NULL; + } + + SYMBOL_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/elfread.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/elfread.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/elfread.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/elfread.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,754 @@ +/* Read ELF (Executable and Linking Format) object files for GDB. + + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Written by Fred Fish at Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "gdb_string.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "symtab.h" +#include "symfile.h" +#include "objfiles.h" +#include "buildsym.h" +#include "stabsread.h" +#include "gdb-stabs.h" +#include "complaints.h" +#include "demangle.h" + +extern void _initialize_elfread (void); + +/* The struct elfinfo is available only during ELF symbol table and + psymtab reading. It is destroyed at the completion of psymtab-reading. + It's local to elf_symfile_read. */ + +struct elfinfo + { + file_ptr dboffset; /* Offset to dwarf debug section */ + unsigned int dbsize; /* Size of dwarf debug section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ + unsigned int lnsize; /* Size of dwarf line number section */ + asection *stabsect; /* Section pointer for .stab section */ + asection *stabindexsect; /* Section pointer for .stab.index section */ + asection *mdebugsect; /* Section pointer for .mdebug section */ + }; + +static void free_elfinfo (void *); + +/* We are called once per section from elf_symfile_read. We + need to examine each section we are passed, check to see + if it is something we are interested in processing, and + if so, stash away some access information for the section. + + For now we recognize the dwarf debug information sections and + line number sections from matching their section names. The + ELF definition is no real help here since it has no direct + knowledge of DWARF (by design, so any debugging format can be + used). + + We also recognize the ".stab" sections used by the Sun compilers + released with Solaris 2. + + FIXME: The section names should not be hardwired strings (what + should they be? I don't think most object file formats have enough + section flags to specify what kind of debug section it is + -kingdon). */ + +static void +elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) +{ + struct elfinfo *ei; + + ei = (struct elfinfo *) eip; + if (strcmp (sectp->name, ".debug") == 0) + { + ei->dboffset = sectp->filepos; + ei->dbsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".line") == 0) + { + ei->lnoffset = sectp->filepos; + ei->lnsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".stab") == 0) + { + ei->stabsect = sectp; + } + else if (strcmp (sectp->name, ".stab.index") == 0) + { + ei->stabindexsect = sectp; + } + else if (strcmp (sectp->name, ".mdebug") == 0) + { + ei->mdebugsect = sectp; + } +} + +static struct minimal_symbol * +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) +{ + if (ms_type == mst_text || ms_type == mst_file_text) + address = SMASH_TEXT_ADDRESS (address); + + return prim_record_minimal_symbol_and_info + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); +} + +/* + + LOCAL FUNCTION + + elf_symtab_read -- read the symbol table of an ELF file + + SYNOPSIS + + void elf_symtab_read (struct objfile *objfile, int dynamic) + + DESCRIPTION + + Given an objfile and a flag that specifies whether or not the objfile + is for an executable or not (may be shared library for example), add + all the global function and data symbols to the minimal symbol table. + + In stabs-in-ELF, as implemented by Sun, there are some local symbols + defined in the ELF symbol table, which can be used to locate + the beginnings of sections from each ".o" file that was linked to + form the executable objfile. We gather any such info and record it + in data structures hung off the objfile's private data. + + */ + +static void +elf_symtab_read (struct objfile *objfile, int dynamic) +{ + long storage_needed; + asymbol *sym; + asymbol **symbol_table; + long number_of_symbols; + long i; + struct cleanup *back_to; + CORE_ADDR symaddr; + CORE_ADDR offset; + enum minimal_symbol_type ms_type; + /* If sectinfo is nonNULL, it contains section info that should end up + filed in the objfile. */ + struct stab_section_info *sectinfo = NULL; + /* If filesym is nonzero, it points to a file symbol, but we haven't + seen any section info for it yet. */ + asymbol *filesym = 0; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + /* Name of filesym, as saved on the objfile_obstack. */ + char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); +#endif + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + int stripped = (bfd_get_symcount (objfile->obfd) == 0); + + if (dynamic) + { + storage_needed = bfd_get_dynamic_symtab_upper_bound (objfile->obfd); + + /* Nothing to be done if there is no dynamic symtab. */ + if (storage_needed < 0) + return; + } + else + { + storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); + if (storage_needed < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + } + if (storage_needed > 0) + { + symbol_table = (asymbol **) xmalloc (storage_needed); + back_to = make_cleanup (xfree, symbol_table); + if (dynamic) + number_of_symbols = bfd_canonicalize_dynamic_symtab (objfile->obfd, + symbol_table); + else + number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); + if (number_of_symbols < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + + for (i = 0; i < number_of_symbols; i++) + { + sym = symbol_table[i]; + if (sym->name == NULL || *sym->name == '\0') + { + /* Skip names that don't exist (shouldn't happen), or names + that are null strings (may happen). */ + continue; + } + + offset = ANOFFSET (objfile->section_offsets, sym->section->index); + if (dynamic + && sym->section == &bfd_und_section + && (sym->flags & BSF_FUNCTION)) + { + struct minimal_symbol *msym; + + /* Symbol is a reference to a function defined in + a shared library. + If its value is non zero then it is usually the address + of the corresponding entry in the procedure linkage table, + plus the desired section offset. + If its value is zero then the dynamic linker has to resolve + the symbol. We are unable to find any meaningful address + for this symbol in the executable file, so we skip it. */ + symaddr = sym->value; + if (symaddr == 0) + continue; + symaddr += offset; + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + mst_solib_trampoline, sym->section, objfile); +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + continue; + } + + /* If it is a nonstripped executable, do not enter dynamic + symbols, as the dynamic symbol table is usually a subset + of the main symbol table. */ + if (dynamic && !stripped) + continue; + if (sym->flags & BSF_FILE) + { + /* STT_FILE debugging symbol that helps stabs-in-elf debugging. + Chain any old one onto the objfile; remember new sym. */ + if (sectinfo != NULL) + { + sectinfo->next = dbx->stab_section_info; + dbx->stab_section_info = sectinfo; + sectinfo = NULL; + } + filesym = sym; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + filesymname = + obsavestring ((char *) filesym->name, strlen (filesym->name), + &objfile->objfile_obstack); +#endif + } + else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) + { + struct minimal_symbol *msym; + + /* Select global/local/weak symbols. Note that bfd puts abs + symbols in their own section, so all symbols we are + interested in will have a section. */ + /* Bfd symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate all non-absolute symbols by the section offset. */ + if (sym->section != &bfd_abs_section) + { + symaddr += offset; + } + /* For non-absolute symbols, use the type of the section + they are relative to, to intuit text/data. Bfd provides + no way of figuring this out for absolute symbols. */ + if (sym->section == &bfd_abs_section) + { + /* This is a hack to get the minimal symbol type + right for Irix 5, which has absolute addresses + with special section indices for dynamic symbols. */ + unsigned short shndx = + ((elf_symbol_type *) sym)->internal_elf_sym.st_shndx; + + switch (shndx) + { + case SHN_MIPS_TEXT: + ms_type = mst_text; + break; + case SHN_MIPS_DATA: + ms_type = mst_data; + break; + case SHN_MIPS_ACOMMON: + ms_type = mst_bss; + break; + default: + ms_type = mst_abs; + } + + /* If it is an Irix dynamic symbol, skip section name + symbols, relocate all others by section offset. */ + if (ms_type != mst_abs) + { + if (sym->name[0] == '.') + continue; + symaddr += offset; + } + } + else if (sym->section->flags & SEC_CODE) + { + if (sym->flags & BSF_GLOBAL) + { + ms_type = mst_text; + } + else if ((sym->name[0] == '.' && sym->name[1] == 'L') + || ((sym->flags & BSF_LOCAL) + && sym->name[0] == '$' + && sym->name[1] == 'L')) + /* Looks like a compiler-generated label. Skip + it. The assembler should be skipping these (to + keep executables small), but apparently with + gcc on the (deleted) delta m88k SVR4, it loses. + So to have us check too should be harmless (but + I encourage people to fix this in the assembler + instead of adding checks here). */ + continue; + else + { + ms_type = mst_file_text; + } + } + else if (sym->section->flags & SEC_ALLOC) + { + if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) + { + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_data; + } + else + { + ms_type = mst_bss; + } + } + else if (sym->flags & BSF_LOCAL) + { + /* Named Local variable in a Data section. + Check its name for stabs-in-elf. */ + int special_local_sect; + if (strcmp ("Bbss.bss", sym->name) == 0) + special_local_sect = SECT_OFF_BSS (objfile); + else if (strcmp ("Ddata.data", sym->name) == 0) + special_local_sect = SECT_OFF_DATA (objfile); + else if (strcmp ("Drodata.rodata", sym->name) == 0) + special_local_sect = SECT_OFF_RODATA (objfile); + else + special_local_sect = -1; + if (special_local_sect >= 0) + { + /* Found a special local symbol. Allocate a + sectinfo, if needed, and fill it in. */ + if (sectinfo == NULL) + { + int max_index; + size_t size; + + max_index + = max (SECT_OFF_BSS (objfile), + max (SECT_OFF_DATA (objfile), + SECT_OFF_RODATA (objfile))); + + /* max_index is the largest index we'll + use into this array, so we must + allocate max_index+1 elements for it. + However, 'struct stab_section_info' + already includes one element, so we + need to allocate max_index aadditional + elements. */ + size = (sizeof (struct stab_section_info) + + (sizeof (CORE_ADDR) + * max_index)); + sectinfo = (struct stab_section_info *) + xmmalloc (objfile->md, size); + memset (sectinfo, 0, size); + sectinfo->num_sections = max_index; + if (filesym == NULL) + { + complaint (&symfile_complaints, + "elf/stab section information %s without a preceding file symbol", + sym->name); + } + else + { + sectinfo->filename = + (char *) filesym->name; + } + } + if (sectinfo->sections[special_local_sect] != 0) + complaint (&symfile_complaints, + "duplicated elf/stab section information for %s", + sectinfo->filename); + /* BFD symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate non-absolute symbols by the + section offset. */ + if (sym->section != &bfd_abs_section) + symaddr += offset; + sectinfo->sections[special_local_sect] = symaddr; + /* The special local symbols don't go in the + minimal symbol table, so ignore this one. */ + continue; + } + /* Not a special stabs-in-elf symbol, do regular + symbol processing. */ + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_file_data; + } + else + { + ms_type = mst_file_bss; + } + } + else + { + ms_type = mst_unknown; + } + } + else + { + /* FIXME: Solaris2 shared libraries include lots of + odd "absolute" and "undefined" symbols, that play + hob with actions like finding what function the PC + is in. Ignore them if they aren't text, data, or bss. */ + /* ms_type = mst_unknown; */ + continue; /* Skip this symbol. */ + } + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, + struct minimal_symbol *); + patch_load_module(objfile, msym); + } +#endif +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + } + } + do_cleanups (back_to); + } +} + +/* Scan and build partial symbols for a symbol file. + We have been initialized by a call to elf_symfile_init, which + currently does nothing. + + SECTION_OFFSETS is a set of offsets to apply to relocate the symbols + in each section. We simplify it down to a single offset for all + symbols. FIXME. + + MAINLINE is true if we are reading the main symbol + table (as opposed to a shared lib or dynamically loaded file). + + This function only does the minimum work necessary for letting the + user "name" things symbolically; it does not read the entire symtab. + Instead, it reads the external and static symbols and puts them in partial + symbol tables. When more extensive information is requested of a + file, the corresponding partial symbol table is mutated into a full + fledged symbol table by going back and reading the symbols + for real. + + We look for sections with specific names, to tell us what debug + format to look for: FIXME!!! + + dwarf_build_psymtabs() builds psymtabs for DWARF symbols; + elfstab_build_psymtabs() handles STABS symbols; + mdebug_build_psymtabs() handles ECOFF debugging information. + + Note that ELF files have a "minimal" symbol table, which looks a lot + like a COFF symbol table, but has only the minimal information necessary + for linking. We process this also, and use the information to + build gdb's minimal symbol table. This gives us some minimal debugging + capability even for files compiled without -g. */ + +static void +elf_symfile_read (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + struct elfinfo ei; + struct cleanup *back_to; + CORE_ADDR offset; + + init_minimal_symbol_collection (); + back_to = make_cleanup_discard_minimal_symbols (); + + memset ((char *) &ei, 0, sizeof (ei)); + + /* Allocate struct to keep track of the symfile */ + objfile->sym_stab_info = (struct dbx_symfile_info *) + xmmalloc (objfile->md, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + make_cleanup (free_elfinfo, (void *) objfile); + + /* Process the normal ELF symbol table first. This may write some + chain of info into the dbx_symfile_info in objfile->sym_stab_info, + which can later be used by elfstab_offset_sections. */ + + elf_symtab_read (objfile, 0); + + /* Add the dynamic symbols. */ + + elf_symtab_read (objfile, 1); + + /* Install any minimal symbols that have been collected as the current + minimal symbols for this objfile. The debug readers below this point + should not generate new minimal symbols; if they do it's their + responsibility to install them. "mdebug" appears to be the only one + which will do this. */ + + install_minimal_symbols (objfile); + do_cleanups (back_to); + + /* Now process debugging information, which is contained in + special ELF sections. */ + + /* If we are reinitializing, or if we have never loaded syms yet, + set table to empty. MAINLINE is cleared so that *_read_psymtab + functions do not all also re-initialize the psymbol table. */ + if (mainline) + { + init_psymbol_list (objfile, 0); + mainline = 0; + } + + /* We first have to find them... */ + bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei); + + /* ELF debugging information is inserted into the psymtab in the + order of least informative first - most informative last. Since + the psymtab table is searched `most recent insertion first' this + increases the probability that more detailed debug information + for a section is found. + + For instance, an object file might contain both .mdebug (XCOFF) + and .debug_info (DWARF2) sections then .mdebug is inserted first + (searched last) and DWARF2 is inserted last (searched first). If + we don't do this then the XCOFF info is found first - for code in + an included file XCOFF info is useless. */ + + if (ei.mdebugsect) + { + const struct ecoff_debug_swap *swap; + + /* .mdebug section, presumably holding ECOFF debugging + information. */ + swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; + if (swap) + elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect); + } + if (ei.stabsect) + { + asection *str_sect; + + /* Stab sections have an associated string table that looks like + a separate section. */ + str_sect = bfd_get_section_by_name (abfd, ".stabstr"); + + /* FIXME should probably warn about a stab section without a stabstr. */ + if (str_sect) + elfstab_build_psymtabs (objfile, + mainline, + ei.stabsect, + str_sect->filepos, + bfd_section_size (abfd, str_sect)); + } + if (dwarf2_has_info (abfd)) + { + /* DWARF 2 sections */ + dwarf2_build_psymtabs (objfile, mainline); + } + else if (ei.dboffset && ei.lnoffset) + { + /* DWARF sections */ + dwarf_build_psymtabs (objfile, + mainline, + ei.dboffset, ei.dbsize, + ei.lnoffset, ei.lnsize); + } + + /* FIXME: kettenis/20030504: This still needs to be integrated with + dwarf2read.c in a better way. */ + dwarf2_build_frame_info (objfile); +} + +/* This cleans up the objfile's sym_stab_info pointer, and the chain of + stab_section_info's, that might be dangling from it. */ + +static void +free_elfinfo (void *objp) +{ + struct objfile *objfile = (struct objfile *) objp; + struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct stab_section_info *ssi, *nssi; + + ssi = dbxinfo->stab_section_info; + while (ssi) + { + nssi = ssi->next; + xmfree (objfile->md, ssi); + ssi = nssi; + } + + dbxinfo->stab_section_info = 0; /* Just say No mo info about this. */ +} + + +/* Initialize anything that needs initializing when a completely new symbol + file is specified (not just adding some symbols from another file, e.g. a + shared library). + + We reinitialize buildsym, since we may be reading stabs from an ELF file. */ + +static void +elf_new_init (struct objfile *ignore) +{ + stabsread_new_init (); + buildsym_new_init (); +} + +/* Perform any local cleanups required when we are done with a particular + objfile. I.E, we are in the process of discarding all symbol information + for an objfile, freeing up all memory held for it, and unlinking the + objfile struct from the global list of known objfiles. */ + +static void +elf_symfile_finish (struct objfile *objfile) +{ + if (objfile->sym_stab_info != NULL) + { + xmfree (objfile->md, objfile->sym_stab_info); + } +} + +/* ELF specific initialization routine for reading symbols. + + It is passed a pointer to a struct sym_fns which contains, among other + things, the BFD for the file whose symbols are being read, and a slot for + a pointer to "private data" which we can fill with goodies. + + For now at least, we have nothing in particular to do, so this function is + just a stub. */ + +static void +elf_symfile_init (struct objfile *objfile) +{ + /* ELF objects may be reordered, so set OBJF_REORDERED. If we + find this causes a significant slowdown in gdb then we could + set it in the debug symbol readers only when necessary. */ + objfile->flags |= OBJF_REORDERED; +} + +/* When handling an ELF file that contains Sun STABS debug info, + some of the debug info is relative to the particular chunk of the + section that was generated in its individual .o file. E.g. + offsets to static variables are relative to the start of the data + segment *for that module before linking*. This information is + painfully squirreled away in the ELF symbol table as local symbols + with wierd names. Go get 'em when needed. */ + +void +elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +{ + char *filename = pst->filename; + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct stab_section_info *maybe = dbx->stab_section_info; + struct stab_section_info *questionable = 0; + int i; + char *p; + + /* The ELF symbol info doesn't include path names, so strip the path + (if any) from the psymtab filename. */ + while (0 != (p = strchr (filename, '/'))) + filename = p + 1; + + /* FIXME: This linear search could speed up significantly + if it was chained in the right order to match how we search it, + and if we unchained when we found a match. */ + for (; maybe; maybe = maybe->next) + { + if (filename[0] == maybe->filename[0] + && strcmp (filename, maybe->filename) == 0) + { + /* We found a match. But there might be several source files + (from different directories) with the same name. */ + if (0 == maybe->found) + break; + questionable = maybe; /* Might use it later. */ + } + } + + if (maybe == 0 && questionable != 0) + { + complaint (&symfile_complaints, + "elf/stab section information questionable for %s", filename); + maybe = questionable; + } + + if (maybe) + { + /* Found it! Allocate a new psymtab struct, and fill it in. */ + maybe->found++; + pst->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + for (i = 0; i < maybe->num_sections; i++) + (pst->section_offsets)->offsets[i] = maybe->sections[i]; + return; + } + + /* We were unable to find any offsets for this file. Complain. */ + if (dbx->stab_section_info) /* If there *is* any info, */ + complaint (&symfile_complaints, + "elf/stab section information missing for %s", filename); +} + +/* Register that we are able to handle ELF object file formats. */ + +static struct sym_fns elf_sym_fns = +{ + bfd_target_elf_flavour, + elf_new_init, /* sym_new_init: init anything gbl to entire symtab */ + elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */ + elf_symfile_read, /* sym_read: read a symbol file into symtab */ + elf_symfile_finish, /* sym_finish: finished with file, cleanup */ + default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */ + NULL /* next: pointer to next struct sym_fns */ +}; + +void +_initialize_elfread (void) +{ + add_symtab_fns (&elf_sym_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/main.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/main.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,924 @@ +/* Top level stuff for GDB, the GNU debugger. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "top.h" +#include "target.h" +#include "inferior.h" +#include "symfile.h" +#include "gdbcore.h" + +#include "getopt.h" + +#include +#include "gdb_stat.h" +#include + +#include "gdb_string.h" +#include "event-loop.h" +#include "ui-out.h" + +#include "interps.h" +#include "main.h" + +/* If nonzero, display time usage both at startup and for each command. */ + +int display_time; + +/* If nonzero, display space usage both at startup and for each command. */ + +int display_space; + +/* Whether this is the async version or not. The async version is + invoked on the command line with the -nw --async options. In this + version, the usual command_loop is substituted by and event loop which + processes UI events asynchronously. */ +int event_loop_p = 1; + +/* The selected interpreter. This will be used as a set command + variable, so it should always be malloc'ed - since + do_setshow_command will free it. */ +char *interpreter_p; + +/* Whether xdb commands will be handled */ +int xdb_commands = 0; + +/* Whether dbx commands will be handled */ +int dbx_commands = 0; + +/* System root path, used to find libraries etc. */ +char *gdb_sysroot = 0; + +struct ui_file *gdb_stdout; +struct ui_file *gdb_stderr; +struct ui_file *gdb_stdlog; +struct ui_file *gdb_stdin; +/* target IO streams */ +struct ui_file *gdb_stdtargin; +struct ui_file *gdb_stdtarg; +struct ui_file *gdb_stdtargerr; + +/* Whether to enable writing into executable and core files */ +extern int write_files; + +static void print_gdb_help (struct ui_file *); + +/* These two are used to set the external editor commands when gdb is farming + out files to be edited by another program. */ + +extern char *external_editor_command; + +/* Call command_loop. If it happens to return, pass that through as a + non-zero return status. */ + +static int +captured_command_loop (void *data) +{ + current_interp_command_loop (); + /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton + would clean things up (restoring the cleanup chain) to the state + they were just prior to the call. Technically, this means that + the do_cleanups() below is redundant. Unfortunately, many FUNCs + are not that well behaved. do_cleanups should either be replaced + with a do_cleanups call (to cover the problem) or an assertion + check to detect bad FUNCs code. */ + do_cleanups (ALL_CLEANUPS); + /* If the command_loop returned, normally (rather than threw an + error) we try to quit. If the quit is aborted, catch_errors() + which called this catch the signal and restart the command + loop. */ + quit_command (NULL, instream == stdin); + return 1; +} + +static int +captured_main (void *data) +{ + struct captured_main_args *context = data; + int argc = context->argc; + char **argv = context->argv; + int count; + static int quiet = 0; + static int batch = 0; + static int set_args = 0; + + /* Pointers to various arguments from command line. */ + char *symarg = NULL; + char *execarg = NULL; + char *corearg = NULL; + char *cdarg = NULL; + char *ttyarg = NULL; + + /* These are static so that we can take their address in an initializer. */ + static int print_help; + static int print_version; + + /* Pointers to all arguments of --command option. */ + char **cmdarg; + /* Allocated size of cmdarg. */ + int cmdsize; + /* Number of elements of cmdarg used. */ + int ncmd; + + /* Indices of all arguments of --directory option. */ + char **dirarg; + /* Allocated size. */ + int dirsize; + /* Number of elements used. */ + int ndir; + + struct stat homebuf, cwdbuf; + char *homedir, *homeinit; + + int i; + + long time_at_startup = get_run_time (); + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* This needs to happen before the first use of malloc. */ + init_malloc (NULL); + +#ifdef HAVE_SBRK + lim_at_start = (char *) sbrk (0); +#endif + +#if defined (ALIGN_STACK_ON_STARTUP) + i = (int) &count & 0x3; + if (i != 0) + alloca (4 - i); +#endif + + cmdsize = 1; + cmdarg = (char **) xmalloc (cmdsize * sizeof (*cmdarg)); + ncmd = 0; + dirsize = 1; + dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg)); + ndir = 0; + + quit_flag = 0; + line = (char *) xmalloc (linesize); + line[0] = '\0'; /* Terminate saved (now empty) cmd line */ + instream = stdin; + + getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); + current_directory = gdb_dirbuf; + + gdb_stdout = stdio_fileopen (stdout); + gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ + gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdin = stdio_fileopen (stdin); + gdb_stdtargerr = gdb_stderr; /* for moment */ + gdb_stdtargin = gdb_stdin; /* for moment */ + + /* initialize error() */ + error_init (); + + /* Set the sysroot path. */ +#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE + gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT); + if (gdb_sysroot) + { + struct stat s; + int res = 0; + + if (stat (gdb_sysroot, &s) == 0) + if (S_ISDIR (s.st_mode)) + res = 1; + + if (res == 0) + { + xfree (gdb_sysroot); + gdb_sysroot = TARGET_SYSTEM_ROOT; + } + } + else + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else +#if defined (TARGET_SYSTEM_ROOT) + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else + gdb_sysroot = ""; +#endif +#endif + + /* There will always be an interpreter. Either the one passed into + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); + + /* Parse arguments and options. */ + { + int c; + /* When var field is 0, use flag field to record the equivalent + short option (or arbitrary numbers starting at 10 for those + with no equivalent). */ + enum { + OPT_SE = 10, + OPT_CD, + OPT_ANNOTATE, + OPT_STATISTICS, + OPT_TUI, + OPT_NOWINDOWS, + OPT_WINDOWS + }; + static struct option long_options[] = + { + {"async", no_argument, &event_loop_p, 1}, + {"noasync", no_argument, &event_loop_p, 0}, +#if defined(TUI) + {"tui", no_argument, 0, OPT_TUI}, +#endif + {"xdb", no_argument, &xdb_commands, 1}, + {"dbx", no_argument, &dbx_commands, 1}, + {"readnow", no_argument, &readnow_symbol_files, 1}, + {"r", no_argument, &readnow_symbol_files, 1}, + {"quiet", no_argument, &quiet, 1}, + {"q", no_argument, &quiet, 1}, + {"silent", no_argument, &quiet, 1}, + {"nx", no_argument, &inhibit_gdbinit, 1}, + {"n", no_argument, &inhibit_gdbinit, 1}, + {"batch", no_argument, &batch, 1}, + {"epoch", no_argument, &epoch_interface, 1}, + + /* This is a synonym for "--annotate=1". --annotate is now preferred, + but keep this here for a long time because people will be running + emacses which use --fullname. */ + {"fullname", no_argument, 0, 'f'}, + {"f", no_argument, 0, 'f'}, + + {"annotate", required_argument, 0, OPT_ANNOTATE}, + {"help", no_argument, &print_help, 1}, + {"se", required_argument, 0, OPT_SE}, + {"symbols", required_argument, 0, 's'}, + {"s", required_argument, 0, 's'}, + {"exec", required_argument, 0, 'e'}, + {"e", required_argument, 0, 'e'}, + {"core", required_argument, 0, 'c'}, + {"c", required_argument, 0, 'c'}, + {"pid", required_argument, 0, 'p'}, + {"p", required_argument, 0, 'p'}, + {"command", required_argument, 0, 'x'}, + {"version", no_argument, &print_version, 1}, + {"x", required_argument, 0, 'x'}, +#ifdef GDBTK + {"tclcommand", required_argument, 0, 'z'}, + {"enable-external-editor", no_argument, 0, 'y'}, + {"editor-command", required_argument, 0, 'w'}, +#endif + {"ui", required_argument, 0, 'i'}, + {"interpreter", required_argument, 0, 'i'}, + {"i", required_argument, 0, 'i'}, + {"directory", required_argument, 0, 'd'}, + {"d", required_argument, 0, 'd'}, + {"cd", required_argument, 0, OPT_CD}, + {"tty", required_argument, 0, 't'}, + {"baud", required_argument, 0, 'b'}, + {"b", required_argument, 0, 'b'}, + {"nw", no_argument, NULL, OPT_NOWINDOWS}, + {"nowindows", no_argument, NULL, OPT_NOWINDOWS}, + {"w", no_argument, NULL, OPT_WINDOWS}, + {"windows", no_argument, NULL, OPT_WINDOWS}, + {"statistics", no_argument, 0, OPT_STATISTICS}, + {"write", no_argument, &write_files, 1}, + {"args", no_argument, &set_args, 1}, + {0, no_argument, 0, 0} + }; + + while (1) + { + int option_index; + + c = getopt_long_only (argc, argv, "", + long_options, &option_index); + if (c == EOF || set_args) + break; + + /* Long option that takes an argument. */ + if (c == 0 && long_options[option_index].flag == 0) + c = long_options[option_index].val; + + switch (c) + { + case 0: + /* Long option that just sets a flag. */ + break; + case OPT_SE: + symarg = optarg; + execarg = optarg; + break; + case OPT_CD: + cdarg = optarg; + break; + case OPT_ANNOTATE: + /* FIXME: what if the syntax is wrong (e.g. not digits)? */ + annotation_level = atoi (optarg); + break; + case OPT_STATISTICS: + /* Enable the display of both time and space usage. */ + display_time = 1; + display_space = 1; + break; + case OPT_TUI: + /* --tui is equivalent to -i=tui. */ + xfree (interpreter_p); + interpreter_p = xstrdup ("tui"); + break; + case OPT_WINDOWS: + /* FIXME: cagney/2003-03-01: Not sure if this option is + actually useful, and if it is, what it should do. */ + use_windows = 1; + break; + case OPT_NOWINDOWS: + /* -nw is equivalent to -i=console. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_CONSOLE); + use_windows = 0; + break; + case 'f': + annotation_level = 1; +/* We have probably been invoked from emacs. Disable window interface. */ + use_windows = 0; + break; + case 's': + symarg = optarg; + break; + case 'e': + execarg = optarg; + break; + case 'c': + corearg = optarg; + break; + case 'p': + /* "corearg" is shared by "--core" and "--pid" */ + corearg = optarg; + break; + case 'x': + cmdarg[ncmd++] = optarg; + if (ncmd >= cmdsize) + { + cmdsize *= 2; + cmdarg = (char **) xrealloc ((char *) cmdarg, + cmdsize * sizeof (*cmdarg)); + } + break; +#ifdef GDBTK + case 'z': + { +extern int gdbtk_test (char *); + if (!gdbtk_test (optarg)) + { + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), + argv[0], optarg); + exit (1); + } + break; + } + case 'y': + /* Backwards compatibility only. */ + break; + case 'w': + { + external_editor_command = xstrdup (optarg); + break; + } +#endif /* GDBTK */ + case 'i': + xfree (interpreter_p); + interpreter_p = xstrdup (optarg); + break; + case 'd': + dirarg[ndir++] = optarg; + if (ndir >= dirsize) + { + dirsize *= 2; + dirarg = (char **) xrealloc ((char *) dirarg, + dirsize * sizeof (*dirarg)); + } + break; + case 't': + ttyarg = optarg; + break; + case 'q': + quiet = 1; + break; + case 'b': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set baud rate to `%s'.\n"), optarg); + else + baud_rate = i; + } + break; + case 'l': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set timeout limit to `%s'.\n"), optarg); + else + remote_timeout = i; + } + break; + + case '?': + fprintf_unfiltered (gdb_stderr, + _("Use `%s --help' for a complete list of options.\n"), + argv[0]); + exit (1); + } + } + + /* If --help or --version, disable window interface. */ + if (print_help || print_version) + { + use_windows = 0; + } + + if (set_args) + { + /* The remaining options are the command-line options for the + inferior. The first one is the sym/exec file, and the rest + are arguments. */ + if (optind >= argc) + { + fprintf_unfiltered (gdb_stderr, + _("%s: `--args' specified but no program specified\n"), + argv[0]); + exit (1); + } + symarg = argv[optind]; + execarg = argv[optind]; + ++optind; + set_inferior_args_vector (argc - optind, &argv[optind]); + } + else + { + /* OK, that's all the options. The other arguments are filenames. */ + count = 0; + for (; optind < argc; optind++) + switch (++count) + { + case 1: + symarg = argv[optind]; + execarg = argv[optind]; + break; + case 2: + /* The documentation says this can be a "ProcID" as well. + We will try it as both a corefile and a pid. */ + corearg = argv[optind]; + break; + case 3: + fprintf_unfiltered (gdb_stderr, + _("Excess command line arguments ignored. (%s%s)\n"), + argv[optind], (optind == argc - 1) ? "" : " ..."); + break; + } + } + if (batch) + quiet = 1; + } + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ + gdb_init (argv[0]); + + /* Do these (and anything which might call wrap_here or *_filtered) + after initialize_all_files() but before the interpreter has been + installed. Otherwize the help/version messages will be eaten by + the interpreter's output handler. */ + + if (print_version) + { + print_gdb_version (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + + if (print_help) + { + print_gdb_help (gdb_stdout); + fputs_unfiltered ("\n", gdb_stdout); + exit (0); + } + + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message before the interpreter is installed. That way + it isn't encapsulated in MI output. */ + if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + + /* Install the default UI. All the interpreters should have had a + look at things by now. Initialize the default interpreter. */ + + { + /* Find it. */ + struct interp *interp = interp_lookup (interpreter_p); + if (interp == NULL) + error ("Interpreter `%s' unrecognized", interpreter_p); + /* Install it. */ + if (!interp_set (interp)) + { + fprintf_unfiltered (gdb_stderr, + "Interpreter `%s' failed to initialize.\n", + interpreter_p); + exit (1); + } + } +#ifdef CRASH_MERGE +{ + extern void update_gdb_hooks(void); + update_gdb_hooks(); +} +#endif + + /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message after the interpreter is installed when it is + any sane interpreter. */ + if (!quiet && !current_interp_named_p (INTERP_MI1)) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + error_pre_print = "\n\n"; + quit_pre_print = error_pre_print; + + /* We may get more than one warning, don't double space all of them... */ + warning_pre_print = _("\nwarning: "); + + /* Read and execute $HOME/.gdbinit file, if it exists. This is done + *before* all the command line arguments are processed; it sets + global parameters, which are independent of what file you are + debugging or what directory you are in. */ + homedir = getenv ("HOME"); + if (homedir) + { + homeinit = (char *) alloca (strlen (homedir) + + strlen (gdbinit) + 10); + strcpy (homeinit, homedir); + strcat (homeinit, "/"); + strcat (homeinit, gdbinit); + + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only + need them if homedir is set. Make sure that they are + zero in case one of them fails (this guarantees that they + won't match if either exists). */ + + memset (&homebuf, 0, sizeof (struct stat)); + memset (&cwdbuf, 0, sizeof (struct stat)); + + stat (homeinit, &homebuf); + stat (gdbinit, &cwdbuf); /* We'll only need this if + homedir was set. */ + } + + /* Now perform all the actions indicated by the arguments. */ + if (cdarg != NULL) + { + catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ndir; i++) + catch_command_errors (directory_command, dirarg[i], 0, RETURN_MASK_ALL); + xfree (dirarg); + + if (execarg != NULL + && symarg != NULL + && strcmp (execarg, symarg) == 0) + { + /* The exec file and the symbol-file are the same. If we can't + open it, better only print one error message. + catch_command_errors returns non-zero on success! */ + if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL)) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + else + { + if (execarg != NULL) + catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL); + if (symarg != NULL) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + + /* After the symbol file has been read, print a newline to get us + beyond the copyright line... But errors should still set off + the error message with a (single) blank line. */ + if (!quiet) + printf_filtered ("\n"); + error_pre_print = "\n"; + quit_pre_print = error_pre_print; + warning_pre_print = _("\nwarning: "); + + if (corearg != NULL) + { + /* corearg may be either a corefile or a pid. + If its first character is a digit, try attach first + and then corefile. Otherwise try corefile first. */ + + if (isdigit (corearg[0])) + { + if (catch_command_errors (attach_command, corearg, + !batch, RETURN_MASK_ALL) == 0) + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + else /* Can't be a pid, better be a corefile. */ + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + + if (ttyarg != NULL) + catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL); + + /* Error messages should no longer be distinguished with extra output. */ + error_pre_print = NULL; + quit_pre_print = NULL; + warning_pre_print = _("warning: "); + + /* Read the .gdbinit file in the current directory, *if* it isn't + the same as the $HOME/.gdbinit file (it should exist, also). */ + + if (!homedir + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) + { +#if 0 + /* NOTE: cagney/1999-11-03: SET_TOP_LEVEL() was a macro that + expanded into a call to setjmp(). */ + if (!SET_TOP_LEVEL ()) /* NB: This is #if 0'd out */ + { + /* NOTE: I am commenting this out, because it is not clear + where this feature is used. It is very old and + undocumented. ezannoni: 1999-05-04 */ +#if 0 + if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0') + read_command_file (stdin); + else +#endif + source_command (cmdarg[i], !batch); + do_cleanups (ALL_CLEANUPS); + } +#endif + catch_command_errors (source_command, cmdarg[i], !batch, RETURN_MASK_ALL); + } + xfree (cmdarg); + + /* Read in the old history after all the command files have been read. */ + init_history (); + + if (batch) + { + /* We have hit the end of the batch file. */ + exit (0); + } + + /* Do any host- or target-specific hacks. This is used for i960 targets + to force the user to set a nindy target and spec its parameters. */ + +#ifdef BEFORE_MAIN_LOOP_HOOK + BEFORE_MAIN_LOOP_HOOK; +#endif + + /* Show time and/or space usage. */ + + if (display_time) + { + long init_time = get_run_time () - time_at_startup; + + printf_unfiltered (_("Startup time: %ld.%06ld\n"), + init_time / 1000000, init_time % 1000000); + } + + if (display_space) + { +#ifdef HAVE_SBRK + extern char **environ; + char *lim = (char *) sbrk (0); + + printf_unfiltered (_("Startup size: data size %ld\n"), + (long) (lim - (char *) &environ)); +#endif + } + +#if 0 + /* FIXME: cagney/1999-11-06: The original main loop was like: */ + while (1) + { + if (!SET_TOP_LEVEL ()) + { + do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ + /* GUIs generally have their own command loop, mainloop, or whatever. + This is a good place to gain control because many error + conditions will end up here via longjmp(). */ + if (command_loop_hook) + command_loop_hook (); + else + command_loop (); + quit_command ((char *) 0, instream == stdin); + } + } + /* NOTE: If the command_loop() returned normally, the loop would + attempt to exit by calling the function quit_command(). That + function would either call exit() or throw an error returning + control to SET_TOP_LEVEL. */ + /* NOTE: The function do_cleanups() was called once each time round + the loop. The usefulness of the call isn't clear. If an error + was thrown, everything would have already been cleaned up. If + command_loop() returned normally and quit_command() was called, + either exit() or error() (again cleaning up) would be called. */ +#endif + /* NOTE: cagney/1999-11-07: There is probably no reason for not + moving this loop and the code found in captured_command_loop() + into the command_loop() proper. The main thing holding back that + change - SET_TOP_LEVEL() - has been eliminated. */ + while (1) + { + catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); +#ifdef CRASH_MERGE + { + int console(char *, ...); + console("\n"); + } +#endif + } + /* No exit -- exit is through quit_command. */ +} + +int +gdb_main (struct captured_main_args *args) +{ + use_windows = args->use_windows; +#ifdef CRASH_MERGE + event_loop_p = 0; +#endif + catch_errors (captured_main, args, "", RETURN_MASK_ALL); + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; +} + +#ifdef CRASH_MERGE +/* + * NOTE: adapted from gdb.c, which is no longer built in; changed name of + * original main() to gdb_main_entry() for use as crash entry point + */ +int +gdb_main_entry (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; + return gdb_main (&args); +} +#endif + +/* Don't use *_filtered for printing help. We don't want to prompt + for continue no matter how small the screen or how much we're going + to print. */ + +static void +print_gdb_help (struct ui_file *stream) +{ + fputs_unfiltered (_("\ +This is the GNU debugger. Usage:\n\n\ + gdb [options] [executable-file [core-file or process-id]]\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ +Options:\n\n\ +"), stream); + fputs_unfiltered (_("\ + --args Arguments after executable-file are passed to inferior\n\ +"), stream); + fputs_unfiltered (_("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +"), stream); + fputs_unfiltered (_("\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + --batch Exit after processing options.\n\ + --cd=DIR Change current directory to DIR.\n\ + --command=FILE Execute GDB commands from FILE.\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --pid=PID Attach to running process PID.\n\ +"), stream); + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --directory=DIR Search for source files in DIR.\n\ + --epoch Output information used by epoch emacs-GDB interface.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --fullname Output information used by emacs-GDB interface.\n\ + --help Print this message.\n\ +"), stream); + fputs_unfiltered (_("\ + --interpreter=INTERP\n\ + Select a specific interpreter / user interface\n\ +"), stream); + fputs_unfiltered (_("\ + --mapped Use mapped symbol files if supported on this system.\n\ + --nw Do not use a window interface.\n\ + --nx Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file.\n\ + --quiet Do not print version number on startup.\n\ + --readnow Fully read symbol files on first access.\n\ +"), stream); + fputs_unfiltered (_("\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --tty=TTY Use TTY for input/output by the program being debugged.\n\ +"), stream); +#if defined(TUI) + fputs_unfiltered (_("\ + --tui Use a terminal user interface.\n\ +"), stream); +#endif + fputs_unfiltered (_("\ + --version Print version information and then exit.\n\ + -w Use a window interface.\n\ + --write Set writing into executable and core files.\n\ + --xdb XDB compatibility mode.\n\ +"), stream); + fputs_unfiltered (_("\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n\ +Report bugs to \"bug-gdb@gnu.org\".\ +"), stream); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2882 @@ +# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +# 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, +# Inc. +# Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. +# Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + +# This file is part of GDB. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +bindir = @bindir@ +libdir = @libdir@ +tooldir = $(libdir)/$(target_alias) + +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 +infodir = @infodir@ +htmldir = $(prefix)/html +includedir = @includedir@ + +# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT. +top_builddir = . + +SHELL = @SHELL@ +EXEEXT = @EXEEXT@ + +AWK = @AWK@ +LN_S = @LN_S@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DESTDIR = + +AR = @AR@ +AR_FLAGS = qv +RANLIB = @RANLIB@ +DLLTOOL = @DLLTOOL@ +WINDRES = @WINDRES@ +MIG = @MIG@ + +# If you are compiling with GCC, make sure that either 1) You have the +# fixed include files where GCC can reach them, or 2) You use the +# -traditional flag. Otherwise the ioctl calls in inflow.c +# will be incorrectly compiled. The "fixincludes" script in the gcc +# distribution will fix your include files up. +CC=@CC@ + +# Directory containing source files. +srcdir = @srcdir@ +VPATH = @srcdir@ + +YACC=@YACC@ + +# This is used to rebuild ada-lex.c from ada-lex.l. If the program is +# not defined, but ada-lex.c is present, compilation will continue, +# possibly with a warning. +FLEX = flex + +YLWRAP = $(srcdir)/../ylwrap + +# where to find makeinfo, preferably one designed for texinfo-2 +MAKEINFO=makeinfo + +MAKEHTML = texi2html + +MAKEHTMLFLAGS = -glossary -menu -split_chapter + +# Set this up with gcc if you have gnu ld and the loader will print out +# line numbers for undefined references. +#CC_LD=gcc -static +CC_LD=$(CC) + +# Where is our "include" directory? Typically $(srcdir)/../include. +# This is essentially the header file directory for the library +# routines in libiberty. +INCLUDE_DIR = $(srcdir)/../include +INCLUDE_CFLAGS = -I$(INCLUDE_DIR) + +# Where is the "-liberty" library? Typically in ../libiberty. +LIBIBERTY = ../libiberty/libiberty.a + +# Where is the BFD library? Typically in ../bfd. +BFD_DIR = ../bfd +BFD = $(BFD_DIR)/libbfd.a +BFD_SRC = $(srcdir)/$(BFD_DIR) +BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + +# Where is the READLINE library? Typically in ../readline. +READLINE_DIR = ../readline +READLINE = $(READLINE_DIR)/libreadline.a +READLINE_SRC = $(srcdir)/$(READLINE_DIR) +READLINE_CFLAGS = -I$(READLINE_SRC)/.. + +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ +GDB_WARN_CFLAGS = $(WARN_CFLAGS) +GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) + +# Where is the INTL library? Typically in ../intl. +INTL_DIR = ../intl +INTL = @INTLLIBS@ +INTL_DEPS = @INTLDEPS@ +INTL_SRC = $(srcdir)/$(INTL_DIR) +INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC) + +# Where is the ICONV library? This can be empty if libc has iconv. +LIBICONV = @LIBICONV@ + +# Did the user give us a --with-sysroot option? +TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + +# +# CLI sub directory definitons +# +SUBDIR_CLI_OBS = \ + cli-dump.o \ + cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ + cli-interp.o +SUBDIR_CLI_SRCS = \ + cli/cli-dump.c \ + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ + cli/cli-interp.c \ + cli/cli-utils.c +SUBDIR_CLI_DEPS = +SUBDIR_CLI_LDFLAGS= +SUBDIR_CLI_CFLAGS= + +# +# MI sub directory definitons +# +SUBDIR_MI_OBS = \ + mi-out.o mi-console.o \ + mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ + mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o \ + mi-interp.o \ + mi-main.o mi-parse.o mi-getopt.o +SUBDIR_MI_SRCS = \ + mi/mi-out.c mi/mi-console.c \ + mi/mi-cmds.c mi/mi-cmd-env.c \ + mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ + mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \ + mi/mi-interp.c \ + mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c +SUBDIR_MI_DEPS = +SUBDIR_MI_LDFLAGS= +SUBDIR_MI_CFLAGS= \ + -DMI_OUT=1 + +# +# TUI sub directory definitions +# + +# Name of the TUI program +TUI=gdbtui + +SUBDIR_TUI_OBS = \ + tui-command.o \ + tui-data.o \ + tui-disasm.o \ + tui-file.o tui.o \ + tui-hooks.o \ + tui-interp.o \ + tui-io.o \ + tui-layout.o \ + tui-out.o \ + tui-regs.o \ + tui-source.o \ + tui-stack.o \ + tui-win.o \ + tui-windata.o \ + tui-wingeneral.o \ + tui-winsource.o +SUBDIR_TUI_SRCS = \ + tui/tui-command.c \ + tui/tui-data.c \ + tui/tui-disasm.c \ + tui/tui-file.c \ + tui/tui-hooks.c \ + tui/tui-interp.c \ + tui/tui-io.c \ + tui/tui-layout.c \ + tui/tui-out.c \ + tui/tui-regs.c \ + tui/tui-source.c \ + tui/tui-stack.c \ + tui/tui-win.c \ + tui/tui-windata.c \ + tui/tui-wingeneral.c \ + tui/tui-winsource.c \ + tui/tui.c +SUBDIR_TUI_DEPS = +SUBDIR_TUI_LDFLAGS= +SUBDIR_TUI_CFLAGS= \ + -DTUI=1 + + +# Opcodes currently live in one of two places. Either they are in the +# opcode library, typically ../opcodes, or they are in a header file +# in INCLUDE_DIR. +# Where is the "-lopcodes" library, with (some of) the opcode tables and +# disassemblers? +OPCODES_DIR = ../opcodes +OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) +OPCODES = $(OPCODES_DIR)/libopcodes.a +# Where are the other opcode tables which only have header file +# versions? +OP_INCLUDE = $(INCLUDE_DIR)/opcode +OPCODES_CFLAGS = -I$(OP_INCLUDE) + +# The simulator is usually nonexistent; targets that include one +# should set this to list all the .o or .a files to be linked in. +SIM = + +WIN32LIBS = @WIN32LIBS@ + +# Where is the TCL library? Typically in ../tcl. +LIB_INSTALL_DIR = $(libdir) +# This variable is needed when doing dynamic linking. +LIB_RUNTIME_DIR = $(libdir) +TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ +TCL_CFLAGS = @TCLHDIR@ +GDBTKLIBS = @GDBTKLIBS@ +# Extra flags that the GDBTK files need: +GDBTK_CFLAGS = @GDBTK_CFLAGS@ + +# Where is the TK library? Typically in ../tk. +TK = @TK_BUILD_LIB_SPEC@ +TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@ + +# Where is Itcl? Typically in ../itcl/itcl. +ITCL_CFLAGS = @ITCLHDIR@ +ITCL = @ITCLLIB@ + +# Where is Itk? Typically in ../itcl/itk. +ITK_CFLAGS = @ITKHDIR@ +ITK = @ITKLIB@ + +X11_CFLAGS = @TK_XINCLUDES@ +X11_LDFLAGS = +X11_LIBS = + +WIN32LDAPP = @WIN32LDAPP@ + +LIBGUI = @LIBGUI@ +GUI_CFLAGS_X = @GUI_CFLAGS_X@ +IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) + +# The version of gdbtk we're building. This should be kept +# in sync with GDBTK_VERSION and friends in gdbtk.h. +GDBTK_VERSION = 1.0 +GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) + +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + +SUBDIR_GDBTK_OBS = \ + gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \ + gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o +SUBDIR_GDBTK_SRCS = \ + gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \ + gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \ + gdbtk/generic/gdbtk-interp.c \ + gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \ + gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \ + gdbtk/generic/gdbtk-main.c +SUBDIR_GDBTK_DEPS = \ + $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS) +SUBDIR_GDBTK_LDFLAGS= +SUBDIR_GDBTK_CFLAGS= -DGDBTK + +CONFIG_OBS= @CONFIG_OBS@ +CONFIG_SRCS= @CONFIG_SRCS@ +CONFIG_DEPS= @CONFIG_DEPS@ +CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ +ENABLE_CFLAGS= @ENABLE_CFLAGS@ +# CONFIG_ALL= @CONFIG_ALL@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_INSTALL = @CONFIG_INSTALL@ +CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ + +# -I. for config files. +# -I$(srcdir) for gdb internal headers. +# -I$(srcdir)/config for more generic config files. + +# It is also possible that you will need to add -I/usr/include/sys if +# your system doesn't have fcntl.h in /usr/include (which is where it +# should be according to Posix). +DEFS = -DCRASH_MERGE @DEFS@ +GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS) + +# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS +# from the config directory. +GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS) + +PROFILE_CFLAGS = @PROFILE_CFLAGS@ + +# CFLAGS is specifically reserved for setting from the command line +# when running make. I.E. "make CFLAGS=-Wmissing-prototypes". +CFLAGS = @CFLAGS@ + +# Need to pass this to testsuite for "make check". Probably should be +# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in +# so "make check" has the same result no matter where it is run. +CXXFLAGS = -g -O + +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_WARN_CFLAGS = \ + $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) $(ENABLE_CFLAGS) \ + $(GDB_WARN_CFLAGS) +INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) + +# LDFLAGS is specifically reserved for setting from the command line +# when running make. +LDFLAGS = @LDFLAGS@ + +# Profiling options need to go here to work. +# I think it's perfectly reasonable for a user to set -pg in CFLAGS +# and have it work; that's why CFLAGS is here. +# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. +INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) + +# If your system is missing alloca(), or, more likely, it's there but +# it doesn't work, then refer to libiberty. + +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# LIBIBERTY appears twice on purpose. +# If you have the Cygnus libraries installed, +# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' +INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + -lintl -liberty +CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + $(LIBICONV) \ + $(LIBIBERTY) $(WIN32LIBS) +CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) + +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) + +DIST=gdb + +LINT=/usr/5bin/lint +LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) + +RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \ + echo $${rootsrc}/../dejagnu/runtest ; else echo runtest; \ + fi` + +RUNTESTFLAGS= + +# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX +# interface to the serial port. Hopefully if get ported to OS/2, VMS, +# etc., then there will be (as part of the C library or perhaps as +# part of libiberty) a POSIX interface. But at least for now the +# host-dependent makefile fragment might need to use something else +# besides ser-unix.o +SER_HARDWIRE = @SER_HARDWIRE@ + +# The `remote' debugging target is supported for most architectures, +# but not all (e.g. 960) +REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o + +# This is remote-sim.o if a simulator is to be linked in. +SIM_OBS = + +# Host and target-dependent makefile fragments come in here. +@host_makefile_frag@ +@target_makefile_frag@ +# End of host and target-dependent makefile fragments + +# Possibly ignore the simulator. If the simulator is being ignored, +# these expand into SIM= and SIM_OBJ=, overriding the entries from +# target_makefile_frag +# +@IGNORE_SIM@ +@IGNORE_SIM_OBS@ + +FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "mandir=$(mandir)" \ + "datadir=$(datadir)" \ + "includedir=$(includedir)" \ + "against=$(against)" \ + "DESTDIR=$(DESTDIR)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "CXX=$(CXX)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "DLLTOOL=$(DLLTOOL)" \ + "LDFLAGS=$(LDFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# Flags that we pass when building the testsuite. + +# empty for native, $(target_alias)/ for cross +target_subdir = @target_subdir@ + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +# The use of $$(x_FOR_TARGET) reduces the command line length by not +# duplicating the lengthy definition. +TARGET_FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "against=$(against)" \ + 'CC=$$(CC_FOR_TARGET)' \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + 'CXX=$$(CXX_FOR_TARGET)' \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# All source files that go into linking GDB. +# Links made at configuration time should not be specified here, since +# SFILES is used in building the distribution archive. + +SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ + ax-general.c ax-gdb.c \ + bcache.c \ + bfd-target.c \ + block.c blockframe.c breakpoint.c buildsym.c \ + c-exp.y c-lang.c c-typeprint.c c-valprint.c \ + charset.c cli-out.c coffread.c coff-pe-read.c \ + complaints.c completer.c corefile.c \ + cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ + dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \ + dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \ + elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ + f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ + frame-base.c \ + frame-unwind.c \ + gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ + hpacc-abi.c \ + inf-loop.c \ + infcall.c \ + infcmd.c inflow.c infrun.c \ + interps.c \ + jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ + kod.c kod-cisco.c \ + language.c linespec.c \ + m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \ + macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \ + mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \ + nlmread.c \ + objc-exp.y objc-lang.c \ + objfiles.c osabi.c observer.c \ + p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \ + regcache.c reggroups.c remote.c remote-fileio.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + serial.c ser-unix.c source.c \ + stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \ + target.c thread.c top.c tracepoint.c \ + trad-frame.c \ + typeprint.c \ + ui-out.c utils.c ui-file.h ui-file.c \ + user-regs.c \ + valarith.c valops.c valprint.c values.c varobj.c \ + wrapper.c + +LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c + +# "system" headers. Using these in dependencies is a rather personal +# choice. (-rich, summer 1993) +# (Why would we not want to depend on them? If one of these changes in a +# non-binary-compatible way, it is a real pain to remake the right stuff +# without these dependencies -kingdon, 13 Mar 1994) +aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h +aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h +getopt_h = $(INCLUDE_DIR)/getopt.h +floatformat_h = $(INCLUDE_DIR)/floatformat.h +bfd_h = $(BFD_DIR)/bfd.h +callback_h = $(INCLUDE_DIR)/gdb/callback.h +coff_sym_h = $(INCLUDE_DIR)/coff/sym.h +coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h +coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h +coff_internal_h = $(INCLUDE_DIR)/coff/internal.h +dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h) +elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h +elf_sh_h = $(INCLUDE_DIR)/elf/sh.h +elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) +elf_bfd_h = $(BFD_SRC)/elf-bfd.h +libaout_h = $(BFD_SRC)/libaout.h +libbfd_h = $(BFD_SRC)/libbfd.h +remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h +demangle_h = $(INCLUDE_DIR)/demangle.h +obstack_h = $(INCLUDE_DIR)/obstack.h +opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h +readline_h = $(READLINE_SRC)/readline.h +readline_tilde_h = $(READLINE_SRC)/tilde.h +readline_history_h = $(READLINE_SRC)/history.h +frv_desc_h = $(OPCODES_SRC)/frv-desc.h +sh_opc_h = $(OPCODES_SRC)/sh-opc.h +gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h +gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h +gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h +gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h +splay_tree_h = $(INCLUDE_DIR)/splay-tree.h + +# +# $BUILD/ headers +# + +config_h = config.h +exc_request_U_h = exc_request_U.h +exc_request_S_h = exc_request_S.h +msg_reply_S_h = msg_reply_S.h +msg_U_h = msg_U.h +notify_S_h = notify_S.h +process_reply_S_h = process_reply_S.h + +# +# config/ headers +# + +xm_h = @xm_h@ +tm_h = @tm_h@ +nm_h = @nm_h@ + +# +# gdb/ headers +# + +ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) +alphabsd_tdep_h = alphabsd-tdep.h +alpha_tdep_h = alpha-tdep.h +amd64_linux_tdep_h = amd64-linux-tdep.h +amd64_nat_h = amd64-nat.h +amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) +annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) +arch_utils_h = arch-utils.h +arm_tdep_h = arm-tdep.h +auxv_h = auxv.h +ax_gdb_h = ax-gdb.h +ax_h = ax.h $(doublest_h) +bcache_h = bcache.h +bfd_target_h = bfd-target.h +block_h = block.h +breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) +buildsym_h = buildsym.h +call_cmds_h = call-cmds.h +charset_h = charset.h +c_lang_h = c-lang.h $(value_h) $(macroexp_h) +cli_out_h = cli-out.h +coff_pe_read_h = coff-pe-read.h +coff_solib_h = coff-solib.h +command_h = command.h +complaints_h = complaints.h +completer_h = completer.h +cp_abi_h = cp-abi.h +cp_support_h = cp-support.h $(symtab_h) +dcache_h = dcache.h +defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) +dictionary_h = dictionary.h +disasm_h = disasm.h +doublest_h = doublest.h $(floatformat_h) +dummy_frame_h = dummy-frame.h +dwarf2expr_h = dwarf2expr.h +dwarf2_frame_h = dwarf2-frame.h +dwarf2loc_h = dwarf2loc.h +environ_h = environ.h +event_loop_h = event-loop.h +event_top_h = event-top.h +exec_h = exec.h $(target_h) +expression_h = expression.h $(symtab_h) $(doublest_h) +f_lang_h = f-lang.h +frame_base_h = frame-base.h +frame_h = frame.h +frame_unwind_h = frame-unwind.h $(frame_h) +gdbarch_h = gdbarch.h +gdb_assert_h = gdb_assert.h +gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) +gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h +gdb_dirent_h = gdb_dirent.h +gdb_events_h = gdb-events.h +gdb_h = gdb.h +gdb_locale_h = gdb_locale.h +gdb_obstack_h = gdb_obstack.h $(obstack_h) +gdb_proc_service_h = gdb_proc_service.h $(gregset_h) +gdb_regex_h = gdb_regex.h $(xregex_h) +gdb_stabs_h = gdb-stabs.h +gdb_stat_h = gdb_stat.h +gdb_string_h = gdb_string.h +gdb_thread_db_h = gdb_thread_db.h +gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) +gdbtypes_h = gdbtypes.h +gdb_vfork_h = gdb_vfork.h +gdb_wait_h = gdb_wait.h +glibc_tdep_h = glibc-tdep.h +gnu_nat_h = gnu-nat.h +gregset_h = gregset.h +hppa_tdep_h = hppa-tdep.h +i386_linux_tdep_h = i386-linux-tdep.h +i386_tdep_h = i386-tdep.h +i387_tdep_h = i387-tdep.h +ia64_tdep_h = ia64-tdep.h +infcall_h = infcall.h +inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h) +inf_loop_h = inf-loop.h +inflow_h = inflow.h $(terminal_h) +infttrace_h = infttrace.h +interps_h = interps.h +jv_lang_h = jv-lang.h +kod_h = kod.h +language_h = language.h +libunwind_frame_h = libunwind-frame.h $(libunwind_h) +linespec_h = linespec.h +linux_nat_h = linux-nat.h +m2_lang_h = m2-lang.h +m68k_tdep_h = m68k-tdep.h +macroexp_h = macroexp.h +macroscope_h = macroscope.h $(macrotab_h) $(symtab_h) +macrotab_h = macrotab.h +main_h = main.h +memattr_h = memattr.h +minimon_h = minimon.h +mipsnbsd_tdep_h = mipsnbsd-tdep.h +mips_tdep_h = mips-tdep.h +monitor_h = monitor.h +nbsd_tdep_h = nbsd-tdep.h +ns32k_tdep_h = ns32k-tdep.h +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +objc_lang_h = objc-lang.h +objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) +observer_h = observer.h +ocd_h = ocd.h +osabi_h = osabi.h +pa64solib_h = pa64solib.h +parser_defs_h = parser-defs.h $(doublest_h) +p_lang_h = p-lang.h +ppcnbsd_tdep_h = ppcnbsd-tdep.h +ppc_tdep_h = ppc-tdep.h +proc_utils_h = proc-utils.h +regcache_h = regcache.h +reggroups_h = reggroups.h +regset_h = regset.h +remote_fileio_h = remote-fileio.h +remote_h = remote.h +remote_utils_h = remote-utils.h $(target_h) +s390_tdep_h = s390-tdep.h +scm_lang_h = scm-lang.h $(scm_tags_h) +scm_tags_h = scm-tags.h +sentinel_frame_h = sentinel-frame.h +serial_h = serial.h +ser_unix_h = ser-unix.h +shnbsd_tdep_h = shnbsd-tdep.h +sh_tdep_h = sh-tdep.h +sim_regno_h = sim-regno.h +solib_h = solib.h +solib_svr4_h = solib-svr4.h +solist_h = solist.h +somsolib_h = somsolib.h +source_h = source.h +sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) +sparc_nat_h = sparc-nat.h +sparc_tdep_h = sparc-tdep.h +srec_h = srec.h +stabsread_h = stabsread.h +stack_h = stack.h +symfile_h = symfile.h +symtab_h = symtab.h +target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) +terminal_h = terminal.h +top_h = top.h +tracepoint_h = tracepoint.h +trad_frame_h = trad-frame.h +typeprint_h = typeprint.h +ui_file_h = ui-file.h +ui_out_h = ui-out.h +user_regs_h = user-regs.h +valprint_h = valprint.h +value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) +varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) +vax_tdep_h = vax-tdep.h +version_h = version.h +wince_stub_h = wince-stub.h +wrapper_h = wrapper.h $(gdb_h) +xcoffsolib_h = xcoffsolib.h +xmodem_h = xmodem.h + +# +# gdb/cli/ headers +# + +cli_cmds_h = $(srcdir)/cli/cli-cmds.h +cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h) +cli_dump_h = $(srcdir)/cli/cli-dump.h +cli_script_h = $(srcdir)/cli/cli-script.h +cli_setshow_h = $(srcdir)/cli/cli-setshow.h +cli_utils_h = $(srcdir)/cli/cli-utils.h + +# +# gdb/mi/ headers +# + +mi_cmds_h = $(srcdir)/mi/mi-cmds.h +mi_console_h = $(srcdir)/mi/mi-console.h +mi_getopt_h = $(srcdir)/mi/mi-getopt.h +mi_main_h = $(srcdir)/mi/mi-main.h +mi_out_h = $(srcdir)/mi/mi-out.h +mi_parse_h = $(srcdir)/mi/mi-parse.h + +# +# gdb/tui/ headers +# + +tui_command_h = $(srcdir)/tui/tui-command.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) +tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) +tui_file_h = $(srcdir)/tui/tui-file.h +tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h +tui_io_h = $(srcdir)/tui/tui-io.h +tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) +tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) +tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h) +tui_stack_h = $(srcdir)/tui/tui-stack.h +tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h) +tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h +tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h) +tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) + +# Header files that need to have srcdir added. Note that in the cases +# where we use a macro like $(gdbcmd_h), things are carefully arranged +# so that each .h file is listed exactly once (M-x tags-search works +# wrong if TAGS has files twice). Because this is tricky to get +# right, it is probably easiest just to list .h files here directly. + +HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + environ.h $(gdbcmd_h) gdb.h gdbcore.h \ + gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ + objfiles.h parser-defs.h serial.h solib.h \ + symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \ + macrotab.h macroexp.h macroscope.h \ + c-lang.h f-lang.h \ + jv-lang.h \ + m2-lang.h p-lang.h \ + complaints.h valprint.h \ + vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \ + vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \ + dcache.h remote-utils.h top.h somsolib.h + +# Header files that already have srcdir in them, or which are in objdir. + +HFILES_WITH_SRCDIR = ../bfd/bfd.h + + +# GDB "info" files, which should be included in their entirety +INFOFILES = gdb.info* + +REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar + +# {X,T,NAT}DEPFILES are something of a pain in that it's hard to +# default their values the way we do for SER_HARDWIRE; in the future +# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other +# variables analogous to SER_HARDWIRE which get defaulted in this +# Makefile.in + +DEPFILES = $(TDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \ + $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS) + +SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) +# Don't include YYFILES (*.c) because we already include *.y in SFILES, +# and it's more useful to see it in the .y file. +TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ + $(SUBDIR_CLI_SRCS) +TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) + +COMMON_OBS = $(DEPFILES) $(YYOBJ) \ + version.o \ + annotate.o \ + auxv.o \ + bfd-target.o \ + blockframe.o breakpoint.o findvar.o regcache.o \ + charset.o disasm.o dummy-frame.o \ + source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ + block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \ + infcall.o \ + infcmd.o infrun.o \ + expprint.o environ.o stack.o thread.o \ + interps.o \ + main.o \ + macrotab.o macrocmd.o macroexp.o macroscope.o \ + event-loop.o event-top.o inf-loop.o completer.o \ + gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \ + memattr.o mem-break.o target.o parse.o language.o buildsym.o \ + std-regs.o \ + signals.o \ + kod.o kod-cisco.o \ + gdb-events.o \ + exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \ + dbxread.o coffread.o coff-pe-read.o elfread.o \ + dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + dwarf2expr.o dwarf2loc.o dwarf2-frame.o \ + c-lang.o f-lang.o objc-lang.o \ + ui-out.o cli-out.o \ + varobj.o wrapper.o \ + jv-lang.o jv-valprint.o jv-typeprint.o \ + m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ + scm-exp.o scm-lang.o scm-valprint.o \ + sentinel-frame.o \ + complaints.o typeprint.o \ + c-typeprint.o f-typeprint.o m2-typeprint.o \ + c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \ + nlmread.o serial.o mdebugread.o top.o utils.o \ + ui-file.o \ + user-regs.o \ + frame.o frame-unwind.o doublest.o \ + frame-base.o \ + gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ + cp-namespace.o \ + reggroups.o \ + trad-frame.o + +TSOBS = inflow.o + +SUBDIRS = build_no_subdirs + +# For now, shortcut the "configure GDB for fewer languages" stuff. +YYFILES = c-exp.c \ + objc-exp.c \ + ada-exp.c \ + jv-exp.c \ + f-exp.c m2-exp.c p-exp.c +YYOBJ = c-exp.o \ + objc-exp.o \ + jv-exp.o \ + f-exp.o m2-exp.o p-exp.o + +# Things which need to be built when making a distribution. + +DISTSTUFF = $(YYFILES) + +# Prevent Sun make from putting in the machine type. Setting +# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. +.c.o: + $(CC) -c $(INTERNAL_CFLAGS) $< + +all: gdb$(EXEEXT) $(CONFIG_ALL) + @$(MAKE) -s $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) + +installcheck: + +# The check target can not use subdir_do, because subdir_do does not +# use TARGET_FLAGS_TO_PASS. +check: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ + else true; fi + +info dvi install-info clean-info html install-html: force + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do + +gdb.z:gdb.1 + nroff -man $(srcdir)/gdb.1 | col -b > gdb.t + pack gdb.t ; rm -f gdb.t + mv gdb.t.z gdb.z + +# Traditionally "install" depends on "all". But it may be useful +# not to; for example, if the user has made some trivial change to a +# source file and doesn't care about rebuilding or just wants to save the +# time it takes for make to check that all is up to date. +# install-only is intended to address that need. +install: all install-only +install-only: $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + + +uninstall: force $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (top.o -> _initialize_top, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +# FIXME: There is a problem with this approach - init.c may force +# unnecessary files to be linked in. + +# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that +# the first call is to _initialize_gdbtypes (implemented by explicitly +# putting that function's name first in the init.l-tmp file). This is +# a hack to ensure that all the architecture dependant global +# builtin_type_* variables are initialized before anything else +# (per-architecture code is called in the same order that it is +# registered). The ``correct fix'' is to have all the builtin types +# made part of the architecture and initialize them on-demand (using +# gdbarch_data) just like everything else. The catch is that other +# modules still take the address of these builtin types forcing them +# to be variables, sigh! + +# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is +# anchored on the first column and excludes the ``/'' character so +# that it doesn't add the $(srcdir) prefix to any file that already +# has an absolute path. It turns out that $(DEC)'s True64 make +# automatically adds the $(srcdir) prefixes when it encounters files +# in sub-directories such as cli/ and mi/. + +# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates +# duplicates. Files in the gdb/ directory can end up appearing in +# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file). + +INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) +init.c: $(INIT_FILES) + @echo Making init.c + @rm -f init.c-tmp init.l-tmp + @touch init.c-tmp + @echo gdbtypes > init.l-tmp + @-echo $(INIT_FILES) | \ + tr ' ' '\012' | \ + sed \ + -e '/^gdbtypes.[co]$$/d' \ + -e '/^init.[co]$$/d' \ + -e '/xdr_ld.[co]$$/d' \ + -e '/xdr_ptrace.[co]$$/d' \ + -e '/xdr_rdb.[co]$$/d' \ + -e '/udr.[co]$$/d' \ + -e '/udip2soc.[co]$$/d' \ + -e '/udi2go32.[co]$$/d' \ + -e '/version.[co]$$/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \ + -e 's/\.[co]$$/.c/' \ + -e 's,signals\.c,signals/signals\.c,' \ + -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ + while read f; do \ + sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ + done | \ + while read f; do \ + case " $$fs " in \ + *" $$f "* ) ;; \ + * ) echo $$f ; fs="$$fs $$f";; \ + esac; \ + done >> init.l-tmp + @echo '/* Do not modify this file. */' >>init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp + @echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp + @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' >init.c-tmp + @echo 'void' >>init.c-tmp + @echo 'initialize_all_files (void)' >>init.c-tmp + @echo '{' >>init.c-tmp + @sed -e 's/\(.*\)/ _initialize_\1 ();/' >init.c-tmp + @echo '}' >>init.c-tmp + @rm init.l-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c + +init.o: init.c $(defs_h) $(call_cmds_h) + +# Removing the old gdb first works better if it is running, at least on SunOS. +gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + @(cd ../..; make --no-print-directory GDB_FLAGS=-DGDB_6_1 library) + @rm -f gdb$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o `cat mergeobj` libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) `cat mergelibs` + +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +nlm: force + rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do + +# Create a library of the gdb object files and build GDB by linking +# against that. +# +# init.o is very important. It pulls in the rest of GDB. +LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o +libgdb.a: $(LIBGDB_OBS) + -rm -f libgdb.a + $(AR) q libgdb.a $(LIBGDB_OBS) + $(RANLIB) libgdb.a + +# A Mach 3.0 program to force gdb back to command level + +stop-gdb: stop-gdb.o + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + stop-gdb.o $(CLIBS) $(LOADLIBES) + +# This is useful when debugging GDB, because some Unix's don't let you run GDB +# on itself without copying the executable. So "make gdb1" will make +# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". +# Removing gdb1 before the copy is the right thing if gdb1 is open +# in another process. +gdb1$(EXEEXT): gdb$(EXEEXT) + rm -f gdb1$(EXEEXT) + cp gdb$(EXEEXT) gdb1$(EXEEXT) + +# FIXME. These are not generated by "make depend" because they only are there +# for some machines. +# But these rules don't do what we want; we want to hack the foo.o: tm.h +# dependency to do the right thing. +tm-sun3.h tm-altos.h: tm-m68k.h +tm-sun2.h tm-3b1.h: tm-m68k.h +xm-vaxult.h: xm-vax.h +xm-vaxbsd.h: xm-vax.h + +# Put the proper machine-specific files first, so M-. on a machine +# specific routine gets the one for the correct machine. (FIXME: those +# files go in twice; we should be removing them from the main list). + +# TAGS depends on all the files that go into it so you can rebuild TAGS +# with `make TAGS' and not have to say `rm TAGS' first. + +TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) + @echo Making TAGS + @etags $(srcdir)/$(TM_FILE) \ + $(srcdir)/$(XM_FILE) \ + $(srcdir)/$(NAT_FILE) \ + `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ + echo $(srcdir)/$$i ; \ + done ; for i in $(TAGFILES_WITH_SRCDIR); do \ + echo $$i ; \ + done) | sed -e 's/\.o$$/\.c/'` \ + `find $(srcdir)/config -name '*.h' -print` + +tags: TAGS + +clean mostlyclean: $(CONFIG_CLEAN) + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do + rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp + rm -f init.c version.c + rm -f gdb$(EXEEXT) core make.log + rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) + +# This used to depend on c-exp.c m2-exp.c TAGS +# I believe this is wrong; the makefile standards for distclean just +# describe removing files; the only sort of "re-create a distribution" +# functionality described is if the distributed files are unmodified. +# NB: While GDBSERVER might be configured on native systems, it isn't +# always included in SUBDIRS. Remove the gdbserver files explictly. +distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do + rm -f gdbserver/config.status gdbserver/config.log + rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h + rm -f gdbserver/Makefile gdbserver/config.cache + rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit + rm -f y.output yacc.acts yacc.tmp y.tab.h + rm -f config.log config.cache + rm -f Makefile + +maintainer-clean: local-maintainer-clean do-maintainer-clean distclean +realclean: maintainer-clean + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f c-exp.c \ + ada-lex.c ada-exp.c \ + objc-exp.c \ + jv-exp.tab \ + f-exp.c m2-exp.c p-exp.c + rm -f TAGS $(INFOFILES) + rm -f $(YYFILES) + rm -f nm.h tm.h xm.h config.status + +do-maintainer-clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \ + subdir_do + +diststuff: $(DISTSTUFF) + cd doc; $(MAKE) $(MFLAGS) diststuff + +subdir_do: force + @for i in $(DODIRS); do \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + +Makefile: Makefile.in config.status @frags@ + $(SHELL) config.status + +config.h: stamp-h ; @true +stamp-h: config.in config.status + CONFIG_HEADERS=config.h:config.in $(SHELL) config.status + +config.status: configure configure.tgt configure.host + $(SHELL) config.status --recheck + +force: + +# Documentation! +# GDB QUICK REFERENCE (TeX dvi file, CM fonts) +doc/refcard.dvi: + cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) + +# GDB QUICK REFERENCE (PostScript output, common PS fonts) +doc/refcard.ps: + cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) + +# GDB MANUAL: TeX dvi file +doc/gdb.dvi: + cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) + +# GDB MANUAL: info file +doc/gdb.info: + cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) + +# Make copying.c from COPYING +$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \ + $(srcdir)/COPYING $(srcdir)/copying.awk + awk -f $(srcdir)/copying.awk \ + < $(srcdir)/COPYING > $(srcdir)/copying.tmp + mv $(srcdir)/copying.tmp $(srcdir)/copying.c + +version.c: Makefile version.in + @rm -f version.c-tmp version.c + @echo '#include "version.h"' >> version.c-tmp + @echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp + @echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp + @echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp + @mv version.c-tmp version.c +version.o: version.c $(version_h) + + +lint: $(LINTFILES) + $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ + `echo $(DEPFILES) | sed 's/\.o /\.c /g'` + +gdb.cxref: $(SFILES) + cxref -I. $(SFILES) >gdb.cxref + +force_update: + +# GNU Make has an annoying habit of putting *all* the Makefile variables +# into the environment, unless you include this target as a circumvention. +# Rumor is that this will be fixed (and this target can be removed) +# in GNU Make 4.0. +.NOEXPORT: + +# GNU Make 3.63 has a different problem: it keeps tacking command line +# overrides onto the definition of $(MAKE). This variable setting +# will remove them. +MAKEOVERRIDES= + +ALLDEPFILES = \ + aix-thread.c \ + alpha-nat.c alphabsd-nat.c \ + alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \ + alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \ + amd64-nat.c amd64-tdep.c \ + amd64bsd-nat.c amdfbsd-nat.c amd64fbsd-tdep.c \ + amd64nbsd-nat.c amd64nbsd-tdep.c \ + amd64obsd-nat.c amd64obsd-tdep.c \ + amd64-linux-nat.c amd64-linux-tdep.c \ + arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \ + armnbsd-nat.c armnbsd-tdep.c \ + avr-tdep.c \ + coff-solib.c \ + core-regset.c core-aout.c corelow.c \ + dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \ + glibc-tdep.c \ + go32-nat.c h8300-tdep.c \ + hppa-tdep.c hppa-hpux-tdep.c \ + hppah-nat.c hpread.c \ + i386-tdep.c i386v-nat.c i386-linux-nat.c \ + i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \ + i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \ + i387-tdep.c \ + i386-linux-tdep.c i386-nat.c \ + i386gnu-nat.c i386gnu-tdep.c \ + ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ + libunwind-frame.c \ + lynx-nat.c m3-nat.c \ + m68hc11-tdep.c \ + m68k-tdep.c \ + mcore-tdep.c \ + mips-linux-nat.c mips-linux-tdep.c \ + mips-nat.c \ + mips-irix-tdep.c \ + mips-tdep.c mipsm3-nat.c mipsv4-nat.c \ + mipsnbsd-nat.c mipsnbsd-tdep.c \ + nbsd-tdep.c \ + ns32k-tdep.c solib-osf.c \ + somread.c somsolib.c $(HPREAD_SOURCE) \ + ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \ + ppcnbsd-nat.o ppcnbsd-tdep.o \ + procfs.c \ + remote-e7000.c \ + remote-hms.c remote-m32r-sdi.c remote-mips.c \ + remote-rdp.c remote-sim.c \ + remote-st.c remote-utils.c dcache.c \ + remote-vx.c \ + rs6000-nat.c rs6000-tdep.c \ + s390-tdep.c s390-nat.c \ + ser-go32.c ser-pipe.c ser-tcp.c \ + sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ + solib.c solib-irix.c solib-svr4.c solib-sunos.c \ + sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \ + sparc-tdep.c sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-linux-nat.c \ + sparc64-linux-tdep.c sparc64-nat.c sparc64-sol2-tdep.c \ + sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ + sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ + sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + sun3-nat.c \ + symm-tdep.c symm-nat.c \ + vax-tdep.c \ + vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ + win32-nat.c \ + xcoffread.c xcoffsolib.c \ + xstormy16-tdep.c + +# Some files need explict build rules (due to -Werror problems) or due +# to sub-directory fun 'n' games. + +# Provide explicit rule/dependency - works for more makes. +copying.o: $(srcdir)/copying.c + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c + +hpux-thread.o: $(srcdir)/hpux-thread.c + $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \ + -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \ + $(srcdir)/hpux-thread.c + +# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. +main.o: main.c + $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \ + -DBINDIR=\"$(bindir)\" $(srcdir)/main.c + +# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral +# errors. It turns out that that is the least of monitor.c's +# problems. The function print_vsprintf appears to be using +# va_arg(long) to extract CORE_ADDR parameters - something that +# definitly will not work. "monitor.c" needs to be rewritten so that +# it doesn't use format strings and instead uses callbacks. +monitor.o: $(srcdir)/monitor.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/monitor.c + +# FIXME: cagney/2003-08-10: Do not try to build "printcmd.c" with +# -Wformat-nonliteral. It needs to be overhauled so that it doesn't +# pass user input strings as the format parameter to host printf +# function calls. +printcmd.o: $(srcdir)/printcmd.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/printcmd.c + +# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't +# match output format strings. +procfs.o: $(srcdir)/procfs.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c + +# FIXME: Thread-db.o gets warnings because the definitions of the register +# sets are different from kernel to kernel. +thread-db.o: $(srcdir)/thread-db.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \ + $(srcdir)/thread-db.c + +v850ice.o: $(srcdir)/v850ice.c + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) \ + $(srcdir)/v850ice.c + +# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with +# -Wformat-nonliteral. It relies on local_hex_format et.al. and +# that's a mess. It needs a serious overhaul. +valprint.o: $(srcdir)/valprint.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c + +# +# YACC/LEX dependencies +# +# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't +# exist in srcdir, then compiled in objdir to LANG-exp.o. If we +# said LANG-exp.c rather than ./c-exp.c some makes would +# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus +# decls for malloc/realloc/free which conflict with everything else. +# Strictly speaking c-exp.c should therefore depend on +# Makefile.in, but that was a pretty big annoyance. + +.SUFFIXES: .y .l +.y.c: + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $@.tmp -- $(YFLAGS) + -sed -e '/extern.*malloc/d' \ + -e '/extern.*realloc/d' \ + -e '/extern.*free/d' \ + -e '/include.*malloc.h/d' \ + -e 's/malloc/xmalloc/g' \ + -e 's/realloc/xrealloc/g' \ + -e '/^#line.*y.tab.c/d' \ + < $@.tmp > $@.new + -rm $@.tmp + mv $@.new ./$*.c +.l.c: + @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ + echo $(FLEX) -Isit $< ">" $@; \ + $(FLEX) -Isit $< > $@; \ + elif [ ! -f $@ -a ! -f $< ]; then \ + echo "ada-lex.c missing and flex not available."; \ + false; \ + elif [ ! -f $@ ]; then \ + echo "Warning: $*.c older than $*.l and flex not available."; \ + fi + +.PRECIOUS: ada-exp.c ada-lex.c +.PRECIOUS: c-exp.c +.PRECIOUS: f-exp.c +.PRECIOUS: jv-exp.c +.PRECIOUS: m2-exp.c +.PRECIOUS: objc-exp.c +.PRECIOUS: p-exp.c + +# +# gdb/ dependencies +# + +abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \ + $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(frame_h) $(block_h) $(ada_lex_c) +ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \ + $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \ + $(infcall_h) $(dictionary_h) +ada-lex.o: ada-lex.c +ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \ + $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \ + $(gregset_h) $(ada_lang_h) +ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ + $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ + $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) +ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \ + $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) +aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ + $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \ + $(ppc_tdep_h) +alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h) +alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) +alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(alpha_tdep_h) +alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \ + $(osabi_h) $(alpha_tdep_h) +alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ + $(block_h) $(gdb_assert_h) $(alpha_tdep_h) +alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) +alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) $(nbsd_tdep_h) +alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h) +alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \ + $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \ + $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \ + $(elf_bfd_h) $(alpha_tdep_h) +amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(solib_svr4_h) +amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) +amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ + $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) +amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ + $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \ + $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(i387_tdep_h) +annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ + $(gdbtypes_h) $(breakpoint_h) +arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ + $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ + $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \ + $(floatformat_h) +arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) +arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \ + $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \ + $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \ + $(glibc_tdep_h) +armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \ + $(regcache_h) $(gdbcore_h) +armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \ + $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \ + $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \ + $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) +auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \ + $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \ + $(elf_common_h) +avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_string_h) $(dis_asm_h) +ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \ + $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \ + $(regcache_h) +ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h) +bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \ + $(gdb_assert_h) +bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \ + $(gdb_assert_h) $(gdb_string_h) +block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \ + $(gdb_obstack_h) $(cp_support_h) +blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \ + $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \ + $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \ + $(command_h) $(gdbcmd_h) $(block_h) +breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \ + $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ + $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \ + $(gdb_events_h) +buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ + $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \ + $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) +c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) +charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \ + $(gdb_string_h) +c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \ + $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \ + $(demangle_h) $(cp_support_h) +cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \ + $(gdb_assert_h) +coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \ + $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h) +coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \ + $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \ + $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \ + $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \ + $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h) +coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) +complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \ + $(command_h) $(gdbcmd_h) +completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \ + $(readline_h) $(completer_h) +copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h) +core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_dirent_h) $(gdb_stat_h) +corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ + $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ + $(dis_asm_h) $(gdb_stat_h) $(completer_h) +corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ + $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ + $(exec_h) $(readline_h) $(gdb_assert_h) +core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) +cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ + $(ui_out_h) $(gdb_string_h) +cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \ + $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \ + $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h) +cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \ + $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \ + $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \ + $(gdbtypes_h) +cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h) +cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \ + $(cp_abi_h) $(valprint_h) +cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \ + $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \ + $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \ + $(gdb_string_h) $(dis_asm_h) +c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \ + $(gdb_string_h) +c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(c_lang_h) $(cp_abi_h) $(target_h) +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ + $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ + $(disasm_h) $(trad_frame_h) $(gdb_assert_h) +dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ + $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ + $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ + $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \ + $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) +dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ + $(gdbcore_h) $(target_h) +delta68-nat.o: delta68-nat.c $(defs_h) +demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ + $(gdb_string_h) +dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(buildsym_h) $(gdb_assert_h) $(dictionary_h) +dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h) +disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \ + $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h) +doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h) +dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) +dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \ + $(gdb_string_h) +dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \ + $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \ + $(command_h) $(gdbcmd_h) +dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \ + $(mips_tdep_h) +dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ + $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) +dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \ + $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) +dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \ + $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \ + $(dwarf2loc_h) $(gdb_string_h) +dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \ + $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \ + $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \ + $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) +dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \ + $(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \ + $(language_h) $(complaints_h) $(gdb_string_h) +elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \ + $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) +environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h) +eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ + $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ + $(parser_defs_h) +event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ + $(gdb_string_h) +event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ + $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ + $(gdbcmd_h) $(readline_h) $(readline_history_h) +exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ + $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ + $(xcoffsolib_h) +expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ + $(gdb_string_h) $(block_h) +fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(gdb_string_h) $(elf_bfd_h) $(gregset_h) +f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \ + $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \ + $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \ + $(user_regs_h) $(block_h) +f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \ + $(valprint_h) $(value_h) +fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ + $(terminal_h) $(gdbthread_h) $(command_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ + $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ + $(command_h) $(gdbcmd_h) +frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdb_assert_h) $(dummy_frame_h) +frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) +f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(f_lang_h) $(gdb_string_h) +f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h) +gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \ + $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \ + $(gdb_assert_h) +gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ + $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) +gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) +gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \ + $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \ + $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) +glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(glibc_tdep_h) +gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \ + $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \ + $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \ + $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) +gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) +gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \ + $(demangle_h) $(gdb_assert_h) $(gdb_string_h) +go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ + $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ + $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ + $(gdb_string_h) +h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ + $(gdb_assert_h) $(dis_asm_h) +hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ + $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) +hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(gdb_wait_h) $(regcache_h) $(gdb_string_h) +hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(osabi_h) $(gdb_string_h) $(frame_h) +hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \ + $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \ + $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \ + $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \ + $(hppa_tdep_h) +hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ + $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ + $(somsolib_h) $(gdb_assert_h) $(gdb_string_h) +hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) +i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) +i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h) +i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \ + $(i386_tdep_h) +i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) +i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \ + $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \ + $(i387_tdep_h) $(gregset_h) +i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h) +i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \ + $(gdbcore_h) $(gregset_h) $(regcache_h) +i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \ + $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \ + $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) +i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(gdb_proc_service_h) +i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ + $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(glibc_tdep_h) +i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) +i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) +i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ + $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ + $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) +i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \ + $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(i386_tdep_h) +i386-stub.o: i386-stub.c +i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \ + $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \ + $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \ + $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) +i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(gregset_h) +i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \ + $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(i386_tdep_h) +i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \ + $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) +ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stat_h) +ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h) +ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) +ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \ + $(arch_utils_h) $(gdbcore_h) $(regcache_h) +ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ + $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ + $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \ + $(libunwind_frame_h) $(libunwind_ia64_h) +infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ + $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ + $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) +infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \ + $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \ + $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \ + $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ + $(gdb_assert_h) +inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ + $(event_top_h) $(inf_loop_h) $(remote_h) +inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ + $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ + $(inflow_h) +infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ + $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) +infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ + $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ + $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ + $(observer_h) $(language_h) $(gdb_assert_h) +inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) +infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \ + $(gdbcore_h) +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ + $(gdb_events_h) $(gdb_assert_h) $(top_h) +irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h) +jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \ + $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) +jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \ + $(c_lang_h) $(cp_abi_h) +jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ + $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) +kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \ + $(kod_h) +kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h) +language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ + $(parser_defs_h) $(jv_lang_h) $(demangle_h) +libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ + $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \ + $(gdb_string_h) $(libunwind_frame_h) $(complaints_h) +linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ + $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \ + $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \ + $(objc_lang_h) $(linespec_h) +lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ + $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \ + $(linux_nat_h) +linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \ + $(linux_nat_h) +linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \ + $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ + $(cli_decode_h) $(gdb_string_h) $(linux_nat_h) +lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \ + $(valprint_h) +m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h) +m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(m2_lang_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ + $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) +m32r-stub.o: m32r-stub.c $(syscall_h) +m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \ + $(dis_asm_h) $(gdb_assert_h) +m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ + $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \ + $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h) +m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ + $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \ + $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(gregset_h) +m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ + $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ + $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ + $(m68k_tdep_h) +m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) +m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) +m68k-stub.o: m68k-stub.c +m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \ + $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \ + $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \ + $(gregset_h) +macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \ + $(command_h) $(gdbcmd_h) +macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \ + $(macroexp_h) $(gdb_assert_h) +macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \ + $(target_h) $(frame_h) $(inferior_h) $(complaints_h) +macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ + $(bcache_h) $(complaints_h) +main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ + $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ + $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) +maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ + $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) +mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(gdb_string_h) $(regcache_h) $(serial_h) +mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ + $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ + $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) +mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ + $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ + $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) \ + $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \ + $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h) +memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \ + $(target_h) $(value_h) $(language_h) $(gdb_string_h) +mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \ + $(target_h) +minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) +mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) +mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) +mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ + $(gdb_assert_h) $(frame_h) +mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(mipsnbsd_tdep_h) +mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ + $(solib_svr4_h) +mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ + $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ + $(elf_common_h) $(elf_mips_h) +mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ + $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) +mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gregset_h) +mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \ + $(objfiles_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \ + $(dis_asm_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ + $(gdb_regex_h) $(srec_h) $(regcache_h) +nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) +nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) +ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ + $(gdb_string_h) +ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ + $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ + $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ + $(nto_tdep_h) $(command_h) $(regcache_h) +nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ + $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ + $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) +objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ + $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \ + $(block_h) +objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ + $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ + $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ + $(gdb_assert_h) +objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \ + $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \ + $(breakpoint_h) $(block_h) $(dictionary_h) +observer.o: observer.c $(defs_h) $(observer_h) +ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ + $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) +osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ + $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) +parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ + $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ + $(doublest_h) $(gdb_assert_h) $(block_h) +p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \ + $(valprint_h) $(value_h) +ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \ + $(regcache_h) +ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \ + $(ppc_tdep_h) +ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ + $(ppc_tdep_h) +ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) +ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ + $(ppc_tdep_h) $(target_h) $(objfiles_h) +printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ + $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ + $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) +proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ + $(proc_utils_h) +proc-events.o: proc-events.c $(defs_h) +proc-flags.o: proc-flags.c $(defs_h) +procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \ + $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \ + $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) $(gregset_h) +proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gregset_h) +proc-why.o: proc-why.c $(defs_h) $(proc_utils_h) +p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h) +p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \ + $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) +regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \ + $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \ + $(gdb_string_h) $(gdbcmd_h) +reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ + $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) +remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ + $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ + $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ + $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ + $(gdbcore_h) $(remote_fileio_h) +remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ + $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ + $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) +remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ + $(remote_fileio_h) +remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) +remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) +remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \ + $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h) +remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) +remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(regcache_h) $(serial_h) +remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ + $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \ + $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) +remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(serial_h) $(regcache_h) +remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \ + $(regcache_h) +remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \ + $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \ + $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \ + $(vx_share_dbgRpcLib_h) +remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \ + $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \ + $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \ + $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \ + $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \ + $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \ + $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(regcache_h) $(gdb_string_h) \ + $(sparc_tdep_h) $(vx_share_ptrace_h) $(vx_share_regPacket_h) +rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) +rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ + $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) +rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ + $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ + $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ + $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ + $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ + $(gdb_assert_h) $(dis_asm_h) +s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ + $(s390_tdep_h) +s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \ + $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ + $(solib_svr4_h) $(s390_tdep_h) +scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) +scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h) +scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \ + $(scm_lang_h) $(valprint_h) $(gdbcore_h) +sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \ + $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h) +ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h) +ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h) +serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h) +ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \ + $(gdb_string_h) +ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h) +ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \ + $(gdb_string_h) $(event_loop_h) +sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \ + $(sh_tdep_h) +sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(objfiles_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \ + $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \ + $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ + $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +sh-stub.o: sh-stub.c +sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \ + $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \ + $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ + $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \ + $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ + $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) +solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ + $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ + $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) +solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ + $(bcache_h) $(regcache_h) +solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \ + $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \ + $(bfd_target_h) $(exec_h) +sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \ + $(symfile_h) $(gdb_string_h) $(gregset_h) +somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ + $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) +source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ + $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ + $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ + $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \ + $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) +sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ + $(solib_svr4_h) $(sparc64_tdep_h) +sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) +sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \ + $(sparc_nat_h) +sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h) +sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \ + $(sparc_tdep_h) $(sparc64_tdep_h) +sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc_tdep_h) +sparc-stub.o: sparc-stub.c +sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ + $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \ + $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ + $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ + $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \ + $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) +stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ + $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ + $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) +standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(gdb_wait_h) +std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ + $(value_h) $(gdb_string_h) +stop-gdb.o: stop-gdb.c $(defs_h) +sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \ + $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ + $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ + $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ + $(gdb_string_h) $(gdb_stat_h) +symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ + $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ + $(dictionary_h) $(gdb_string_h) +symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ + $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ + $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ + $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) +target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ + $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) +thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ + $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) +thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \ + $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) +top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ + $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ + $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ + $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ + $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ + $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) +tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ + $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ + $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \ + $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \ + $(readline_history_h) +trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ + $(regcache_h) +typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ + $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ + $(gdb_string_h) +ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) +ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(ui_out_h) $(gdb_assert_h) +user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ + $(gdb_string_h) $(gdb_assert_h) $(frame_h) +utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ + $(filenames_h) $(inferior_h) $(readline_h) +uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ + $(regcache_h) $(gregset_h) +v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ + $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) +v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) +valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ + $(doublest_h) $(infcall_h) +valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \ + $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \ + $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \ + $(cp_support_h) +valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \ + $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) +values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \ + $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \ + $(gdb_assert_h) $(regcache_h) $(block_h) +varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ + $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) +vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \ + $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h) +win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ + $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ + $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ + $(regcache_h) $(mips_tdep_h) +wince-stub.o: wince-stub.c $(wince_stub_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ + $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ + $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \ + $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h) +xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \ + $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h) +xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h) +xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \ + $(dis_asm_h) + +# +# gdb/cli/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \ + $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \ + $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ + $(tui_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c +cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ + $(cli_decode_h) $(tui_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c +cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ + $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ + $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c +cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ + $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ + $(cli_script_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c +cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \ + $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \ + $(cli_setshow_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c +cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c + +# +# GDBTK sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +all-gdbtk: insight$(EXEEXT) + +install-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ + $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/help \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ + cd $(srcdir)/gdbtk/library ; \ + for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \ + do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ + done ; + +uninstall-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + rm -rf $(DESTDIR)$(GDBTK_LIBRARY) + +clean-gdbtk: + rm -f insight$(EXEEXT) + +# Removing the old gdb first works better if it is running, at least on SunOS. +insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \ + $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico + $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o + +gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) $(top_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(ITK_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" + +gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(breakpoint_h) $(tracepoint_h) \ + $(symfile_h) $(symtab_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \ + $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(dis_asm_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \ + $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \ + $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \ + $(srcdir)/gdbtk/generic/gdbtk.h + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \ + $(srcdir)/gdbtk/generic/gdbtk-interp.c + +gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(frame_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \ + $(block_h) $(dictionary_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-varobj.c + +gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(frame_h) $(value_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.c + +# +# gdb/mi/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ + $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c +mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ + $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c +mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \ + $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \ + $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \ + $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c +mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \ + $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c +mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c +mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ + $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \ + $(stack_h) $(dictionary_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c +mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c +mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c +mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ + $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c +mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ + $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ + $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ + $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_h) $(frame_h) $(mi_main_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c +mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c +mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c +mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \ + $(symtab_h) $(ui_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c + +# +# rdi-share sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +rdi-share/libangsd.a: force + @dir=rdi-share; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ + else \ + true; \ + fi + +# +# gdb/signals/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c + +# +# gdb/tui/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ + $(source_h) $(gdb_curses_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c +tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c +tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c +tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c +tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ + $(tui_io_h) $(tui_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c +tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ + $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ + $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ + $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c +tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ + $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ + $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c +tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ + $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c +tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ + $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ + $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ + $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c +tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ + $(gdb_string_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c +tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c +tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ + $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c +tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ + $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c +tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ + $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ + $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c +tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c +tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c +tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ + $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ + $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c + +# +# vx-share sub-directory +# + +xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ld.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c + +xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ptrace.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c + +xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_rdb.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c + +### end of the gdb Makefile.in. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/ppc-linux-tdep.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/ppc-linux-tdep.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/ppc-linux-tdep.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/ppc-linux-tdep.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1116 @@ +/* Target-dependent code for GDB, the GNU debugger. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "symtab.h" +#include "target.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "symfile.h" +#include "objfiles.h" +#include "regcache.h" +#include "value.h" +#include "osabi.h" + +#include "solib-svr4.h" +#include "ppc-tdep.h" + +/* The following instructions are used in the signal trampoline code + on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and + 0x7777 but now uses the sigreturn syscalls. We check for both. */ +#define INSTR_LI_R0_0x6666 0x38006666 +#define INSTR_LI_R0_0x7777 0x38007777 +#define INSTR_LI_R0_NR_sigreturn 0x38000077 +#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC + +#define INSTR_SC 0x44000002 + +/* Since the *-tdep.c files are platform independent (i.e, they may be + used to build cross platform debuggers), we can't include system + headers. Therefore, details concerning the sigcontext structure + must be painstakingly rerecorded. What's worse, if these details + ever change in the header files, they'll have to be changed here + as well. */ + +/* __SIGNAL_FRAMESIZE from */ +#define PPC_LINUX_SIGNAL_FRAMESIZE 64 + +/* From , offsetof(struct sigcontext_struct, regs) == 0x1c */ +#define PPC_LINUX_REGS_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x1c) + +/* From , + offsetof(struct sigcontext_struct, handler) == 0x14 */ +#define PPC_LINUX_HANDLER_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x14) + +/* From , values for PT_NIP, PT_R1, and PT_LNK */ +#define PPC_LINUX_PT_R0 0 +#define PPC_LINUX_PT_R1 1 +#define PPC_LINUX_PT_R2 2 +#define PPC_LINUX_PT_R3 3 +#define PPC_LINUX_PT_R4 4 +#define PPC_LINUX_PT_R5 5 +#define PPC_LINUX_PT_R6 6 +#define PPC_LINUX_PT_R7 7 +#define PPC_LINUX_PT_R8 8 +#define PPC_LINUX_PT_R9 9 +#define PPC_LINUX_PT_R10 10 +#define PPC_LINUX_PT_R11 11 +#define PPC_LINUX_PT_R12 12 +#define PPC_LINUX_PT_R13 13 +#define PPC_LINUX_PT_R14 14 +#define PPC_LINUX_PT_R15 15 +#define PPC_LINUX_PT_R16 16 +#define PPC_LINUX_PT_R17 17 +#define PPC_LINUX_PT_R18 18 +#define PPC_LINUX_PT_R19 19 +#define PPC_LINUX_PT_R20 20 +#define PPC_LINUX_PT_R21 21 +#define PPC_LINUX_PT_R22 22 +#define PPC_LINUX_PT_R23 23 +#define PPC_LINUX_PT_R24 24 +#define PPC_LINUX_PT_R25 25 +#define PPC_LINUX_PT_R26 26 +#define PPC_LINUX_PT_R27 27 +#define PPC_LINUX_PT_R28 28 +#define PPC_LINUX_PT_R29 29 +#define PPC_LINUX_PT_R30 30 +#define PPC_LINUX_PT_R31 31 +#define PPC_LINUX_PT_NIP 32 +#define PPC_LINUX_PT_MSR 33 +#define PPC_LINUX_PT_CTR 35 +#define PPC_LINUX_PT_LNK 36 +#define PPC_LINUX_PT_XER 37 +#define PPC_LINUX_PT_CCR 38 +#define PPC_LINUX_PT_MQ 39 +#define PPC_LINUX_PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ +#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31) +#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1) + +static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); + +/* Determine if pc is in a signal trampoline... + + Ha! That's not what this does at all. wait_for_inferior in + infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a + signal trampoline just after delivery of a signal. But on + GNU/Linux, signal trampolines are used for the return path only. + The kernel sets things up so that the signal handler is called + directly. + + If we use in_sigtramp2() in place of in_sigtramp() (see below) + we'll (often) end up with stop_pc in the trampoline and prev_pc in + the (now exited) handler. The code there will cause a temporary + breakpoint to be set on prev_pc which is not very likely to get hit + again. + + If this is confusing, think of it this way... the code in + wait_for_inferior() needs to be able to detect entry into a signal + trampoline just after a signal is delivered, not after the handler + has been run. + + So, we define in_sigtramp() below to return 1 if the following is + true: + + 1) The previous frame is a real signal trampoline. + + - and - + + 2) pc is at the first or second instruction of the corresponding + handler. + + Why the second instruction? It seems that wait_for_inferior() + never sees the first instruction when single stepping. When a + signal is delivered while stepping, the next instruction that + would've been stepped over isn't, instead a signal is delivered and + the first instruction of the handler is stepped over instead. That + puts us on the second instruction. (I added the test for the + first instruction long after the fact, just in case the observed + behavior is ever fixed.) + + PC_IN_SIGTRAMP is called from blockframe.c as well in order to set + the frame's type (if a SIGTRAMP_FRAME). Because of our strange + definition of in_sigtramp below, we can't rely on the frame's type + getting set correctly from within blockframe.c. This is why we + take pains to set it in init_extra_frame_info(). + + NOTE: cagney/2002-11-10: I suspect the real problem here is that + the get_prev_frame() only initializes the frame's type after the + call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this + code shouldn't be working its way around a bug :-(. */ + +int +ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) +{ + CORE_ADDR lr; + CORE_ADDR sp; + CORE_ADDR tramp_sp; + char buf[4]; + CORE_ADDR handler; + + lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); + if (!ppc_linux_at_sigtramp_return_path (lr)) + return 0; + + sp = read_register (SP_REGNUM); + + if (target_read_memory (sp, buf, sizeof (buf)) != 0) + return 0; + + tramp_sp = extract_unsigned_integer (buf, 4); + + if (target_read_memory (tramp_sp + PPC_LINUX_HANDLER_PTR_OFFSET, buf, + sizeof (buf)) != 0) + return 0; + + handler = extract_unsigned_integer (buf, 4); + + return (pc == handler || pc == handler + 4); +} + +static int +insn_is_sigreturn (unsigned long pcinsn) +{ + switch(pcinsn) + { + case INSTR_LI_R0_0x6666: + case INSTR_LI_R0_0x7777: + case INSTR_LI_R0_NR_sigreturn: + case INSTR_LI_R0_NR_rt_sigreturn: + return 1; + default: + return 0; + } +} + +/* + * The signal handler trampoline is on the stack and consists of exactly + * two instructions. The easiest and most accurate way of determining + * whether the pc is in one of these trampolines is by inspecting the + * instructions. It'd be faster though if we could find a way to do this + * via some simple address comparisons. + */ +static int +ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) +{ + char buf[12]; + unsigned long pcinsn; + if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) + return 0; + + /* extract the instruction at the pc */ + pcinsn = extract_unsigned_integer (buf + 4, 4); + + return ( + (insn_is_sigreturn (pcinsn) + && extract_unsigned_integer (buf + 8, 4) == INSTR_SC) + || + (pcinsn == INSTR_SC + && insn_is_sigreturn (extract_unsigned_integer (buf, 4)))); +} + +static CORE_ADDR +ppc_linux_skip_trampoline_code (CORE_ADDR pc) +{ + char buf[4]; + struct obj_section *sect; + struct objfile *objfile; + unsigned long insn; + CORE_ADDR plt_start = 0; + CORE_ADDR symtab = 0; + CORE_ADDR strtab = 0; + int num_slots = -1; + int reloc_index = -1; + CORE_ADDR plt_table; + CORE_ADDR reloc; + CORE_ADDR sym; + long symidx; + char symname[1024]; + struct minimal_symbol *msymbol; + + /* Find the section pc is in; return if not in .plt */ + sect = find_pc_section (pc); + if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0) + return 0; + + objfile = sect->objfile; + + /* Pick up the instruction at pc. It had better be of the + form + li r11, IDX + + where IDX is an index into the plt_table. */ + + if (target_read_memory (pc, buf, 4) != 0) + return 0; + insn = extract_unsigned_integer (buf, 4); + + if ((insn & 0xffff0000) != 0x39600000 /* li r11, VAL */ ) + return 0; + + reloc_index = (insn << 16) >> 16; + + /* Find the objfile that pc is in and obtain the information + necessary for finding the symbol name. */ + for (sect = objfile->sections; sect < objfile->sections_end; ++sect) + { + const char *secname = sect->the_bfd_section->name; + if (strcmp (secname, ".plt") == 0) + plt_start = sect->addr; + else if (strcmp (secname, ".rela.plt") == 0) + num_slots = ((int) sect->endaddr - (int) sect->addr) / 12; + else if (strcmp (secname, ".dynsym") == 0) + symtab = sect->addr; + else if (strcmp (secname, ".dynstr") == 0) + strtab = sect->addr; + } + + /* Make sure we have all the information we need. */ + if (plt_start == 0 || num_slots == -1 || symtab == 0 || strtab == 0) + return 0; + + /* Compute the value of the plt table */ + plt_table = plt_start + 72 + 8 * num_slots; + + /* Get address of the relocation entry (Elf32_Rela) */ + if (target_read_memory (plt_table + reloc_index, buf, 4) != 0) + return 0; + reloc = extract_unsigned_integer (buf, 4); + + sect = find_pc_section (reloc); + if (!sect) + return 0; + + if (strcmp (sect->the_bfd_section->name, ".text") == 0) + return reloc; + + /* Now get the r_info field which is the relocation type and symbol + index. */ + if (target_read_memory (reloc + 4, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Shift out the relocation type leaving just the symbol index */ + /* symidx = ELF32_R_SYM(symidx); */ + symidx = symidx >> 8; + + /* compute the address of the symbol */ + sym = symtab + symidx * 4; + + /* Fetch the string table index */ + if (target_read_memory (sym, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Fetch the string; we don't know how long it is. Is it possible + that the following will fail because we're trying to fetch too + much? */ + if (target_read_memory (strtab + symidx, symname, sizeof (symname)) != 0) + return 0; + + /* This might not work right if we have multiple symbols with the + same name; the only way to really get it right is to perform + the same sort of lookup as the dynamic linker. */ + msymbol = lookup_minimal_symbol_text (symname, NULL); + if (!msymbol) + return 0; + + return SYMBOL_VALUE_ADDRESS (msymbol); +} + +/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The + signal handler details are different, so we'll handle those here + and call the rs6000 version to do the rest. */ +CORE_ADDR +ppc_linux_frame_saved_pc (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return the NIP in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); + } + else if (get_next_frame (fi) + && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (get_next_frame (fi)) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return LNK in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); + } + else + return rs6000_frame_saved_pc (fi); +} + +void +ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) +{ + rs6000_init_extra_frame_info (fromleaf, fi); + + if (get_next_frame (fi) != 0) + { + /* We're called from get_prev_frame_info; check to see if + this is a signal frame by looking to see if the pc points + at trampoline code */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + deprecated_set_frame_type (fi, SIGTRAMP_FRAME); + else + /* FIXME: cagney/2002-11-10: Is this double bogus? What + happens if the frame has previously been marked as a dummy? */ + deprecated_set_frame_type (fi, NORMAL_FRAME); + } +} + +int +ppc_linux_frameless_function_invocation (struct frame_info *fi) +{ + /* We'll find the wrong thing if we let + rs6000_frameless_function_invocation () search for a signal trampoline */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + return 0; + else + return rs6000_frameless_function_invocation (fi); +} + +void +ppc_linux_frame_init_saved_regs (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr; + int i; + if (deprecated_get_frame_saved_regs (fi)) + return; + + frame_saved_regs_zalloc (fi); + + regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MSR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CCR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_LNK; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CTR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = + regs_addr + 4 * PPC_LINUX_PT_XER; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MQ; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = + regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; + } + else + rs6000_frame_init_saved_regs (fi); +} + +CORE_ADDR +ppc_linux_frame_chain (struct frame_info *thisframe) +{ + /* Kernel properly constructs the frame chain for the handler */ + if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) + return read_memory_integer (get_frame_base (thisframe), 4); + else + return rs6000_frame_chain (thisframe); +} + +/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint + in much the same fashion as memory_remove_breakpoint in mem-break.c, + but is careful not to write back the previous contents if the code + in question has changed in between inserting the breakpoint and + removing it. + + Here is the problem that we're trying to solve... + + Once upon a time, before introducing this function to remove + breakpoints from the inferior, setting a breakpoint on a shared + library function prior to running the program would not work + properly. In order to understand the problem, it is first + necessary to understand a little bit about dynamic linking on + this platform. + + A call to a shared library function is accomplished via a bl + (branch-and-link) instruction whose branch target is an entry + in the procedure linkage table (PLT). The PLT in the object + file is uninitialized. To gdb, prior to running the program, the + entries in the PLT are all zeros. + + Once the program starts running, the shared libraries are loaded + and the procedure linkage table is initialized, but the entries in + the table are not (necessarily) resolved. Once a function is + actually called, the code in the PLT is hit and the function is + resolved. In order to better illustrate this, an example is in + order; the following example is from the gdb testsuite. + + We start the program shmain. + + [kev@arroyo testsuite]$ ../gdb gdb.base/shmain + [...] + + We place two breakpoints, one on shr1 and the other on main. + + (gdb) b shr1 + Breakpoint 1 at 0x100409d4 + (gdb) b main + Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44. + + Examine the instruction (and the immediatly following instruction) + upon which the breakpoint was placed. Note that the PLT entry + for shr1 contains zeros. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : .long 0x0 + 0x100409d8 : .long 0x0 + + Now run 'til main. + + (gdb) r + Starting program: gdb.base/shmain + Breakpoint 1 at 0xffaf790: file gdb.base/shr1.c, line 19. + + Breakpoint 2, main () + at gdb.base/shmain.c:44 + 44 g = 1; + + Examine the PLT again. Note that the loading of the shared + library has initialized the PLT to code which loads a constant + (which I think is an index into the GOT) into r11 and then + branchs a short distance to the code which actually does the + resolving. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : li r11,4 + 0x100409d8 : b 0x10040984 + (gdb) c + Continuing. + + Breakpoint 1, shr1 (x=1) + at gdb.base/shr1.c:19 + 19 l = 1; + + Now we've hit the breakpoint at shr1. (The breakpoint was + reset from the PLT entry to the actual shr1 function after the + shared library was loaded.) Note that the PLT entry has been + resolved to contain a branch that takes us directly to shr1. + (The real one, not the PLT entry.) + + (gdb) x/2i 0x100409d4 + 0x100409d4 : b 0xffaf76c + 0x100409d8 : b 0x10040984 + + The thing to note here is that the PLT entry for shr1 has been + changed twice. + + Now the problem should be obvious. GDB places a breakpoint (a + trap instruction) on the zero value of the PLT entry for shr1. + Later on, after the shared library had been loaded and the PLT + initialized, GDB gets a signal indicating this fact and attempts + (as it always does when it stops) to remove all the breakpoints. + + The breakpoint removal was causing the former contents (a zero + word) to be written back to the now initialized PLT entry thus + destroying a portion of the initialization that had occurred only a + short time ago. When execution continued, the zero word would be + executed as an instruction an an illegal instruction trap was + generated instead. (0 is not a legal instruction.) + + The fix for this problem was fairly straightforward. The function + memory_remove_breakpoint from mem-break.c was copied to this file, + modified slightly, and renamed to ppc_linux_memory_remove_breakpoint. + In tm-linux.h, MEMORY_REMOVE_BREAKPOINT is defined to call this new + function. + + The differences between ppc_linux_memory_remove_breakpoint () and + memory_remove_breakpoint () are minor. All that the former does + that the latter does not is check to make sure that the breakpoint + location actually contains a breakpoint (trap instruction) prior + to attempting to write back the old contents. If it does contain + a trap instruction, we allow the old contents to be written back. + Otherwise, we silently do nothing. + + The big question is whether memory_remove_breakpoint () should be + changed to have the same functionality. The downside is that more + traffic is generated for remote targets since we'll have an extra + fetch of a memory word each time a breakpoint is removed. + + For the time being, we'll leave this self-modifying-code-friendly + version in ppc-linux-tdep.c, but it ought to be migrated somewhere + else in the event that some other platform has similar needs with + regard to removing breakpoints in some potentially self modifying + code. */ +int +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +{ + const unsigned char *bp; + int val; + int bplen; + char old_contents[BREAKPOINT_MAX]; + + /* Determine appropriate breakpoint contents and size for this address. */ + bp = BREAKPOINT_FROM_PC (&addr, &bplen); + if (bp == NULL) + error ("Software breakpoints not implemented for this target."); + + val = target_read_memory (addr, old_contents, bplen); + + /* If our breakpoint is no longer at the address, this means that the + program modified the code on us, so it is wrong to put back the + old value */ + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) + val = target_write_memory (addr, contents_cache, bplen); + + return val; +} + +/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather + than the 32 bit SYSV R4 ABI structure return convention - all + structures, no matter their size, are put in memory. Vectors, + which were added later, do get returned in a register though. */ + +static enum return_value_convention +ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, + struct regcache *regcache, void *readbuf, + const void *writebuf) +{ + if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT + || TYPE_CODE (valtype) == TYPE_CODE_UNION) + && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8) + && TYPE_VECTOR (valtype))) + return RETURN_VALUE_STRUCT_CONVENTION; + else + return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf, + writebuf); +} + +/* Fetch (and possibly build) an appropriate link_map_offsets + structure for GNU/Linux PPC targets using the struct offsets + defined in link.h (but without actual reference to that file). + + This makes it possible to access GNU/Linux PPC shared libraries + from a GDB that was not built on an GNU/Linux PPC host (for cross + debugging). */ + +struct link_map_offsets * +ppc_linux_svr4_fetch_link_map_offsets (void) +{ + static struct link_map_offsets lmo; + static struct link_map_offsets *lmp = NULL; + + if (lmp == NULL) + { + lmp = &lmo; + + lmo.r_debug_size = 8; /* The actual size is 20 bytes, but + this is all we need. */ + lmo.r_map_offset = 4; + lmo.r_map_size = 4; + + lmo.link_map_size = 20; /* The actual size is 560 bytes, but + this is all we need. */ + lmo.l_addr_offset = 0; + lmo.l_addr_size = 4; + + lmo.l_name_offset = 4; + lmo.l_name_size = 4; + + lmo.l_next_offset = 12; + lmo.l_next_size = 4; + + lmo.l_prev_offset = 16; + lmo.l_prev_size = 4; + } + + return lmp; +} + + +/* Macros for matching instructions. Note that, since all the + operands are masked off before they're or-ed into the instruction, + you can use -1 to make masks. */ + +#define insn_d(opcd, rts, ra, d) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xffff)) + +#define insn_ds(opcd, rts, ra, d, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xfffc) \ + | ((xo) & 0x3)) + +#define insn_xfx(opcd, rts, spr, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((spr) & 0x1f) << 16) \ + | (((spr) & 0x3e0) << 6) \ + | (((xo) & 0x3ff) << 1)) + +/* Read a PPC instruction from memory. PPC instructions are always + big-endian, no matter what endianness the program is running in, so + we can't use read_memory_integer or one of its friends here. */ +static unsigned int +read_insn (CORE_ADDR pc) +{ + unsigned char buf[4]; + + read_memory (pc, buf, 4); + return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; +} + + +/* An instruction to match. */ +struct insn_pattern +{ + unsigned int mask; /* mask the insn with this... */ + unsigned int data; /* ...and see if it matches this. */ + int optional; /* If non-zero, this insn may be absent. */ +}; + +/* Return non-zero if the instructions at PC match the series + described in PATTERN, or zero otherwise. PATTERN is an array of + 'struct insn_pattern' objects, terminated by an entry whose mask is + zero. + + When the match is successful, fill INSN[i] with what PATTERN[i] + matched. If PATTERN[i] is optional, and the instruction wasn't + present, set INSN[i] to 0 (which is not a valid PPC instruction). + INSN should have as many elements as PATTERN. Note that, if + PATTERN contains optional instructions which aren't present in + memory, then INSN will have holes, so INSN[i] isn't necessarily the + i'th instruction in memory. */ +static int +insns_match_pattern (CORE_ADDR pc, + struct insn_pattern *pattern, + unsigned int *insn) +{ + int i; + + for (i = 0; pattern[i].mask; i++) + { + insn[i] = read_insn (pc); + if ((insn[i] & pattern[i].mask) == pattern[i].data) + pc += 4; + else if (pattern[i].optional) + insn[i] = 0; + else + return 0; + } + + return 1; +} + + +/* Return the 'd' field of the d-form instruction INSN, properly + sign-extended. */ +static CORE_ADDR +insn_d_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000); +} + + +/* Return the 'ds' field of the ds-form instruction INSN, with the two + zero bits concatenated at the right, and properly + sign-extended. */ +static CORE_ADDR +insn_ds_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000); +} + + +/* If DESC is the address of a 64-bit PowerPC GNU/Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + +/* Pattern for the standard linkage function. These are built by + build_plt_stub in elf64-ppc.c, whose GLINK argument is always + zero. */ +static struct insn_pattern ppc64_standard_linkage[] = + { + /* addis r12, r2, */ + { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 }, + + /* std r2, 40(r1) */ + { -1, insn_ds (62, 2, 1, 40, 0), 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* ld r2, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* mtctr r11 */ + { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), + 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* bctr */ + { -1, 0x4e800420, 0 }, + + { 0, 0, 0 } + }; +#define PPC64_STANDARD_LINKAGE_LEN \ + (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0])) + + +/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB + calls a "solib trampoline". */ +static int +ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name) +{ + /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain. + + It's not specifically solib call trampolines that are the issue. + Any call from one function to another function that uses a + different TOC requires a trampoline, to save the caller's TOC + pointer and then load the callee's TOC. An executable or shared + library may have more than one TOC, so even intra-object calls + may require a trampoline. Since executable and shared libraries + will all have their own distinct TOCs, every inter-object call is + also an inter-TOC call, and requires a trampoline --- so "solib + call trampolines" are just a special case. + + The 64-bit PowerPC GNU/Linux ABI calls these call trampolines + "linkage functions". Since they need to be near the functions + that call them, they all appear in .text, not in any special + section. The .plt section just contains an array of function + descriptors, from which the linkage functions load the callee's + entry point, TOC value, and environment pointer. So + in_plt_section is useless. The linkage functions don't have any + special linker symbols to name them, either. + + The only way I can see to recognize them is to actually look at + their code. They're generated by ppc_build_one_stub and some + other functions in bfd/elf64-ppc.c, so that should show us all + the instruction sequences we need to recognize. */ + unsigned int insn[PPC64_STANDARD_LINKAGE_LEN]; + + return insns_match_pattern (pc, ppc64_standard_linkage, insn); +} + + +/* When the dynamic linker is doing lazy symbol resolution, the first + call to a function in another object will go like this: + + - The user's function calls the linkage function: + + 100007c4: 4b ff fc d5 bl 10000498 + 100007c8: e8 41 00 28 ld r2,40(r1) + + - The linkage function loads the entry point (and other stuff) from + the function descriptor in the PLT, and jumps to it: + + 10000498: 3d 82 00 00 addis r12,r2,0 + 1000049c: f8 41 00 28 std r2,40(r1) + 100004a0: e9 6c 80 98 ld r11,-32616(r12) + 100004a4: e8 4c 80 a0 ld r2,-32608(r12) + 100004a8: 7d 69 03 a6 mtctr r11 + 100004ac: e9 6c 80 a8 ld r11,-32600(r12) + 100004b0: 4e 80 04 20 bctr + + - But since this is the first time that PLT entry has been used, it + sends control to its glink entry. That loads the number of the + PLT entry and jumps to the common glink0 code: + + 10000c98: 38 00 00 00 li r0,0 + 10000c9c: 4b ff ff dc b 10000c78 + + - The common glink0 code then transfers control to the dynamic + linker's fixup code: + + 10000c78: e8 41 00 28 ld r2,40(r1) + 10000c7c: 3d 82 00 00 addis r12,r2,0 + 10000c80: e9 6c 80 80 ld r11,-32640(r12) + 10000c84: e8 4c 80 88 ld r2,-32632(r12) + 10000c88: 7d 69 03 a6 mtctr r11 + 10000c8c: e9 6c 80 90 ld r11,-32624(r12) + 10000c90: 4e 80 04 20 bctr + + Eventually, this code will figure out how to skip all of this, + including the dynamic linker. At the moment, we just get through + the linkage function. */ + +/* If the current thread is about to execute a series of instructions + at PC matching the ppc64_standard_linkage pattern, and INSN is the result + from that pattern match, return the code address to which the + standard linkage function will send them. (This doesn't deal with + dynamic linker lazy symbol resolution stubs.) */ +static CORE_ADDR +ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + /* The address of the function descriptor this linkage function + references. */ + CORE_ADDR desc + = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2) + + (insn_d_field (insn[0]) << 16) + + insn_ds_field (insn[2])); + + /* The first word of the descriptor is the entry point. Return that. */ + return ppc64_desc_entry_point (desc); +} + + +/* Given that we've begun executing a call trampoline at PC, return + the entry point of the function the trampoline will go to. */ +static CORE_ADDR +ppc64_skip_trampoline_code (CORE_ADDR pc) +{ + unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN]; + + if (insns_match_pattern (pc, ppc64_standard_linkage, + ppc64_standard_linkage_insn)) + return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn); + else + return 0; +} + + +/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64 + GNU/Linux. + + Usually a function pointer's representation is simply the address + of the function. On GNU/Linux on the 64-bit PowerPC however, a + function pointer is represented by a pointer to a TOC entry. This + TOC entry contains three words, the first word is the address of + the function, the second word is the TOC pointer (r2), and the + third word is the static chain value. Throughout GDB it is + currently assumed that a function pointer contains the address of + the function, which is not easy to fix. In addition, the + conversion of a function address to a function pointer would + require allocation of a TOC entry in the inferior's memory space, + with all its drawbacks. To be able to call C++ virtual methods in + the inferior (which are called via function pointers), + find_function_addr uses this function to get the function address + from a function pointer. */ + +/* If ADDR points at what is clearly a function descriptor, transform + it into the address of the corresponding function. Be + conservative, otherwize GDB will do the transformation on any + random addresses such as occures when there is no symbol table. */ + +static CORE_ADDR +ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + struct section_table *s = target_section_by_addr (targ, addr); + + /* Check if ADDR points to a function descriptor. */ + if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) + return get_target_memory_unsigned (targ, addr, 8); + + return addr; +} + +#ifdef CRASH_MERGE +enum { + PPC_ELF_NGREG = 48, + PPC_ELF_NFPREG = 33, + PPC_ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (PPC_ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (PPC_ELF_NFPREG * 8) +}; +#else +enum { + ELF_NGREG = 48, + ELF_NFPREG = 33, + ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) +}; +#endif + +void +ppc_linux_supply_gregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (regi, buf + 4 * regi); + + supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); + supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); + supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); + supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); + supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); + if (tdep->ppc_mq_regnum != -1) + supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); + supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); +} + +void +ppc_linux_supply_fpregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (FP0_REGNUM + regi, buf + 8 * regi); + + /* The FPSCR is stored in the low order word of the last doubleword in the + fpregset. */ + supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); +} + +/* + Use a local version of this function to get the correct types for regsets. +*/ + +static void +fetch_core_registers (char *core_reg_sect, + unsigned core_reg_size, + int which, + CORE_ADDR reg_addr) +{ + if (which == 0) + { + if (core_reg_size == ELF_GREGSET_SIZE) + ppc_linux_supply_gregset (core_reg_sect); + else + warning ("wrong size gregset struct in core file"); + } + else if (which == 2) + { + if (core_reg_size == ELF_FPREGSET_SIZE) + ppc_linux_supply_fpregset (core_reg_sect); + else + warning ("wrong size fpregset struct in core file"); + } +} + +/* Register that we are able to handle ELF file formats using standard + procfs "regset" structures. */ + +static struct core_fns ppc_linux_regset_core_fns = +{ + bfd_target_elf_flavour, /* core_flavour */ + default_check_format, /* check_format */ + default_core_sniffer, /* core_sniffer */ + fetch_core_registers, /* core_read_registers */ + NULL /* next */ +}; + +static void +ppc_linux_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if (tdep->wordsize == 4) + { + /* Until November 2001, gcc did not comply with the 32 bit SysV + R4 ABI requirement that structures less than or equal to 8 + bytes should be returned in registers. Instead GCC was using + the the AIX/PowerOpen ABI - everything returned in memory + (well ignoring vectors that is). When this was corrected, it + wasn't fixed for GNU/Linux native platform. Use the + PowerOpen struct convention. */ + set_gdbarch_return_value (gdbarch, ppc_linux_return_value); + + /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding + *_push_arguments(). The same remarks hold for the methods below. */ + set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); + set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); + set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); + + set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, + ppc_linux_frame_init_saved_regs); + set_gdbarch_deprecated_init_extra_frame_info (gdbarch, + ppc_linux_init_extra_frame_info); + + set_gdbarch_memory_remove_breakpoint (gdbarch, + ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, + ppc_linux_skip_trampoline_code); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); + } + + if (tdep->wordsize == 8) + { + /* Handle PPC64 GNU/Linux function pointers (which are really + function descriptors). */ + set_gdbarch_convert_from_func_ptr_addr + (gdbarch, ppc64_linux_convert_from_func_ptr_addr); + + set_gdbarch_in_solib_call_trampoline + (gdbarch, ppc64_in_solib_call_trampoline); + set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); + + /* PPC64 malloc's entry-point is called ".malloc". */ + set_gdbarch_name_of_malloc (gdbarch, ".malloc"); + } +} + +void +_initialize_ppc_linux_tdep (void) +{ + /* Register for all sub-familes of the POWER/PowerPC: 32-bit and + 64-bit PowerPC, and the older rs6k. */ + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, + ppc_linux_init_abi); + add_core_fns (&ppc_linux_regset_core_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/symfile.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/symfile.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/symfile.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/symfile.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3644 @@ +/* Generic symbol file reading for the GNU debugger, GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support, using pieces from other GDB modules. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfdlink.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "source.h" +#include "gdbcmd.h" +#include "breakpoint.h" +#include "language.h" +#include "complaints.h" +#include "demangle.h" +#include "inferior.h" /* for write_pc */ +#include "filenames.h" /* for DOSish file names */ +#include "gdb-stabs.h" +#include "gdb_obstack.h" +#include "completer.h" +#include "bcache.h" +#include "hashtab.h" +#include "readline/readline.h" +#include "gdb_assert.h" +#include "block.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifdef HPUXHPPA + +/* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + +extern int hp_som_som_object_present; +extern int hp_cxx_exception_support_initialized; +#define RESET_HP_UX_GLOBALS() do {\ + hp_som_som_object_present = 0; /* indicates HP-compiled code */ \ + hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \ + } while (0) +#endif + +int (*ui_load_progress_hook) (const char *section, unsigned long num); +void (*show_load_progress) (const char *section, + unsigned long section_sent, + unsigned long section_size, + unsigned long total_sent, + unsigned long total_size); +void (*pre_add_symbol_hook) (char *); +void (*post_add_symbol_hook) (void); +void (*target_new_objfile_hook) (struct objfile *); + +static void clear_symtab_users_cleanup (void *ignore); + +/* Global variables owned by this file */ +int readnow_symbol_files; /* Read full symbols immediately */ + +/* External variables and functions referenced. */ + +extern void report_transfer_performance (unsigned long, time_t, time_t); + +/* Functions this file defines */ + +#if 0 +static int simple_read_overlay_region_table (void); +static void simple_free_overlay_region_table (void); +#endif + +static void set_initial_language (void); + +static void load_command (char *, int); + +static void symbol_file_add_main_1 (char *args, int from_tty, int flags); + +static void add_symbol_file_command (char *, int); + +static void add_shared_symbol_files_command (char *, int); + +static void reread_separate_symbols (struct objfile *objfile); + +static void cashier_psymtab (struct partial_symtab *); + +bfd *symfile_bfd_open (char *); + +int get_section_index (struct objfile *, char *); + +static void find_sym_fns (struct objfile *); + +static void decrement_reading_symtab (void *); + +static void overlay_invalidate_all (void); + +static int overlay_is_mapped (struct obj_section *); + +void list_overlays_command (char *, int); + +void map_overlay_command (char *, int); + +void unmap_overlay_command (char *, int); + +static void overlay_auto_command (char *, int); + +static void overlay_manual_command (char *, int); + +static void overlay_off_command (char *, int); + +static void overlay_load_command (char *, int); + +static void overlay_command (char *, int); + +static void simple_free_overlay_table (void); + +static void read_target_long_array (CORE_ADDR, unsigned int *, int); + +static int simple_read_overlay_table (void); + +static int simple_overlay_update_1 (struct obj_section *); + +static void add_filename_language (char *ext, enum language lang); + +static void set_ext_lang_command (char *args, int from_tty); + +static void info_ext_lang_command (char *args, int from_tty); + +static char *find_separate_debug_file (struct objfile *objfile); + +static void init_filename_language_table (void); + +void _initialize_symfile (void); + +/* List of all available sym_fns. On gdb startup, each object file reader + calls add_symtab_fns() to register information on each format it is + prepared to read. */ + +static struct sym_fns *symtab_fns = NULL; + +/* Flag for whether user will be reloading symbols multiple times. + Defaults to ON for VxWorks, otherwise OFF. */ + +#ifdef SYMBOL_RELOADING_DEFAULT +int symbol_reloading = SYMBOL_RELOADING_DEFAULT; +#else +int symbol_reloading = 0; +#endif + +/* If non-zero, shared library symbols will be added automatically + when the inferior is created, new libraries are loaded, or when + attaching to the inferior. This is almost always what users will + want to have happen; but for very large programs, the startup time + will be excessive, and so if this is a problem, the user can clear + this flag and then add the shared library symbols as needed. Note + that there is a potential for confusion, since if the shared + library symbols are not loaded, commands like "info fun" will *not* + report all the functions that are actually present. */ + +int auto_solib_add = 1; + +/* For systems that support it, a threshold size in megabytes. If + automatically adding a new library's symbol table to those already + known to the debugger would cause the total shared library symbol + size to exceed this threshhold, then the shlib's symbols are not + added. The threshold is ignored if the user explicitly asks for a + shlib to be added, such as when using the "sharedlibrary" + command. */ + +int auto_solib_limit; + + +/* This compares two partial symbols by names, using strcmp_iw_ordered + for the comparison. */ + +static int +compare_psymbols (const void *s1p, const void *s2p) +{ + struct partial_symbol *const *s1 = s1p; + struct partial_symbol *const *s2 = s2p; + + return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1), + SYMBOL_NATURAL_NAME (*s2)); +} + +void +sort_pst_symbols (struct partial_symtab *pst) +{ + /* Sort the global list; don't sort the static list */ + + qsort (pst->objfile->global_psymbols.list + pst->globals_offset, + pst->n_global_syms, sizeof (struct partial_symbol *), + compare_psymbols); +} + +/* Make a null terminated copy of the string at PTR with SIZE characters in + the obstack pointed to by OBSTACKP . Returns the address of the copy. + Note that the string at PTR does not have to be null terminated, I.E. it + may be part of a larger string and we are only saving a substring. */ + +char * +obsavestring (const char *ptr, int size, struct obstack *obstackp) +{ + char *p = (char *) obstack_alloc (obstackp, size + 1); + /* Open-coded memcpy--saves function call time. These strings are usually + short. FIXME: Is this really still true with a compiler that can + inline memcpy? */ + { + const char *p1 = ptr; + char *p2 = p; + const char *end = ptr + size; + while (p1 != end) + *p2++ = *p1++; + } + p[size] = 0; + return p; +} + +/* Concatenate strings S1, S2 and S3; return the new string. Space is found + in the obstack pointed to by OBSTACKP. */ + +char * +obconcat (struct obstack *obstackp, const char *s1, const char *s2, + const char *s3) +{ + int len = strlen (s1) + strlen (s2) + strlen (s3) + 1; + char *val = (char *) obstack_alloc (obstackp, len); + strcpy (val, s1); + strcat (val, s2); + strcat (val, s3); + return val; +} + +/* True if we are nested inside psymtab_to_symtab. */ + +int currently_reading_symtab = 0; + +static void +decrement_reading_symtab (void *dummy) +{ + currently_reading_symtab--; +} + +/* Get the symbol table that corresponds to a partial_symtab. + This is fast after the first time you do it. In fact, there + is an even faster macro PSYMTAB_TO_SYMTAB that does the fast + case inline. */ + +struct symtab * +psymtab_to_symtab (struct partial_symtab *pst) +{ + /* If it's been looked up before, return it. */ + if (pst->symtab) + return pst->symtab; + + /* If it has not yet been read in, read it. */ + if (!pst->readin) + { + struct cleanup *back_to = make_cleanup (decrement_reading_symtab, NULL); + currently_reading_symtab++; + (*pst->read_symtab) (pst); + do_cleanups (back_to); + } + + return pst->symtab; +} + +/* Remember the lowest-addressed loadable section we've seen. + This function is called via bfd_map_over_sections. + + In case of equal vmas, the section with the largest size becomes the + lowest-addressed loadable section. + + If the vmas and sizes are equal, the last section is considered the + lowest-addressed loadable section. */ + +void +find_lowest_section (bfd *abfd, asection *sect, void *obj) +{ + asection **lowest = (asection **) obj; + + if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD)) + return; + if (!*lowest) + *lowest = sect; /* First loadable section */ + else if (bfd_section_vma (abfd, *lowest) > bfd_section_vma (abfd, sect)) + *lowest = sect; /* A lower loadable section */ + else if (bfd_section_vma (abfd, *lowest) == bfd_section_vma (abfd, sect) + && (bfd_section_size (abfd, (*lowest)) + <= bfd_section_size (abfd, sect))) + *lowest = sect; +} + +/* Create a new section_addr_info, with room for NUM_SECTIONS. */ + +struct section_addr_info * +alloc_section_addr_info (size_t num_sections) +{ + struct section_addr_info *sap; + size_t size; + + size = (sizeof (struct section_addr_info) + + sizeof (struct other_sections) * (num_sections - 1)); + sap = (struct section_addr_info *) xmalloc (size); + memset (sap, 0, size); + sap->num_sections = num_sections; + + return sap; +} + +/* Build (allocate and populate) a section_addr_info struct from + an existing section table. */ + +extern struct section_addr_info * +build_section_addr_info_from_section_table (const struct section_table *start, + const struct section_table *end) +{ + struct section_addr_info *sap; + const struct section_table *stp; + int oidx; + + sap = alloc_section_addr_info (end - start); + + for (stp = start, oidx = 0; stp != end; stp++) + { + if (bfd_get_section_flags (stp->bfd, + stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD) + && oidx < end - start) + { + sap->other[oidx].addr = stp->addr; + sap->other[oidx].name + = xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section)); + sap->other[oidx].sectindex = stp->the_bfd_section->index; + oidx++; + } + } + + return sap; +} + + +/* Free all memory allocated by build_section_addr_info_from_section_table. */ + +extern void +free_section_addr_info (struct section_addr_info *sap) +{ + int idx; + + for (idx = 0; idx < sap->num_sections; idx++) + if (sap->other[idx].name) + xfree (sap->other[idx].name); + xfree (sap); +} + + +/* Initialize OBJFILE's sect_index_* members. */ +static void +init_objfile_sect_indices (struct objfile *objfile) +{ + asection *sect; + int i; + + sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (sect) + objfile->sect_index_text = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".data"); + if (sect) + objfile->sect_index_data = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".bss"); + if (sect) + objfile->sect_index_bss = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".rodata"); + if (sect) + objfile->sect_index_rodata = sect->index; + + /* This is where things get really weird... We MUST have valid + indices for the various sect_index_* members or gdb will abort. + So if for example, there is no ".text" section, we have to + accomodate that. Except when explicitly adding symbol files at + some address, section_offsets contains nothing but zeros, so it + doesn't matter which slot in section_offsets the individual + sect_index_* members index into. So if they are all zero, it is + safe to just point all the currently uninitialized indices to the + first slot. */ + + for (i = 0; i < objfile->num_sections; i++) + { + if (ANOFFSET (objfile->section_offsets, i) != 0) + { + break; + } + } + if (i == objfile->num_sections) + { + if (objfile->sect_index_text == -1) + objfile->sect_index_text = 0; + if (objfile->sect_index_data == -1) + objfile->sect_index_data = 0; + if (objfile->sect_index_bss == -1) + objfile->sect_index_bss = 0; + if (objfile->sect_index_rodata == -1) + objfile->sect_index_rodata = 0; + } +} + + +/* Parse the user's idea of an offset for dynamic linking, into our idea + of how to represent it for fast symbol reading. This is the default + version of the sym_fns.sym_offsets function for symbol readers that + don't need to do anything special. It allocates a section_offsets table + for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */ + +void +default_symfile_offsets (struct objfile *objfile, + struct section_addr_info *addrs) +{ + int i; + + objfile->num_sections = bfd_count_sections (objfile->obfd); + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + memset (objfile->section_offsets, 0, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + + /* Now calculate offsets for section that were specified by the + caller. */ + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + struct other_sections *osp ; + + osp = &addrs->other[i] ; + if (osp->addr == 0) + continue; + + /* Record all sections in offsets */ + /* The section_offsets in the objfile are here filled in using + the BFD index. */ + (objfile->section_offsets)->offsets[osp->sectindex] = osp->addr; + } + + /* Remember the bfd indexes for the .text, .data, .bss and + .rodata sections. */ + init_objfile_sect_indices (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + OBJFILE is where the symbols are to be read from. + + ADDRS is the list of section load addresses. If the user has given + an 'add-symbol-file' command, then this is the list of offsets and + addresses he or she provided as arguments to the command; or, if + we're handling a shared library, these are the actual addresses the + sections are loaded at, according to the inferior's dynamic linker + (as gleaned by GDB's shared library code). We convert each address + into an offset from the section VMA's as it appears in the object + file, and then call the file's sym_offsets function to convert this + into a format-specific offset table --- a `struct section_offsets'. + If ADDRS is non-zero, OFFSETS must be zero. + + OFFSETS is a table of section offsets already in the right + format-specific representation. NUM_OFFSETS is the number of + elements present in OFFSETS->offsets. If OFFSETS is non-zero, we + assume this is the proper table the call to sym_offsets described + above would produce. Instead of calling sym_offsets, we just dump + it right into objfile->section_offsets. (When we're re-reading + symbols from an objfile, we don't have the original load address + list any more; all we have is the section offset table.) If + OFFSETS is non-zero, ADDRS must be zero. + + MAINLINE is nonzero if this is the main symbol file, or zero if + it's an extra symbol file such as dynamically loaded code. + + VERBO is nonzero if the caller has printed a verbose message about + the symbol reading (and complaints can be more terse about it). */ + +void +syms_from_objfile (struct objfile *objfile, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, + int verbo) +{ + struct section_addr_info *local_addr = NULL; + struct cleanup *old_chain; + + gdb_assert (! (addrs && offsets)); + + init_entry_point_info (objfile); + find_sym_fns (objfile); + + if (objfile->sf == NULL) + return; /* No symbols. */ + + /* Make sure that partially constructed symbol tables will be cleaned up + if an error occurs during symbol reading. */ + old_chain = make_cleanup_free_objfile (objfile); + + /* If ADDRS and OFFSETS are both NULL, put together a dummy address + list. We now establish the convention that an addr of zero means + no load address was specified. */ + if (! addrs && ! offsets) + { + local_addr + = alloc_section_addr_info (bfd_count_sections (objfile->obfd)); + make_cleanup (xfree, local_addr); + addrs = local_addr; + } + + /* Now either addrs or offsets is non-zero. */ + + if (mainline) + { + /* We will modify the main symbol table, make sure that all its users + will be cleaned up if an error occurs during symbol reading. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Since no error yet, throw away the old symbol table. */ + + if (symfile_objfile != NULL) + { + free_objfile (symfile_objfile); + symfile_objfile = NULL; + } + + /* Currently we keep symbols from the add-symbol-file command. + If the user wants to get rid of them, they should do "symbol-file" + without arguments first. Not sure this is the best behavior + (PR 2207). */ + + (*objfile->sf->sym_new_init) (objfile); + } + + /* Convert addr into an offset rather than an absolute address. + We find the lowest address of a loaded segment in the objfile, + and assume that is where that got loaded. + + We no longer warn if the lowest section is not a text segment (as + happens for the PA64 port. */ + if (!mainline && addrs && addrs->other[0].name) + { + asection *lower_sect; + asection *sect; + CORE_ADDR lower_offset; + int i; + + /* Find lowest loadable section to be used as starting point for + continguous sections. FIXME!! won't work without call to find + .text first, but this assumes text is lowest section. */ + lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (lower_sect == NULL) + bfd_map_over_sections (objfile->obfd, find_lowest_section, + &lower_sect); + if (lower_sect == NULL) + warning ("no loadable sections found in added symbol-file %s", + objfile->name); + else + if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) + warning ("Lowest section in %s is %s at %s", + objfile->name, + bfd_section_name (objfile->obfd, lower_sect), + paddr (bfd_section_vma (objfile->obfd, lower_sect))); + if (lower_sect != NULL) + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); + else + lower_offset = 0; + + /* Calculate offsets for the loadable sections. + FIXME! Sections must be in order of increasing loadable section + so that contiguous sections can use the lower-offset!!! + + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to + the offset of the highest loadable section lower than it + (the loadable section directly below it in memory). + this_offset = lower_offset = lower_addr - lower_orig_addr */ + + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + if (addrs->other[i].addr != 0) + { + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); + if (sect) + { + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); + lower_offset = addrs->other[i].addr; + /* This is the index used by BFD. */ + addrs->other[i].sectindex = sect->index ; + } + else + { + warning ("section %s not found in %s", + addrs->other[i].name, + objfile->name); + addrs->other[i].addr = 0; + } + } + else + addrs->other[i].addr = lower_offset; + } + } + + /* Initialize symbol reading routines for this objfile, allow complaints to + appear for this new file, and record how verbose to be, then do the + initial symbol reading for this file. */ + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, verbo); + + if (addrs) + (*objfile->sf->sym_offsets) (objfile, addrs); + else + { + size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets); + + /* Just copy in the offset table directly as given to us. */ + objfile->num_sections = num_offsets; + objfile->section_offsets + = ((struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, size)); + memcpy (objfile->section_offsets, offsets, size); + + init_objfile_sect_indices (objfile); + } + +#ifndef DEPRECATED_IBM6000_TARGET + /* This is a SVR4/SunOS specific hack, I think. In any event, it + screws RS/6000. sym_offsets should be doing this sort of thing, + because it knows the mapping between bfd sections and + section_offsets. */ + /* This is a hack. As far as I can tell, section offsets are not + target dependent. They are all set to addr with a couple of + exceptions. The exceptions are sysvr4 shared libraries, whose + offsets are kept in solib structures anyway and rs6000 xcoff + which handles shared libraries in a completely unique way. + + Section offsets are built similarly, except that they are built + by adding addr in all cases because there is no clear mapping + from section_offsets into actual sections. Note that solib.c + has a different algorithm for finding section offsets. + + These should probably all be collapsed into some target + independent form of shared library support. FIXME. */ + + if (addrs) + { + struct obj_section *s; + + /* Map section offsets in "addr" back to the object's + sections by comparing the section names with bfd's + section names. Then adjust the section address by + the offset. */ /* for gdb/13815 */ + + ALL_OBJFILE_OSECTIONS (objfile, s) + { + CORE_ADDR s_addr = 0; + int i; + + for (i = 0; + !s_addr && i < addrs->num_sections && addrs->other[i].name; + i++) + if (strcmp (bfd_section_name (s->objfile->obfd, + s->the_bfd_section), + addrs->other[i].name) == 0) + s_addr = addrs->other[i].addr; /* end added for gdb/13815 */ + + s->addr -= s->offset; + s->addr += s_addr; + s->endaddr -= s->offset; + s->endaddr += s_addr; + s->offset += s_addr; + } + } + +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, struct minimal_symbol *); + patch_load_module(objfile, NULL); + } +#endif +#endif /* not DEPRECATED_IBM6000_TARGET */ + + (*objfile->sf->sym_read) (objfile, mainline); + + /* Don't allow char * to have a typename (else would get caddr_t). + Ditto void *. FIXME: Check whether this is now done by all the + symbol readers themselves (many of them now do), and if so remove + it from here. */ + + TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0; + TYPE_NAME (lookup_pointer_type (builtin_type_void)) = 0; + + /* Mark the objfile has having had initial symbol read attempted. Note + that this does not mean we found any symbols... */ + + objfile->flags |= OBJF_SYMS; + + /* Discard cleanups as symbol reading was successful. */ + + discard_cleanups (old_chain); +} + +/* Perform required actions after either reading in the initial + symbols for a new objfile, or mapping in the symbols from a reusable + objfile. */ + +void +new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) +{ + + /* If this is the main symbol file we have to clean up all users of the + old main symbol file. Otherwise it is sufficient to fixup all the + breakpoints that may have been redefined by this symbol file. */ + if (mainline) + { + /* OK, make it the "real" symbol file. */ + symfile_objfile = objfile; + + clear_symtab_users (); + } + else + { + breakpoint_re_set (); + } + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, verbo); +} + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + NAME is the file name (which will be tilde-expanded and made + absolute herein) (but we don't free or modify NAME itself). + + FROM_TTY says how verbose to be. + + MAINLINE specifies whether this is the main symbol file, or whether + it's an extra symbol file such as dynamically loaded code. + + ADDRS, OFFSETS, and NUM_OFFSETS are as described for + syms_from_objfile, above. ADDRS is ignored when MAINLINE is + non-zero. + + Upon success, returns a pointer to the objfile that was added. + Upon failure, jumps back to command level (never returns). */ +static struct objfile * +symbol_file_add_with_addrs_or_offsets (char *name, int from_tty, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, int flags) +{ + struct objfile *objfile; + struct partial_symtab *psymtab; + char *debugfile; + bfd *abfd; + struct section_addr_info *orig_addrs; + struct cleanup *my_cleanups; + + /* Open a bfd for the file, and give user a chance to burp if we'd be + interactively wiping out any existing symbols. */ + + abfd = symfile_bfd_open (name); + + if ((have_full_symbols () || have_partial_symbols ()) + && mainline + && from_tty + && !query ("Load new symbol table from \"%s\"? ", name)) + error ("Not confirmed."); + + objfile = allocate_objfile (abfd, flags); + + orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); + my_cleanups = make_cleanup (xfree, orig_addrs); + if (addrs) + { + int i; + orig_addrs->num_sections = addrs->num_sections; + for (i = 0; i < addrs->num_sections; i++) + orig_addrs->other[i] = addrs->other[i]; + } + + /* We either created a new mapped symbol table, mapped an existing + symbol table file which has not had initial symbol reading + performed, or need to read an unmapped symbol table. */ + if (from_tty || info_verbose) + { + if (pre_add_symbol_hook) + pre_add_symbol_hook (name); + else + { + printf_unfiltered ("Reading symbols from %s...", name); + wrap_here (""); + gdb_flush (gdb_stdout); + } + } + syms_from_objfile (objfile, addrs, offsets, num_offsets, + mainline, from_tty); + + /* We now have at least a partial symbol table. Check to see if the + user requested that all symbols be read on initial access via either + the gdb startup command line or on a per symbol file basis. Expand + all partial symbol tables for this objfile if so. */ + + if ((flags & OBJF_READNOW) || readnow_symbol_files) + { + if (from_tty || info_verbose) + { + printf_unfiltered ("expanding to full symbols..."); + wrap_here (""); + gdb_flush (gdb_stdout); + } + + for (psymtab = objfile->psymtabs; + psymtab != NULL; + psymtab = psymtab->next) + { + psymtab_to_symtab (psymtab); + } + } + + debugfile = find_separate_debug_file (objfile); + if (debugfile) + { + if (addrs != NULL) + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags); + } + else + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, NULL, 0, flags); + } + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + + /* Put the separate debug object before the normal one, this is so that + usage of the ALL_OBJFILES_SAFE macro will stay safe. */ + put_objfile_before (objfile->separate_debug_objfile, objfile); + + xfree (debugfile); + } + + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)..."); + wrap_here (""); + } + + if (from_tty || info_verbose) + { + if (post_add_symbol_hook) + post_add_symbol_hook (); + else + { + printf_unfiltered ("done.\n"); + } + } + + /* We print some messages regardless of whether 'from_tty || + info_verbose' is true, so make sure they go out at the right + time. */ + gdb_flush (gdb_stdout); + + do_cleanups (my_cleanups); + + if (objfile->sf == NULL) + return objfile; /* No symbols. */ + + new_symfile_objfile (objfile, mainline, from_tty); + + if (target_new_objfile_hook) + target_new_objfile_hook (objfile); + + return (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. See symbol_file_add_with_addrs_or_offsets's comments + for details. */ +struct objfile * +symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs, + int mainline, int flags) +{ + return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0, + mainline, flags); +} + + +/* Call symbol_file_add() with default values and update whatever is + affected by the loading of a new main(). + Used when the file is supplied in the gdb command line + and by some targets with special loading requirements. + The auxiliary function, symbol_file_add_main_1(), has the flags + argument for the switches that can only be specified in the symbol_file + command itself. */ + +void +symbol_file_add_main (char *args, int from_tty) +{ + symbol_file_add_main_1 (args, from_tty, 0); +} + +static void +symbol_file_add_main_1 (char *args, int from_tty, int flags) +{ + symbol_file_add (args, from_tty, NULL, 1, flags); + +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + + /* Getting new symbols may change our opinion about + what is frameless. */ + reinit_frame_cache (); + + set_initial_language (); +} + +void +symbol_file_clear (int from_tty) +{ + if ((have_full_symbols () || have_partial_symbols ()) + && from_tty + && !query ("Discard symbol table from `%s'? ", + symfile_objfile->name)) + error ("Not confirmed."); + free_all_objfiles (); + + /* solib descriptors may have handles to objfiles. Since their + storage has just been released, we'd better wipe the solib + descriptors as well. + */ +#if defined(SOLIB_RESTART) + SOLIB_RESTART (); +#endif + + symfile_objfile = NULL; + if (from_tty) + printf_unfiltered ("No symbol file now.\n"); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif +} + +static char * +get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) +{ + asection *sect; + bfd_size_type debuglink_size; + unsigned long crc32; + char *contents; + int crc_offset; + unsigned char *p; + + sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); + + if (sect == NULL) + return NULL; + + debuglink_size = bfd_section_size (objfile->obfd, sect); + + contents = xmalloc (debuglink_size); + bfd_get_section_contents (objfile->obfd, sect, contents, + (file_ptr)0, (bfd_size_type)debuglink_size); + + /* Crc value is stored after the filename, aligned up to 4 bytes. */ + crc_offset = strlen (contents) + 1; + crc_offset = (crc_offset + 3) & ~3; + + crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); + + *crc32_out = crc32; + return contents; +} + +static int +separate_debug_file_exists (const char *name, unsigned long crc) +{ + unsigned long file_crc = 0; + int fd; + char buffer[8*1024]; + int count; + + fd = open (name, O_RDONLY | O_BINARY); + if (fd < 0) + return 0; + + while ((count = read (fd, buffer, sizeof (buffer))) > 0) + file_crc = gnu_debuglink_crc32 (file_crc, buffer, count); + + close (fd); + + return crc == file_crc; +} + +static char *debug_file_directory = NULL; + +#if ! defined (DEBUG_SUBDIRECTORY) +#define DEBUG_SUBDIRECTORY ".debug" +#endif + +static char * +find_separate_debug_file (struct objfile *objfile) +{ + asection *sect; + char *basename; + char *dir; + char *debugfile; + char *name_copy; + bfd_size_type debuglink_size; + unsigned long crc32; + int i; + + basename = get_debug_link_info (objfile, &crc32); + + if (basename == NULL) + return NULL; + + dir = xstrdup (objfile->name); + + /* Strip off the final filename part, leaving the directory name, + followed by a slash. Objfile names should always be absolute and + tilde-expanded, so there should always be a slash in there + somewhere. */ + for (i = strlen(dir) - 1; i >= 0; i--) + { + if (IS_DIR_SEPARATOR (dir[i])) + break; + } + gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i])); + dir[i+1] = '\0'; + + debugfile = alloca (strlen (debug_file_directory) + 1 + + strlen (dir) + + strlen (DEBUG_SUBDIRECTORY) + + strlen ("/") + + strlen (basename) + + 1); + + /* First try in the same directory as the original file. */ + strcpy (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */ + strcpy (debugfile, dir); + strcat (debugfile, DEBUG_SUBDIRECTORY); + strcat (debugfile, "/"); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the global debugfile directory. */ + strcpy (debugfile, debug_file_directory); + strcat (debugfile, "/"); + strcat (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + xfree (basename); + xfree (dir); +#ifdef CRASH_MERGE +{ + extern char *check_specified_debug_file(); + name_copy = check_specified_debug_file(); + return (name_copy ? xstrdup (name_copy) : NULL); +} +#else + return NULL; +#endif +} + + +/* This is the symbol-file command. Read the file, analyze its + symbols, and add a struct symtab to a symtab list. The syntax of + the command is rather bizarre--(1) buildargv implements various + quoting conventions which are undocumented and have little or + nothing in common with the way things are quoted (or not quoted) + elsewhere in GDB, (2) options are used, which are not generally + used in GDB (perhaps "set mapped on", "set readnow on" would be + better), (3) the order of options matters, which is contrary to GNU + conventions (because it is confusing and inconvenient). */ +/* Note: ezannoni 2000-04-17. This function used to have support for + rombug (see remote-os9k.c). It consisted of a call to target_link() + (target.c) to get the address of the text segment from the target, + and pass that to symbol_file_add(). This is no longer supported. */ + +void +symbol_file_command (char *args, int from_tty) +{ + char **argv; + char *name = NULL; + struct cleanup *cleanups; + int flags = OBJF_USERLOADED; + + dont_repeat (); + + if (args == NULL) + { + symbol_file_clear (from_tty); + } + else + { + if ((argv = buildargv (args)) == NULL) + { + nomem (0); + } + cleanups = make_cleanup_freeargv (argv); + while (*argv != NULL) + { + if (strcmp (*argv, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (**argv == '-') + error ("unknown option `%s'", *argv); + else + { + name = *argv; + + symbol_file_add_main_1 (name, from_tty, flags); + } + argv++; + } + + if (name == NULL) + { + error ("no symbol file name was specified"); + } + do_cleanups (cleanups); + } +} + +/* Set the initial language. + + A better solution would be to record the language in the psymtab when reading + partial symbols, and then use it (if known) to set the language. This would + be a win for formats that encode the language in an easily discoverable place, + such as DWARF. For stabs, we can jump through hoops looking for specially + named symbols or try to intuit the language from the specific type of stabs + we find, but we can't do that until later when we read in full symbols. + FIXME. */ + +static void +set_initial_language (void) +{ + struct partial_symtab *pst; + enum language lang = language_unknown; + + pst = find_main_psymtab (); + if (pst != NULL) + { + if (pst->filename != NULL) + { + lang = deduce_language_from_filename (pst->filename); + } + if (lang == language_unknown) + { + /* Make C the default language */ + lang = language_c; + } + set_language (lang); + expected_language = current_language; /* Don't warn the user */ + } +} + +/* Open file specified by NAME and hand it off to BFD for preliminary + analysis. Result is a newly initialized bfd *, which includes a newly + malloc'd` copy of NAME (tilde-expanded and made absolute). + In case of trouble, error() is called. */ + +bfd * +symfile_bfd_open (char *name) +{ + bfd *sym_bfd; + int desc; + char *absolute_name; + + + + name = tilde_expand (name); /* Returns 1st new malloc'd copy */ + + /* Look down path for it, allocate 2nd new malloc'd copy. */ + desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); +#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) + if (desc < 0) + { + char *exename = alloca (strlen (name) + 5); + strcat (strcpy (exename, name), ".exe"); + desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, + 0, &absolute_name); + } +#endif + if (desc < 0) + { + make_cleanup (xfree, name); + perror_with_name (name); + } + xfree (name); /* Free 1st new malloc'd copy */ + name = absolute_name; /* Keep 2nd malloc'd copy in bfd */ + /* It'll be freed in free_objfile(). */ + + sym_bfd = bfd_fdopenr (name, gnutarget, desc); + if (!sym_bfd) + { + close (desc); + make_cleanup (xfree, name); + error ("\"%s\": can't open to read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + bfd_set_cacheable (sym_bfd, 1); + + if (!bfd_check_format (sym_bfd, bfd_object)) + { + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + bfd_close (sym_bfd); /* This also closes desc */ + make_cleanup (xfree, name); + error ("\"%s\": can't read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + return (sym_bfd); +} + +/* Return the section index for the given section name. Return -1 if + the section was not found. */ +int +get_section_index (struct objfile *objfile, char *section_name) +{ + asection *sect = bfd_get_section_by_name (objfile->obfd, section_name); + if (sect) + return sect->index; + else + return -1; +} + +/* Link a new symtab_fns into the global symtab_fns list. Called on gdb + startup by the _initialize routine in each object file format reader, + to register information about each format the the reader is prepared + to handle. */ + +void +add_symtab_fns (struct sym_fns *sf) +{ + sf->next = symtab_fns; + symtab_fns = sf; +} + + +/* Initialize to read symbols from the symbol file sym_bfd. It either + returns or calls error(). The result is an initialized struct sym_fns + in the objfile structure, that contains cached information about the + symbol file. */ + +static void +find_sym_fns (struct objfile *objfile) +{ + struct sym_fns *sf; + enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd); + char *our_target = bfd_get_target (objfile->obfd); + + if (our_flavour == bfd_target_srec_flavour + || our_flavour == bfd_target_ihex_flavour + || our_flavour == bfd_target_tekhex_flavour) + return; /* No symbols. */ + + for (sf = symtab_fns; sf != NULL; sf = sf->next) + { + if (our_flavour == sf->sym_flavour) + { + objfile->sf = sf; + return; + } + } + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (objfile->obfd)); +} + +/* This function runs the load command of our current target. */ + +static void +load_command (char *arg, int from_tty) +{ + if (arg == NULL) + arg = get_exec_file (1); + target_load (arg, from_tty); + + /* After re-loading the executable, we don't really know which + overlays are mapped any more. */ + overlay_cache_invalid = 1; +} + +/* This version of "load" should be usable for any target. Currently + it is just used for remote targets, not inftarg.c or core files, + on the theory that only in that case is it useful. + + Avoiding xmodem and the like seems like a win (a) because we don't have + to worry about finding it, and (b) On VMS, fork() is very slow and so + we don't want to run a subprocess. On the other hand, I'm not sure how + performance compares. */ + +static int download_write_size = 512; +static int validate_download = 0; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +add_section_size_callback (bfd *abfd, asection *asec, void *data) +{ + bfd_size_type *sum = data; + + *sum += bfd_get_section_size_before_reloc (asec); +} + +/* Opaque data for load_section_callback. */ +struct load_section_data { + unsigned long load_offset; + unsigned long write_count; + unsigned long data_count; + bfd_size_type total_size; +}; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +load_section_callback (bfd *abfd, asection *asec, void *data) +{ + struct load_section_data *args = data; + + if (bfd_get_section_flags (abfd, asec) & SEC_LOAD) + { + bfd_size_type size = bfd_get_section_size_before_reloc (asec); + if (size > 0) + { + char *buffer; + struct cleanup *old_chain; + CORE_ADDR lma = bfd_section_lma (abfd, asec) + args->load_offset; + bfd_size_type block_size; + int err; + const char *sect_name = bfd_get_section_name (abfd, asec); + bfd_size_type sent; + + if (download_write_size > 0 && size > download_write_size) + block_size = download_write_size; + else + block_size = size; + + buffer = xmalloc (size); + old_chain = make_cleanup (xfree, buffer); + + /* Is this really necessary? I guess it gives the user something + to look at during a long download. */ + ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n", + sect_name, paddr_nz (size), paddr_nz (lma)); + + bfd_get_section_contents (abfd, asec, buffer, 0, size); + + sent = 0; + do + { + int len; + bfd_size_type this_transfer = size - sent; + + if (this_transfer >= block_size) + this_transfer = block_size; + len = target_write_memory_partial (lma, buffer, + this_transfer, &err); + if (err) + break; + if (validate_download) + { + /* Broken memories and broken monitors manifest + themselves here when bring new computers to + life. This doubles already slow downloads. */ + /* NOTE: cagney/1999-10-18: A more efficient + implementation might add a verify_memory() + method to the target vector and then use + that. remote.c could implement that method + using the ``qCRC'' packet. */ + char *check = xmalloc (len); + struct cleanup *verify_cleanups = + make_cleanup (xfree, check); + + if (target_read_memory (lma, check, len) != 0) + error ("Download verify read failed at 0x%s", + paddr (lma)); + if (memcmp (buffer, check, len) != 0) + error ("Download verify compare failed at 0x%s", + paddr (lma)); + do_cleanups (verify_cleanups); + } + args->data_count += len; + lma += len; + buffer += len; + args->write_count += 1; + sent += len; + if (quit_flag + || (ui_load_progress_hook != NULL + && ui_load_progress_hook (sect_name, sent))) + error ("Canceled the download"); + + if (show_load_progress != NULL) + show_load_progress (sect_name, sent, size, + args->data_count, args->total_size); + } + while (sent < size); + + if (err != 0) + error ("Memory access error while loading section %s.", sect_name); + + do_cleanups (old_chain); + } + } +} + +void +generic_load (char *args, int from_tty) +{ + asection *s; + bfd *loadfile_bfd; + time_t start_time, end_time; /* Start and end times of download */ + char *filename; + struct cleanup *old_cleanups; + char *offptr; + struct load_section_data cbdata; + CORE_ADDR entry; + + cbdata.load_offset = 0; /* Offset to add to vma for each section. */ + cbdata.write_count = 0; /* Number of writes needed. */ + cbdata.data_count = 0; /* Number of bytes written to target memory. */ + cbdata.total_size = 0; /* Total size of all bfd sectors. */ + + /* Parse the input argument - the user can specify a load offset as + a second argument. */ + filename = xmalloc (strlen (args) + 1); + old_cleanups = make_cleanup (xfree, filename); + strcpy (filename, args); + offptr = strchr (filename, ' '); + if (offptr != NULL) + { + char *endptr; + + cbdata.load_offset = strtoul (offptr, &endptr, 0); + if (offptr == endptr) + error ("Invalid download offset:%s\n", offptr); + *offptr = '\0'; + } + else + cbdata.load_offset = 0; + + /* Open the file for loading. */ + loadfile_bfd = bfd_openr (filename, gnutarget); + if (loadfile_bfd == NULL) + { + perror_with_name (filename); + return; + } + + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + make_cleanup_bfd_close (loadfile_bfd); + + if (!bfd_check_format (loadfile_bfd, bfd_object)) + { + error ("\"%s\" is not an object file: %s", filename, + bfd_errmsg (bfd_get_error ())); + } + + bfd_map_over_sections (loadfile_bfd, add_section_size_callback, + (void *) &cbdata.total_size); + + start_time = time (NULL); + + bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata); + + end_time = time (NULL); + + entry = bfd_get_start_address (loadfile_bfd); + ui_out_text (uiout, "Start address "); + ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry)); + ui_out_text (uiout, ", load size "); + ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count); + ui_out_text (uiout, "\n"); + /* We were doing this in remote-mips.c, I suspect it is right + for other targets too. */ + write_pc (entry); + + /* FIXME: are we supposed to call symbol_file_add or not? According + to a comment from remote-mips.c (where a call to symbol_file_add + was commented out), making the call confuses GDB if more than one + file is loaded in. Some targets do (e.g., remote-vx.c) but + others don't (or didn't - perhaphs they have all been deleted). */ + + print_transfer_performance (gdb_stdout, cbdata.data_count, + cbdata.write_count, end_time - start_time); + + do_cleanups (old_cleanups); +} + +/* Report how fast the transfer went. */ + +/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being + replaced by print_transfer_performance (with a very different + function signature). */ + +void +report_transfer_performance (unsigned long data_count, time_t start_time, + time_t end_time) +{ + print_transfer_performance (gdb_stdout, data_count, + end_time - start_time, 0); +} + +void +print_transfer_performance (struct ui_file *stream, + unsigned long data_count, + unsigned long write_count, + unsigned long time_count) +{ + ui_out_text (uiout, "Transfer rate: "); + if (time_count > 0) + { + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (data_count * 8) / time_count); + ui_out_text (uiout, " bits/sec"); + } + else + { + ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); + ui_out_text (uiout, " bits in <1 sec"); + } + if (write_count > 0) + { + ui_out_text (uiout, ", "); + ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); + ui_out_text (uiout, " bytes/write"); + } + ui_out_text (uiout, ".\n"); +} + +/* This function allows the addition of incrementally linked object files. + It does not modify any state in the target, only in the debugger. */ +/* Note: ezannoni 2000-04-13 This function/command used to have a + special case syntax for the rombug target (Rombug is the boot + monitor for Microware's OS-9 / OS-9000, see remote-os9k.c). In the + rombug case, the user doesn't need to supply a text address, + instead a call to target_link() (in target.c) would supply the + value to use. We are now discontinuing this type of ad hoc syntax. */ + +static void +add_symbol_file_command (char *args, int from_tty) +{ + char *filename = NULL; + int flags = OBJF_USERLOADED; + char *arg; + int expecting_option = 0; + int section_index = 0; + int argcnt = 0; + int sec_num = 0; + int i; + int expecting_sec_name = 0; + int expecting_sec_addr = 0; + + struct sect_opt + { + char *name; + char *value; + }; + + struct section_addr_info *section_addrs; + struct sect_opt *sect_opts = NULL; + size_t num_sect_opts = 0; + struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL); + + num_sect_opts = 16; + sect_opts = (struct sect_opt *) xmalloc (num_sect_opts + * sizeof (struct sect_opt)); + + dont_repeat (); + + if (args == NULL) + error ("add-symbol-file takes a file name and an address"); + + /* Make a copy of the string that we can safely write into. */ + args = xstrdup (args); + + while (*args != '\000') + { + /* Any leading spaces? */ + while (isspace (*args)) + args++; + + /* Point arg to the beginning of the argument. */ + arg = args; + + /* Move args pointer over the argument. */ + while ((*args != '\000') && !isspace (*args)) + args++; + + /* If there are more arguments, terminate arg and + proceed past it. */ + if (*args != '\000') + *args++ = '\000'; + + /* Now process the argument. */ + if (argcnt == 0) + { + /* The first argument is the file name. */ + filename = tilde_expand (arg); + make_cleanup (xfree, filename); + } + else + if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) + { + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + error ("USAGE: add-symbol-file [-mapped] [-readnow] [-s ]*"); + } + } + argcnt++; + } + + /* Print the prompt for the query below. And save the arguments into + a sect_addr_info structure to be passed around to other + functions. We have to split this up into separate print + statements because local_hex_string returns a local static + string. */ + + printf_unfiltered ("add symbol table from file \"%s\" at\n", filename); + section_addrs = alloc_section_addr_info (section_index); + make_cleanup (xfree, section_addrs); + for (i = 0; i < section_index; i++) + { + CORE_ADDR addr; + char *val = sect_opts[i].value; + char *sec = sect_opts[i].name; + + addr = parse_and_eval_address (val); + + /* Here we store the section offsets in the order they were + entered on the command line. */ + section_addrs->other[sec_num].name = sec; + section_addrs->other[sec_num].addr = addr; + printf_unfiltered ("\t%s_addr = %s\n", + sec, + local_hex_string ((unsigned long)addr)); + sec_num++; + + /* The object's sections are initialized when a + call is made to build_objfile_section_table (objfile). + This happens in reread_symbols. + At this point, we don't know what file type this is, + so we can't determine what section names are valid. */ + } + +#ifndef CRASH_MERGE + if (from_tty && (!query ("%s", ""))) + error ("Not confirmed."); +#endif + + symbol_file_add (filename, from_tty, section_addrs, 0, flags); + + /* Getting new symbols may change our opinion about what is + frameless. */ + reinit_frame_cache (); + do_cleanups (my_cleanups); +} + +static void +add_shared_symbol_files_command (char *args, int from_tty) +{ +#ifdef ADD_SHARED_SYMBOL_FILES + ADD_SHARED_SYMBOL_FILES (args, from_tty); +#else + error ("This command is not available in this configuration of GDB."); +#endif +} + +/* Re-read symbols if a symbol-file has changed. */ +void +reread_symbols (void) +{ + struct objfile *objfile; + long new_modtime; + int reread_one = 0; + struct stat new_statbuf; + int res; + + /* With the addition of shared libraries, this should be modified, + the load time should be saved in the partial symbol tables, since + different tables may come from different source files. FIXME. + This routine should then walk down each partial symbol table + and see if the symbol table that it originates from has been changed */ + + for (objfile = object_files; objfile; objfile = objfile->next) + { + if (objfile->obfd) + { +#ifdef DEPRECATED_IBM6000_TARGET + /* If this object is from a shared library, then you should + stat on the library name, not member name. */ + + if (objfile->obfd->my_archive) + res = stat (objfile->obfd->my_archive->filename, &new_statbuf); + else +#endif + res = stat (objfile->name, &new_statbuf); + if (res != 0) + { + /* FIXME, should use print_sys_errmsg but it's not filtered. */ + printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n", + objfile->name); + continue; + } + new_modtime = new_statbuf.st_mtime; + if (new_modtime != objfile->mtime) + { + struct cleanup *old_cleanups; + struct section_offsets *offsets; + int num_offsets; + char *obfd_filename; + + printf_unfiltered ("`%s' has changed; re-reading symbols.\n", + objfile->name); + + /* There are various functions like symbol_file_add, + symfile_bfd_open, syms_from_objfile, etc., which might + appear to do what we want. But they have various other + effects which we *don't* want. So we just do stuff + ourselves. We don't worry about mapped files (for one thing, + any mapped file will be out of date). */ + + /* If we get an error, blow away this objfile (not sure if + that is the correct response for things like shared + libraries). */ + old_cleanups = make_cleanup_free_objfile (objfile); + /* We need to do this whenever any symbols go away. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Clean up any state BFD has sitting around. We don't need + to close the descriptor but BFD lacks a way of closing the + BFD without closing the descriptor. */ + obfd_filename = bfd_get_filename (objfile->obfd); + if (!bfd_close (objfile->obfd)) + error ("Can't close BFD for %s: %s", objfile->name, + bfd_errmsg (bfd_get_error ())); + objfile->obfd = bfd_openr (obfd_filename, gnutarget); + if (objfile->obfd == NULL) + error ("Can't open %s to read symbols.", objfile->name); + /* bfd_openr sets cacheable to true, which is what we want. */ + if (!bfd_check_format (objfile->obfd, bfd_object)) + error ("Can't read symbols from %s: %s.", objfile->name, + bfd_errmsg (bfd_get_error ())); + + /* Save the offsets, we will nuke them with the rest of the + objfile_obstack. */ + num_offsets = objfile->num_sections; + offsets = ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets))); + memcpy (offsets, objfile->section_offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + + /* Nuke all the state that we will re-read. Much of the following + code which sets things to NULL really is necessary to tell + other parts of GDB that there is nothing currently there. */ + + /* FIXME: Do we have to free a whole linked list, or is this + enough? */ + if (objfile->global_psymbols.list) + xmfree (objfile->md, objfile->global_psymbols.list); + memset (&objfile->global_psymbols, 0, + sizeof (objfile->global_psymbols)); + if (objfile->static_psymbols.list) + xmfree (objfile->md, objfile->static_psymbols.list); + memset (&objfile->static_psymbols, 0, + sizeof (objfile->static_psymbols)); + + /* Free the obstacks for non-reusable objfiles */ + bcache_xfree (objfile->psymbol_cache); + objfile->psymbol_cache = bcache_xmalloc (); + bcache_xfree (objfile->macro_cache); + objfile->macro_cache = bcache_xmalloc (); + if (objfile->demangled_names_hash != NULL) + { + htab_delete (objfile->demangled_names_hash); + objfile->demangled_names_hash = NULL; + } + obstack_free (&objfile->objfile_obstack, 0); + objfile->sections = NULL; + objfile->symtabs = NULL; + objfile->psymtabs = NULL; + objfile->free_psymtabs = NULL; + objfile->cp_namespace_symtab = NULL; + objfile->msymbols = NULL; + objfile->sym_private = NULL; + objfile->minimal_symbol_count = 0; + memset (&objfile->msymbol_hash, 0, + sizeof (objfile->msymbol_hash)); + memset (&objfile->msymbol_demangled_hash, 0, + sizeof (objfile->msymbol_demangled_hash)); + objfile->fundamental_types = NULL; + clear_objfile_data (objfile); + if (objfile->sf != NULL) + { + (*objfile->sf->sym_finish) (objfile); + } + + /* We never make this a mapped file. */ + objfile->md = NULL; + objfile->psymbol_cache = bcache_xmalloc (); + objfile->macro_cache = bcache_xmalloc (); + /* obstack_init also initializes the obstack so it is + empty. We could use obstack_specify_allocation but + gdb_obstack.h specifies the alloc/dealloc + functions. */ + obstack_init (&objfile->objfile_obstack); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile->name, bfd_errmsg (bfd_get_error ())); + } + terminate_minimal_symbol_table (objfile); + + /* We use the same section offsets as from last time. I'm not + sure whether that is always correct for shared libraries. */ + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + memcpy (objfile->section_offsets, offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + objfile->num_sections = num_offsets; + + /* What the hell is sym_new_init for, anyway? The concept of + distinguishing between the main file and additional files + in this way seems rather dubious. */ + if (objfile == symfile_objfile) + { + (*objfile->sf->sym_new_init) (objfile); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + } + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, 1); + /* The "mainline" parameter is a hideous hack; I think leaving it + zero is OK since dbxread.c also does what it needs to do if + objfile->global_psymbols.size is 0. */ + (*objfile->sf->sym_read) (objfile, 0); + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)\n"); + wrap_here (""); + } + objfile->flags |= OBJF_SYMS; + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, 1); + + /* Getting new symbols may change our opinion about what is + frameless. */ + + reinit_frame_cache (); + + /* Discard cleanups as symbol reading was successful. */ + discard_cleanups (old_cleanups); + + /* If the mtime has changed between the time we set new_modtime + and now, we *want* this to be out of date, so don't call stat + again now. */ + objfile->mtime = new_modtime; + reread_one = 1; + reread_separate_symbols (objfile); + } + } + } + + if (reread_one) + clear_symtab_users (); +} + + +/* Handle separate debug info for OBJFILE, which has just been + re-read: + - If we had separate debug info before, but now we don't, get rid + of the separated objfile. + - If we didn't have separated debug info before, but now we do, + read in the new separated debug info file. + - If the debug link points to a different file, toss the old one + and read the new one. + This function does *not* handle the case where objfile is still + using the same separate debug info file, but that file's timestamp + has changed. That case should be handled by the loop in + reread_symbols already. */ +static void +reread_separate_symbols (struct objfile *objfile) +{ + char *debug_file; + unsigned long crc32; + + /* Does the updated objfile's debug info live in a + separate file? */ + debug_file = find_separate_debug_file (objfile); + + if (objfile->separate_debug_objfile) + { + /* There are two cases where we need to get rid of + the old separated debug info objfile: + - if the new primary objfile doesn't have + separated debug info, or + - if the new primary objfile has separate debug + info, but it's under a different filename. + + If the old and new objfiles both have separate + debug info, under the same filename, then we're + okay --- if the separated file's contents have + changed, we will have caught that when we + visited it in this function's outermost + loop. */ + if (! debug_file + || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0) + free_objfile (objfile->separate_debug_objfile); + } + + /* If the new objfile has separate debug info, and we + haven't loaded it already, do so now. */ + if (debug_file + && ! objfile->separate_debug_objfile) + { + /* Use the same section offset table as objfile itself. + Preserve the flags from objfile that make sense. */ + objfile->separate_debug_objfile + = (symbol_file_add_with_addrs_or_offsets + (debug_file, + info_verbose, /* from_tty: Don't override the default. */ + 0, /* No addr table. */ + objfile->section_offsets, objfile->num_sections, + 0, /* Not mainline. See comments about this above. */ + objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW + | OBJF_USERLOADED))); + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + } +} + + + + + +typedef struct +{ + char *ext; + enum language lang; +} +filename_language; + +static filename_language *filename_language_table; +static int fl_table_size, fl_table_next; + +static void +add_filename_language (char *ext, enum language lang) +{ + if (fl_table_next >= fl_table_size) + { + fl_table_size += 10; + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); + } + + filename_language_table[fl_table_next].ext = xstrdup (ext); + filename_language_table[fl_table_next].lang = lang; + fl_table_next++; +} + +static char *ext_args; + +static void +set_ext_lang_command (char *args, int from_tty) +{ + int i; + char *cp = ext_args; + enum language lang; + + /* First arg is filename extension, starting with '.' */ + if (*cp != '.') + error ("'%s': Filename extension must begin with '.'", ext_args); + + /* Find end of first arg. */ + while (*cp && !isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Null-terminate first arg */ + *cp++ = '\0'; + + /* Find beginning of second arg, which should be a source language. */ + while (*cp && isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Lookup the language from among those we know. */ + lang = language_enum (cp); + + /* Now lookup the filename extension: do we already know it? */ + for (i = 0; i < fl_table_next; i++) + if (0 == strcmp (ext_args, filename_language_table[i].ext)) + break; + + if (i >= fl_table_next) + { + /* new file extension */ + add_filename_language (ext_args, lang); + } + else + { + /* redefining a previously known filename extension */ + + /* if (from_tty) */ + /* query ("Really make files of type %s '%s'?", */ + /* ext_args, language_str (lang)); */ + + xfree (filename_language_table[i].ext); + filename_language_table[i].ext = xstrdup (ext_args); + filename_language_table[i].lang = lang; + } +} + +static void +info_ext_lang_command (char *args, int from_tty) +{ + int i; + + printf_filtered ("Filename extensions and the languages they represent:"); + printf_filtered ("\n\n"); + for (i = 0; i < fl_table_next; i++) + printf_filtered ("\t%s\t- %s\n", + filename_language_table[i].ext, + language_str (filename_language_table[i].lang)); +} + +static void +init_filename_language_table (void) +{ + if (fl_table_size == 0) /* protect against repetition */ + { + fl_table_size = 20; + fl_table_next = 0; + filename_language_table = + xmalloc (fl_table_size * sizeof (*filename_language_table)); + add_filename_language (".c", language_c); + add_filename_language (".C", language_cplus); + add_filename_language (".cc", language_cplus); + add_filename_language (".cp", language_cplus); + add_filename_language (".cpp", language_cplus); + add_filename_language (".cxx", language_cplus); + add_filename_language (".c++", language_cplus); + add_filename_language (".java", language_java); + add_filename_language (".class", language_java); + add_filename_language (".m", language_objc); + add_filename_language (".f", language_fortran); + add_filename_language (".F", language_fortran); + add_filename_language (".s", language_asm); + add_filename_language (".S", language_asm); + add_filename_language (".pas", language_pascal); + add_filename_language (".p", language_pascal); + add_filename_language (".pp", language_pascal); + } +} + +enum language +deduce_language_from_filename (char *filename) +{ + int i; + char *cp; + + if (filename != NULL) + if ((cp = strrchr (filename, '.')) != NULL) + for (i = 0; i < fl_table_next; i++) + if (strcmp (cp, filename_language_table[i].ext) == 0) + return filename_language_table[i].lang; + + return language_unknown; +} + +/* allocate_symtab: + + Allocate and partly initialize a new symbol table. Return a pointer + to it. error() if no space. + + Caller must set these fields: + LINETABLE(symtab) + symtab->blockvector + symtab->dirname + symtab->free_code + symtab->free_ptr + possibly free_named_symtabs (symtab->filename); + */ + +struct symtab * +allocate_symtab (char *filename, struct objfile *objfile) +{ + struct symtab *symtab; + + symtab = (struct symtab *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct symtab)); + memset (symtab, 0, sizeof (*symtab)); + symtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + symtab->fullname = NULL; + symtab->language = deduce_language_from_filename (filename); + symtab->debugformat = obsavestring ("unknown", 7, + &objfile->objfile_obstack); + + /* Hook it to the objfile it comes from */ + + symtab->objfile = objfile; + symtab->next = objfile->symtabs; + objfile->symtabs = symtab; + + /* FIXME: This should go away. It is only defined for the Z8000, + and the Z8000 definition of this macro doesn't have anything to + do with the now-nonexistent EXTRA_SYMTAB_INFO macro, it's just + here for convenience. */ +#ifdef INIT_EXTRA_SYMTAB_INFO + INIT_EXTRA_SYMTAB_INFO (symtab); +#endif + + return (symtab); +} + +struct partial_symtab * +allocate_psymtab (char *filename, struct objfile *objfile) +{ + struct partial_symtab *psymtab; + + if (objfile->free_psymtabs) + { + psymtab = objfile->free_psymtabs; + objfile->free_psymtabs = psymtab->next; + } + else + psymtab = (struct partial_symtab *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct partial_symtab)); + + memset (psymtab, 0, sizeof (struct partial_symtab)); + psymtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + psymtab->symtab = NULL; + + /* Prepend it to the psymtab list for the objfile it belongs to. + Psymtabs are searched in most recent inserted -> least recent + inserted order. */ + + psymtab->objfile = objfile; + psymtab->next = objfile->psymtabs; + objfile->psymtabs = psymtab; +#if 0 + { + struct partial_symtab **prev_pst; + psymtab->objfile = objfile; + psymtab->next = NULL; + prev_pst = &(objfile->psymtabs); + while ((*prev_pst) != NULL) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = psymtab; + } +#endif + + return (psymtab); +} + +void +discard_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab **prev_pst; + + /* From dbxread.c: + Empty psymtabs happen as a result of header files which don't + have any symbols in them. There can be a lot of them. But this + check is wrong, in that a psymtab with N_SLINE entries but + nothing else is not empty, but we don't realize that. Fixing + that without slowing things down might be tricky. */ + + /* First, snip it out of the psymtab chain */ + + prev_pst = &(pst->objfile->psymtabs); + while ((*prev_pst) != pst) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = pst->next; + + /* Next, put it on a free list for recycling */ + + pst->next = pst->objfile->free_psymtabs; + pst->objfile->free_psymtabs = pst; +} + + +/* Reset all data structures in gdb which may contain references to symbol + table data. */ + +void +clear_symtab_users (void) +{ + /* Someday, we should do better than this, by only blowing away + the things that really need to be blown. */ + clear_value_history (); + clear_displays (); + clear_internalvars (); + breakpoint_re_set (); + set_default_breakpoint (0, 0, 0, 0); + clear_current_source_symtab_and_line (); + clear_pc_function_cache (); + if (target_new_objfile_hook) + target_new_objfile_hook (NULL); +} + +static void +clear_symtab_users_cleanup (void *ignore) +{ + clear_symtab_users (); +} + +/* clear_symtab_users_once: + + This function is run after symbol reading, or from a cleanup. + If an old symbol table was obsoleted, the old symbol table + has been blown away, but the other GDB data structures that may + reference it have not yet been cleared or re-directed. (The old + symtab was zapped, and the cleanup queued, in free_named_symtab() + below.) + + This function can be queued N times as a cleanup, or called + directly; it will do all the work the first time, and then will be a + no-op until the next time it is queued. This works by bumping a + counter at queueing time. Much later when the cleanup is run, or at + the end of symbol processing (in case the cleanup is discarded), if + the queued count is greater than the "done-count", we do the work + and set the done-count to the queued count. If the queued count is + less than or equal to the done-count, we just ignore the call. This + is needed because reading a single .o file will often replace many + symtabs (one per .h file, for example), and we don't want to reset + the breakpoints N times in the user's face. + + The reason we both queue a cleanup, and call it directly after symbol + reading, is because the cleanup protects us in case of errors, but is + discarded if symbol reading is successful. */ + +#if 0 +/* FIXME: As free_named_symtabs is currently a big noop this function + is no longer needed. */ +static void clear_symtab_users_once (void); + +static int clear_symtab_users_queued; +static int clear_symtab_users_done; + +static void +clear_symtab_users_once (void) +{ + /* Enforce once-per-`do_cleanups'-semantics */ + if (clear_symtab_users_queued <= clear_symtab_users_done) + return; + clear_symtab_users_done = clear_symtab_users_queued; + + clear_symtab_users (); +} +#endif + +/* Delete the specified psymtab, and any others that reference it. */ + +static void +cashier_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab *ps, *pprev = NULL; + int i; + + /* Find its previous psymtab in the chain */ + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + if (ps == pst) + break; + pprev = ps; + } + + if (ps) + { + /* Unhook it from the chain. */ + if (ps == pst->objfile->psymtabs) + pst->objfile->psymtabs = ps->next; + else + pprev->next = ps->next; + + /* FIXME, we can't conveniently deallocate the entries in the + partial_symbol lists (global_psymbols/static_psymbols) that + this psymtab points to. These just take up space until all + the psymtabs are reclaimed. Ditto the dependencies list and + filename, which are all in the objfile_obstack. */ + + /* We need to cashier any psymtab that has this one as a dependency... */ + again: + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + for (i = 0; i < ps->number_of_dependencies; i++) + { + if (ps->dependencies[i] == pst) + { + cashier_psymtab (ps); + goto again; /* Must restart, chain has been munged. */ + } + } + } + } +} + +/* If a symtab or psymtab for filename NAME is found, free it along + with any dependent breakpoints, displays, etc. + Used when loading new versions of object modules with the "add-file" + command. This is only called on the top-level symtab or psymtab's name; + it is not called for subsidiary files such as .h files. + + Return value is 1 if we blew away the environment, 0 if not. + FIXME. The return value appears to never be used. + + FIXME. I think this is not the best way to do this. We should + work on being gentler to the environment while still cleaning up + all stray pointers into the freed symtab. */ + +int +free_named_symtabs (char *name) +{ +#if 0 + /* FIXME: With the new method of each objfile having it's own + psymtab list, this function needs serious rethinking. In particular, + why was it ever necessary to toss psymtabs with specific compilation + unit filenames, as opposed to all psymtabs from a particular symbol + file? -- fnf + Well, the answer is that some systems permit reloading of particular + compilation units. We want to blow away any old info about these + compilation units, regardless of which objfiles they arrived in. --gnu. */ + + struct symtab *s; + struct symtab *prev; + struct partial_symtab *ps; + struct blockvector *bv; + int blewit = 0; + + /* We only wack things if the symbol-reload switch is set. */ + if (!symbol_reloading) + return 0; + + /* Some symbol formats have trouble providing file names... */ + if (name == 0 || *name == '\0') + return 0; + + /* Look for a psymtab with the specified name. */ + +again2: + for (ps = partial_symtab_list; ps; ps = ps->next) + { + if (strcmp (name, ps->filename) == 0) + { + cashier_psymtab (ps); /* Blow it away...and its little dog, too. */ + goto again2; /* Must restart, chain has been munged */ + } + } + + /* Look for a symtab with the specified name. */ + + for (s = symtab_list; s; s = s->next) + { + if (strcmp (name, s->filename) == 0) + break; + prev = s; + } + + if (s) + { + if (s == symtab_list) + symtab_list = s->next; + else + prev->next = s->next; + + /* For now, queue a delete for all breakpoints, displays, etc., whether + or not they depend on the symtab being freed. This should be + changed so that only those data structures affected are deleted. */ + + /* But don't delete anything if the symtab is empty. + This test is necessary due to a bug in "dbxread.c" that + causes empty symtabs to be created for N_SO symbols that + contain the pathname of the object file. (This problem + has been fixed in GDB 3.9x). */ + + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) + { + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); + clear_symtab_users_queued++; + make_cleanup (clear_symtab_users_once, 0); + blewit = 1; + } + else + { + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); + } + + free_symtab (s); + } + else + { + /* It is still possible that some breakpoints will be affected + even though no symtab was found, since the file might have + been compiled without debugging, and hence not be associated + with a symtab. In order to handle this correctly, we would need + to keep a list of text address ranges for undebuggable files. + For now, we do nothing, since this is a fairly obscure case. */ + ; + } + + /* FIXME, what about the minimal symbol table? */ + return blewit; +#else + return (0); +#endif +} + +/* Allocate and partially fill a partial symtab. It will be + completely filled at the end of the symbol list. + + FILENAME is the name of the symbol-file we are reading from. */ + +struct partial_symtab * +start_psymtab_common (struct objfile *objfile, + struct section_offsets *section_offsets, char *filename, + CORE_ADDR textlow, struct partial_symbol **global_syms, + struct partial_symbol **static_syms) +{ + struct partial_symtab *psymtab; + + psymtab = allocate_psymtab (filename, objfile); + psymtab->section_offsets = section_offsets; + psymtab->textlow = textlow; + psymtab->texthigh = psymtab->textlow; /* default */ + psymtab->globals_offset = global_syms - objfile->global_psymbols.list; + psymtab->statics_offset = static_syms - objfile->static_psymbols.list; + return (psymtab); +} + +/* Add a symbol with a long value to a psymtab. + Since one arg is a struct, we pass in a ptr and deref it (sigh). + Return the partial symbol that has been added. */ + +/* NOTE: carlton/2003-09-11: The reason why we return the partial + symbol is so that callers can get access to the symbol's demangled + name, which they don't have any cheap way to determine otherwise. + (Currenly, dwarf2read.c is the only file who uses that information, + though it's possible that other readers might in the future.) + Elena wasn't thrilled about that, and I don't blame her, but we + couldn't come up with a better way to get that information. If + it's needed in other situations, we could consider breaking up + SYMBOL_SET_NAMES to provide access to the demangled name lookup + cache. */ + +const struct partial_symbol * +add_psymbol_to_list (char *name, int namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + + SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); + + return psym; +} + +/* Add a symbol with a long value to a psymtab. This differs from + * add_psymbol_to_list above in taking both a mangled and a demangled + * name. */ + +void +add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, + int dem_namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, + struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1, + objfile->psymbol_cache); + + buf = alloca (dem_namelength + 1); + memcpy (buf, dem_name, dem_namelength); + buf[dem_namelength] = '\0'; + + switch (language) + { + case language_c: + case language_cplus: + SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) = + deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache); + break; + /* FIXME What should be done for the default case? Ignoring for now. */ + } + + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); +} + +/* Initialize storage for partial symbols. */ + +void +init_psymbol_list (struct objfile *objfile, int total_symbols) +{ + /* Free any previously allocated psymbol lists. */ + + if (objfile->global_psymbols.list) + { + xmfree (objfile->md, objfile->global_psymbols.list); + } + if (objfile->static_psymbols.list) + { + xmfree (objfile->md, objfile->static_psymbols.list); + } + + /* Current best guess is that approximately a twentieth + of the total symbols (in a debugging file) are global or static + oriented symbols */ + + objfile->global_psymbols.size = total_symbols / 10; + objfile->static_psymbols.size = total_symbols / 10; + + if (objfile->global_psymbols.size > 0) + { + objfile->global_psymbols.next = + objfile->global_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->global_psymbols.size + * sizeof (struct partial_symbol *))); + } + if (objfile->static_psymbols.size > 0) + { + objfile->static_psymbols.next = + objfile->static_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->static_psymbols.size + * sizeof (struct partial_symbol *))); + } +} + +/* OVERLAYS: + The following code implements an abstraction for debugging overlay sections. + + The target model is as follows: + 1) The gnu linker will permit multiple sections to be mapped into the + same VMA, each with its own unique LMA (or load address). + 2) It is assumed that some runtime mechanism exists for mapping the + sections, one by one, from the load address into the VMA address. + 3) This code provides a mechanism for gdb to keep track of which + sections should be considered to be mapped from the VMA to the LMA. + This information is used for symbol lookup, and memory read/write. + For instance, if a section has been mapped then its contents + should be read from the VMA, otherwise from the LMA. + + Two levels of debugger support for overlays are available. One is + "manual", in which the debugger relies on the user to tell it which + overlays are currently mapped. This level of support is + implemented entirely in the core debugger, and the information about + whether a section is mapped is kept in the objfile->obj_section table. + + The second level of support is "automatic", and is only available if + the target-specific code provides functionality to read the target's + overlay mapping table, and translate its contents for the debugger + (by updating the mapped state information in the obj_section tables). + + The interface is as follows: + User commands: + overlay map -- tell gdb to consider this section mapped + overlay unmap -- tell gdb to consider this section unmapped + overlay list -- list the sections that GDB thinks are mapped + overlay read-target -- get the target's state of what's mapped + overlay off/manual/auto -- set overlay debugging state + Functional interface: + find_pc_mapped_section(pc): if the pc is in the range of a mapped + section, return that section. + find_pc_overlay(pc): find any overlay section that contains + the pc, either in its VMA or its LMA + overlay_is_mapped(sect): true if overlay is marked as mapped + section_is_overlay(sect): true if section's VMA != LMA + pc_in_mapped_range(pc,sec): true if pc belongs to section's VMA + pc_in_unmapped_range(...): true if pc belongs to section's LMA + sections_overlap(sec1, sec2): true if mapped sec1 and sec2 ranges overlap + overlay_mapped_address(...): map an address from section's LMA to VMA + overlay_unmapped_address(...): map an address from section's VMA to LMA + symbol_overlayed_address(...): Return a "current" address for symbol: + either in VMA or LMA depending on whether + the symbol's section is currently mapped + */ + +/* Overlay debugging state: */ + +enum overlay_debugging_state overlay_debugging = ovly_off; +int overlay_cache_invalid = 0; /* True if need to refresh mapped state */ + +/* Target vector for refreshing overlay mapped state */ +static void simple_overlay_update (struct obj_section *); +void (*target_overlay_update) (struct obj_section *) = simple_overlay_update; + +/* Function: section_is_overlay (SECTION) + Returns true if SECTION has VMA not equal to LMA, ie. + SECTION is loaded at an address different from where it will "run". */ + +int +section_is_overlay (asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section->lma != 0 && + section->vma != section->lma) + return 1; + + return 0; +} + +/* Function: overlay_invalidate_all (void) + Invalidate the mapped state of all overlay sections (mark it as stale). */ + +static void +overlay_invalidate_all (void) +{ + struct objfile *objfile; + struct obj_section *sect; + + ALL_OBJSECTIONS (objfile, sect) + if (section_is_overlay (sect->the_bfd_section)) + sect->ovly_mapped = -1; +} + +/* Function: overlay_is_mapped (SECTION) + Returns true if section is an overlay, and is currently mapped. + Private: public access is thru function section_is_mapped. + + Access to the ovly_mapped flag is restricted to this function, so + that we can do automatic update. If the global flag + OVERLAY_CACHE_INVALID is set (by wait_for_inferior), then call + overlay_invalidate_all. If the mapped state of the particular + section is stale, then call TARGET_OVERLAY_UPDATE to refresh it. */ + +static int +overlay_is_mapped (struct obj_section *osect) +{ + if (osect == 0 || !section_is_overlay (osect->the_bfd_section)) + return 0; + + switch (overlay_debugging) + { + default: + case ovly_off: + return 0; /* overlay debugging off */ + case ovly_auto: /* overlay debugging automatic */ + /* Unles there is a target_overlay_update function, + there's really nothing useful to do here (can't really go auto) */ + if (target_overlay_update) + { + if (overlay_cache_invalid) + { + overlay_invalidate_all (); + overlay_cache_invalid = 0; + } + if (osect->ovly_mapped == -1) + (*target_overlay_update) (osect); + } + /* fall thru to manual case */ + case ovly_on: /* overlay debugging manual */ + return osect->ovly_mapped == 1; + } +} + +/* Function: section_is_mapped + Returns true if section is an overlay, and is currently mapped. */ + +int +section_is_mapped (asection *section) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + ALL_OBJSECTIONS (objfile, osect) + if (osect->the_bfd_section == section) + return overlay_is_mapped (osect); + + return 0; +} + +/* Function: pc_in_unmapped_range + If PC falls into the lma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_unmapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->lma <= pc && pc < section->lma + size) + return 1; + } + return 0; +} + +/* Function: pc_in_mapped_range + If PC falls into the vma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_mapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->vma <= pc && pc < section->vma + size) + return 1; + } + return 0; +} + + +/* Return true if the mapped ranges of sections A and B overlap, false + otherwise. */ +static int +sections_overlap (asection *a, asection *b) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + CORE_ADDR a_start = a->vma; + CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a); + CORE_ADDR b_start = b->vma; + CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b); + + return (a_start < b_end && b_start < a_end); +} + +/* Function: overlay_unmapped_address (PC, SECTION) + Returns the address corresponding to PC in the unmapped (load) range. + May be the same as PC. */ + +CORE_ADDR +overlay_unmapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_mapped_range (pc, section)) + return pc + section->lma - section->vma; + + return pc; +} + +/* Function: overlay_mapped_address (PC, SECTION) + Returns the address corresponding to PC in the mapped (runtime) range. + May be the same as PC. */ + +CORE_ADDR +overlay_mapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_unmapped_range (pc, section)) + return pc + section->vma - section->lma; + + return pc; +} + + +/* Function: symbol_overlayed_address + Return one of two addresses (relative to the VMA or to the LMA), + depending on whether the section is mapped or not. */ + +CORE_ADDR +symbol_overlayed_address (CORE_ADDR address, asection *section) +{ + if (overlay_debugging) + { + /* If the symbol has no section, just return its regular address. */ + if (section == 0) + return address; + /* If the symbol's section is not an overlay, just return its address */ + if (!section_is_overlay (section)) + return address; + /* If the symbol's section is mapped, just return its address */ + if (section_is_mapped (section)) + return address; + /* + * HOWEVER: if the symbol is in an overlay section which is NOT mapped, + * then return its LOADED address rather than its vma address!! + */ + return overlay_unmapped_address (address, section); + } + return address; +} + +/* Function: find_pc_overlay (PC) + Return the best-match overlay section for PC: + If PC matches a mapped overlay section's VMA, return that section. + Else if PC matches an unmapped section's VMA, return that section. + Else if PC matches an unmapped section's LMA, return that section. */ + +asection * +find_pc_overlay (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect, *best_match = NULL; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + if (pc_in_mapped_range (pc, osect->the_bfd_section)) + { + if (overlay_is_mapped (osect)) + return osect->the_bfd_section; + else + best_match = osect; + } + else if (pc_in_unmapped_range (pc, osect->the_bfd_section)) + best_match = osect; + } + return best_match ? best_match->the_bfd_section : NULL; +} + +/* Function: find_pc_mapped_section (PC) + If PC falls into the VMA address range of an overlay section that is + currently marked as MAPPED, return that section. Else return NULL. */ + +asection * +find_pc_mapped_section (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (pc_in_mapped_range (pc, osect->the_bfd_section) && + overlay_is_mapped (osect)) + return osect->the_bfd_section; + + return NULL; +} + +/* Function: list_overlays_command + Print a list of mapped sections and their PC ranges */ + +void +list_overlays_command (char *args, int from_tty) +{ + int nmapped = 0; + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (overlay_is_mapped (osect)) + { + const char *name; + bfd_vma lma, vma; + int size; + + vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section); + lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section); + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + name = bfd_section_name (objfile->obfd, osect->the_bfd_section); + + printf_filtered ("Section %s, loaded at ", name); + print_address_numeric (lma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (lma + size, 1, gdb_stdout); + printf_filtered (", mapped at "); + print_address_numeric (vma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (vma + size, 1, gdb_stdout); + puts_filtered ("\n"); + + nmapped++; + } + if (nmapped == 0) + printf_filtered ("No sections are mapped.\n"); +} + +/* Function: map_overlay_command + Mark the named section as mapped (ie. residing at its VMA address). */ + +void +map_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile, *objfile2; + struct obj_section *sec, *sec2; + asection *bfdsec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + /* Now, check to see if the section is an overlay. */ + bfdsec = sec->the_bfd_section; + if (!section_is_overlay (bfdsec)) + continue; /* not an overlay section */ + + /* Mark the overlay as "mapped" */ + sec->ovly_mapped = 1; + + /* Next, make a pass and unmap any sections that are + overlapped by this new section: */ + ALL_OBJSECTIONS (objfile2, sec2) + if (sec2->ovly_mapped + && sec != sec2 + && sec->the_bfd_section != sec2->the_bfd_section + && sections_overlap (sec->the_bfd_section, + sec2->the_bfd_section)) + { + if (info_verbose) + printf_unfiltered ("Note: section %s unmapped by overlap\n", + bfd_section_name (objfile->obfd, + sec2->the_bfd_section)); + sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */ + } + return; + } + error ("No overlay section called %s", args); +} + +/* Function: unmap_overlay_command + Mark the overlay section as unmapped + (ie. resident in its LMA address range, rather than the VMA range). */ + +void +unmap_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile; + struct obj_section *sec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + if (!sec->ovly_mapped) + error ("Section %s is not mapped", args); + sec->ovly_mapped = 0; + return; + } + error ("No overlay section called %s", args); +} + +/* Function: overlay_auto_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_auto_command (char *args, int from_tty) +{ + overlay_debugging = ovly_auto; + enable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Automatic overlay debugging enabled."); +} + +/* Function: overlay_manual_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_manual_command (char *args, int from_tty) +{ + overlay_debugging = ovly_on; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging enabled."); +} + +/* Function: overlay_off_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_off_command (char *args, int from_tty) +{ + overlay_debugging = ovly_off; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging disabled."); +} + +static void +overlay_load_command (char *args, int from_tty) +{ + if (target_overlay_update) + (*target_overlay_update) (NULL); + else + error ("This target does not know how to read its overlay state."); +} + +/* Function: overlay_command + A place-holder for a mis-typed command */ + +/* Command list chain containing all defined "overlay" subcommands. */ +struct cmd_list_element *overlaylist; + +static void +overlay_command (char *args, int from_tty) +{ + printf_unfiltered + ("\"overlay\" must be followed by the name of an overlay command.\n"); + help_list (overlaylist, "overlay ", -1, gdb_stdout); +} + + +/* Target Overlays for the "Simplest" overlay manager: + + This is GDB's default target overlay layer. It works with the + minimal overlay manager supplied as an example by Cygnus. The + entry point is via a function pointer "target_overlay_update", + so targets that use a different runtime overlay manager can + substitute their own overlay_update function and take over the + function pointer. + + The overlay_update function pokes around in the target's data structures + to see what overlays are mapped, and updates GDB's overlay mapping with + this information. + + In this simple implementation, the target data structures are as follows: + unsigned _novlys; /# number of overlay sections #/ + unsigned _ovly_table[_novlys][4] = { + {VMA, SIZE, LMA, MAPPED}, /# one entry per overlay section #/ + {..., ..., ..., ...}, + } + unsigned _novly_regions; /# number of overlay regions #/ + unsigned _ovly_region_table[_novly_regions][3] = { + {VMA, SIZE, MAPPED_TO_LMA}, /# one entry per overlay region #/ + {..., ..., ...}, + } + These functions will attempt to update GDB's mappedness state in the + symbol section table, based on the target's mappedness state. + + To do this, we keep a cached copy of the target's _ovly_table, and + attempt to detect when the cached copy is invalidated. The main + entry point is "simple_overlay_update(SECT), which looks up SECT in + the cached table and re-reads only the entry for that section from + the target (whenever possible). + */ + +/* Cached, dynamically allocated copies of the target data structures: */ +static unsigned (*cache_ovly_table)[4] = 0; +#if 0 +static unsigned (*cache_ovly_region_table)[3] = 0; +#endif +static unsigned cache_novlys = 0; +#if 0 +static unsigned cache_novly_regions = 0; +#endif +static CORE_ADDR cache_ovly_table_base = 0; +#if 0 +static CORE_ADDR cache_ovly_region_table_base = 0; +#endif +enum ovly_index + { + VMA, SIZE, LMA, MAPPED + }; +#define TARGET_LONG_BYTES (TARGET_LONG_BIT / TARGET_CHAR_BIT) + +/* Throw away the cached copy of _ovly_table */ +static void +simple_free_overlay_table (void) +{ + if (cache_ovly_table) + xfree (cache_ovly_table); + cache_novlys = 0; + cache_ovly_table = NULL; + cache_ovly_table_base = 0; +} + +#if 0 +/* Throw away the cached copy of _ovly_region_table */ +static void +simple_free_overlay_region_table (void) +{ + if (cache_ovly_region_table) + xfree (cache_ovly_region_table); + cache_novly_regions = 0; + cache_ovly_region_table = NULL; + cache_ovly_region_table_base = 0; +} +#endif + +/* Read an array of ints from the target into a local buffer. + Convert to host order. int LEN is number of ints */ +static void +read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len) +{ + /* FIXME (alloca): Not safe if array is very large. */ + char *buf = alloca (len * TARGET_LONG_BYTES); + int i; + + read_memory (memaddr, buf, len * TARGET_LONG_BYTES); + for (i = 0; i < len; i++) + myaddr[i] = extract_unsigned_integer (TARGET_LONG_BYTES * i + buf, + TARGET_LONG_BYTES); +} + +/* Find and grab a copy of the target _ovly_table + (and _novlys, which is needed for the table's size) */ +static int +simple_read_overlay_table (void) +{ + struct minimal_symbol *novlys_msym, *ovly_table_msym; + + simple_free_overlay_table (); + novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); + if (! novlys_msym) + { + error ("Error reading inferior's overlay table: " + "couldn't find `_novlys' variable\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); + if (! ovly_table_msym) + { + error ("Error reading inferior's overlay table: couldn't find " + "`_ovly_table' array\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym), 4); + cache_ovly_table + = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); + cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym); + read_target_long_array (cache_ovly_table_base, + (int *) cache_ovly_table, + cache_novlys * 4); + + return 1; /* SUCCESS */ +} + +#if 0 +/* Find and grab a copy of the target _ovly_region_table + (and _novly_regions, which is needed for the table's size) */ +static int +simple_read_overlay_region_table (void) +{ + struct minimal_symbol *msym; + + simple_free_overlay_region_table (); + msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL); + if (msym != NULL) + cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym), 4); + else + return 0; /* failure */ + cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12); + if (cache_ovly_region_table != NULL) + { + msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL); + if (msym != NULL) + { + cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym); + read_target_long_array (cache_ovly_region_table_base, + (int *) cache_ovly_region_table, + cache_novly_regions * 3); + } + else + return 0; /* failure */ + } + else + return 0; /* failure */ + return 1; /* SUCCESS */ +} +#endif + +/* Function: simple_overlay_update_1 + A helper function for simple_overlay_update. Assuming a cached copy + of _ovly_table exists, look through it to find an entry whose vma, + lma and size match those of OSECT. Re-read the entry and make sure + it still matches OSECT (else the table may no longer be valid). + Set OSECT's mapped state to match the entry. Return: 1 for + success, 0 for failure. */ + +static int +simple_overlay_update_1 (struct obj_section *osect) +{ + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES, + (int *) cache_ovly_table[i], 4); + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + return 1; + } + else /* Warning! Warning! Target's ovly table has changed! */ + return 0; + } + return 0; +} + +/* Function: simple_overlay_update + If OSECT is NULL, then update all sections' mapped state + (after re-reading the entire target _ovly_table). + If OSECT is non-NULL, then try to find a matching entry in the + cached ovly_table and update only OSECT's mapped state. + If a cached entry can't be found or the cache isn't valid, then + re-read the entire cache, and go ahead and update all sections. */ + +static void +simple_overlay_update (struct obj_section *osect) +{ + struct objfile *objfile; + + /* Were we given an osect to look up? NULL means do all of them. */ + if (osect) + /* Have we got a cached copy of the target's overlay table? */ + if (cache_ovly_table != NULL) + /* Does its cached location match what's currently in the symtab? */ + if (cache_ovly_table_base == + SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL))) + /* Then go ahead and try to look up this single section in the cache */ + if (simple_overlay_update_1 (osect)) + /* Found it! We're done. */ + return; + + /* Cached table no good: need to read the entire table anew. + Or else we want all the sections, in which case it's actually + more efficient to read the whole table in one block anyway. */ + + if (! simple_read_overlay_table ()) + return; + + /* Now may as well update all sections, even if only one was requested. */ + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { /* obj_section matches i'th entry in ovly_table */ + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + break; /* finished with inner for loop: break out */ + } + } +} + +/* Set the output sections and output offsets for section SECTP in + ABFD. The relocation code in BFD will read these offsets, so we + need to be sure they're initialized. We map each section to itself, + with no offset; this means that SECTP->vma will be honored. */ + +static void +symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy) +{ + sectp->output_section = sectp; + sectp->output_offset = 0; +} + +/* Relocate the contents of a debug section SECTP in ABFD. The + contents are stored in BUF if it is non-NULL, or returned in a + malloc'd buffer otherwise. + + For some platforms and debug info formats, shared libraries contain + relocations against the debug sections (particularly for DWARF-2; + one affected platform is PowerPC GNU/Linux, although it depends on + the version of the linker in use). Also, ELF object files naturally + have unresolved relocations for their debug sections. We need to apply + the relocations in order to get the locations of symbols correct. */ + +bfd_byte * +symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) +{ +#ifdef CRASH_MERGE + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; +#endif + /* We're only interested in debugging sections with relocation + information. */ + if ((sectp->flags & SEC_RELOC) == 0) + return NULL; + if ((sectp->flags & SEC_DEBUGGING) == 0) + return NULL; + + /* We will handle section offsets properly elsewhere, so relocate as if + all sections begin at 0. */ + bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL); + + return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL); +} + +void +_initialize_symfile (void) +{ + struct cmd_list_element *c; + + c = add_cmd ("symbol-file", class_files, symbol_file_command, + "Load symbol table from executable file FILE.\n\ +The `file' command can also load symbol tables, as well as setting the file\n\ +to execute.", &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, + "Usage: add-symbol-file FILE ADDR [-s -s ...]\n\ +Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\ +ADDR is the starting address of the file's text.\n\ +The optional arguments are section-name section-address pairs and\n\ +should be specified if the data and bss segments are not contiguous\n\ +with the text. SECT is a section name to be loaded at SECT_ADDR.", + &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-shared-symbol-files", class_files, + add_shared_symbol_files_command, + "Load the symbols from shared objects in the dynamic linker's link map.", + &cmdlist); + c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1, + &cmdlist); + + c = add_cmd ("load", class_files, load_command, + "Dynamically load FILE into the running program, and record its symbols\n\ +for access from GDB.", &cmdlist); + set_cmd_completer (c, filename_completer); + + add_show_from_set + (add_set_cmd ("symbol-reloading", class_support, var_boolean, + (char *) &symbol_reloading, + "Set dynamic symbol table reloading multiple times in one run.", + &setlist), + &showlist); + + add_prefix_cmd ("overlay", class_support, overlay_command, + "Commands for debugging overlays.", &overlaylist, + "overlay ", 0, &cmdlist); + + add_com_alias ("ovly", "overlay", class_alias, 1); + add_com_alias ("ov", "overlay", class_alias, 1); + + add_cmd ("map-overlay", class_support, map_overlay_command, + "Assert that an overlay section is mapped.", &overlaylist); + + add_cmd ("unmap-overlay", class_support, unmap_overlay_command, + "Assert that an overlay section is unmapped.", &overlaylist); + + add_cmd ("list-overlays", class_support, list_overlays_command, + "List mappings of overlay sections.", &overlaylist); + + add_cmd ("manual", class_support, overlay_manual_command, + "Enable overlay debugging.", &overlaylist); + add_cmd ("off", class_support, overlay_off_command, + "Disable overlay debugging.", &overlaylist); + add_cmd ("auto", class_support, overlay_auto_command, + "Enable automatic overlay debugging.", &overlaylist); + add_cmd ("load-target", class_support, overlay_load_command, + "Read the overlay mapping state from the target.", &overlaylist); + + /* Filename extension to source language lookup table: */ + init_filename_language_table (); + c = add_set_cmd ("extension-language", class_files, var_string_noescape, + (char *) &ext_args, + "Set mapping between filename extension and source language.\n\ +Usage: set extension-language .foo bar", + &setlist); + set_cmd_cfunc (c, set_ext_lang_command); + + add_info ("extensions", info_ext_lang_command, + "All filename extensions associated with a source language."); + + add_show_from_set + (add_set_cmd ("download-write-size", class_obscure, + var_integer, (char *) &download_write_size, + "Set the write size used when downloading a program.\n" + "Only used when downloading a program onto a remote\n" + "target. Specify zero, or a negative value, to disable\n" + "blocked writes. The actual size of each transfer is also\n" + "limited by the size of the target packet and the memory\n" + "cache.\n", + &setlist), + &showlist); + + debug_file_directory = xstrdup (DEBUGDIR); + c = (add_set_cmd + ("debug-file-directory", class_support, var_string, + (char *) &debug_file_directory, + "Set the directory where separate debug symbols are searched for.\n" + "Separate debug symbols are first searched for in the same\n" + "directory as the binary, then in the `" DEBUG_SUBDIRECTORY + "' subdirectory,\n" + "and lastly at the path of the directory of the binary with\n" + "the global debug-file directory prepended\n", + &setlist)); + add_show_from_set (c, &showlist); + set_cmd_completer (c, filename_completer); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/symtab.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/symtab.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/symtab.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/symtab.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,4814 @@ +/* Symbol table lookup for the GNU debugger, GDB. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +/* Prototypes for local functions */ + +static void completion_list_add_name (char *, char *, int, char *, char *); + +static void rbreak_command (char *, int); + +static void types_info (char *, int); + +static void functions_info (char *, int); + +static void variables_info (char *, int); + +static void sources_info (char *, int); + +static void output_source_filename (char *, int *); + +static int find_line_common (struct linetable *, int, int *); + +/* This one is used by linespec.c */ + +char *operator_chars (char *p, char **end); + +static struct symbol *lookup_symbol_aux (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_local (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_symtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_psymtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +#if 0 +static +struct symbol *lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); +#endif + +/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ +/* Signals the presence of objects compiled by HP compilers */ +int hp_som_som_object_present = 0; + +static void fixup_section (struct general_symbol_info *, struct objfile *); + +static int file_matches (char *, char **, int); + +static void print_symbol_info (domain_enum, + struct symtab *, struct symbol *, int, char *); + +static void print_msymbol_info (struct minimal_symbol *); + +static void symtab_symbol_info (char *, domain_enum, int); + +void _initialize_symtab (void); + +/* */ + +/* The single non-language-specific builtin type */ +struct type *builtin_type_error; + +/* Block in which the most recently searched-for symbol was found. + Might be better to make this a parameter to lookup_symbol and + value_of_this. */ + +const struct block *block_found; + +/* Check for a symtab of a specific name; first in symtabs, then in + psymtabs. *If* there is no '/' in the name, a match after a '/' + in the symtab filename will also work. */ + +struct symtab * +lookup_symtab (const char *name) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + char *real_path = NULL; + char *full_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + +got_symtab: + + /* First, search for an exact match */ + + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (name, s->filename) == 0) + { + return s; + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + + if (full_path != NULL) + { + const char *fp = symtab_to_filename (s); + if (FILENAME_CMP (full_path, fp) == 0) + { + return s; + } + } + + if (real_path != NULL) + { + char *rp = gdb_realpath (symtab_to_filename (s)); + make_cleanup (xfree, rp); + if (FILENAME_CMP (real_path, rp) == 0) + { + return s; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (lbasename (s->filename), name) == 0) + return s; + } + + /* Same search rules as above apply here, but now we look thru the + psymtabs. */ + + ps = lookup_partial_symtab (name); + if (!ps) + return (NULL); + + if (ps->readin) + error ("Internal: readin %s pst for `%s' found when no symtab found.", + ps->filename, name); + + s = PSYMTAB_TO_SYMTAB (ps); + + if (s) + return s; + + /* At this point, we have located the psymtab for this file, but + the conversion to a symtab has failed. This usually happens + when we are looking up an include file. In this case, + PSYMTAB_TO_SYMTAB doesn't return a symtab, even though one has + been created. So, we need to run through the symtabs again in + order to find the file. + XXX - This is a crock, and should be fixed inside of the the + symbol parsing routines. */ + goto got_symtab; +} + +/* Lookup the partial symbol table of a source file named NAME. + *If* there is no '/' in the name, a match after a '/' + in the psymtab filename will also work. */ + +struct partial_symtab * +lookup_partial_symtab (const char *name) +{ + struct partial_symtab *pst; + struct objfile *objfile; + char *full_path = NULL; + char *real_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (name, pst->filename) == 0) + { + return (pst); + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + if (full_path != NULL) + { + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL + && FILENAME_CMP (full_path, pst->fullname) == 0) + { + return pst; + } + } + + if (real_path != NULL) + { + char *rp = NULL; + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL) + { + rp = gdb_realpath (pst->fullname); + make_cleanup (xfree, rp); + } + if (rp != NULL && FILENAME_CMP (real_path, rp) == 0) + { + return pst; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (lbasename (pst->filename), name) == 0) + return (pst); + } + + return (NULL); +} + +/* Mangle a GDB method stub type. This actually reassembles the pieces of the + full method name, which consist of the class name (from T), the unadorned + method name from METHOD_ID, and the signature for the specific overload, + specified by SIGNATURE_ID. Note that this function is g++ specific. */ + +char * +gdb_mangle_name (struct type *type, int method_id, int signature_id) +{ + int mangled_name_len; + char *mangled_name; + struct fn_field *f = TYPE_FN_FIELDLIST1 (type, method_id); + struct fn_field *method = &f[signature_id]; + char *field_name = TYPE_FN_FIELDLIST_NAME (type, method_id); + char *physname = TYPE_FN_FIELD_PHYSNAME (f, signature_id); + char *newname = type_name_no_tag (type); + + /* Does the form of physname indicate that it is the full mangled name + of a constructor (not just the args)? */ + int is_full_physname_constructor; + + int is_constructor; + int is_destructor = is_destructor_name (physname); + /* Need a new type prefix. */ + char *const_prefix = method->is_const ? "C" : ""; + char *volatile_prefix = method->is_volatile ? "V" : ""; + char buf[20]; + int len = (newname == NULL ? 0 : strlen (newname)); + + /* Nothing to do if physname already contains a fully mangled v3 abi name + or an operator name. */ + if ((physname[0] == '_' && physname[1] == 'Z') + || is_operator_name (field_name)) + return xstrdup (physname); + + is_full_physname_constructor = is_constructor_name (physname); + + is_constructor = + is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0); + + if (!is_destructor) + is_destructor = (strncmp (physname, "__dt", 4) == 0); + + if (is_destructor || is_full_physname_constructor) + { + mangled_name = (char *) xmalloc (strlen (physname) + 1); + strcpy (mangled_name, physname); + return mangled_name; + } + + if (len == 0) + { + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + } + else if (physname[0] == 't' || physname[0] == 'Q') + { + /* The physname for template and qualified methods already includes + the class name. */ + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + newname = NULL; + len = 0; + } + else + { + sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); + } + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + + strlen (buf) + len + strlen (physname) + 1); + + { + mangled_name = (char *) xmalloc (mangled_name_len); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); + } + strcat (mangled_name, buf); + /* If the class doesn't have a name, i.e. newname NULL, then we just + mangle it using 0 for the length of the class. Thus it gets mangled + as something starting with `::' rather than `classname::'. */ + if (newname != NULL) + strcat (mangled_name, newname); + + strcat (mangled_name, physname); + return (mangled_name); +} + + +/* Initialize the language dependent portion of a symbol + depending upon the language for the symbol. */ +void +symbol_init_language_specific (struct general_symbol_info *gsymbol, + enum language language) +{ + gsymbol->language = language; + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + memset (&gsymbol->language_specific, 0, + sizeof (gsymbol->language_specific)); + } +} + +/* Functions to initialize a symbol's mangled name. */ + +/* Create the hash table used for demangled names. Each hash entry is + a pair of strings; one for the mangled name and one for the demangled + name. The entry is hashed via just the mangled name. */ + +static void +create_demangled_names_hash (struct objfile *objfile) +{ + /* Choose 256 as the starting size of the hash table, somewhat arbitrarily. + The hash table code will round this up to the next prime number. + Choosing a much larger table size wastes memory, and saves only about + 1% in symbol reading. */ + + objfile->demangled_names_hash = htab_create_alloc_ex + (256, htab_hash_string, (int (*) (const void *, const void *)) streq, + NULL, objfile->md, xmcalloc, xmfree); +} + +/* Try to determine the demangled name for a symbol, based on the + language of that symbol. If the language is set to language_auto, + it will attempt to find any demangling algorithm that works and + then set the language appropriately. The returned name is allocated + by the demangler and should be xfree'd. */ + +static char * +symbol_find_demangled_name (struct general_symbol_info *gsymbol, + const char *mangled) +{ + char *demangled = NULL; + + if (gsymbol->language == language_unknown) + gsymbol->language = language_auto; + + if (gsymbol->language == language_objc + || gsymbol->language == language_auto) + { + demangled = + objc_demangle (mangled, 0); + if (demangled != NULL) + { + gsymbol->language = language_objc; + return demangled; + } + } + if (gsymbol->language == language_cplus + || gsymbol->language == language_auto) + { + demangled = + cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI); + if (demangled != NULL) + { + gsymbol->language = language_cplus; + return demangled; + } + } + if (gsymbol->language == language_java) + { + demangled = + cplus_demangle (mangled, + DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); + if (demangled != NULL) + { + gsymbol->language = language_java; + return demangled; + } + } + return NULL; +} + +/* Set both the mangled and demangled (if any) names for GSYMBOL based + on LINKAGE_NAME and LEN. The hash table corresponding to OBJFILE + is used, and the memory comes from that objfile's objfile_obstack. + LINKAGE_NAME is copied, so the pointer can be discarded after + calling this function. */ + +/* We have to be careful when dealing with Java names: when we run + into a Java minimal symbol, we don't know it's a Java symbol, so it + gets demangled as a C++ name. This is unfortunate, but there's not + much we can do about it: but when demangling partial symbols and + regular symbols, we'd better not reuse the wrong demangled name. + (See PR gdb/1039.) We solve this by putting a distinctive prefix + on Java names when storing them in the hash table. */ + +/* FIXME: carlton/2003-03-13: This is an unfortunate situation. I + don't mind the Java prefix so much: different languages have + different demangling requirements, so it's only natural that we + need to keep language data around in our demangling cache. But + it's not good that the minimal symbol has the wrong demangled name. + Unfortunately, I can't think of any easy solution to that + problem. */ + +#define JAVA_PREFIX "##JAVA$$" +#define JAVA_PREFIX_LEN 8 + +void +symbol_set_names (struct general_symbol_info *gsymbol, + const char *linkage_name, int len, struct objfile *objfile) +{ + char **slot; + /* A 0-terminated copy of the linkage name. */ + const char *linkage_name_copy; + /* A copy of the linkage name that might have a special Java prefix + added to it, for use when looking names up in the hash table. */ + const char *lookup_name; + /* The length of lookup_name. */ + int lookup_len; + + if (objfile->demangled_names_hash == NULL) + create_demangled_names_hash (objfile); + + /* The stabs reader generally provides names that are not + NUL-terminated; most of the other readers don't do this, so we + can just use the given copy, unless we're in the Java case. */ + if (gsymbol->language == language_java) + { + char *alloc_name; + lookup_len = len + JAVA_PREFIX_LEN; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN); + memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name + JAVA_PREFIX_LEN; + } + else if (linkage_name[len] != '\0') + { + char *alloc_name; + lookup_len = len; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name; + } + else + { + lookup_len = len; + lookup_name = linkage_name; + linkage_name_copy = linkage_name; + } + + slot = (char **) htab_find_slot (objfile->demangled_names_hash, + lookup_name, INSERT); + + /* If this name is not in the hash table, add it. */ + if (*slot == NULL) + { + char *demangled_name = symbol_find_demangled_name (gsymbol, + linkage_name_copy); + int demangled_len = demangled_name ? strlen (demangled_name) : 0; + + /* If there is a demangled name, place it right after the mangled name. + Otherwise, just place a second zero byte after the end of the mangled + name. */ + *slot = obstack_alloc (&objfile->objfile_obstack, + lookup_len + demangled_len + 2); + memcpy (*slot, lookup_name, lookup_len + 1); + if (demangled_name != NULL) + { + memcpy (*slot + lookup_len + 1, demangled_name, demangled_len + 1); + xfree (demangled_name); + } + else + (*slot)[lookup_len + 1] = '\0'; + } + + gsymbol->name = *slot + lookup_len - len; + if ((*slot)[lookup_len + 1] != '\0') + gsymbol->language_specific.cplus_specific.demangled_name + = &(*slot)[lookup_len + 1]; + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; +} + +/* Initialize the demangled name of GSYMBOL if possible. Any required space + to store the name is obtained from the specified obstack. The function + symbol_set_names, above, should be used instead where possible for more + efficient memory usage. */ + +void +symbol_init_demangled_name (struct general_symbol_info *gsymbol, + struct obstack *obstack) +{ + char *mangled = gsymbol->name; + char *demangled = NULL; + + demangled = symbol_find_demangled_name (gsymbol, mangled); + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + if (demangled) + { + gsymbol->language_specific.cplus_specific.demangled_name + = obsavestring (demangled, strlen (demangled), obstack); + xfree (demangled); + } + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + /* Unknown language; just clean up quietly. */ + if (demangled) + xfree (demangled); + } +} + +/* Return the source code name of a symbol. In languages where + demangling is necessary, this is the demangled name. */ + +char * +symbol_natural_name (const struct general_symbol_info *gsymbol) +{ + if ((gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + && (gsymbol->language_specific.cplus_specific.demangled_name != NULL)) + { + return gsymbol->language_specific.cplus_specific.demangled_name; + } + else + { + return gsymbol->name; + } +} + +/* Return the demangled name for a symbol based on the language for + that symbol. If no demangled name exists, return NULL. */ +char * +symbol_demangled_name (struct general_symbol_info *gsymbol) +{ + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + return gsymbol->language_specific.cplus_specific.demangled_name; + + else + return NULL; +} + +/* Initialize the structure fields to zero values. */ +void +init_sal (struct symtab_and_line *sal) +{ + sal->symtab = 0; + sal->section = 0; + sal->line = 0; + sal->pc = 0; + sal->end = 0; +} + + + +/* Find which partial symtab contains PC and SECTION. Return 0 if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ +struct partial_symtab * +find_pc_sect_psymtab (CORE_ADDR pc, asection *section) +{ + struct partial_symtab *pst; + struct objfile *objfile; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on texthigh and textlow, which do + not include the data ranges. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + ALL_PSYMTABS (objfile, pst) + { + if (pc >= pst->textlow && pc < pst->texthigh) + { + struct partial_symtab *tpst; + struct partial_symtab *best_pst = pst; + struct partial_symbol *best_psym = NULL; + + /* An objfile that has its functions reordered might have + many partial symbol tables containing the PC, but + we want the partial symbol table that contains the + function containing the PC. */ + if (!(objfile->flags & OBJF_REORDERED) && + section == 0) /* can't validate section this way */ + return (pst); + + if (msymbol == NULL) + return (pst); + + /* The code range of partial symtabs sometimes overlap, so, in + the loop below, we need to check all partial symtabs and + find the one that fits better for the given PC address. We + select the partial symtab that contains a symbol whose + address is closest to the PC address. By closest we mean + that find_pc_sect_symbol returns the symbol with address + that is closest and still less than the given PC. */ + for (tpst = pst; tpst != NULL; tpst = tpst->next) + { + if (pc >= tpst->textlow && pc < tpst->texthigh) + { + struct partial_symbol *p; + + p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && SYMBOL_VALUE_ADDRESS (p) + == SYMBOL_VALUE_ADDRESS (msymbol)) + return (tpst); + if (p != NULL) + { + /* We found a symbol in this partial symtab which + matches (or is closest to) PC, check whether it + is closer than our current BEST_PSYM. Since + this symbol address is necessarily lower or + equal to PC, the symbol closer to PC is the + symbol which address is the highest. */ + /* This way we return the psymtab which contains + such best match symbol. This can help in cases + where the symbol information/debuginfo is not + complete, like for instance on IRIX6 with gcc, + where no debug info is emitted for + statics. (See also the nodebug.exp + testcase.) */ + if (best_psym == NULL + || SYMBOL_VALUE_ADDRESS (p) + > SYMBOL_VALUE_ADDRESS (best_psym)) + { + best_psym = p; + best_pst = tpst; + } + } + + } + } + return (best_pst); + } + } + return (NULL); +} + +/* Find which partial symtab contains PC. Return 0 if none. + Backward compatibility, no section */ + +struct partial_symtab * +find_pc_psymtab (CORE_ADDR pc) +{ + return find_pc_sect_psymtab (pc, find_pc_mapped_section (pc)); +} + +/* Find which partial symbol within a psymtab matches PC and SECTION. + Return 0 if none. Check all psymtabs if PSYMTAB is 0. */ + +struct partial_symbol * +find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, + asection *section) +{ + struct partial_symbol *best = NULL, *p, **pp; + CORE_ADDR best_pc; + + if (!psymtab) + psymtab = find_pc_sect_psymtab (pc, section); + if (!psymtab) + return 0; + + /* Cope with programs that start at address 0 */ + best_pc = (psymtab->textlow != 0) ? psymtab->textlow - 1 : 0; + + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; + (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) + < psymtab->n_static_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + return best; +} + +/* Find which partial symbol within a psymtab matches PC. Return 0 if none. + Check all psymtabs if PSYMTAB is 0. Backwards compatibility, no section. */ + +struct partial_symbol * +find_pc_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc) +{ + return find_pc_sect_psymbol (psymtab, pc, find_pc_mapped_section (pc)); +} + +/* Debug symbols usually don't have section information. We need to dig that + out of the minimal symbols and stash that in the debug symbol. */ + +static void +fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile) +{ + struct minimal_symbol *msym; + msym = lookup_minimal_symbol (ginfo->name, NULL, objfile); + + if (msym) + { + ginfo->bfd_section = SYMBOL_BFD_SECTION (msym); + ginfo->section = SYMBOL_SECTION (msym); + } +} + +struct symbol * +fixup_symbol_section (struct symbol *sym, struct objfile *objfile) +{ + if (!sym) + return NULL; + + if (SYMBOL_BFD_SECTION (sym)) + return sym; + + fixup_section (&sym->ginfo, objfile); + + return sym; +} + +struct partial_symbol * +fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) +{ + if (!psym) + return NULL; + + if (SYMBOL_BFD_SECTION (psym)) + return psym; + + fixup_section (&psym->ginfo, objfile); + + return psym; +} + +/* Find the definition for a specified symbol name NAME + in domain DOMAIN, visible from lexical block BLOCK. + Returns the struct symbol pointer, or zero if no symbol is found. + If SYMTAB is non-NULL, store the symbol table in which the + symbol was found there, or NULL if not found. + C++: if IS_A_FIELD_OF_THIS is nonzero on entry, check to see if + NAME is a field of the current implied argument `this'. If so set + *IS_A_FIELD_OF_THIS to 1, otherwise set it to zero. + BLOCK_FOUND is set to the block in which NAME is found (in the case of + a field of `this', value_of_this sets BLOCK_FOUND to the proper value.) */ + +/* This function has a bunch of loops in it and it would seem to be + attractive to put in some QUIT's (though I'm not really sure + whether it can run long enough to be really important). But there + are a few calls for which it would appear to be bad news to quit + out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note + that there is C++ code below which can error(), but that probably + doesn't affect these calls since they are looking for a known + variable and thus can probably assume it will never hit the C++ + code). */ +#ifdef CRASH_MERGE +static void gdb_bait_and_switch(char *, struct symbol *); +#endif +struct symbol * +lookup_symbol (const char *name, const struct block *block, + const domain_enum domain, int *is_a_field_of_this, + struct symtab **symtab) +{ + char *demangled_name = NULL; + const char *modified_name = NULL; + const char *mangled_name = NULL; + int needtofreename = 0; + struct symbol *returnval; + + modified_name = name; + + /* If we are using C++ language, demangle the name before doing a lookup, so + we can always binary search. */ + if (current_language->la_language == language_cplus) + { + demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); + if (demangled_name) + { + mangled_name = name; + modified_name = demangled_name; + needtofreename = 1; + } + } + + if (case_sensitivity == case_sensitive_off) + { + char *copy; + int len, i; + + len = strlen (name); + copy = (char *) alloca (len + 1); + for (i= 0; i < len; i++) + copy[i] = tolower (name[i]); + copy[len] = 0; + modified_name = copy; + } + + returnval = lookup_symbol_aux (modified_name, mangled_name, block, + domain, is_a_field_of_this, symtab); + if (needtofreename) + xfree (demangled_name); + +#ifdef CRASH_MERGE + if (returnval && (domain == VAR_DOMAIN)) { + gdb_bait_and_switch((char *)modified_name, returnval); + } +#endif + + return returnval; +} + +/* Behave like lookup_symbol_aux except that NAME is the natural name + of the symbol that we're looking for and, if LINKAGE_NAME is + non-NULL, ensure that the symbol's linkage name matches as + well. */ + +static struct symbol * +lookup_symbol_aux (const char *name, const char *linkage_name, + const struct block *block, const domain_enum domain, + int *is_a_field_of_this, struct symtab **symtab) +{ + struct symbol *sym; + + /* Make sure we do something sensible with is_a_field_of_this, since + the callers that set this parameter to some non-null value will + certainly use it later and expect it to be either 0 or 1. + If we don't set it, the contents of is_a_field_of_this are + undefined. */ + if (is_a_field_of_this != NULL) + *is_a_field_of_this = 0; + + /* Search specified block and its superiors. Don't search + STATIC_BLOCK or GLOBAL_BLOCK. */ + + sym = lookup_symbol_aux_local (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + + /* If requested to do so by the caller and if appropriate for the + current language, check to see if NAME is a field of `this'. */ + + if (current_language->la_value_of_this != NULL + && is_a_field_of_this != NULL) + { + struct value *v = current_language->la_value_of_this (0); + + if (v && check_field (v, name)) + { + *is_a_field_of_this = 1; + if (symtab != NULL) + *symtab = NULL; + return NULL; + } + } + + /* Now do whatever is appropriate for the current language to look + up static and global variables. */ + + sym = current_language->la_lookup_symbol_nonlocal (name, linkage_name, + block, domain, + symtab); + if (sym != NULL) + return sym; + + /* Now search all static file-level symbols. Not strictly correct, + but more useful than an error. Do the symtabs first, then check + the psymtabs. If a psymtab indicates the existence of the + desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + if (symtab != NULL) + *symtab = NULL; + return NULL; +} + +/* Check to see if the symbol is defined in BLOCK or its superiors. + Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ + +static struct symbol * +lookup_symbol_aux_local (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + const struct block *static_block = block_static_block (block); + + /* Check if either no block is specified or it's a global block. */ + + if (static_block == NULL) + return NULL; + + while (block != static_block) + { + sym = lookup_symbol_aux_block (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + block = BLOCK_SUPERBLOCK (block); + } + + /* We've reached the static block without finding a result. */ + + return NULL; +} + +/* Look up a symbol in a block; if found, locate its symtab, fixup the + symbol, and set block_found appropriately. */ + +struct symbol * +lookup_symbol_aux_block (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile = NULL; + struct blockvector *bv; + struct block *b; + struct symtab *s = NULL; + + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + { + /* Search the list of symtabs for one which contains the + address of the start of this block. */ + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + if (BLOCK_START (b) <= BLOCK_START (block) + && BLOCK_END (b) > BLOCK_START (block)) + goto found; + } + found: + *symtab = s; + } + + return fixup_symbol_section (sym, objfile); + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the symtabs. + BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK, + depending on whether or not we want to search global symbols or + static symbols. */ + +static struct symbol * +lookup_symbol_aux_symtabs (int block_index, + const char *name, const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct symtab *s; + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the partial + symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or + STATIC_BLOCK, depending on whether or not we want to search global + symbols or static symbols. */ + +static struct symbol * +lookup_symbol_aux_psymtabs (int block_index, const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct partial_symtab *ps; + struct symtab *s; + const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin + && lookup_partial_symbol (ps, name, linkage_name, + psymtab_index, domain)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort try + looking in the statics even though the psymtab claimed + the symbol was global, or vice-versa. It's possible + that the psymtab gets it wrong in some cases. */ + + /* FIXME: carlton/2002-09-30: Should we really do that? + If that happens, isn't it likely to be a GDB error, in + which case we should fix the GDB error rather than + silently dealing with it here? So I'd vote for + removing the check for the symbol in the other + block. */ + block = BLOCKVECTOR_BLOCK (bv, + block_index == GLOBAL_BLOCK ? + STATIC_BLOCK : GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s).", + block_index == GLOBAL_BLOCK ? "global" : "static", + name, ps->filename, name, name); + } + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +#if 0 +/* Check for the possibility of the symbol being a function or a + mangled variable that is stored in one of the minimal symbol + tables. Eventually, all global symbols might be resolved in this + way. */ + +/* NOTE: carlton/2002-12-05: At one point, this function was part of + lookup_symbol_aux, and what are now 'return' statements within + lookup_symbol_aux_minsyms returned from lookup_symbol_aux, even if + sym was NULL. As far as I can tell, this was basically accidental; + it didn't happen every time that msymbol was non-NULL, but only if + some additional conditions held as well, and it caused problems + with HP-generated symbol tables. */ + +/* NOTE: carlton/2003-05-14: This function was once used as part of + lookup_symbol. It is currently unnecessary for correctness + reasons, however, and using it doesn't seem to be any faster than + using lookup_symbol_aux_psymtabs, so I'm commenting it out. */ + +static struct symbol * +lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab) +{ + struct symbol *sym; + struct blockvector *bv; + const struct block *block; + struct minimal_symbol *msymbol; + struct symtab *s; + + if (domain == VAR_DOMAIN) + { + msymbol = lookup_minimal_symbol (name, NULL, NULL); + + if (msymbol != NULL) + { + /* OK, we found a minimal symbol in spite of not finding any + symbol. There are various possible explanations for + this. One possibility is the symbol exists in code not + compiled -g. Another possibility is that the 'psymtab' + isn't doing its job. A third possibility, related to #2, + is that we were confused by name-mangling. For instance, + maybe the psymtab isn't doing its job because it only + know about demangled names, but we were given a mangled + name... */ + + /* We first use the address in the msymbol to try to locate + the appropriate symtab. Note that find_pc_sect_symtab() + has a side-effect of doing psymtab-to-symtab expansion, + for the found symtab. */ + s = find_pc_sect_symtab (SYMBOL_VALUE_ADDRESS (msymbol), + SYMBOL_BFD_SECTION (msymbol)); + if (s != NULL) + { + /* This is a function which has a symtab for its address. */ + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the + `name' argument to lookup_block_symbol. But the name + of a minimal symbol is always mangled, so that seems + to be clearly the wrong thing to pass as the + unmangled name. */ + sym = + lookup_block_symbol (block, name, linkage_name, domain); + /* We kept static functions in minimal symbol table as well as + in static scope. We want to find them in the symbol table. */ + if (!sym) + { + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, + linkage_name, domain); + } + + /* NOTE: carlton/2002-12-04: The following comment was + taken from a time when two versions of this function + were part of the body of lookup_symbol_aux: this + comment was taken from the version of the function + that was #ifdef HPUXHPPA, and the comment was right + before the 'return NULL' part of lookup_symbol_aux. + (Hence the "Fall through and return 0" comment.) + Elena did some digging into the situation for + Fortran, and she reports: + + "I asked around (thanks to Jeff Knaggs), and I think + the story for Fortran goes like this: + + "Apparently, in older Fortrans, '_' was not part of + the user namespace. g77 attached a final '_' to + procedure names as the exported symbols for linkage + (foo_) , but the symbols went in the debug info just + like 'foo'. The rationale behind this is not + completely clear, and maybe it was done to other + symbols as well, not just procedures." */ + + /* If we get here with sym == 0, the symbol was + found in the minimal symbol table + but not in the symtab. + Fall through and return 0 to use the msymbol + definition of "foo_". + (Note that outer code generally follows up a call + to this routine with a call to lookup_minimal_symbol(), + so a 0 return means we'll just flow into that other routine). + + This happens for Fortran "foo_" symbols, + which are "foo" in the symtab. + + This can also happen if "asm" is used to make a + regular symbol but not a debugging symbol, e.g. + asm(".globl _main"); + asm("_main:"); + */ + + if (symtab != NULL && sym != NULL) + *symtab = s; + return fixup_symbol_section (sym, s->objfile); + } + } + } + + return NULL; +} +#endif /* 0 */ + +/* A default version of lookup_symbol_nonlocal for use by languages + that can't think of anything better to do. This implements the C + lookup rules. */ + +struct symbol * +basic_lookup_symbol_nonlocal (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + /* NOTE: carlton/2003-05-19: The comments below were written when + this (or what turned into this) was part of lookup_symbol_aux; + I'm much less worried about these questions now, since these + decisions have turned out well, but I leave these comments here + for posterity. */ + + /* NOTE: carlton/2002-12-05: There is a question as to whether or + not it would be appropriate to search the current global block + here as well. (That's what this code used to do before the + is_a_field_of_this check was moved up.) On the one hand, it's + redundant with the lookup_symbol_aux_symtabs search that happens + next. On the other hand, if decode_line_1 is passed an argument + like filename:var, then the user presumably wants 'var' to be + searched for in filename. On the third hand, there shouldn't be + multiple global variables all of which are named 'var', and it's + not like decode_line_1 has ever restricted its search to only + global variables in a single filename. All in all, only + searching the static block here seems best: it's correct and it's + cleanest. */ + + /* NOTE: carlton/2002-12-05: There's also a possible performance + issue here: if you usually search for global symbols in the + current file, then it would be slightly better to search the + current global block before searching all the symtabs. But there + are other factors that have a much greater effect on performance + than that one, so I don't think we should worry about that for + now. */ + + sym = lookup_symbol_static (name, linkage_name, block, domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_global (name, linkage_name, domain, symtab); +} + +/* Lookup a symbol in the static block associated to BLOCK, if there + is one; do nothing if BLOCK is NULL or a global block. */ + +struct symbol * +lookup_symbol_static (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + const struct block *static_block = block_static_block (block); + + if (static_block != NULL) + return lookup_symbol_aux_block (name, linkage_name, static_block, + domain, symtab); + else + return NULL; +} + +/* Lookup a symbol in all files' global blocks (searching psymtabs if + necessary). */ + +struct symbol * +lookup_symbol_global (const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); +} + +/* Look, in partial_symtab PST, for symbol whose natural name is NAME. + If LINKAGE_NAME is non-NULL, check in addition that the symbol's + linkage name matches it. Check the global symbols if GLOBAL, the + static symbols if not */ + +struct partial_symbol * +lookup_partial_symbol (struct partial_symtab *pst, const char *name, + const char *linkage_name, int global, + domain_enum domain) +{ + struct partial_symbol *temp; + struct partial_symbol **start, **psym; + struct partial_symbol **top, **real_top, **bottom, **center; + int length = (global ? pst->n_global_syms : pst->n_static_syms); + int do_linear_search = 1; + + if (length == 0) + { + return (NULL); + } + start = (global ? + pst->objfile->global_psymbols.list + pst->globals_offset : + pst->objfile->static_psymbols.list + pst->statics_offset); + + if (global) /* This means we can use a binary search. */ + { + do_linear_search = 0; + + /* Binary search. This search is guaranteed to end with center + pointing at the earliest partial symbol whose name might be + correct. At that point *all* partial symbols with an + appropriate name will be checked against the correct + domain. */ + + bottom = start; + top = start + length - 1; + real_top = top; + while (top > bottom) + { + center = bottom + (top - bottom) / 2; + if (!(center < top)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + if (!do_linear_search + && (SYMBOL_LANGUAGE (*center) == language_java)) + { + do_linear_search = 1; + } + if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0) + { + top = center; + } + else + { + bottom = center + 1; + } + } + if (!(top == bottom)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + while (top <= real_top + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) + { + if (SYMBOL_DOMAIN (*top) == domain) + { + return (*top); + } + top++; + } + } + + /* Can't use a binary search or else we found during the binary search that + we should also do a linear search. */ + + if (do_linear_search) + { + for (psym = start; psym < start + length; psym++) + { + if (domain == SYMBOL_DOMAIN (*psym)) + { + if (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*psym, name)) + { + return (*psym); + } + } + } + } + + return (NULL); +} + +/* Look up a type named NAME in the struct_domain. The type returned + must not be opaque -- i.e., must have at least one field + defined. */ + +struct type * +lookup_transparent_type (const char *name) +{ + return current_language->la_lookup_transparent_type (name); +} + +/* The standard implementation of lookup_transparent_type. This code + was modeled on lookup_symbol -- the parts not relevant to looking + up types were just left out. In particular it's assumed here that + types are available in struct_domain and only at file-static or + global blocks. */ + +struct type * +basic_lookup_transparent_type (const char *name) +{ + struct symbol *sym; + struct symtab *s = NULL; + struct partial_symtab *ps; + struct blockvector *bv; + struct objfile *objfile; + struct block *block; + + /* Now search all the global symbols. Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a global, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, + 1, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the statics even though the psymtab + * claimed the symbol was global. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + + /* Now search the static file-level symbols. + Not strictly correct, but more useful than an error. + Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. + */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the globals even though the psymtab + * claimed the symbol was static. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + return (struct type *) 0; +} + + +/* Find the psymtab containing main(). */ +/* FIXME: What about languages without main() or specially linked + executables that have no main() ? */ + +struct partial_symtab * +find_main_psymtab (void) +{ + struct partial_symtab *pst; + struct objfile *objfile; + + ALL_PSYMTABS (objfile, pst) + { + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + { + return (pst); + } + } + return (NULL); +} + +/* Search BLOCK for symbol NAME in DOMAIN. + + Note that if NAME is the demangled form of a C++ symbol, we will fail + to find a match during the binary search of the non-encoded names, but + for now we don't worry about the slight inefficiency of looking for + a match we'll never find, since it will go pretty quick. Once the + binary search terminates, we drop through and do a straight linear + search on the symbols. Each symbol which is marked as being a ObjC/C++ + symbol (language_cplus or language_objc set) has both the encoded and + non-encoded names tested for a match. + + If LINKAGE_NAME is non-NULL, verify that any symbol we find has this + particular mangled name. +*/ + +struct symbol * +lookup_block_symbol (const struct block *block, const char *name, + const char *linkage_name, + const domain_enum domain) +{ + struct dict_iterator iter; + struct symbol *sym; + + if (!BLOCK_FUNCTION (block)) + { + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + return sym; + } + return NULL; + } + else + { + /* Note that parameter symbols do not always show up last in the + list; this loop makes sure to take anything else other than + parameter symbols first; it only uses parameter symbols as a + last resort. Note that this only takes up extra computation + time on a match. */ + + struct symbol *sym_found = NULL; + + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + { + sym_found = sym; + if (SYMBOL_CLASS (sym) != LOC_ARG && + SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && + SYMBOL_CLASS (sym) != LOC_REF_ARG && + SYMBOL_CLASS (sym) != LOC_REGPARM && + SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR && + SYMBOL_CLASS (sym) != LOC_BASEREG_ARG && + SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG) + { + break; + } + } + } + return (sym_found); /* Will be NULL if not found. */ + } +} + +/* Find the symtab associated with PC and SECTION. Look through the + psymtabs and read in another symtab if necessary. */ + +struct symtab * +find_pc_sect_symtab (CORE_ADDR pc, asection *section) +{ + struct block *b; + struct blockvector *bv; + struct symtab *s = NULL; + struct symtab *best_s = NULL; + struct partial_symtab *ps; + struct objfile *objfile; + CORE_ADDR distance = 0; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on the block's high and low code + addresses, which do not include the data ranges, and because + we call find_pc_sect_psymtab which has a similar restriction based + on the partial_symtab's texthigh and textlow. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + /* Search all symtabs for the one whose file contains our address, and which + is the smallest of all the ones containing the address. This is designed + to deal with a case like symtab a is at 0x1000-0x2000 and 0x3000-0x4000 + and symtab b is at 0x2000-0x3000. So the GLOBAL_BLOCK for a is from + 0x1000-0x4000, but for address 0x2345 we want to return symtab b. + + This happens for native ecoff format, where code from included files + gets its own symtab. The symtab for the included file should have + been read in already via the dependency mechanism. + It might be swifter to create several symtabs with the same name + like xcoff does (I'm not sure). + + It also happens for objfiles that have their functions reordered. + For these, the symtab we are looking for is not necessarily read in. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + if (BLOCK_START (b) <= pc + && BLOCK_END (b) > pc + && (distance == 0 + || BLOCK_END (b) - BLOCK_START (b) < distance)) + { + /* For an objfile that has its functions reordered, + find_pc_psymtab will find the proper partial symbol table + and we simply return its corresponding symtab. */ + /* In order to better support objfiles that contain both + stabs and coff debugging info, we continue on if a psymtab + can't be found. */ + if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs) + { + ps = find_pc_sect_psymtab (pc, section); + if (ps) + return PSYMTAB_TO_SYMTAB (ps); + } + if (section != 0) + { + struct dict_iterator iter; + struct symbol *sym = NULL; + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + fixup_symbol_section (sym, objfile); + if (section == SYMBOL_BFD_SECTION (sym)) + break; + } + if (sym == NULL) + continue; /* no symbol in this symtab matches section */ + } + distance = BLOCK_END (b) - BLOCK_START (b); + best_s = s; + } + } + + if (best_s != NULL) + return (best_s); + + s = NULL; + ps = find_pc_sect_psymtab (pc, section); + if (ps) + { + if (ps->readin) + /* Might want to error() here (in case symtab is corrupt and + will cause a core dump), but maybe we can successfully + continue, so let's not. */ + warning ("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + paddr_nz (pc)); + s = PSYMTAB_TO_SYMTAB (ps); + } + return (s); +} + +/* Find the symtab associated with PC. Look through the psymtabs and + read in another symtab if necessary. Backward compatibility, no section */ + +struct symtab * +find_pc_symtab (CORE_ADDR pc) +{ + return find_pc_sect_symtab (pc, find_pc_mapped_section (pc)); +} + + +/* Find the source file and line number for a given PC value and SECTION. + Return a structure containing a symtab pointer, a line number, + and a pc range for the entire source line. + The value's .pc field is NOT the specified pc. + NOTCURRENT nonzero means, if specified pc is on a line boundary, + use the line that ends there. Otherwise, in that case, the line + that begins there is used. */ + +/* The big complication here is that a line may start in one file, and end just + before the start of another file. This usually occurs when you #include + code in the middle of a subroutine. To properly find the end of a line's PC + range, we must search all symtabs associated with this compilation unit, and + find the one whose first PC is closer than that of the next line in this + symtab. */ + +/* If it's worth the effort, we could be using a binary search. */ + +struct symtab_and_line +find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent) +{ + struct symtab *s; + struct linetable *l; + int len; + int i; + struct linetable_entry *item; + struct symtab_and_line val; + struct blockvector *bv; + struct minimal_symbol *msymbol; + struct minimal_symbol *mfunsym; + + /* Info on best line seen so far, and where it starts, and its file. */ + + struct linetable_entry *best = NULL; + CORE_ADDR best_end = 0; + struct symtab *best_symtab = 0; + + /* Store here the first line number + of a file which contains the line at the smallest pc after PC. + If we don't find a line whose range contains PC, + we will use a line one less than this, + with a range from the start of that file to the first line's pc. */ + struct linetable_entry *alt = NULL; + struct symtab *alt_symtab = 0; + + /* Info on best line seen in this file. */ + + struct linetable_entry *prev; + + /* If this pc is not from the current frame, + it is the address of the end of a call instruction. + Quite likely that is the start of the following statement. + But what we want is the statement containing the instruction. + Fudge the pc to make sure we get that. */ + + init_sal (&val); /* initialize to zeroes */ + + /* It's tempting to assume that, if we can't find debugging info for + any function enclosing PC, that we shouldn't search for line + number info, either. However, GAS can emit line number info for + assembly files --- very helpful when debugging hand-written + assembly code. In such a case, we'd have no debug info for the + function, but we would have line info. */ + + if (notcurrent) + pc -= 1; + + /* elz: added this because this function returned the wrong + information if the pc belongs to a stub (import/export) + to call a shlib function. This stub would be anywhere between + two functions in the target, and the line info was erroneously + taken to be the one of the line before the pc. + */ + /* RT: Further explanation: + + * We have stubs (trampolines) inserted between procedures. + * + * Example: "shr1" exists in a shared library, and a "shr1" stub also + * exists in the main image. + * + * In the minimal symbol table, we have a bunch of symbols + * sorted by start address. The stubs are marked as "trampoline", + * the others appear as text. E.g.: + * + * Minimal symbol table for main image + * main: code for main (text symbol) + * shr1: stub (trampoline symbol) + * foo: code for foo (text symbol) + * ... + * Minimal symbol table for "shr1" image: + * ... + * shr1: code for shr1 (text symbol) + * ... + * + * So the code below is trying to detect if we are in the stub + * ("shr1" stub), and if so, find the real code ("shr1" trampoline), + * and if found, do the symbolization from the real-code address + * rather than the stub address. + * + * Assumptions being made about the minimal symbol table: + * 1. lookup_minimal_symbol_by_pc() will return a trampoline only + * if we're really in the trampoline. If we're beyond it (say + * we're in "foo" in the above example), it'll have a closer + * symbol (the "foo" text symbol for example) and will not + * return the trampoline. + * 2. lookup_minimal_symbol_text() will find a real text symbol + * corresponding to the trampoline, and whose address will + * be different than the trampoline address. I put in a sanity + * check for the address being the same, to avoid an + * infinite recursion. + */ + msymbol = lookup_minimal_symbol_by_pc (pc); + if (msymbol != NULL) + if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + { + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL); + if (mfunsym == NULL) + /* I eliminated this warning since it is coming out + * in the following situation: + * gdb shmain // test program with shared libraries + * (gdb) break shr1 // function in shared lib + * Warning: In stub for ... + * In the above situation, the shared lib is not loaded yet, + * so of course we can't find the real func/line info, + * but the "break" still works, and the warning is annoying. + * So I commented out the warning. RT */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) + /* Avoid infinite recursion */ + /* See above comment about why warning is commented out */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else + return find_pc_line (SYMBOL_VALUE (mfunsym), 0); + } + + + s = find_pc_sect_symtab (pc, section); + if (!s) + { + /* if no symbol information, return previous pc */ + if (notcurrent) + pc++; + val.pc = pc; + return val; + } + + bv = BLOCKVECTOR (s); + + /* Look at all the symtabs that share this blockvector. + They all have the same apriori range, that we found was right; + but they have different line tables. */ + + for (; s && BLOCKVECTOR (s) == bv; s = s->next) + { + /* Find the best line in this symtab. */ + l = LINETABLE (s); + if (!l) + continue; + len = l->nitems; + if (len <= 0) + { + /* I think len can be zero if the symtab lacks line numbers + (e.g. gcc -g1). (Either that or the LINETABLE is NULL; + I'm not sure which, and maybe it depends on the symbol + reader). */ + continue; + } + + prev = NULL; + item = l->item; /* Get first line info */ + + /* Is this file's first line closer than the first lines of other files? + If so, record this file, and its first line, as best alternate. */ + if (item->pc > pc && (!alt || item->pc < alt->pc)) + { + alt = item; + alt_symtab = s; + } + + for (i = 0; i < len; i++, item++) + { + /* Leave prev pointing to the linetable entry for the last line + that started at or before PC. */ + if (item->pc > pc) + break; + + prev = item; + } + + /* At this point, prev points at the line whose start addr is <= pc, and + item points at the next line. If we ran off the end of the linetable + (pc >= start of the last line), then prev == item. If pc < start of + the first line, prev will not be set. */ + + /* Is this file's best line closer than the best in the other files? + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ + + if (prev && prev->line && (!best || prev->pc > best->pc)) + { + best = prev; + best_symtab = s; + + /* Discard BEST_END if it's before the PC of the current BEST. */ + if (best_end <= best->pc) + best_end = 0; + } + + /* If another line (denoted by ITEM) is in the linetable and its + PC is after BEST's PC, but before the current BEST_END, then + use ITEM's PC as the new best_end. */ + if (best && i < len && item->pc > best->pc + && (best_end == 0 || best_end > item->pc)) + best_end = item->pc; + } + + if (!best_symtab) + { + if (!alt_symtab) + { /* If we didn't find any line # info, just + return zeros. */ + val.pc = pc; + } + else + { + val.symtab = alt_symtab; + val.line = alt->line - 1; + + /* Don't return line 0, that means that we didn't find the line. */ + if (val.line == 0) + ++val.line; + + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + val.end = alt->pc; + } + } + else if (best->line == 0) + { + /* If our best fit is in a range of PC's for which no line + number info is available (line number is zero) then we didn't + find any valid line information. */ + val.pc = pc; + } + else + { + val.symtab = best_symtab; + val.line = best->line; + val.pc = best->pc; + if (best_end && (!alt || best_end < alt->pc)) + val.end = best_end; + else if (alt) + val.end = alt->pc; + else + val.end = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + } + val.section = section; + return val; +} + +/* Backward compatibility (no section) */ + +struct symtab_and_line +find_pc_line (CORE_ADDR pc, int notcurrent) +{ + asection *section; + + section = find_pc_overlay (pc); + if (pc_in_unmapped_range (pc, section)) + pc = overlay_mapped_address (pc, section); + return find_pc_sect_line (pc, section, notcurrent); +} + +/* Find line number LINE in any symtab whose name is the same as + SYMTAB. + + If found, return the symtab that contains the linetable in which it was + found, set *INDEX to the index in the linetable of the best entry + found, and set *EXACT_MATCH nonzero if the value returned is an + exact match. + + If not found, return NULL. */ + +struct symtab * +find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match) +{ + int exact; + + /* BEST_INDEX and BEST_LINETABLE identify the smallest linenumber > LINE + so far seen. */ + + int best_index; + struct linetable *best_linetable; + struct symtab *best_symtab; + + /* First try looking it up in the given symtab. */ + best_linetable = LINETABLE (symtab); + best_symtab = symtab; + best_index = find_line_common (best_linetable, line, &exact); + if (best_index < 0 || !exact) + { + /* Didn't find an exact match. So we better keep looking for + another symtab with the same name. In the case of xcoff, + multiple csects for one source file (produced by IBM's FORTRAN + compiler) produce multiple symtabs (this is unavoidable + assuming csects can be at arbitrary places in memory and that + the GLOBAL_BLOCK of a symtab has a begin and end address). */ + + /* BEST is the smallest linenumber > LINE so far seen, + or 0 if none has been seen so far. + BEST_INDEX and BEST_LINETABLE identify the item for it. */ + int best; + + struct objfile *objfile; + struct symtab *s; + + if (best_index >= 0) + best = best_linetable->item[best_index].line; + else + best = 0; + + ALL_SYMTABS (objfile, s) + { + struct linetable *l; + int ind; + + if (strcmp (symtab->filename, s->filename) != 0) + continue; + l = LINETABLE (s); + ind = find_line_common (l, line, &exact); + if (ind >= 0) + { + if (exact) + { + best_index = ind; + best_linetable = l; + best_symtab = s; + goto done; + } + if (best == 0 || l->item[ind].line < best) + { + best = l->item[ind].line; + best_index = ind; + best_linetable = l; + best_symtab = s; + } + } + } + } +done: + if (best_index < 0) + return NULL; + + if (index) + *index = best_index; + if (exact_match) + *exact_match = exact; + + return best_symtab; +} + +/* Set the PC value for a given source file and line number and return true. + Returns zero for invalid line number (and sets the PC to 0). + The source file is specified with a struct symtab. */ + +int +find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc) +{ + struct linetable *l; + int ind; + + *pc = 0; + if (symtab == 0) + return 0; + + symtab = find_line_symtab (symtab, line, &ind, NULL); + if (symtab != NULL) + { + l = LINETABLE (symtab); + *pc = l->item[ind].pc; + return 1; + } + else + return 0; +} + +/* Find the range of pc values in a line. + Store the starting pc of the line into *STARTPTR + and the ending pc (start of next line) into *ENDPTR. + Returns 1 to indicate success. + Returns 0 if could not find the specified line. */ + +int +find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, + CORE_ADDR *endptr) +{ + CORE_ADDR startaddr; + struct symtab_and_line found_sal; + + startaddr = sal.pc; + if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr)) + return 0; + + /* This whole function is based on address. For example, if line 10 has + two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then + "info line *0x123" should say the line goes from 0x100 to 0x200 + and "info line *0x355" should say the line goes from 0x300 to 0x400. + This also insures that we never give a range like "starts at 0x134 + and ends at 0x12c". */ + + found_sal = find_pc_sect_line (startaddr, sal.section, 0); + if (found_sal.line != sal.line) + { + /* The specified line (sal) has zero bytes. */ + *startptr = found_sal.pc; + *endptr = found_sal.pc; + } + else + { + *startptr = found_sal.pc; + *endptr = found_sal.end; + } + return 1; +} + +/* Given a line table and a line number, return the index into the line + table for the pc of the nearest line whose number is >= the specified one. + Return -1 if none is found. The value is >= 0 if it is an index. + + Set *EXACT_MATCH nonzero if the value returned is an exact match. */ + +static int +find_line_common (struct linetable *l, int lineno, + int *exact_match) +{ + int i; + int len; + + /* BEST is the smallest linenumber > LINENO so far seen, + or 0 if none has been seen so far. + BEST_INDEX identifies the item for it. */ + + int best_index = -1; + int best = 0; + + if (lineno <= 0) + return -1; + if (l == 0) + return -1; + + len = l->nitems; + for (i = 0; i < len; i++) + { + struct linetable_entry *item = &(l->item[i]); + + if (item->line == lineno) + { + /* Return the first (lowest address) entry which matches. */ + *exact_match = 1; + return i; + } + + if (item->line > lineno && (best == 0 || item->line < best)) + { + best = item->line; + best_index = i; + } + } + + /* If we got here, we didn't get an exact match. */ + + *exact_match = 0; + return best_index; +} + +int +find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr) +{ + struct symtab_and_line sal; + sal = find_pc_line (pc, 0); + *startptr = sal.pc; + *endptr = sal.end; + return sal.symtab != 0; +} + +/* Given a function symbol SYM, find the symtab and line for the start + of the function. + If the argument FUNFIRSTLINE is nonzero, we want the first line + of real code inside the function. */ + +struct symtab_and_line +find_function_start_sal (struct symbol *sym, int funfirstline) +{ + CORE_ADDR pc; + struct symtab_and_line sal; + + pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + fixup_symbol_section (sym, NULL); + if (funfirstline) + { /* skip "first line" of function (which is actually its prologue) */ + asection *section = SYMBOL_BFD_SECTION (sym); + /* If function is in an unmapped overlay, use its unmapped LMA + address, so that SKIP_PROLOGUE has something unique to work on */ + if (section_is_overlay (section) && + !section_is_mapped (section)) + pc = overlay_unmapped_address (pc, section); + + pc += FUNCTION_START_OFFSET; + pc = SKIP_PROLOGUE (pc); + + /* For overlays, map pc back into its mapped VMA range */ + pc = overlay_mapped_address (pc, section); + } + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + + /* Check if SKIP_PROLOGUE left us in mid-line, and the next + line is still part of the same function. */ + if (sal.pc != pc + && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end + && sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym))) + { + /* First pc of next line */ + pc = sal.end; + /* Recalculate the line number (might not be N+1). */ + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + } + sal.pc = pc; + + return sal; +} + +/* If P is of the form "operator[ \t]+..." where `...' is + some legitimate operator text, return a pointer to the + beginning of the substring of the operator text. + Otherwise, return "". */ +char * +operator_chars (char *p, char **end) +{ + *end = ""; + if (strncmp (p, "operator", 8)) + return *end; + p += 8; + + /* Don't get faked out by `operator' being part of a longer + identifier. */ + if (isalpha (*p) || *p == '_' || *p == '$' || *p == '\0') + return *end; + + /* Allow some whitespace between `operator' and the operator symbol. */ + while (*p == ' ' || *p == '\t') + p++; + + /* Recognize 'operator TYPENAME'. */ + + if (isalpha (*p) || *p == '_' || *p == '$') + { + char *q = p + 1; + while (isalnum (*q) || *q == '_' || *q == '$') + q++; + *end = q; + return p; + } + + while (*p) + switch (*p) + { + case '\\': /* regexp quoting */ + if (p[1] == '*') + { + if (p[2] == '=') /* 'operator\*=' */ + *end = p + 3; + else /* 'operator\*' */ + *end = p + 2; + return p; + } + else if (p[1] == '[') + { + if (p[2] == ']') + error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + else if (p[2] == '\\' && p[3] == ']') + { + *end = p + 4; /* 'operator\[\]' */ + return p; + } + else + error ("nothing is allowed between '[' and ']'"); + } + else + { + /* Gratuitous qoute: skip it and move on. */ + p++; + continue; + } + break; + case '!': + case '=': + case '*': + case '/': + case '%': + case '^': + if (p[1] == '=') + *end = p + 2; + else + *end = p + 1; + return p; + case '<': + case '>': + case '+': + case '-': + case '&': + case '|': + if (p[0] == '-' && p[1] == '>') + { + /* Struct pointer member operator 'operator->'. */ + if (p[2] == '*') + { + *end = p + 3; /* 'operator->*' */ + return p; + } + else if (p[2] == '\\') + { + *end = p + 4; /* Hopefully 'operator->\*' */ + return p; + } + else + { + *end = p + 2; /* 'operator->' */ + return p; + } + } + if (p[1] == '=' || p[1] == p[0]) + *end = p + 2; + else + *end = p + 1; + return p; + case '~': + case ',': + *end = p + 1; + return p; + case '(': + if (p[1] != ')') + error ("`operator ()' must be specified without whitespace in `()'"); + *end = p + 2; + return p; + case '?': + if (p[1] != ':') + error ("`operator ?:' must be specified without whitespace in `?:'"); + *end = p + 2; + return p; + case '[': + if (p[1] != ']') + error ("`operator []' must be specified without whitespace in `[]'"); + *end = p + 2; + return p; + default: + error ("`operator %s' not supported", p); + break; + } + + *end = ""; + return *end; +} + + +/* If FILE is not already in the table of files, return zero; + otherwise return non-zero. Optionally add FILE to the table if ADD + is non-zero. If *FIRST is non-zero, forget the old table + contents. */ +static int +filename_seen (const char *file, int add, int *first) +{ + /* Table of files seen so far. */ + static const char **tab = NULL; + /* Allocated size of tab in elements. + Start with one 256-byte block (when using GNU malloc.c). + 24 is the malloc overhead when range checking is in effect. */ + static int tab_alloc_size = (256 - 24) / sizeof (char *); + /* Current size of tab in elements. */ + static int tab_cur_size; + const char **p; + + if (*first) + { + if (tab == NULL) + tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab)); + tab_cur_size = 0; + } + + /* Is FILE in tab? */ + for (p = tab; p < tab + tab_cur_size; p++) + if (strcmp (*p, file) == 0) + return 1; + + /* No; maybe add it to tab. */ + if (add) + { + if (tab_cur_size == tab_alloc_size) + { + tab_alloc_size *= 2; + tab = (const char **) xrealloc ((char *) tab, + tab_alloc_size * sizeof (*tab)); + } + tab[tab_cur_size++] = file; + } + + return 0; +} + +/* Slave routine for sources_info. Force line breaks at ,'s. + NAME is the name to print and *FIRST is nonzero if this is the first + name printed. Set *FIRST to zero. */ +static void +output_source_filename (char *name, int *first) +{ + /* Since a single source file can result in several partial symbol + tables, we need to avoid printing it more than once. Note: if + some of the psymtabs are read in and some are not, it gets + printed both under "Source files for which symbols have been + read" and "Source files for which symbols will be read in on + demand". I consider this a reasonable way to deal with the + situation. I'm not sure whether this can also happen for + symtabs; it doesn't hurt to check. */ + + /* Was NAME already seen? */ + if (filename_seen (name, 1, first)) + { + /* Yes; don't print it again. */ + return; + } + /* No; print it and reset *FIRST. */ + if (*first) + { + *first = 0; + } + else + { + printf_filtered (", "); + } + + wrap_here (""); + fputs_filtered (name, gdb_stdout); +} + +static void +sources_info (char *ignore, int from_tty) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first; + + if (!have_full_symbols () && !have_partial_symbols ()) + { + error ("No symbol table is loaded. Use the \"file\" command."); + } + + printf_filtered ("Source files for which symbols have been read in:\n\n"); + + first = 1; + ALL_SYMTABS (objfile, s) + { + output_source_filename (s->filename, &first); + } + printf_filtered ("\n\n"); + + printf_filtered ("Source files for which symbols will be read in on demand:\n\n"); + + first = 1; + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin) + { + output_source_filename (ps->filename, &first); + } + } + printf_filtered ("\n"); +} + +static int +file_matches (char *file, char *files[], int nfiles) +{ + int i; + + if (file != NULL && nfiles != 0) + { + for (i = 0; i < nfiles; i++) + { + if (strcmp (files[i], lbasename (file)) == 0) + return 1; + } + } + else if (nfiles == 0) + return 1; + return 0; +} + +/* Free any memory associated with a search. */ +void +free_search_symbols (struct symbol_search *symbols) +{ + struct symbol_search *p; + struct symbol_search *next; + + for (p = symbols; p != NULL; p = next) + { + next = p->next; + xfree (p); + } +} + +static void +do_free_search_symbols_cleanup (void *symbols) +{ + free_search_symbols (symbols); +} + +struct cleanup * +make_cleanup_free_search_symbols (struct symbol_search *symbols) +{ + return make_cleanup (do_free_search_symbols_cleanup, symbols); +} + +/* Helper function for sort_search_symbols and qsort. Can only + sort symbols, not minimal symbols. */ +static int +compare_search_syms (const void *sa, const void *sb) +{ + struct symbol_search **sym_a = (struct symbol_search **) sa; + struct symbol_search **sym_b = (struct symbol_search **) sb; + + return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol), + SYMBOL_PRINT_NAME ((*sym_b)->symbol)); +} + +/* Sort the ``nfound'' symbols in the list after prevtail. Leave + prevtail where it is, but update its next pointer to point to + the first of the sorted symbols. */ +static struct symbol_search * +sort_search_symbols (struct symbol_search *prevtail, int nfound) +{ + struct symbol_search **symbols, *symp, *old_next; + int i; + + symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *) + * nfound); + symp = prevtail->next; + for (i = 0; i < nfound; i++) + { + symbols[i] = symp; + symp = symp->next; + } + /* Generally NULL. */ + old_next = symp; + + qsort (symbols, nfound, sizeof (struct symbol_search *), + compare_search_syms); + + symp = prevtail; + for (i = 0; i < nfound; i++) + { + symp->next = symbols[i]; + symp = symp->next; + } + symp->next = old_next; + + xfree (symbols); + return symp; +} + +/* Search the symbol table for matches to the regular expression REGEXP, + returning the results in *MATCHES. + + Only symbols of KIND are searched: + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, + and constants (enums) + + free_search_symbols should be called when *MATCHES is no longer needed. + + The results are sorted locally; each symtab's global and static blocks are + separately alphabetized. + */ +void +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], + struct symbol_search **matches) +{ + struct symtab *s; + struct partial_symtab *ps; + struct blockvector *bv; + struct blockvector *prev_bv = 0; + struct block *b; + int i = 0; + struct dict_iterator iter; + struct symbol *sym; + struct partial_symbol **psym; + struct objfile *objfile; + struct minimal_symbol *msymbol; + char *val; + int found_misc = 0; + static enum minimal_symbol_type types[] + = + {mst_data, mst_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types2[] + = + {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = + {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = + {mst_file_bss, mst_text, mst_abs, mst_unknown}; + enum minimal_symbol_type ourtype; + enum minimal_symbol_type ourtype2; + enum minimal_symbol_type ourtype3; + enum minimal_symbol_type ourtype4; + struct symbol_search *sr; + struct symbol_search *psr; + struct symbol_search *tail; + struct cleanup *old_chain = NULL; + + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); + + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; + + sr = *matches = NULL; + tail = NULL; + + if (regexp != NULL) + { + /* Make sure spacing is right for C++ operators. + This is just a courtesy to make the matching less sensitive + to how many spaces the user leaves between 'operator' + and or . */ + char *opend; + char *opname = operator_chars (regexp, &opend); + if (*opname) + { + int fix = -1; /* -1 means ok; otherwise number of spaces needed. */ + if (isalpha (*opname) || *opname == '_' || *opname == '$') + { + /* There should 1 space between 'operator' and 'TYPENAME'. */ + if (opname[-1] != ' ' || opname[-2] == ' ') + fix = 1; + } + else + { + /* There should 0 spaces between 'operator' and 'OPERATOR'. */ + if (opname[-1] == ' ') + fix = 0; + } + /* If wrong number of spaces, fix it. */ + if (fix >= 0) + { + char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); + sprintf (tmp, "operator%.*s%s", fix, " ", opname); + regexp = tmp; + } + } + + if (0 != (val = re_comp (regexp))) + error ("Invalid regexp (%s): %s", val, regexp); + } + + /* Search through the partial symtabs *first* for all symbols + matching the regexp. That way we don't have to reproduce all of + the machinery below. */ + + ALL_PSYMTABS (objfile, ps) + { + struct partial_symbol **bound, **gbound, **sbound; + int keep_going = 1; + + if (ps->readin) + continue; + + gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms; + sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms; + bound = gbound; + + /* Go through all of the symbols stored in a partial + symtab in one loop. */ + psym = objfile->global_psymbols.list + ps->globals_offset; + while (keep_going) + { + if (psym >= bound) + { + if (bound == gbound && ps->n_static_syms != 0) + { + psym = objfile->static_psymbols.list + ps->statics_offset; + bound = sbound; + } + else + keep_going = 0; + continue; + } + else + { + QUIT; + + /* If it would match (logic taken from loop below) + load the file and go on to the next one */ + if (file_matches (ps->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && SYMBOL_CLASS (*psym) != LOC_BLOCK) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + { + PSYMTAB_TO_SYMTAB (ps); + keep_going = 0; + } + } + psym++; + } + } + + /* Here, we search through the minimal symbol tables for functions + and variables that match, and force their symbols to be read. + This is in particular necessary for demangled variable names, + which are no longer put into the partial symbol tables. + The symbol will then be found during the scan of symtabs below. + + For functions, find_pc_symtab should succeed if we have debug info + for the function, for variables we have to call lookup_symbol + to determine if the variable has debug info. + If the lookup fails, set found_misc so that we will rescan to print + any matching symbols without debug info. + */ + + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) + { + /* FIXME: carlton/2003-02-04: Given that the + semantics of lookup_symbol keeps on changing + slightly, it would be a nice idea if we had a + function lookup_symbol_minsym that found the + symbol associated to a given minimal symbol (if + any). */ + if (kind == FUNCTIONS_DOMAIN + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, + VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + found_misc = 1; + } + } + } + } + } + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + /* Often many files share a blockvector. + Scan each blockvector only once so that + we don't get every symbol many times. + It happens that the first symtab in the list + for any given blockvector is the main file. */ + if (bv != prev_bv) + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) + { + struct symbol_search *prevtail = tail; + int nfound = 0; + b = BLOCKVECTOR_BLOCK (bv, i); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + if (file_matches (s->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && SYMBOL_CLASS (sym) != LOC_BLOCK + && SYMBOL_CLASS (sym) != LOC_CONST) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->symtab = s; + psr->symbol = sym; + psr->msymbol = NULL; + psr->next = NULL; + if (tail == NULL) + sr = psr; + else + tail->next = psr; + tail = psr; + nfound ++; + } + } + if (nfound > 0) + { + if (prevtail == NULL) + { + struct symbol_search dummy; + + dummy.next = sr; + tail = sort_search_symbols (&dummy, nfound); + sr = dummy.next; + + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail = sort_search_symbols (prevtail, nfound); + } + } + prev_bv = bv; + } + + /* If there are no eyes, avoid all contact. I mean, if there are + no debug symbols, then print directly from the msymbol_vector. */ + + if (found_misc || kind != FUNCTIONS_DOMAIN) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + /* Functions: Look up by address. */ + if (kind != FUNCTIONS_DOMAIN || + (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) + { + /* Variables/Absolutes: Look up by name */ + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->msymbol = msymbol; + psr->symtab = NULL; + psr->symbol = NULL; + psr->next = NULL; + if (tail == NULL) + { + sr = psr; + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail->next = psr; + tail = psr; + } + } + } + } + } + } + + *matches = sr; + if (sr != NULL) + discard_cleanups (old_chain); +} + +/* Helper function for symtab_symbol_info, this function uses + the data returned from search_symbols() to print information + regarding the match to gdb_stdout. + */ +static void +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, + int block, char *last) +{ + if (last == NULL || strcmp (last, s->filename) != 0) + { + fputs_filtered ("\nFile ", gdb_stdout); + fputs_filtered (s->filename, gdb_stdout); + fputs_filtered (":\n", gdb_stdout); + } + + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) + printf_filtered ("static "); + + /* Typedef that is not a C++ class */ + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) + typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); + /* variable, func, or typedef-that-is-c++-class */ + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) + { + type_print (SYMBOL_TYPE (sym), + (SYMBOL_CLASS (sym) == LOC_TYPEDEF + ? "" : SYMBOL_PRINT_NAME (sym)), + gdb_stdout, 0); + + printf_filtered (";\n"); + } +} + +/* This help function for symtab_symbol_info() prints information + for non-debugging symbols to gdb_stdout. + */ +static void +print_msymbol_info (struct minimal_symbol *msymbol) +{ + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_PRINT_NAME (msymbol)); +} + +/* This is the guts of the commands "info functions", "info types", and + "info variables". It calls search_symbols to find all matches and then + print_[m]symbol_info to print out some useful information about the + matches. + */ +static void +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) +{ + static char *classnames[] + = + {"variable", "function", "type", "method"}; + struct symbol_search *symbols; + struct symbol_search *p; + struct cleanup *old_chain; + char *last_filename = NULL; + int first = 1; + + /* must make sure that if we're interrupted, symbols gets freed */ + search_symbols (regexp, kind, 0, (char **) NULL, &symbols); + old_chain = make_cleanup_free_search_symbols (symbols); + + printf_filtered (regexp + ? "All %ss matching regular expression \"%s\":\n" + : "All defined %ss:\n", + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); + + for (p = symbols; p != NULL; p = p->next) + { + QUIT; + + if (p->msymbol != NULL) + { + if (first) + { + printf_filtered ("\nNon-debugging symbols:\n"); + first = 0; + } + print_msymbol_info (p->msymbol); + } + else + { + print_symbol_info (kind, + p->symtab, + p->symbol, + p->block, + last_filename); + last_filename = p->symtab->filename; + } + } + + do_cleanups (old_chain); +} + +static void +variables_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); +} + +static void +functions_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); +} + + +static void +types_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); +} + +/* Breakpoint all functions matching regular expression. */ + +void +rbreak_command_wrapper (char *regexp, int from_tty) +{ + rbreak_command (regexp, from_tty); +} + +static void +rbreak_command (char *regexp, int from_tty) +{ + struct symbol_search *ss; + struct symbol_search *p; + struct cleanup *old_chain; + + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); + old_chain = make_cleanup_free_search_symbols (ss); + + for (p = ss; p != NULL; p = p->next) + { + if (p->msymbol == NULL) + { + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); + strcpy (string, p->symtab->filename); + strcat (string, ":'"); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); + strcat (string, "'"); + break_command (string, from_tty); + print_symbol_info (FUNCTIONS_DOMAIN, + p->symtab, + p->symbol, + p->block, + p->symtab->filename); + } + else + { + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); + printf_filtered (" %s;\n", + SYMBOL_PRINT_NAME (p->msymbol)); + } + } + + do_cleanups (old_chain); +} + + +/* Helper routine for make_symbol_completion_list. */ + +static int return_val_size; +static int return_val_index; +static char **return_val; + +#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ + completion_list_add_name \ + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) + +/* Test to see if the symbol specified by SYMNAME (which is already + demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN + characters. If so, add it to the current completion list. */ + +static void +completion_list_add_name (char *symname, char *sym_text, int sym_text_len, + char *text, char *word) +{ + int newsize; + int i; + + /* clip symbols that cannot match */ + + if (strncmp (symname, sym_text, sym_text_len) != 0) + { + return; + } + + /* We have a match for a completion, so add SYMNAME to the current list + of matches. Note that the name is moved to freshly malloc'd space. */ + + { + char *new; + if (word == sym_text) + { + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname); + } + else if (word > sym_text) + { + /* Return some portion of symname. */ + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname + (word - sym_text)); + } + else + { + /* Return some of SYM_TEXT plus symname. */ + new = xmalloc (strlen (symname) + (sym_text - word) + 5); + strncpy (new, word, sym_text - word); + new[sym_text - word] = '\0'; + strcat (new, symname); + } + + if (return_val_index + 3 > return_val_size) + { + newsize = (return_val_size *= 2) * sizeof (char *); + return_val = (char **) xrealloc ((char *) return_val, newsize); + } + return_val[return_val_index++] = new; + return_val[return_val_index] = NULL; + } +} + +/* ObjC: In case we are completing on a selector, look as the msymbol + again and feed all the selectors into the mill. */ + +static void +completion_list_objc_symbol (struct minimal_symbol *msymbol, char *sym_text, + int sym_text_len, char *text, char *word) +{ + static char *tmp = NULL; + static unsigned int tmplen = 0; + + char *method, *category, *selector; + char *tmp2 = NULL; + + method = SYMBOL_NATURAL_NAME (msymbol); + + /* Is it a method? */ + if ((method[0] != '-') && (method[0] != '+')) + return; + + if (sym_text[0] == '[') + /* Complete on shortened method method. */ + completion_list_add_name (method + 1, sym_text, sym_text_len, text, word); + + while ((strlen (method) + 1) >= tmplen) + { + if (tmplen == 0) + tmplen = 1024; + else + tmplen *= 2; + tmp = xrealloc (tmp, tmplen); + } + selector = strchr (method, ' '); + if (selector != NULL) + selector++; + + category = strchr (method, '('); + + if ((category != NULL) && (selector != NULL)) + { + memcpy (tmp, method, (category - method)); + tmp[category - method] = ' '; + memcpy (tmp + (category - method) + 1, selector, strlen (selector) + 1); + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + if (sym_text[0] == '[') + completion_list_add_name (tmp + 1, sym_text, sym_text_len, text, word); + } + + if (selector != NULL) + { + /* Complete on selector only. */ + strcpy (tmp, selector); + tmp2 = strchr (tmp, ']'); + if (tmp2 != NULL) + *tmp2 = '\0'; + + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + } +} + +/* Break the non-quoted text based on the characters which are in + symbols. FIXME: This should probably be language-specific. */ + +static char * +language_search_unquoted_string (char *text, char *p) +{ + for (; p > text; --p) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + continue; + else + { + if ((current_language->la_language == language_objc)) + { + if (p[-1] == ':') /* might be part of a method name */ + continue; + else if (p[-1] == '[' && (p[-2] == '-' || p[-2] == '+')) + p -= 2; /* beginning of a method name */ + else if (p[-1] == ' ' || p[-1] == '(' || p[-1] == ')') + { /* might be part of a method name */ + char *t = p; + + /* Seeing a ' ' or a '(' is not conclusive evidence + that we are in the middle of a method name. However, + finding "-[" or "+[" should be pretty un-ambiguous. + Unfortunately we have to find it now to decide. */ + + while (t > text) + if (isalnum (t[-1]) || t[-1] == '_' || + t[-1] == ' ' || t[-1] == ':' || + t[-1] == '(' || t[-1] == ')') + --t; + else + break; + + if (t[-1] == '[' && (t[-2] == '-' || t[-2] == '+')) + p = t - 2; /* method name detected */ + /* else we leave with p unchanged */ + } + } + break; + } + } + return p; +} + + +/* Return a NULL terminated array of all symbols (regardless of class) + which begin by matching TEXT. If the answer is no symbols, then + the return value is an array which contains only a NULL pointer. + + Problem: All of the symbols have to be copied because readline frees them. + I'm not going to worry about this; hopefully there won't be that many. */ + +char ** +make_symbol_completion_list (char *text, char *word) +{ + struct symbol *sym; + struct symtab *s; + struct partial_symtab *ps; + struct minimal_symbol *msymbol; + struct objfile *objfile; + struct block *b, *surrounding_static_block = 0; + struct dict_iterator iter; + int j; + struct partial_symbol **psym; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* It is not a quoted string. Break it based on the characters + which are in symbols. */ + while (p > text) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + --p; + else + break; + } + sym_text = p; + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 100; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Look through the partial symtabs for all symbols which begin + by matching SYM_TEXT. Add each one that you find to the list. */ + + ALL_PSYMTABS (objfile, ps) + { + /* If the psymtab's been read in we'll get it when we search + through the blockvector. */ + if (ps->readin) + continue; + + for (psym = objfile->global_psymbols.list + ps->globals_offset; + psym < (objfile->global_psymbols.list + ps->globals_offset + + ps->n_global_syms); + psym++) + { + /* If interrupted, then quit. */ + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + + for (psym = objfile->static_psymbols.list + ps->statics_offset; + psym < (objfile->static_psymbols.list + ps->statics_offset + + ps->n_static_syms); + psym++) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + } + + /* At this point scan through the misc symbol vectors and add each + symbol you find to the list. Eventually we want to ignore + anything that isn't a text symbol (everything else will be + handled by the psymtab code above). */ + + ALL_MSYMBOLS (objfile, msymbol) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text, word); + + completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text, word); + } + + /* Search upwards from currently selected frame (so that we can + complete on local vars. */ + + for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b)) + { + if (!BLOCK_SUPERBLOCK (b)) + { + surrounding_static_block = b; /* For elmin of dups */ + } + + /* Also catch fields of types defined in this places which match our + text string. Only complete on types visible from current context. */ + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + { + struct type *t = SYMBOL_TYPE (sym); + enum type_code c = TYPE_CODE (t); + + if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT) + { + for (j = TYPE_N_BASECLASSES (t); j < TYPE_NFIELDS (t); j++) + { + if (TYPE_FIELD_NAME (t, j)) + { + completion_list_add_name (TYPE_FIELD_NAME (t, j), + sym_text, sym_text_len, text, word); + } + } + } + } + } + } + + /* Go through the symtabs and check the externs and statics for + symbols which match. */ + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + /* Don't do this block twice. */ + if (b == surrounding_static_block) + continue; + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + return (return_val); +} + +/* Like make_symbol_completion_list, but returns a list of symbols + defined in a source file FILE. */ + +char ** +make_file_symbol_completion_list (char *text, char *word, char *srcfile) +{ + struct symbol *sym; + struct symtab *s; + struct block *b; + struct dict_iterator iter; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* Not a quoted string. */ + sym_text = language_search_unquoted_string (text, p); + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 10; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Find the symtab for SRCFILE (this loads it if it was not yet read + in). */ + s = lookup_symtab (srcfile); + if (s == NULL) + { + /* Maybe they typed the file with leading directories, while the + symbol tables record only its basename. */ + const char *tail = lbasename (srcfile); + + if (tail > srcfile) + s = lookup_symtab (tail); + } + + /* If we have no symtab for that file, return an empty list. */ + if (s == NULL) + return (return_val); + + /* Go through this symtab and check the externs and statics for + symbols which match. */ + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + return (return_val); +} + +/* A helper function for make_source_files_completion_list. It adds + another file name to a list of possible completions, growing the + list as necessary. */ + +static void +add_filename_to_list (const char *fname, char *text, char *word, + char ***list, int *list_used, int *list_alloced) +{ + char *new; + size_t fnlen = strlen (fname); + + if (*list_used + 1 >= *list_alloced) + { + *list_alloced *= 2; + *list = (char **) xrealloc ((char *) *list, + *list_alloced * sizeof (char *)); + } + + if (word == text) + { + /* Return exactly fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname); + } + else if (word > text) + { + /* Return some portion of fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname + (word - text)); + } + else + { + /* Return some of TEXT plus fname. */ + new = xmalloc (fnlen + (text - word) + 5); + strncpy (new, word, text - word); + new[text - word] = '\0'; + strcat (new, fname); + } + (*list)[*list_used] = new; + (*list)[++*list_used] = NULL; +} + +static int +not_interesting_fname (const char *fname) +{ + static const char *illegal_aliens[] = { + "_globals_", /* inserted by coff_symtab_read */ + NULL + }; + int i; + + for (i = 0; illegal_aliens[i]; i++) + { + if (strcmp (fname, illegal_aliens[i]) == 0) + return 1; + } + return 0; +} + +/* Return a NULL terminated array of all source files whose names + begin with matching TEXT. The file names are looked up in the + symbol tables of this program. If the answer is no matchess, then + the return value is an array which contains only a NULL pointer. */ + +char ** +make_source_files_completion_list (char *text, char *word) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first = 1; + int list_alloced = 1; + int list_used = 0; + size_t text_len = strlen (text); + char **list = (char **) xmalloc (list_alloced * sizeof (char *)); + const char *base_name; + + list[0] = NULL; + + if (!have_full_symbols () && !have_partial_symbols ()) + return list; + + ALL_SYMTABS (objfile, s) + { + if (not_interesting_fname (s->filename)) + continue; + if (!filename_seen (s->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (s->filename, text, text_len) == 0 +#else + && strncmp (s->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the current + list of matches. */ + add_filename_to_list (s->filename, text, word, + &list, &list_used, &list_alloced); + } + else + { + /* NOTE: We allow the user to type a base name when the + debug info records leading directories, but not the other + way around. This is what subroutines of breakpoint + command do when they parse file names. */ + base_name = lbasename (s->filename); + if (base_name != s->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (not_interesting_fname (ps->filename)) + continue; + if (!ps->readin) + { + if (!filename_seen (ps->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (ps->filename, text, text_len) == 0 +#else + && strncmp (ps->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the + current list of matches. */ + add_filename_to_list (ps->filename, text, word, + &list, &list_used, &list_alloced); + + } + else + { + base_name = lbasename (ps->filename); + if (base_name != ps->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + } + + return list; +} + +/* Determine if PC is in the prologue of a function. The prologue is the area + between the first instruction of a function, and the first executable line. + Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue. + + If non-zero, func_start is where we think the prologue starts, possibly + by previous examination of symbol table information. + */ + +int +in_prologue (CORE_ADDR pc, CORE_ADDR func_start) +{ + struct symtab_and_line sal; + CORE_ADDR func_addr, func_end; + + /* We have several sources of information we can consult to figure + this out. + - Compilers usually emit line number info that marks the prologue + as its own "source line". So the ending address of that "line" + is the end of the prologue. If available, this is the most + reliable method. + - The minimal symbols and partial symbols, which can usually tell + us the starting and ending addresses of a function. + - If we know the function's start address, we can call the + architecture-defined SKIP_PROLOGUE function to analyze the + instruction stream and guess where the prologue ends. + - Our `func_start' argument; if non-zero, this is the caller's + best guess as to the function's entry point. At the time of + this writing, handle_inferior_event doesn't get this right, so + it should be our last resort. */ + + /* Consult the partial symbol table, to find which function + the PC is in. */ + if (! find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + CORE_ADDR prologue_end; + + /* We don't even have minsym information, so fall back to using + func_start, if given. */ + if (! func_start) + return 1; /* We *might* be in a prologue. */ + + prologue_end = SKIP_PROLOGUE (func_start); + + return func_start <= pc && pc < prologue_end; + } + + /* If we have line number information for the function, that's + usually pretty reliable. */ + sal = find_pc_line (func_addr, 0); + + /* Now sal describes the source line at the function's entry point, + which (by convention) is the prologue. The end of that "line", + sal.end, is the end of the prologue. + + Note that, for functions whose source code is all on a single + line, the line number information doesn't always end up this way. + So we must verify that our purported end-of-prologue address is + *within* the function, not at its start or end. */ + if (sal.line == 0 + || sal.end <= func_addr + || func_end <= sal.end) + { + /* We don't have any good line number info, so use the minsym + information, together with the architecture-specific prologue + scanning code. */ + CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr); + + return func_addr <= pc && pc < prologue_end; + } + + /* We have line number info, and it looks good. */ + return func_addr <= pc && pc < sal.end; +} + +/* Given PC at the function's start address, attempt to find the + prologue end using SAL information. Return zero if the skip fails. + + A non-optimized prologue traditionally has one SAL for the function + and a second for the function body. A single line function has + them both pointing at the same line. + + An optimized prologue is similar but the prologue may contain + instructions (SALs) from the instruction body. Need to skip those + while not getting into the function body. + + The functions end point and an increasing SAL line are used as + indicators of the prologue's endpoint. + + This code is based on the function refine_prologue_limit (versions + found in both ia64 and ppc). */ + +CORE_ADDR +skip_prologue_using_sal (CORE_ADDR func_addr) +{ + struct symtab_and_line prologue_sal; + CORE_ADDR start_pc; + CORE_ADDR end_pc; + + /* Get an initial range for the function. */ + find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc); + start_pc += FUNCTION_START_OFFSET; + + prologue_sal = find_pc_line (start_pc, 0); + if (prologue_sal.line != 0) + { + while (prologue_sal.end < end_pc) + { + struct symtab_and_line sal; + + sal = find_pc_line (prologue_sal.end, 0); + if (sal.line == 0) + break; + /* Assume that a consecutive SAL for the same (or larger) + line mark the prologue -> body transition. */ + if (sal.line >= prologue_sal.line) + break; + /* The case in which compiler's optimizer/scheduler has + moved instructions into the prologue. We look ahead in + the function looking for address ranges whose + corresponding line number is less the first one that we + found for the function. This is more conservative then + refine_prologue_limit which scans a large number of SALs + looking for any in the prologue */ + prologue_sal = sal; + } + } + return prologue_sal.end; +} + +struct symtabs_and_lines +decode_line_spec (char *string, int funfirstline) +{ + struct symtabs_and_lines sals; + struct symtab_and_line cursal; + + if (string == 0) + error ("Empty line specification."); + + /* We use whatever is set as the current source line. We do not try + and get a default or it will recursively call us! */ + cursal = get_current_source_symtab_and_line (); + + sals = decode_line_1 (&string, funfirstline, + cursal.symtab, cursal.line, + (char ***) NULL, NULL); + + if (*string) + error ("Junk at end of line specification: %s", string); + return sals; +} + +/* Track MAIN */ +static char *name_of_main; + +void +set_main_name (const char *name) +{ + if (name_of_main != NULL) + { + xfree (name_of_main); + name_of_main = NULL; + } + if (name != NULL) + { + name_of_main = xstrdup (name); + } +} + +char * +main_name (void) +{ + if (name_of_main != NULL) + return name_of_main; + else + return "main"; +} + + +void +_initialize_symtab (void) +{ + add_info ("variables", variables_info, + "All global and static variable names, or those matching REGEXP."); + if (dbx_commands) + add_com ("whereis", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + + add_info ("functions", functions_info, + "All function names, or those matching REGEXP."); + + + /* FIXME: This command has at least the following problems: + 1. It prints builtin types (in a very strange and confusing fashion). + 2. It doesn't print right, e.g. with + typedef struct foo *FOO + type_print prints "FOO" when we want to make it (in this situation) + print "struct foo *". + I also think "ptype" or "whatis" is more likely to be useful (but if + there is much disagreement "info types" can be fixed). */ + add_info ("types", types_info, + "All type names, or those matching REGEXP."); + + add_info ("sources", sources_info, + "Source files in the program."); + + add_com ("rbreak", class_breakpoint, rbreak_command, + "Set a breakpoint for all functions matching REGEXP."); + + if (xdb_commands) + { + add_com ("lf", class_info, sources_info, "Source files in the program"); + add_com ("lg", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + } + + /* Initialize the one built-in type that isn't language dependent... */ + builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0, + "", (struct objfile *) NULL); +} + +#ifdef CRASH_MERGE +#include "gdb-stabs.h" +#include "version.h" +#define GDB_COMMON +#include "../../defs.h" + +static void get_member_data(struct gnu_request *, struct type *); +static void dump_enum(struct type *, struct gnu_request *); +static void eval_enum(struct type *, struct gnu_request *); +static void gdb_get_line_number(struct gnu_request *); +static void gdb_get_datatype(struct gnu_request *); +static void gdb_get_symbol_type(struct gnu_request *); +static void gdb_command_exists(struct gnu_request *); +#ifdef NEEDS_NEW_FUNCTIONALITY +static void gdb_stack_trace(struct gnu_request *); +#endif +static void gdb_debug_command(struct gnu_request *); +static void gdb_function_numargs(struct gnu_request *); +static void gdb_add_symbol_file(struct gnu_request *); +static void gdb_delete_symbol_file(struct gnu_request *); +static void gdb_patch_symbol_values(struct gnu_request *); +extern void replace_ui_file_FILE(struct ui_file *, FILE *); +extern int get_frame_offset(CORE_ADDR); + +static struct objfile *gdb_kernel_objfile = { 0 }; + +static ulong gdb_merge_flags = 0; +#define KERNEL_SYMBOLS_PATCHED (0x1) + +#undef STREQ +#define STREQ(A, B) (A && B && (strcmp(A, B) == 0)) + +/* + * All commands from above come through here. + */ +void +gdb_command_funnel(struct gnu_request *req) +{ + struct symbol *sym; + + if (req->command != GNU_VERSION) { + replace_ui_file_FILE(gdb_stdout, req->fp); + replace_ui_file_FILE(gdb_stderr, req->fp); + do_cleanups((struct cleanup *)0); + } + + switch (req->command) + { + case GNU_VERSION: + req->buf = (char *)version; + break; + + case GNU_PASS_THROUGH: + execute_command(req->buf, + req->flags & GNU_FROM_TTY_OFF ? FALSE : TRUE); + break; + + case GNU_STACK_TRACE: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * The get_current_frame() function in frame.c no longer can + * be subject of a CRASH_MERGE in which passed-in fp and pc + * value were substituted for read_fp() and read_pc() calls. + * Now there's a new unwind_to_current_frame() function and + * a new frame_info structure that are used. + */ + gdb_stack_trace(req); +#endif + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_RESOLVE_TEXT_ADDR: + sym = find_pc_function(req->addr); + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_DISASSEMBLE: + if (req->addr2) + sprintf(req->buf, "disassemble 0x%lx 0x%lx", + req->addr, req->addr2); + else + sprintf(req->buf, "disassemble 0x%lx", req->addr); + execute_command(req->buf, TRUE); + break; + + case GNU_ADD_SYMBOL_FILE: + gdb_add_symbol_file(req); + break; + + case GNU_DELETE_SYMBOL_FILE: + gdb_delete_symbol_file(req); + break; + + case GNU_GET_LINE_NUMBER: + gdb_get_line_number(req); + break; + + case GNU_GET_DATATYPE: + gdb_get_datatype(req); + break; + + case GNU_GET_SYMBOL_TYPE: + gdb_get_symbol_type(req); + break; + + case GNU_COMMAND_EXISTS: + gdb_command_exists(req); + break; + + case GNU_ALPHA_FRAME_OFFSET: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * get_frame_offset() was a CRASH_MERGE function located in + * alpha-tdep.c; going from 5.3 to 6.1 made its direct port + * impossible because of dependencies that no longer exist. + * Also changed in alpha-tdep.c, alpha_frame_chain() and + * read_next_frame_reg() no longer exist, and both of those + * contained CRASH_MERGE pieces. Until somebody gives me + * a new port of a function to calculate the size of a function + * frame, it appears that alpha back-traces may be far more + * likely to fail. + */ + req->value = get_frame_offset(req->pc); +#endif + req->value = 0; + break; + + case GNU_FUNCTION_NUMARGS: + gdb_function_numargs(req); + break; + + case GNU_DEBUG_COMMAND: + gdb_debug_command(req); + break; + + case GNU_PATCH_SYMBOL_VALUES: + gdb_patch_symbol_values(req); + break; + + default: + req->flags |= GNU_COMMAND_FAILED; + break; + } +} + +/* + * Given a PC value, return the file and line number. + */ +static void +gdb_get_line_number(struct gnu_request *req) +{ + struct symtab_and_line sal; + CORE_ADDR pc; + +#define LASTCHAR(s) (s[strlen(s)-1]) + + pc = req->addr; + + sal = find_pc_line(pc, 0); + + if (!sal.symtab) { + req->buf[0] = '\0'; + return; + } + + if (sal.symtab->filename && sal.symtab->dirname) { + if (sal.symtab->filename[0] == '/') + sprintf(req->buf, "%s: %d", + sal.symtab->filename, sal.line); + else + sprintf(req->buf, "%s%s%s: %d", + sal.symtab->dirname, + LASTCHAR(sal.symtab->dirname) == '/' ? "" : "/", sal.symtab->filename, sal.line); + } +} + + +/* + * General purpose routine for determining datatypes. + */ + +static void +gdb_get_datatype(struct gnu_request *req) +{ + register struct cleanup *old_chain = NULL; + register struct type *type; + register struct type *typedef_type; + struct expression *expr; + struct symbol *sym; + register int i; + struct field *nextfield; + struct value *val; + + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (a)\n", req->name); + + req->typecode = TYPE_CODE_UNDEF; + + /* + * lookup_symbol() will pick up struct and union names. + */ + sym = lookup_symbol(req->name, 0, STRUCT_DOMAIN, 0, + (struct symtab **) NULL); + if (sym) { + req->typecode = TYPE_CODE(sym->type); + req->length = TYPE_LENGTH(sym->type); + if (req->member) + get_member_data(req, sym->type); + + if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) { + if (req->flags & GNU_PRINT_ENUMERATORS) + dump_enum(sym->type, req); + } + + return; + } + + /* + * Otherwise parse the expression. + */ + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (b)\n", req->name); + + expr = parse_expression(req->name); + + old_chain = make_cleanup(free_current_contents, &expr); + + + switch (expr->elts[0].opcode) + { + case OP_VAR_VALUE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_VAR_VALUE\n"); + type = expr->elts[2].symbol->type; + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + req->typecode = TYPE_CODE(type); + req->value = SYMBOL_VALUE(expr->elts[2].symbol); + req->tagname = TYPE_TAG_NAME(type); + if (!req->tagname) { + val = evaluate_type(expr); + eval_enum(VALUE_TYPE(val), req); + } + } + break; + + case OP_TYPE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_TYPE\n"); + type = expr->elts[1].type; + + req->typecode = TYPE_CODE(type); + req->length = TYPE_LENGTH(type); + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + req->is_typedef = TYPE_CODE_TYPEDEF; + if ((typedef_type = check_typedef(type))) { + req->typecode = TYPE_CODE(typedef_type); + req->length = TYPE_LENGTH(typedef_type); + type = typedef_type; + } + } + + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + if (req->is_typedef) + if (req->flags & GNU_PRINT_ENUMERATORS) { + if (req->is_typedef) + fprintf_filtered(gdb_stdout, + "typedef "); + dump_enum(type, req); + } + } + + if (req->member) + get_member_data(req, type); + + break; + + default: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: %d (?)\n", + expr->elts[0].opcode); + break; + + } + + do_cleanups(old_chain); +} + +/* + * More robust enum list dump that gdb's, showing the value of each + * identifier, each on its own line. + */ +static void +dump_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, + "enum %s {\n", TYPE_TAG_NAME (type)); + else + fprintf_filtered(gdb_stdout, "enum {\n"); + + for (i = 0; i < len; i++) { + fprintf_filtered(gdb_stdout, " %s", + TYPE_FIELD_NAME (type, i)); + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + fprintf_filtered (gdb_stdout, " = %d", + TYPE_FIELD_BITPOS (type, i)); + lastval = TYPE_FIELD_BITPOS (type, i); + } else + fprintf_filtered(gdb_stdout, " = %d", lastval); + fprintf_filtered(gdb_stdout, "\n"); + lastval++; + } + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, "};\n"); + else + fprintf_filtered(gdb_stdout, "} %s;\n", req->name); +} + +/* + * Given an enum type with no tagname, determine its value. + */ +static void +eval_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + + for (i = 0; i < len; i++) { + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + lastval = TYPE_FIELD_BITPOS (type, i); + } + if (STREQ(TYPE_FIELD_NAME(type, i), req->name)) { + req->tagname = "(unknown)"; + req->value = lastval; + return; + } + lastval++; + } +} + +/* + * Walk through a struct type's list of fields looking for the desired + * member field, and when found, return its relevant data. + */ +static void +get_member_data(struct gnu_request *req, struct type *type) +{ + register short i; + struct field *nextfield; + short nfields; + struct type *typedef_type; + + req->member_offset = -1; + +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(type)->nfields; + nextfield = TYPE_MAIN_TYPE(type)->fields; +#else + nfields = type->nfields; + nextfield = type->fields; +#endif + + if (nfields == 0) { + struct type *newtype; + newtype = lookup_transparent_type(req->name); + if (newtype) { + console("get_member_data(%s.%s): switching type from %lx to %lx\n", + req->name, req->member, type, newtype); +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(newtype)->nfields; + nextfield = TYPE_MAIN_TYPE(newtype)->fields; +#else + nfields = newtype->nfields; + nextfield = newtype->fields; +#endif + } + } + + for (i = 0; i < nfields; i++) { + if (STREQ(req->member, nextfield->name)) { + req->member_offset = nextfield->loc.bitpos; + req->member_length = TYPE_LENGTH(nextfield->type); + req->member_typecode = TYPE_CODE(nextfield->type); + if ((req->member_typecode == TYPE_CODE_TYPEDEF) && + (typedef_type = check_typedef(nextfield->type))) + req->member_length = TYPE_LENGTH(typedef_type); + return; + } + nextfield++; + } +} + +#ifdef NEEDS_NEW_FUNCTIONALITY +/* + * Kick off a gdb stack trace, keeping copies of the starting frame and pc. + */ + +CORE_ADDR gdb_starting_pc; +CORE_ADDR gdb_starting_fp; + +static void +gdb_stack_trace(struct gnu_request *req) +{ + target_has_stack = TRUE; + target_has_registers = TRUE; + stop_soon_quietly = TRUE; + gdb_starting_pc = req->pc; + gdb_starting_fp = req->sp; + sprintf(req->buf, "backtrace"); + execute_command(req->buf, TRUE); +} +#endif + +/* + * Check whether a command exists. If it doesn't, the command will be + * returned indirectly via the error_hook. + */ +static void +gdb_command_exists(struct gnu_request *req) +{ + extern struct cmd_list_element *cmdlist; + register struct cmd_list_element *c; + + req->value = FALSE; + c = lookup_cmd(&req->name, cmdlist, "", 0, 1); + req->value = TRUE; +} + +static void +gdb_function_numargs(struct gnu_request *req) +{ + struct symbol *sym; + + sym = find_pc_function(req->pc); + + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) { + req->flags |= GNU_COMMAND_FAILED; + return; + } + + req->value = (ulong)TYPE_NFIELDS(sym->type); +} + +struct load_module *gdb_current_load_module = NULL; + +static void +gdb_add_symbol_file(struct gnu_request *req) +{ + register struct objfile *loaded_objfile = NULL; + register struct objfile *objfile; + register struct minimal_symbol *m; + struct load_module *lm; + struct syment *sp; + struct syment *spx; + int external, subsequent, found; + off_t offset; + ulong value, adjusted; + struct symbol *sym; + struct expression *expr; + struct cleanup *old_chain; + int i; + int allsect = 0; + char *secname; + char buf[80]; + + gdb_current_load_module = lm = (struct load_module *)req->addr; + + req->name = lm->mod_namelist; + gdb_delete_symbol_file(req); + + for (i = 0 ; i < lm->mod_sections; i++) { + if (STREQ(lm->mod_section_data[i].name, ".text") && + (lm->mod_section_data[i].flags & SEC_FOUND)) + allsect = 1; + } + + if (!allsect) { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start ? lm->mod_text_start : lm->mod_base); + if (lm->mod_data_start) { + sprintf(buf, " -s .data 0x%lx", lm->mod_data_start); + strcat(req->buf, buf); + } + if (lm->mod_bss_start) { + sprintf(buf, " -s .bss 0x%lx", lm->mod_bss_start); + strcat(req->buf, buf); + } + if (lm->mod_rodata_start) { + sprintf(buf, " -s .rodata 0x%lx", lm->mod_rodata_start); + strcat(req->buf, buf); + } + } else { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start); + for (i = 0; i < lm->mod_sections; i++) { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + strcat(req->buf, buf); + } + } + } + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, "gdb_add_symbol_file: %s\n", req->buf); + } + + execute_command(req->buf, FALSE); + + ALL_OBJFILES(objfile) { + if (same_file(objfile->name, lm->mod_namelist)) { + loaded_objfile = objfile; + break; + } + } + + if (!loaded_objfile) + req->flags |= GNU_COMMAND_FAILED; +} + +void +patch_load_module(struct objfile *objfile, struct minimal_symbol *msymbol) +{ + register int i; + struct syment *sp, *spx; + struct load_module *lm; + struct mod_section_data *msd; + struct section_offsets *section_offsets; + ulong start; + char *name; + int external; + struct obj_section *s; + extern void print_gdb_version (struct ui_file *); + + if (!gdb_kernel_objfile) { + gdb_kernel_objfile = objfile; + return; + } + + if (!(lm = gdb_current_load_module) || + (msymbol && !IN_MODULE(SYMBOL_VALUE_ADDRESS(msymbol), lm))) + return; + + if (msymbol) { + for (sp = lm->mod_load_symtable; + sp < lm->mod_load_symend; sp++) { + + if ((sp->value < lm->mod_data_start) || + !STREQ(sp->name, msymbol->ginfo.name)) + continue; + + for (external = FALSE, + spx = lm->mod_ext_symtable; + spx < lm->mod_ext_symend; + spx++) { + if (STREQ(sp->name, spx->name)) { + external = TRUE; + break; + } + } + if (external) + continue; + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, + "patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), + sp->value); + } + + console("patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), sp->value); + + SYMBOL_VALUE_ADDRESS(msymbol) = sp->value; + + break; + } + return; + } + + for (s = objfile->sections; s < objfile->sections_end; ++s) { + name = (char *)s->the_bfd_section->name; + + for (i = 0; i < lm->mod_sections; i++) { + msd = &lm->mod_section_data[i]; + if (STREQ(msd->name, name)) { + s->addr = lm->mod_base + msd->offset; + s->endaddr = s->addr + msd->size; + } + } + } + + section_offsets = objfile->section_offsets; + + if (objfile->sect_index_text != -1) + section_offsets->offsets[SECT_OFF_TEXT(objfile)] = + lm->mod_text_start; + + if (objfile->sect_index_data != -1) + section_offsets->offsets[SECT_OFF_DATA(objfile)] = + lm->mod_data_start; + + if (objfile->sect_index_bss != -1) + section_offsets->offsets[SECT_OFF_BSS(objfile)] = + lm->mod_bss_start; + + if (objfile->sect_index_rodata != -1) + section_offsets->offsets[SECT_OFF_RODATA(objfile)] = + lm->mod_rodata_start; + +#ifdef DEPRECATED_SECT_OFF_MAX + if (gdb_CRASHDEBUG(1)) { + for (i = 0; i < SECT_OFF_MAX; i++) { + if (ANOFFSET(objfile->section_offsets, i)) { + fprintf_filtered(gdb_stdout, + "section_offsets[%d]: %lx\n", i, + ANOFFSET(objfile->section_offsets, i)); + } + } + } +#endif +} + +static void +gdb_delete_symbol_file(struct gnu_request *req) +{ + register struct objfile *objfile; + + ALL_OBJFILES(objfile) { + if (STREQ(objfile->name, req->name)) { + free_objfile(objfile); + break; + } + } + + if (gdb_CRASHDEBUG(1)) + ALL_OBJFILES(objfile) + fprintf_filtered(gdb_stdout, "%s\n", objfile->name); +} + +/* + * Walk through all minimal_symbols, patching their values with the + * correct addresses. + */ +static void +gdb_patch_symbol_values(struct gnu_request *req) +{ + struct minimal_symbol *msymbol; + struct objfile *objfile; + + req->name = PATCH_KERNEL_SYMBOLS_START; + patch_kernel_symbol(req); + + ALL_MSYMBOLS (objfile, msymbol) + { + req->name = msymbol->ginfo.name; + req->addr = (ulong)(&SYMBOL_VALUE_ADDRESS(msymbol)); + if (!patch_kernel_symbol(req)) { + req->flags |= GNU_COMMAND_FAILED; + break; + } + } + + req->name = PATCH_KERNEL_SYMBOLS_STOP; + patch_kernel_symbol(req); + + clear_symtab_users(); + gdb_merge_flags |= KERNEL_SYMBOLS_PATCHED; +} + +static void +gdb_get_symbol_type(struct gnu_request *req) +{ + struct expression *expr; + struct value *val; + struct cleanup *old_chain = NULL; + struct type *type; + struct type *target_type; + + req->typecode = TYPE_CODE_UNDEF; + + expr = parse_expression (req->name); + old_chain = make_cleanup (free_current_contents, &expr); + val = evaluate_type (expr); + + type = VALUE_TYPE(val); + +#ifdef TYPE_MAIN_TYPE + req->typename = TYPE_MAIN_TYPE(type)->name; + req->typecode = TYPE_MAIN_TYPE(type)->code; + req->length = type->length; + target_type = TYPE_MAIN_TYPE(type)->target_type; +#else + req->typename = type->name; + req->typecode = type->code; + req->length = type->length; + target_type = type->target_type; +#endif + + if (target_type) { +#ifdef TYPE_MAIN_TYPE + req->target_typename = TYPE_MAIN_TYPE(target_type)->name; + req->target_typecode = TYPE_MAIN_TYPE(target_type)->code; + req->target_length = target_type->length; +#else + req->target_typename = target_type->name; + req->target_typecode = target_type->code; + req->target_length = target_type->length; +#endif + } + + if (req->member) + get_member_data(req, type); + + do_cleanups (old_chain); +} + +static void +gdb_debug_command(struct gnu_request *req) +{ + +} + +/* + * Only necessary on "patched" kernel symbol sessions, and called only by + * lookup_symbol(), pull a symbol value bait-and-switch operation by altering + * either a data symbol's address value or a text symbol's block start address. + */ +static void +gdb_bait_and_switch(char *name, struct symbol *sym) +{ + struct minimal_symbol *msym; + struct block *block; + + if ((gdb_merge_flags & KERNEL_SYMBOLS_PATCHED) && + (msym = lookup_minimal_symbol(name, NULL, gdb_kernel_objfile))) { + if (sym->aclass == LOC_BLOCK) { + block = (struct block *)SYMBOL_BLOCK_VALUE(sym); + BLOCK_START(block) = SYMBOL_VALUE_ADDRESS(msym); + } else + SYMBOL_VALUE_ADDRESS(sym) = SYMBOL_VALUE_ADDRESS(msym); + } +} + +#endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/target.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/target.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/target.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/target.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2458 @@ +/* Select target systems and architectures at runtime for GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include +#include "gdb_string.h" +#include "target.h" +#include "gdbcmd.h" +#include "symtab.h" +#include "inferior.h" +#include "bfd.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdb_wait.h" +#include "dcache.h" +#include +#include "regcache.h" +#include "gdb_assert.h" +#include "gdbcore.h" + +static void target_info (char *, int); + +static void maybe_kill_then_create_inferior (char *, char *, char **); + +static void maybe_kill_then_attach (char *, int); + +static void kill_or_be_killed (int); + +static void default_terminal_info (char *, int); + +static int default_region_size_ok_for_hw_watchpoint (int); + +static int nosymbol (char *, CORE_ADDR *); + +static void tcomplain (void); + +static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *); + +static int return_zero (void); + +static int return_one (void); + +static int return_minus_one (void); + +void target_ignore (void); + +static void target_command (char *, int); + +static struct target_ops *find_default_run_target (char *); + +static void nosupport_runtime (void); + +static LONGEST default_xfer_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, + ULONGEST offset, LONGEST len); + +/* Transfer LEN bytes between target address MEMADDR and GDB address + MYADDR. Returns 0 for success, errno code for failure (which + includes partial transfers -- if you want a more useful response to + partial transfers, try either target_read_memory_partial or + target_write_memory_partial). */ + +static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write); + +static void init_dummy_target (void); + +static void debug_to_open (char *, int); + +static void debug_to_close (int); + +static void debug_to_attach (char *, int); + +static void debug_to_detach (char *, int); + +static void debug_to_disconnect (char *, int); + +static void debug_to_resume (ptid_t, int, enum target_signal); + +static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *); + +static void debug_to_fetch_registers (int); + +static void debug_to_store_registers (int); + +static void debug_to_prepare_to_store (void); + +static int debug_to_xfer_memory (CORE_ADDR, char *, int, int, + struct mem_attrib *, struct target_ops *); + +static void debug_to_files_info (struct target_ops *); + +static int debug_to_insert_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_breakpoint (CORE_ADDR, char *); + +static int debug_to_can_use_hw_breakpoint (int, int, int); + +static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_insert_watchpoint (CORE_ADDR, int, int); + +static int debug_to_remove_watchpoint (CORE_ADDR, int, int); + +static int debug_to_stopped_by_watchpoint (void); + +static CORE_ADDR debug_to_stopped_data_address (void); + +static int debug_to_region_size_ok_for_hw_watchpoint (int); + +static void debug_to_terminal_init (void); + +static void debug_to_terminal_inferior (void); + +static void debug_to_terminal_ours_for_output (void); + +static void debug_to_terminal_save_ours (void); + +static void debug_to_terminal_ours (void); + +static void debug_to_terminal_info (char *, int); + +static void debug_to_kill (void); + +static void debug_to_load (char *, int); + +static int debug_to_lookup_symbol (char *, CORE_ADDR *); + +static void debug_to_create_inferior (char *, char *, char **); + +static void debug_to_mourn_inferior (void); + +static int debug_to_can_run (void); + +static void debug_to_notice_signals (ptid_t); + +static int debug_to_thread_alive (ptid_t); + +static void debug_to_stop (void); + +/* Pointer to array of target architecture structures; the size of the + array; the current index into the array; the allocated size of the + array. */ +struct target_ops **target_structs; +unsigned target_struct_size; +unsigned target_struct_index; +unsigned target_struct_allocsize; +#define DEFAULT_ALLOCSIZE 10 + +/* The initial current target, so that there is always a semi-valid + current target. */ + +static struct target_ops dummy_target; + +/* Top of target stack. */ + +static struct target_ops *target_stack; + +/* The target structure we are currently using to talk to a process + or file or whatever "inferior" we have. */ + +struct target_ops current_target; + +/* Command list for target. */ + +static struct cmd_list_element *targetlist = NULL; + +/* Nonzero if we are debugging an attached outside process + rather than an inferior. */ + +int attach_flag; + +/* Non-zero if we want to see trace of target level stuff. */ + +static int targetdebug = 0; + +static void setup_target_debug (void); + +DCACHE *target_dcache; + +/* The user just typed 'target' without the name of a target. */ + +static void +target_command (char *arg, int from_tty) +{ + fputs_filtered ("Argument required (target name). Try `help target'\n", + gdb_stdout); +} + +/* Add a possible target architecture to the list. */ + +void +add_target (struct target_ops *t) +{ + /* Provide default values for all "must have" methods. */ + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; + + if (!target_structs) + { + target_struct_allocsize = DEFAULT_ALLOCSIZE; + target_structs = (struct target_ops **) xmalloc + (target_struct_allocsize * sizeof (*target_structs)); + } + if (target_struct_size >= target_struct_allocsize) + { + target_struct_allocsize *= 2; + target_structs = (struct target_ops **) + xrealloc ((char *) target_structs, + target_struct_allocsize * sizeof (*target_structs)); + } + target_structs[target_struct_size++] = t; + + if (targetlist == NULL) + add_prefix_cmd ("target", class_run, target_command, + "Connect to a target machine or process.\n\ +The first argument is the type or protocol of the target machine.\n\ +Remaining arguments are interpreted by the target protocol. For more\n\ +information on the arguments for a particular protocol, type\n\ +`help target ' followed by the protocol name.", + &targetlist, "target ", 0, &cmdlist); + add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); +} + +/* Stub functions */ + +void +target_ignore (void) +{ +} + +void +target_load (char *arg, int from_tty) +{ + dcache_invalidate (target_dcache); + (*current_target.to_load) (arg, from_tty); +} + +static int +nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *t) +{ + errno = EIO; /* Can't read/write this location */ + return 0; /* No bytes handled */ +} + +static void +tcomplain (void) +{ + error ("You can't do that when your target is `%s'", + current_target.to_shortname); +} + +void +noprocess (void) +{ + error ("You can't do that without a process to debug."); +} + +static int +nosymbol (char *name, CORE_ADDR *addrp) +{ + return 1; /* Symbol does not exist in target env */ +} + +static void +nosupport_runtime (void) +{ + if (ptid_equal (inferior_ptid, null_ptid)) + noprocess (); + else + error ("No run-time support for this"); +} + + +static void +default_terminal_info (char *args, int from_tty) +{ + printf_unfiltered ("No saved terminal information.\n"); +} + +/* This is the default target_create_inferior and target_attach function. + If the current target is executing, it asks whether to kill it off. + If this function returns without calling error(), it has killed off + the target, and the operation should be attempted. */ + +static void +kill_or_be_killed (int from_tty) +{ + if (target_has_execution) + { + printf_unfiltered ("You are already running a program:\n"); + target_files_info (); + if (query ("Kill it? ")) + { + target_kill (); + if (target_has_execution) + error ("Killing the program did not help."); + return; + } + else + { + error ("Program not killed."); + } + } + tcomplain (); +} + +static void +maybe_kill_then_attach (char *args, int from_tty) +{ + kill_or_be_killed (from_tty); + target_attach (args, from_tty); +} + +static void +maybe_kill_then_create_inferior (char *exec, char *args, char **env) +{ + kill_or_be_killed (0); + target_create_inferior (exec, args, env); +} + +/* Go through the target stack from top to bottom, copying over zero + entries in current_target, then filling in still empty entries. In + effect, we are doing class inheritance through the pushed target + vectors. + + NOTE: cagney/2003-10-17: The problem with this inheritance, as it + is currently implemented, is that it discards any knowledge of + which target an inherited method originally belonged to. + Consequently, new new target methods should instead explicitly and + locally search the target stack for the target that can handle the + request. */ + +static void +update_current_target (void) +{ + struct target_ops *t; + + /* First, reset curren'ts contents. */ + memset (¤t_target, 0, sizeof (current_target)); + +#define INHERIT(FIELD, TARGET) \ + if (!current_target.FIELD) \ + current_target.FIELD = (TARGET)->FIELD + + for (t = target_stack; t; t = t->beneath) + { + INHERIT (to_shortname, t); + INHERIT (to_longname, t); + INHERIT (to_doc, t); + INHERIT (to_open, t); + INHERIT (to_close, t); + INHERIT (to_attach, t); + INHERIT (to_post_attach, t); + INHERIT (to_detach, t); + INHERIT (to_disconnect, t); + INHERIT (to_resume, t); + INHERIT (to_wait, t); + INHERIT (to_post_wait, t); + INHERIT (to_fetch_registers, t); + INHERIT (to_store_registers, t); + INHERIT (to_prepare_to_store, t); + INHERIT (to_xfer_memory, t); + INHERIT (to_files_info, t); + INHERIT (to_insert_breakpoint, t); + INHERIT (to_remove_breakpoint, t); + INHERIT (to_can_use_hw_breakpoint, t); + INHERIT (to_insert_hw_breakpoint, t); + INHERIT (to_remove_hw_breakpoint, t); + INHERIT (to_insert_watchpoint, t); + INHERIT (to_remove_watchpoint, t); + INHERIT (to_stopped_data_address, t); + INHERIT (to_stopped_by_watchpoint, t); + INHERIT (to_have_continuable_watchpoint, t); + INHERIT (to_region_size_ok_for_hw_watchpoint, t); + INHERIT (to_terminal_init, t); + INHERIT (to_terminal_inferior, t); + INHERIT (to_terminal_ours_for_output, t); + INHERIT (to_terminal_ours, t); + INHERIT (to_terminal_save_ours, t); + INHERIT (to_terminal_info, t); + INHERIT (to_kill, t); + INHERIT (to_load, t); + INHERIT (to_lookup_symbol, t); + INHERIT (to_create_inferior, t); + INHERIT (to_post_startup_inferior, t); + INHERIT (to_acknowledge_created_inferior, t); + INHERIT (to_insert_fork_catchpoint, t); + INHERIT (to_remove_fork_catchpoint, t); + INHERIT (to_insert_vfork_catchpoint, t); + INHERIT (to_remove_vfork_catchpoint, t); + INHERIT (to_follow_fork, t); + INHERIT (to_insert_exec_catchpoint, t); + INHERIT (to_remove_exec_catchpoint, t); + INHERIT (to_reported_exec_events_per_exec_call, t); + INHERIT (to_has_exited, t); + INHERIT (to_mourn_inferior, t); + INHERIT (to_can_run, t); + INHERIT (to_notice_signals, t); + INHERIT (to_thread_alive, t); + INHERIT (to_find_new_threads, t); + INHERIT (to_pid_to_str, t); + INHERIT (to_extra_thread_info, t); + INHERIT (to_stop, t); + /* Do not inherit to_xfer_partial. */ + INHERIT (to_rcmd, t); + INHERIT (to_enable_exception_callback, t); + INHERIT (to_get_current_exception_event, t); + INHERIT (to_pid_to_exec_file, t); + INHERIT (to_stratum, t); + INHERIT (to_has_all_memory, t); + INHERIT (to_has_memory, t); + INHERIT (to_has_stack, t); + INHERIT (to_has_registers, t); + INHERIT (to_has_execution, t); + INHERIT (to_has_thread_control, t); + INHERIT (to_sections, t); + INHERIT (to_sections_end, t); + INHERIT (to_can_async_p, t); + INHERIT (to_is_async_p, t); + INHERIT (to_async, t); + INHERIT (to_async_mask_value, t); + INHERIT (to_find_memory_regions, t); + INHERIT (to_make_corefile_notes, t); + INHERIT (to_get_thread_local_address, t); + INHERIT (to_magic, t); + } +#undef INHERIT + + /* Clean up a target struct so it no longer has any zero pointers in + it. Some entries are defaulted to a method that print an error, + others are hard-wired to a standard recursive default. */ + +#define de_fault(field, value) \ + if (!current_target.field) \ + current_target.field = value + + de_fault (to_open, + (void (*) (char *, int)) + tcomplain); + de_fault (to_close, + (void (*) (int)) + target_ignore); + de_fault (to_attach, + maybe_kill_then_attach); + de_fault (to_post_attach, + (void (*) (int)) + target_ignore); + de_fault (to_detach, + (void (*) (char *, int)) + target_ignore); + de_fault (to_disconnect, + (void (*) (char *, int)) + tcomplain); + de_fault (to_resume, + (void (*) (ptid_t, int, enum target_signal)) + noprocess); + de_fault (to_wait, + (ptid_t (*) (ptid_t, struct target_waitstatus *)) + noprocess); + de_fault (to_post_wait, + (void (*) (ptid_t, int)) + target_ignore); + de_fault (to_fetch_registers, + (void (*) (int)) + target_ignore); + de_fault (to_store_registers, + (void (*) (int)) + noprocess); + de_fault (to_prepare_to_store, + (void (*) (void)) + noprocess); + de_fault (to_xfer_memory, + (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) + nomemory); + de_fault (to_files_info, + (void (*) (struct target_ops *)) + target_ignore); + de_fault (to_insert_breakpoint, + memory_insert_breakpoint); + de_fault (to_remove_breakpoint, + memory_remove_breakpoint); + de_fault (to_can_use_hw_breakpoint, + (int (*) (int, int, int)) + return_zero); + de_fault (to_insert_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_remove_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_insert_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_remove_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_stopped_by_watchpoint, + (int (*) (void)) + return_zero); + de_fault (to_stopped_data_address, + (CORE_ADDR (*) (void)) + return_zero); + de_fault (to_region_size_ok_for_hw_watchpoint, + default_region_size_ok_for_hw_watchpoint); + de_fault (to_terminal_init, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_inferior, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours_for_output, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_save_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_info, + default_terminal_info); + de_fault (to_kill, + (void (*) (void)) + noprocess); + de_fault (to_load, + (void (*) (char *, int)) + tcomplain); + de_fault (to_lookup_symbol, + (int (*) (char *, CORE_ADDR *)) + nosymbol); + de_fault (to_create_inferior, + maybe_kill_then_create_inferior); + de_fault (to_post_startup_inferior, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_acknowledge_created_inferior, + (void (*) (int)) + target_ignore); + de_fault (to_insert_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_insert_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_follow_fork, + (int (*) (int)) + target_ignore); + de_fault (to_insert_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_reported_exec_events_per_exec_call, + (int (*) (void)) + return_one); + de_fault (to_has_exited, + (int (*) (int, int, int *)) + return_zero); + de_fault (to_mourn_inferior, + (void (*) (void)) + noprocess); + de_fault (to_can_run, + return_zero); + de_fault (to_notice_signals, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_thread_alive, + (int (*) (ptid_t)) + return_zero); + de_fault (to_find_new_threads, + (void (*) (void)) + target_ignore); + de_fault (to_extra_thread_info, + (char *(*) (struct thread_info *)) + return_zero); + de_fault (to_stop, + (void (*) (void)) + target_ignore); + current_target.to_xfer_partial = default_xfer_partial; + de_fault (to_rcmd, + (void (*) (char *, struct ui_file *)) + tcomplain); + de_fault (to_enable_exception_callback, + (struct symtab_and_line * (*) (enum exception_event_kind, int)) + nosupport_runtime); + de_fault (to_get_current_exception_event, + (struct exception_event_record * (*) (void)) + nosupport_runtime); + de_fault (to_pid_to_exec_file, + (char *(*) (int)) + return_zero); + de_fault (to_can_async_p, + (int (*) (void)) + return_zero); + de_fault (to_is_async_p, + (int (*) (void)) + return_zero); + de_fault (to_async, + (void (*) (void (*) (enum inferior_event_type, void*), void*)) + tcomplain); +#undef de_fault + + /* Finally, position the target-stack beneath the squashed + "current_target". That way code looking for a non-inherited + target method can quickly and simply find it. */ + current_target.beneath = target_stack; +} + +/* Push a new target type into the stack of the existing target accessors, + possibly superseding some of the existing accessors. + + Result is zero if the pushed target ended up on top of the stack, + nonzero if at least one target is on top of it. + + Rather than allow an empty stack, we always have the dummy target at + the bottom stratum, so we can call the function vectors without + checking them. */ + +int +push_target (struct target_ops *t) +{ + struct target_ops **cur; + + /* Check magic number. If wrong, it probably means someone changed + the struct definition, but not all the places that initialize one. */ + if (t->to_magic != OPS_MAGIC) + { + fprintf_unfiltered (gdb_stderr, + "Magic number of %s target struct wrong\n", + t->to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + } + + /* Find the proper stratum to install this target in. */ + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum) + break; + } + + /* If there's already targets at this stratum, remove them. */ + /* FIXME: cagney/2003-10-15: I think this should be poping all + targets to CUR, and not just those at this stratum level. */ + while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) + { + /* There's already something at this stratum level. Close it, + and un-hook it from the stack. */ + struct target_ops *tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + target_close (tmp, 0); + } + + /* We have removed all targets in our stratum, now add the new one. */ + t->beneath = (*cur); + (*cur) = t; + + update_current_target (); + + if (targetdebug) + setup_target_debug (); + + /* Not on top? */ + return (t != target_stack); +} + +/* Remove a target_ops vector from the stack, wherever it may be. + Return how many times it was removed (0 or 1). */ + +int +unpush_target (struct target_ops *t) +{ + struct target_ops **cur; + struct target_ops *tmp; + + /* Look for the specified target. Note that we assume that a target + can only occur once in the target stack. */ + + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((*cur) == t) + break; + } + + if ((*cur) == NULL) + return 0; /* Didn't find target_ops, quit now */ + + /* NOTE: cagney/2003-12-06: In '94 the close call was made + unconditional by moving it to before the above check that the + target was in the target stack (something about "Change the way + pushing and popping of targets work to support target overlays + and inheritance"). This doesn't make much sense - only open + targets should be closed. */ + target_close (t, 0); + + /* Unchain the target */ + tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + + update_current_target (); + + return 1; +} + +void +pop_target (void) +{ + target_close (¤t_target, 0); /* Let it clean up */ + if (unpush_target (target_stack) == 1) + return; + + fprintf_unfiltered (gdb_stderr, + "pop_target couldn't find target %s\n", + current_target.to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); +} + +#undef MIN +#define MIN(A, B) (((A) <= (B)) ? (A) : (B)) + +/* target_read_string -- read a null terminated string, up to LEN bytes, + from MEMADDR in target. Set *ERRNOP to the errno code, or 0 if successful. + Set *STRING to a pointer to malloc'd memory containing the data; the caller + is responsible for freeing it. Return the number of bytes successfully + read. */ + +int +target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop) +{ + int tlen, origlen, offset, i; + char buf[4]; + int errcode = 0; + char *buffer; + int buffer_allocated; + char *bufptr; + unsigned int nbytes_read = 0; + + /* Small for testing. */ + buffer_allocated = 4; + buffer = xmalloc (buffer_allocated); + bufptr = buffer; + + origlen = len; + + while (len > 0) + { + tlen = MIN (len, 4 - (memaddr & 3)); + offset = memaddr & 3; + + errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0); + if (errcode != 0) + { + /* The transfer request might have crossed the boundary to an + unallocated region of memory. Retry the transfer, requesting + a single byte. */ + tlen = 1; + offset = 0; + errcode = target_xfer_memory (memaddr, buf, 1, 0); + if (errcode != 0) + goto done; + } + + if (bufptr - buffer + tlen > buffer_allocated) + { + unsigned int bytes; + bytes = bufptr - buffer; + buffer_allocated *= 2; + buffer = xrealloc (buffer, buffer_allocated); + bufptr = buffer + bytes; + } + + for (i = 0; i < tlen; i++) + { + *bufptr++ = buf[i + offset]; + if (buf[i + offset] == '\000') + { + nbytes_read += i + 1; + goto done; + } + } + + memaddr += tlen; + len -= tlen; + nbytes_read += tlen; + } +done: + if (errnop != NULL) + *errnop = errcode; + if (string != NULL) + *string = buffer; + return nbytes_read; +} + +/* Find a section containing ADDR. */ +struct section_table * +target_section_by_addr (struct target_ops *target, CORE_ADDR addr) +{ + struct section_table *secp; + for (secp = target->to_sections; + secp < target->to_sections_end; + secp++) + { + if (addr >= secp->addr && addr < secp->endaddr) + return secp; + } + return NULL; +} + +/* Read LEN bytes of target memory at address MEMADDR, placing the results in + GDB's memory at MYADDR. Returns either 0 for success or an errno value + if any error occurs. + + If an error occurs, no guarantee is made about the contents of the data at + MYADDR. In particular, the caller should not depend upon partial reads + filling the buffer with good data. There is no way for the caller to know + how much good data might have been transfered anyway. Callers that can + deal with partial reads should call target_read_memory_partial. */ + +int +target_read_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 0); +} + +int +target_write_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 1); +} + +static int trust_readonly = 0; + +/* Move memory to or from the targets. The top target gets priority; + if it cannot handle it, it is offered to the next one down, etc. + + Result is -1 on error, or the number of bytes transfered. */ + +int +do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib) +{ + int res; + int done = 0; + struct target_ops *t; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + return 0; + + /* to_xfer_memory is not guaranteed to set errno, even when it returns + 0. */ + errno = 0; + + if (!write && trust_readonly) + { + struct section_table *secp; + /* User-settable option, "trust-readonly-sections". If true, + then memory from any SEC_READONLY bfd section may be read + directly from the bfd file. */ + secp = target_section_by_addr (¤t_target, memaddr); + if (secp != NULL + && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) + & SEC_READONLY)) + return xfer_memory (memaddr, myaddr, len, 0, attrib, ¤t_target); + } + + /* The quick case is that the top target can handle the transfer. */ + res = current_target.to_xfer_memory + (memaddr, myaddr, len, write, attrib, ¤t_target); + + /* If res <= 0 then we call it again in the loop. Ah well. */ + if (res <= 0) + { + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t); + if (res > 0) + break; /* Handled all or part of xfer */ + if (t->to_has_all_memory) + break; + } + + if (res <= 0) + return -1; + } + + return res; +} + + +/* Perform a memory transfer. Iterate until the entire region has + been transfered. + + Result is 0 or errno value. */ + +static int +target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write) +{ + int res; + int reg_len; + struct mem_region *region; + +#ifdef CRASH_MERGE + int gdb_readmem_callback(ulong, void *, int, int); + if (gdb_readmem_callback(memaddr, myaddr, len, write)) + return 0; +#endif + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + return 0; + } + + while (len > 0) + { + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write) + return EIO; + break; + + case MEM_WO: + if (!write) + return EIO; + break; + } + + while (reg_len > 0) + { + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write, + ®ion->attrib); + + if (res <= 0) + { + /* If this address is for nonexistent memory, read zeros + if reading, or do nothing if writing. Return + error. */ + if (!write) + memset (myaddr, 0, len); + if (errno == 0) + return EIO; + else + return errno; + } + + memaddr += res; + myaddr += res; + len -= res; + reg_len -= res; + } + } + + return 0; /* We managed to cover it all somehow. */ +} + + +/* Perform a partial memory transfer. + + Result is -1 on error, or the number of bytes transfered. */ + +static int +target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len, + int write_p, int *err) +{ + int res; + int reg_len; + struct mem_region *region; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + *err = 0; + return 0; + } + + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + + case MEM_WO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + } + + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write_p); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write_p, + ®ion->attrib); + + if (res <= 0) + { + if (errno != 0) + *err = errno; + else + *err = EIO; + + return -1; + } + + *err = 0; + return res; +} + +int +target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 0, err); +} + +int +target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 1, err); +} + +/* More generic transfers. */ + +static LONGEST +default_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_MEMORY + && ops->to_xfer_memory != NULL) + /* If available, fall back to the target's "to_xfer_memory" + method. */ + { + int xfered = -1; + errno = 0; + if (writebuf != NULL) + { + void *buffer = xmalloc (len); + struct cleanup *cleanup = make_cleanup (xfree, buffer); + memcpy (buffer, writebuf, len); + xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL, + ops); + do_cleanups (cleanup); + } + if (readbuf != NULL) + xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL, + ops); + if (xfered > 0) + return xfered; + else if (xfered == 0 && errno == 0) + /* "to_xfer_memory" uses 0, cross checked against ERRNO as one + indication of an error. */ + return 0; + else + return -1; + } + else if (ops->beneath != NULL) + return ops->beneath->to_xfer_partial (ops->beneath, object, annex, + readbuf, writebuf, offset, len); + else + return -1; +} + +/* Target vector read/write partial wrapper functions. + + NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial + (inbuf, outbuf)", instead of separate read/write methods, make life + easier. */ + +LONGEST +target_read_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len); +} + +LONGEST +target_write_partial (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len); +} + +/* Wrappers to perform the full transfer. */ +LONGEST +target_read (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_read_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +LONGEST +target_write (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_write_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +/* Memory transfer methods. */ + +void +get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf, + LONGEST len) +{ + if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) + != len) + memory_error (EIO, addr); +} + +ULONGEST +get_target_memory_unsigned (struct target_ops *ops, + CORE_ADDR addr, int len) +{ + char buf[sizeof (ULONGEST)]; + + gdb_assert (len <= sizeof (buf)); + get_target_memory (ops, addr, buf, len); + return extract_unsigned_integer (buf, len); +} + +static void +target_info (char *args, int from_tty) +{ + struct target_ops *t; + int has_all_mem = 0; + + if (symfile_objfile != NULL) + printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name); + +#ifdef FILES_INFO_HOOK + if (FILES_INFO_HOOK ()) + return; +#endif + + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + if ((int) (t->to_stratum) <= (int) dummy_stratum) + continue; + if (has_all_mem) + printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n"); + printf_unfiltered ("%s:\n", t->to_longname); + (t->to_files_info) (t); + has_all_mem = t->to_has_all_memory; + } +} + +/* This is to be called by the open routine before it does + anything. */ + +void +target_preopen (int from_tty) +{ + dont_repeat (); + + if (target_has_execution) + { + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) + target_kill (); + else + error ("Program not killed."); + } + + /* Calling target_kill may remove the target from the stack. But if + it doesn't (which seems like a win for UDI), remove it now. */ + + if (target_has_execution) + pop_target (); +} + +/* Detach a target after doing deferred register stores. */ + +void +target_detach (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_detach) (args, from_tty); +} + +void +target_disconnect (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_disconnect) (args, from_tty); +} + +void +target_link (char *modname, CORE_ADDR *t_reloc) +{ + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) + { + (current_target.to_lookup_symbol) (modname, t_reloc); + if (*t_reloc == 0) + error ("Unable to link to %s and get relocation in rombug", modname); + } + else + *t_reloc = (CORE_ADDR) -1; +} + +int +target_async_mask (int mask) +{ + int saved_async_masked_status = target_async_mask_value; + target_async_mask_value = mask; + return saved_async_masked_status; +} + +/* Look through the list of possible targets for a target that can + execute a run or attach command without any other data. This is + used to locate the default process stratum. + + Result is always valid (error() is called for errors). */ + +static struct target_ops * +find_default_run_target (char *do_mesg) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + if (count != 1) + error ("Don't know how to %s. Try \"help target\".", do_mesg); + + return runable; +} + +void +find_default_attach (char *args, int from_tty) +{ + struct target_ops *t; + + t = find_default_run_target ("attach"); + (t->to_attach) (args, from_tty); + return; +} + +void +find_default_create_inferior (char *exec_file, char *allargs, char **env) +{ + struct target_ops *t; + + t = find_default_run_target ("run"); + (t->to_create_inferior) (exec_file, allargs, env); + return; +} + +static int +default_region_size_ok_for_hw_watchpoint (int byte_count) +{ + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); +} + +static int +return_zero (void) +{ + return 0; +} + +static int +return_one (void) +{ + return 1; +} + +static int +return_minus_one (void) +{ + return -1; +} + +/* + * Resize the to_sections pointer. Also make sure that anyone that + * was holding on to an old value of it gets updated. + * Returns the old size. + */ + +int +target_resize_to_sections (struct target_ops *target, int num_added) +{ + struct target_ops **t; + struct section_table *old_value; + int old_count; + + old_value = target->to_sections; + + if (target->to_sections) + { + old_count = target->to_sections_end - target->to_sections; + target->to_sections = (struct section_table *) + xrealloc ((char *) target->to_sections, + (sizeof (struct section_table)) * (num_added + old_count)); + } + else + { + old_count = 0; + target->to_sections = (struct section_table *) + xmalloc ((sizeof (struct section_table)) * num_added); + } + target->to_sections_end = target->to_sections + (num_added + old_count); + + /* Check to see if anyone else was pointing to this structure. + If old_value was null, then no one was. */ + + if (old_value) + { + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_sections == old_value) + { + (*t)->to_sections = target->to_sections; + (*t)->to_sections_end = target->to_sections_end; + } + } + } + + return old_count; + +} + +/* Remove all target sections taken from ABFD. + + Scan the current target stack for targets whose section tables + refer to sections from BFD, and remove those sections. We use this + when we notice that the inferior has unloaded a shared object, for + example. */ +void +remove_target_sections (bfd *abfd) +{ + struct target_ops **t; + + for (t = target_structs; t < target_structs + target_struct_size; t++) + { + struct section_table *src, *dest; + + dest = (*t)->to_sections; + for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++) + if (src->bfd != abfd) + { + /* Keep this section. */ + if (dest < src) *dest = *src; + dest++; + } + + /* If we've dropped any sections, resize the section table. */ + if (dest < src) + target_resize_to_sections (*t, dest - src); + } +} + + + + +/* Find a single runnable target in the stack and return it. If for + some reason there is more than one, return NULL. */ + +struct target_ops * +find_run_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* Find a single core_stratum target in the list of targets and return it. + If for some reason there is more than one, return NULL. */ + +struct target_ops * +find_core_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_stratum == core_stratum) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* + * Find the next target down the stack from the specified target. + */ + +struct target_ops * +find_target_beneath (struct target_ops *t) +{ + return t->beneath; +} + + +/* The inferior process has died. Long live the inferior! */ + +void +generic_mourn_inferior (void) +{ + extern int show_breakpoint_hit_counts; + + inferior_ptid = null_ptid; + attach_flag = 0; + breakpoint_init_inferior (inf_exited); + registers_changed (); + +#ifdef CLEAR_DEFERRED_STORES + /* Delete any pending stores to the inferior... */ + CLEAR_DEFERRED_STORES; +#endif + + reopen_exec_file (); + reinit_frame_cache (); + + /* It is confusing to the user for ignore counts to stick around + from previous runs of the inferior. So clear them. */ + /* However, it is more confusing for the ignore counts to disappear when + using hit counts. So don't clear them if we're counting hits. */ + if (!show_breakpoint_hit_counts) + breakpoint_clear_ignore_counts (); + + if (detach_hook) + detach_hook (); +} + +/* Helper function for child_wait and the Lynx derivatives of child_wait. + HOSTSTATUS is the waitstatus from wait() or the equivalent; store our + translation of that in OURSTATUS. */ +void +store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus) +{ +#ifdef CHILD_SPECIAL_WAITSTATUS + /* CHILD_SPECIAL_WAITSTATUS should return nonzero and set *OURSTATUS + if it wants to deal with hoststatus. */ + if (CHILD_SPECIAL_WAITSTATUS (ourstatus, hoststatus)) + return; +#endif + + if (WIFEXITED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_EXITED; + ourstatus->value.integer = WEXITSTATUS (hoststatus); + } + else if (!WIFSTOPPED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus)); + } + else + { + ourstatus->kind = TARGET_WAITKIND_STOPPED; + ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus)); + } +} + +/* Returns zero to leave the inferior alone, one to interrupt it. */ +int (*target_activity_function) (void); +int target_activity_fd; + +/* Convert a normal process ID to a string. Returns the string in a static + buffer. */ + +char * +normal_pid_to_str (ptid_t ptid) +{ + static char buf[30]; + + sprintf (buf, "process %d", PIDGET (ptid)); + return buf; +} + +/* Error-catcher for target_find_memory_regions */ +static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) +{ + error ("No target."); + return 0; +} + +/* Error-catcher for target_make_corefile_notes */ +static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) +{ + error ("No target."); + return NULL; +} + +/* Set up the handful of non-empty slots needed by the dummy target + vector. */ + +static void +init_dummy_target (void) +{ + dummy_target.to_shortname = "None"; + dummy_target.to_longname = "None"; + dummy_target.to_doc = ""; + dummy_target.to_attach = find_default_attach; + dummy_target.to_create_inferior = find_default_create_inferior; + dummy_target.to_pid_to_str = normal_pid_to_str; + dummy_target.to_stratum = dummy_stratum; + dummy_target.to_find_memory_regions = dummy_find_memory_regions; + dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; + dummy_target.to_magic = OPS_MAGIC; +} + + +static struct target_ops debug_target; + +static void +debug_to_open (char *args, int from_tty) +{ + debug_target.to_open (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty); +} + +static void +debug_to_close (int quitting) +{ + target_close (&debug_target, quitting); + fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting); +} + +void +target_close (struct target_ops *targ, int quitting) +{ + if (targ->to_xclose != NULL) + targ->to_xclose (targ, quitting); + else if (targ->to_close != NULL) + targ->to_close (quitting); +} + +static void +debug_to_attach (char *args, int from_tty) +{ + debug_target.to_attach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty); +} + + +static void +debug_to_post_attach (int pid) +{ + debug_target.to_post_attach (pid); + + fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid); +} + +static void +debug_to_detach (char *args, int from_tty) +{ + debug_target.to_detach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty); +} + +static void +debug_to_disconnect (char *args, int from_tty) +{ + debug_target.to_disconnect (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); +} + +static void +debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal) +{ + debug_target.to_resume (ptid, step, siggnal); + + fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid), + step ? "step" : "continue", + target_signal_to_name (siggnal)); +} + +static ptid_t +debug_to_wait (ptid_t ptid, struct target_waitstatus *status) +{ + ptid_t retval; + + retval = debug_target.to_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, + "target_wait (%d, status) = %d, ", PIDGET (ptid), + PIDGET (retval)); + fprintf_unfiltered (gdb_stdlog, "status->kind = "); + switch (status->kind) + { + case TARGET_WAITKIND_EXITED: + fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n", + status->value.integer); + break; + case TARGET_WAITKIND_STOPPED: + fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_SIGNALLED: + fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_LOADED: + fprintf_unfiltered (gdb_stdlog, "loaded\n"); + break; + case TARGET_WAITKIND_FORKED: + fprintf_unfiltered (gdb_stdlog, "forked\n"); + break; + case TARGET_WAITKIND_VFORKED: + fprintf_unfiltered (gdb_stdlog, "vforked\n"); + break; + case TARGET_WAITKIND_EXECD: + fprintf_unfiltered (gdb_stdlog, "execd\n"); + break; + case TARGET_WAITKIND_SPURIOUS: + fprintf_unfiltered (gdb_stdlog, "spurious\n"); + break; + default: + fprintf_unfiltered (gdb_stdlog, "unknown???\n"); + break; + } + + return retval; +} + +static void +debug_to_post_wait (ptid_t ptid, int status) +{ + debug_target.to_post_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n", + PIDGET (ptid), status); +} + +static void +debug_print_register (const char * func, int regno) +{ + fprintf_unfiltered (gdb_stdlog, "%s ", func); + if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS + && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0') + fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno)); + else + fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + if (regno >= 0) + { + int i; + unsigned char buf[MAX_REGISTER_SIZE]; + deprecated_read_register_gen (regno, buf); + fprintf_unfiltered (gdb_stdlog, " = "); + for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++) + { + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + } + if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST)) + { + fprintf_unfiltered (gdb_stdlog, " 0x%s %s", + paddr_nz (read_register (regno)), + paddr_d (read_register (regno))); + } + } + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_fetch_registers (int regno) +{ + debug_target.to_fetch_registers (regno); + debug_print_register ("target_fetch_registers", regno); +} + +static void +debug_to_store_registers (int regno) +{ + debug_target.to_store_registers (regno); + debug_print_register ("target_store_registers", regno); + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_prepare_to_store (void) +{ + debug_target.to_prepare_to_store (); + + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); +} + +static int +debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib, + struct target_ops *target) +{ + int retval; + + retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, + attrib, target); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d", + (unsigned int) memaddr, /* possable truncate long long */ + len, write ? "write" : "read", retval); + + + + if (retval > 0) + { + int i; + + fputs_unfiltered (", bytes =", gdb_stdlog); + for (i = 0; i < retval; i++) + { + if ((((long) &(myaddr[i])) & 0xf) == 0) + fprintf_unfiltered (gdb_stdlog, "\n"); + fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + } + } + + fputc_unfiltered ('\n', gdb_stdlog); + + return retval; +} + +static void +debug_to_files_info (struct target_ops *target) +{ + debug_target.to_files_info (target); + + fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n"); +} + +static int +debug_to_insert_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty) +{ + int retval; + + retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty); + + fprintf_unfiltered (gdb_stdlog, + "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n", + (unsigned long) type, + (unsigned long) cnt, + (unsigned long) from_tty, + (unsigned long) retval); + return retval; +} + +static int +debug_to_region_size_ok_for_hw_watchpoint (int byte_count) +{ + CORE_ADDR retval; + + retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count); + + fprintf_unfiltered (gdb_stdlog, + "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n", + (unsigned long) byte_count, + (unsigned long) retval); + return retval; +} + +static int +debug_to_stopped_by_watchpoint (void) +{ + int retval; + + retval = debug_target.to_stopped_by_watchpoint (); + + fprintf_unfiltered (gdb_stdlog, + "STOPPED_BY_WATCHPOINT () = %ld\n", + (unsigned long) retval); + return retval; +} + +static CORE_ADDR +debug_to_stopped_data_address (void) +{ + CORE_ADDR retval; + + retval = debug_target.to_stopped_data_address (); + + fprintf_unfiltered (gdb_stdlog, + "target_stopped_data_address () = 0x%lx\n", + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static void +debug_to_terminal_init (void) +{ + debug_target.to_terminal_init (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n"); +} + +static void +debug_to_terminal_inferior (void) +{ + debug_target.to_terminal_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); +} + +static void +debug_to_terminal_ours_for_output (void) +{ + debug_target.to_terminal_ours_for_output (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); +} + +static void +debug_to_terminal_ours (void) +{ + debug_target.to_terminal_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n"); +} + +static void +debug_to_terminal_save_ours (void) +{ + debug_target.to_terminal_save_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n"); +} + +static void +debug_to_terminal_info (char *arg, int from_tty) +{ + debug_target.to_terminal_info (arg, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg, + from_tty); +} + +static void +debug_to_kill (void) +{ + debug_target.to_kill (); + + fprintf_unfiltered (gdb_stdlog, "target_kill ()\n"); +} + +static void +debug_to_load (char *args, int from_tty) +{ + debug_target.to_load (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty); +} + +static int +debug_to_lookup_symbol (char *name, CORE_ADDR *addrp) +{ + int retval; + + retval = debug_target.to_lookup_symbol (name, addrp); + + fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name); + + return retval; +} + +static void +debug_to_create_inferior (char *exec_file, char *args, char **env) +{ + debug_target.to_create_inferior (exec_file, args, env); + + fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n", + exec_file, args); +} + +static void +debug_to_post_startup_inferior (ptid_t ptid) +{ + debug_target.to_post_startup_inferior (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n", + PIDGET (ptid)); +} + +static void +debug_to_acknowledge_created_inferior (int pid) +{ + debug_target.to_acknowledge_created_inferior (pid); + + fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n", + pid); +} + +static int +debug_to_insert_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_insert_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_follow_fork (int follow_child) +{ + int retval = debug_target.to_follow_fork (follow_child); + + fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n", + follow_child, retval); + + return retval; +} + +static int +debug_to_insert_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_reported_exec_events_per_exec_call (void) +{ + int reported_exec_events; + + reported_exec_events = debug_target.to_reported_exec_events_per_exec_call (); + + fprintf_unfiltered (gdb_stdlog, + "target_reported_exec_events_per_exec_call () = %d\n", + reported_exec_events); + + return reported_exec_events; +} + +static int +debug_to_has_exited (int pid, int wait_status, int *exit_status) +{ + int has_exited; + + has_exited = debug_target.to_has_exited (pid, wait_status, exit_status); + + fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n", + pid, wait_status, *exit_status, has_exited); + + return has_exited; +} + +static void +debug_to_mourn_inferior (void) +{ + debug_target.to_mourn_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n"); +} + +static int +debug_to_can_run (void) +{ + int retval; + + retval = debug_target.to_can_run (); + + fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval); + + return retval; +} + +static void +debug_to_notice_signals (ptid_t ptid) +{ + debug_target.to_notice_signals (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", + PIDGET (ptid)); +} + +static int +debug_to_thread_alive (ptid_t ptid) +{ + int retval; + + retval = debug_target.to_thread_alive (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + PIDGET (ptid), retval); + + return retval; +} + +static void +debug_to_find_new_threads (void) +{ + debug_target.to_find_new_threads (); + + fputs_unfiltered ("target_find_new_threads ()\n", gdb_stdlog); +} + +static void +debug_to_stop (void) +{ + debug_target.to_stop (); + + fprintf_unfiltered (gdb_stdlog, "target_stop ()\n"); +} + +static LONGEST +debug_to_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + LONGEST retval; + + retval = debug_target.to_xfer_partial (&debug_target, object, annex, + readbuf, writebuf, offset, len); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n", + (int) object, (annex ? annex : "(null)"), + (long) readbuf, (long) writebuf, paddr_nz (offset), + paddr_d (len), paddr_d (retval)); + + return retval; +} + +static void +debug_to_rcmd (char *command, + struct ui_file *outbuf) +{ + debug_target.to_rcmd (command, outbuf); + fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); +} + +static struct symtab_and_line * +debug_to_enable_exception_callback (enum exception_event_kind kind, int enable) +{ + struct symtab_and_line *result; + result = debug_target.to_enable_exception_callback (kind, enable); + fprintf_unfiltered (gdb_stdlog, + "target get_exception_callback_sal (%d, %d)\n", + kind, enable); + return result; +} + +static struct exception_event_record * +debug_to_get_current_exception_event (void) +{ + struct exception_event_record *result; + result = debug_target.to_get_current_exception_event (); + fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n"); + return result; +} + +static char * +debug_to_pid_to_exec_file (int pid) +{ + char *exec_file; + + exec_file = debug_target.to_pid_to_exec_file (pid); + + fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n", + pid, exec_file); + + return exec_file; +} + +static void +setup_target_debug (void) +{ + memcpy (&debug_target, ¤t_target, sizeof debug_target); + + current_target.to_open = debug_to_open; + current_target.to_close = debug_to_close; + current_target.to_attach = debug_to_attach; + current_target.to_post_attach = debug_to_post_attach; + current_target.to_detach = debug_to_detach; + current_target.to_disconnect = debug_to_disconnect; + current_target.to_resume = debug_to_resume; + current_target.to_wait = debug_to_wait; + current_target.to_post_wait = debug_to_post_wait; + current_target.to_fetch_registers = debug_to_fetch_registers; + current_target.to_store_registers = debug_to_store_registers; + current_target.to_prepare_to_store = debug_to_prepare_to_store; + current_target.to_xfer_memory = debug_to_xfer_memory; + current_target.to_files_info = debug_to_files_info; + current_target.to_insert_breakpoint = debug_to_insert_breakpoint; + current_target.to_remove_breakpoint = debug_to_remove_breakpoint; + current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint; + current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint; + current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint; + current_target.to_insert_watchpoint = debug_to_insert_watchpoint; + current_target.to_remove_watchpoint = debug_to_remove_watchpoint; + current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint; + current_target.to_stopped_data_address = debug_to_stopped_data_address; + current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint; + current_target.to_terminal_init = debug_to_terminal_init; + current_target.to_terminal_inferior = debug_to_terminal_inferior; + current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output; + current_target.to_terminal_ours = debug_to_terminal_ours; + current_target.to_terminal_save_ours = debug_to_terminal_save_ours; + current_target.to_terminal_info = debug_to_terminal_info; + current_target.to_kill = debug_to_kill; + current_target.to_load = debug_to_load; + current_target.to_lookup_symbol = debug_to_lookup_symbol; + current_target.to_create_inferior = debug_to_create_inferior; + current_target.to_post_startup_inferior = debug_to_post_startup_inferior; + current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior; + current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint; + current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint; + current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint; + current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint; + current_target.to_follow_fork = debug_to_follow_fork; + current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint; + current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint; + current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call; + current_target.to_has_exited = debug_to_has_exited; + current_target.to_mourn_inferior = debug_to_mourn_inferior; + current_target.to_can_run = debug_to_can_run; + current_target.to_notice_signals = debug_to_notice_signals; + current_target.to_thread_alive = debug_to_thread_alive; + current_target.to_find_new_threads = debug_to_find_new_threads; + current_target.to_stop = debug_to_stop; + current_target.to_xfer_partial = debug_to_xfer_partial; + current_target.to_rcmd = debug_to_rcmd; + current_target.to_enable_exception_callback = debug_to_enable_exception_callback; + current_target.to_get_current_exception_event = debug_to_get_current_exception_event; + current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file; + +} + + +static char targ_desc[] = +"Names of targets and files being debugged.\n\ +Shows the entire stack of targets currently in use (including the exec-file,\n\ +core-file, and process, if any), as well as the symbol file name."; + +static void +do_monitor_command (char *cmd, + int from_tty) +{ + if ((current_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain) + || (current_target.to_rcmd == debug_to_rcmd + && (debug_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain))) + { + error ("\"monitor\" command not supported by this target.\n"); + } + target_rcmd (cmd, gdb_stdtarg); +} + +void +initialize_targets (void) +{ + init_dummy_target (); + push_target (&dummy_target); + + add_info ("target", target_info, targ_desc); + add_info ("files", target_info, targ_desc); + + add_show_from_set + (add_set_cmd ("target", class_maintenance, var_zinteger, + (char *) &targetdebug, + "Set target debugging.\n\ +When non-zero, target debugging is enabled.", &setdebuglist), + &showdebuglist); + + add_setshow_boolean_cmd ("trust-readonly-sections", class_support, + &trust_readonly, "\ +Set mode for reading from readonly sections.\n\ +When this mode is on, memory reads from readonly sections (such as .text)\n\ +will be read from the object file instead of from the target. This will\n\ +result in significant performance improvement for remote targets.", "\ +Show mode for reading from readonly sections.\n", + NULL, NULL, + &setlist, &showlist); + + add_com ("monitor", class_obscure, do_monitor_command, + "Send a command to the remote monitor (remote targets only)."); + + target_dcache = dcache_init (); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/ui-file.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/ui-file.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/ui-file.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/ui-file.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,630 @@ +/* UI_FILE - a generic STDIO like output stream. + + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Implement the ``struct ui_file'' object. */ + +#include "defs.h" +#include "ui-file.h" +#include "gdb_string.h" + +#include + +static ui_file_isatty_ftype null_file_isatty; +static ui_file_write_ftype null_file_write; +static ui_file_fputs_ftype null_file_fputs; +static ui_file_read_ftype null_file_read; +static ui_file_flush_ftype null_file_flush; +static ui_file_delete_ftype null_file_delete; +static ui_file_rewind_ftype null_file_rewind; +static ui_file_put_ftype null_file_put; + +struct ui_file + { + int *magic; + ui_file_flush_ftype *to_flush; + ui_file_write_ftype *to_write; + ui_file_fputs_ftype *to_fputs; + ui_file_read_ftype *to_read; + ui_file_delete_ftype *to_delete; + ui_file_isatty_ftype *to_isatty; + ui_file_rewind_ftype *to_rewind; + ui_file_put_ftype *to_put; + void *to_data; + }; +int ui_file_magic; + +struct ui_file * +ui_file_new (void) +{ + struct ui_file *file = xmalloc (sizeof (struct ui_file)); + file->magic = &ui_file_magic; + set_ui_file_data (file, NULL, null_file_delete); + set_ui_file_flush (file, null_file_flush); + set_ui_file_write (file, null_file_write); + set_ui_file_fputs (file, null_file_fputs); + set_ui_file_read (file, null_file_read); + set_ui_file_isatty (file, null_file_isatty); + set_ui_file_rewind (file, null_file_rewind); + set_ui_file_put (file, null_file_put); + return file; +} + +void +ui_file_delete (struct ui_file *file) +{ + file->to_delete (file); + xfree (file); +} + +static int +null_file_isatty (struct ui_file *file) +{ + return 0; +} + +static void +null_file_rewind (struct ui_file *file) +{ + return; +} + +static void +null_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + return; +} + +static void +null_file_flush (struct ui_file *file) +{ + return; +} + +static void +null_file_write (struct ui_file *file, + const char *buf, + long sizeof_buf) +{ + if (file->to_fputs == null_file_fputs) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The fputs method isn't null, slowly pass the write request + onto that. FYI, this isn't as bad as it may look - the + current (as of 1999-11-07) printf_* function calls fputc and + fputc does exactly the below. By having a write function it + is possible to clean up that code. */ + int i; + char b[2]; + b[1] = '\0'; + for (i = 0; i < sizeof_buf; i++) + { + b[0] = buf[i]; + file->to_fputs (b, file); + } + return; + } +} + +static long +null_file_read (struct ui_file *file, + char *buf, + long sizeof_buf) +{ + errno = EBADF; + return 0; +} + +static void +null_file_fputs (const char *buf, struct ui_file *file) +{ + if (file->to_write == null_file_write) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The write method was implemented, use that. */ + file->to_write (file, buf, strlen (buf)); + } +} + +static void +null_file_delete (struct ui_file *file) +{ + return; +} + +void * +ui_file_data (struct ui_file *file) +{ + if (file->magic != &ui_file_magic) + internal_error (__FILE__, __LINE__, + "ui_file_data: bad magic number"); + return file->to_data; +} + +void +gdb_flush (struct ui_file *file) +{ + file->to_flush (file); +} + +int +ui_file_isatty (struct ui_file *file) +{ + return file->to_isatty (file); +} + +void +ui_file_rewind (struct ui_file *file) +{ + file->to_rewind (file); +} + +void +ui_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + file->to_put (file, write, dest); +} + +void +ui_file_write (struct ui_file *file, + const char *buf, + long length_buf) +{ + file->to_write (file, buf, length_buf); +} + +long +ui_file_read (struct ui_file *file, char *buf, long length_buf) +{ + return file->to_read (file, buf, length_buf); +} + +void +fputs_unfiltered (const char *buf, struct ui_file *file) +{ + file->to_fputs (buf, file); +} + +void +set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush) +{ + file->to_flush = flush; +} + +void +set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty) +{ + file->to_isatty = isatty; +} + +void +set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind) +{ + file->to_rewind = rewind; +} + +void +set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put) +{ + file->to_put = put; +} + +void +set_ui_file_write (struct ui_file *file, + ui_file_write_ftype *write) +{ + file->to_write = write; +} + +void +set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read) +{ + file->to_read = read; +} + +void +set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs) +{ + file->to_fputs = fputs; +} + +void +set_ui_file_data (struct ui_file *file, void *data, + ui_file_delete_ftype *delete) +{ + file->to_data = data; + file->to_delete = delete; +} + +/* ui_file utility function for converting a ``struct ui_file'' into + a memory buffer''. */ + +struct accumulated_ui_file +{ + char *buffer; + long length; +}; + +static void +do_ui_file_xstrdup (void *context, const char *buffer, long length) +{ + struct accumulated_ui_file *acc = context; + if (acc->buffer == NULL) + acc->buffer = xmalloc (length + 1); + else + acc->buffer = xrealloc (acc->buffer, acc->length + length + 1); + memcpy (acc->buffer + acc->length, buffer, length); + acc->length += length; + acc->buffer[acc->length] = '\0'; +} + +char * +ui_file_xstrdup (struct ui_file *file, + long *length) +{ + struct accumulated_ui_file acc; + acc.buffer = NULL; + acc.length = 0; + ui_file_put (file, do_ui_file_xstrdup, &acc); + if (acc.buffer == NULL) + acc.buffer = xstrdup (""); + *length = acc.length; + return acc.buffer; +} + +/* A pure memory based ``struct ui_file'' that can be used an output + buffer. The buffers accumulated contents are available via + ui_file_put(). */ + +struct mem_file + { + int *magic; + char *buffer; + int sizeof_buffer; + int length_buffer; + }; + +static ui_file_rewind_ftype mem_file_rewind; +static ui_file_put_ftype mem_file_put; +static ui_file_write_ftype mem_file_write; +static ui_file_delete_ftype mem_file_delete; +static struct ui_file *mem_file_new (void); +static int mem_file_magic; + +static struct ui_file * +mem_file_new (void) +{ + struct mem_file *stream = XMALLOC (struct mem_file); + struct ui_file *file = ui_file_new (); + set_ui_file_data (file, stream, mem_file_delete); + set_ui_file_rewind (file, mem_file_rewind); + set_ui_file_put (file, mem_file_put); + set_ui_file_write (file, mem_file_write); + stream->magic = &mem_file_magic; + stream->buffer = NULL; + stream->sizeof_buffer = 0; + stream->length_buffer = 0; + return file; +} + +static void +mem_file_delete (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_delete: bad magic number"); + if (stream->buffer != NULL) + xfree (stream->buffer); + xfree (stream); +} + +struct ui_file * +mem_fileopen (void) +{ + return mem_file_new (); +} + +static void +mem_file_rewind (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_rewind: bad magic number"); + stream->length_buffer = 0; +} + +static void +mem_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_put: bad magic number"); + if (stream->length_buffer > 0) + write (dest, stream->buffer, stream->length_buffer); +} + +void +mem_file_write (struct ui_file *file, + const char *buffer, + long length_buffer) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_write: bad magic number"); + if (stream->buffer == NULL) + { + stream->length_buffer = length_buffer; + stream->sizeof_buffer = length_buffer; + stream->buffer = xmalloc (stream->sizeof_buffer); + memcpy (stream->buffer, buffer, length_buffer); + } + else + { + int new_length = stream->length_buffer + length_buffer; + if (new_length >= stream->sizeof_buffer) + { + stream->sizeof_buffer = new_length; + stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer); + } + memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer); + stream->length_buffer = new_length; + } +} + +/* ``struct ui_file'' implementation that maps directly onto + 's FILE. */ + +static ui_file_write_ftype stdio_file_write; +static ui_file_fputs_ftype stdio_file_fputs; +static ui_file_read_ftype stdio_file_read; +static ui_file_isatty_ftype stdio_file_isatty; +static ui_file_delete_ftype stdio_file_delete; +static struct ui_file *stdio_file_new (FILE * file, int close_p); +static ui_file_flush_ftype stdio_file_flush; + +static int stdio_file_magic; + +struct stdio_file + { + int *magic; + FILE *file; + int close_p; + }; + +static struct ui_file * +stdio_file_new (FILE *file, int close_p) +{ + struct ui_file *ui_file = ui_file_new (); + struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file)); + stdio->magic = &stdio_file_magic; + stdio->file = file; + stdio->close_p = close_p; + set_ui_file_data (ui_file, stdio, stdio_file_delete); + set_ui_file_flush (ui_file, stdio_file_flush); + set_ui_file_write (ui_file, stdio_file_write); + set_ui_file_fputs (ui_file, stdio_file_fputs); + set_ui_file_read (ui_file, stdio_file_read); + set_ui_file_isatty (ui_file, stdio_file_isatty); + return ui_file; +} + +static void +stdio_file_delete (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_delete: bad magic number"); + if (stdio->close_p) + { + fclose (stdio->file); + } + xfree (stdio); +} + +static void +stdio_file_flush (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_flush: bad magic number"); + fflush (stdio->file); +} + +static long +stdio_file_read (struct ui_file *file, char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_read: bad magic number"); + return read (fileno (stdio->file), buf, length_buf); +} + +static void +stdio_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_write: bad magic number"); + fwrite (buf, length_buf, 1, stdio->file); +} + +static void +stdio_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_fputs: bad magic number"); + fputs (linebuffer, stdio->file); +} + +static int +stdio_file_isatty (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_isatty: bad magic number"); + return (isatty (fileno (stdio->file))); +} + +/* Like fdopen(). Create a ui_file from a previously opened FILE. */ + +struct ui_file * +stdio_fileopen (FILE *file) +{ + return stdio_file_new (file, 0); +} + +struct ui_file * +gdb_fopen (char *name, char *mode) +{ + FILE *f = fopen (name, mode); + if (f == NULL) + return NULL; + return stdio_file_new (f, 1); +} + +#ifdef CRASH_MERGE +void +replace_ui_file_FILE(struct ui_file *file, FILE *fp) +{ + struct stdio_file *stdio_file; + + stdio_file = (struct stdio_file *)ui_file_data(file); + stdio_file->file = fp; +} +#endif + +/* ``struct ui_file'' implementation that maps onto two ui-file objects. */ + +static ui_file_write_ftype tee_file_write; +static ui_file_fputs_ftype tee_file_fputs; +static ui_file_isatty_ftype tee_file_isatty; +static ui_file_delete_ftype tee_file_delete; +static ui_file_flush_ftype tee_file_flush; + +static int tee_file_magic; + +struct tee_file + { + int *magic; + struct ui_file *one, *two; + int close_one, close_two; + }; + +struct ui_file * +tee_file_new (struct ui_file *one, int close_one, + struct ui_file *two, int close_two) +{ + struct ui_file *ui_file = ui_file_new (); + struct tee_file *tee = xmalloc (sizeof (struct tee_file)); + tee->magic = &tee_file_magic; + tee->one = one; + tee->two = two; + tee->close_one = close_one; + tee->close_two = close_two; + set_ui_file_data (ui_file, tee, tee_file_delete); + set_ui_file_flush (ui_file, tee_file_flush); + set_ui_file_write (ui_file, tee_file_write); + set_ui_file_fputs (ui_file, tee_file_fputs); + set_ui_file_isatty (ui_file, tee_file_isatty); + return ui_file; +} + +static void +tee_file_delete (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_delete: bad magic number"); + if (tee->close_one) + ui_file_delete (tee->one); + if (tee->close_two) + ui_file_delete (tee->two); + + xfree (tee); +} + +static void +tee_file_flush (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_flush: bad magic number"); + tee->one->to_flush (tee->one); + tee->two->to_flush (tee->two); +} + +static void +tee_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_write: bad magic number"); + ui_file_write (tee->one, buf, length_buf); + ui_file_write (tee->two, buf, length_buf); +} + +static void +tee_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_fputs: bad magic number"); + tee->one->to_fputs (linebuffer, tee->one); + tee->two->to_fputs (linebuffer, tee->two); +} + +static int +tee_file_isatty (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_isatty: bad magic number"); + return (0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/utils.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/utils.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb/utils.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb/utils.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3068 @@ +/* General utility routines for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" + +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + +#ifdef __GO32__ +#include +#endif + +/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ +#ifdef reg +#undef reg +#endif + +#include +#include "gdbcmd.h" +#include "serial.h" +#include "bfd.h" +#include "target.h" +#include "demangle.h" +#include "expression.h" +#include "language.h" +#include "charset.h" +#include "annotate.h" +#include "filenames.h" + +#include "inferior.h" /* for signed_pointer_to_address */ + +#include /* For MAXPATHLEN */ + +#ifdef HAVE_CURSES_H +#include +#endif +#ifdef HAVE_TERM_H +#include +#endif + +#include "readline/readline.h" + +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif +/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) +extern char *canonicalize_file_name (const char *); +#endif + +/* readline defines this. */ +#undef savestring + +void (*error_begin_hook) (void); + +/* Holds the last error message issued by gdb */ + +static struct ui_file *gdb_lasterr; + +/* Prototypes for local functions */ + +static void vfprintf_maybe_filtered (struct ui_file *, const char *, + va_list, int); + +static void fputs_maybe_filtered (const char *, struct ui_file *, int); + +static void do_my_cleanups (struct cleanup **, struct cleanup *); + +static void prompt_for_continue (void); + +static void set_screen_size (void); +static void set_width (void); + +/* Chain of cleanup actions established with make_cleanup, + to be executed if an error happens. */ + +static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ +static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ +static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ +static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; + +/* Pointer to what is left to do for an execution command after the + target stops. Used only in asynchronous mode, by targets that + support async execution. The finish and until commands use it. So + does the target extended-remote command. */ +struct continuation *cmd_continuation; +struct continuation *intermediate_continuation; + +/* Nonzero if we have job control. */ + +int job_control; + +/* Nonzero means a quit has been requested. */ + +int quit_flag; + +/* Nonzero means quit immediately if Control-C is typed now, rather + than waiting until QUIT is executed. Be careful in setting this; + code which executes with immediate_quit set has to be very careful + about being able to deal with being interrupted at any time. It is + almost always better to use QUIT; the only exception I can think of + is being able to quit out of a system call (using EINTR loses if + the SIGINT happens between the previous QUIT and the system call). + To immediately quit in the case in which a SIGINT happens between + the previous QUIT and setting immediate_quit (desirable anytime we + expect to block), call QUIT after setting immediate_quit. */ + +int immediate_quit; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form rather than raw. */ + +int demangle = 1; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form even in assembler language displays. If this is set, but + DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */ + +int asm_demangle = 0; + +/* Nonzero means that strings with character values >0x7F should be printed + as octal escapes. Zero means just print the value (e.g. it's an + international character, and the terminal or window can cope.) */ + +int sevenbit_strings = 0; + +/* String to be printed before error messages, if any. */ + +char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + +char *warning_pre_print = "\nwarning: "; + +int pagination_enabled = 1; + + +/* Add a new cleanup to the cleanup_chain, + and return the previous chain pointer + to be passed later to do_cleanups or discard_cleanups. + Args are FUNCTION to clean up with, and ARG to pass to it. */ + +struct cleanup * +make_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&cleanup_chain, function, arg); +} + +struct cleanup * +make_final_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&final_cleanup_chain, function, arg); +} + +struct cleanup * +make_run_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&run_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_error_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + +static void +do_freeargv (void *arg) +{ + freeargv ((char **) arg); +} + +struct cleanup * +make_cleanup_freeargv (char **arg) +{ + return make_my_cleanup (&cleanup_chain, do_freeargv, arg); +} + +static void +do_bfd_close_cleanup (void *arg) +{ + bfd_close (arg); +} + +struct cleanup * +make_cleanup_bfd_close (bfd *abfd) +{ + return make_cleanup (do_bfd_close_cleanup, abfd); +} + +static void +do_close_cleanup (void *arg) +{ + int *fd = arg; + close (*fd); + xfree (fd); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + int *saved_fd = xmalloc (sizeof (fd)); + *saved_fd = fd; + return make_cleanup (do_close_cleanup, saved_fd); +} + +static void +do_ui_file_delete (void *arg) +{ + ui_file_delete (arg); +} + +struct cleanup * +make_cleanup_ui_file_delete (struct ui_file *arg) +{ + return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg); +} + +struct cleanup * +make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function, + void *arg) +{ + struct cleanup *new + = (struct cleanup *) xmalloc (sizeof (struct cleanup)); + struct cleanup *old_chain = *pmy_chain; + + new->next = *pmy_chain; + new->function = function; + new->arg = arg; + *pmy_chain = new; + + return old_chain; +} + +/* Discard cleanups and do the actions they describe + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +do_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&cleanup_chain, old_chain); +} + +void +do_final_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +do_run_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&run_cleanup_chain, old_chain); +} + +void +do_exec_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_cleanup_chain, old_chain); +} + +void +do_exec_error_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +static void +do_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; /* Do this first incase recursion */ + (*ptr->function) (ptr->arg); + xfree (ptr); + } +} + +/* Discard cleanups, not doing the actions they describe, + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +discard_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&cleanup_chain, old_chain); +} + +void +discard_final_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +discard_exec_error_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +void +discard_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; + xfree (ptr); + } +} + +/* Set the cleanup_chain to 0, and return the old cleanup chain. */ +struct cleanup * +save_cleanups (void) +{ + return save_my_cleanups (&cleanup_chain); +} + +struct cleanup * +save_final_cleanups (void) +{ + return save_my_cleanups (&final_cleanup_chain); +} + +struct cleanup * +save_my_cleanups (struct cleanup **pmy_chain) +{ + struct cleanup *old_chain = *pmy_chain; + + *pmy_chain = 0; + return old_chain; +} + +/* Restore the cleanup chain from a previously saved chain. */ +void +restore_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&cleanup_chain, chain); +} + +void +restore_final_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&final_cleanup_chain, chain); +} + +void +restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) +{ + *pmy_chain = chain; +} + +/* This function is useful for cleanups. + Do + + foo = xmalloc (...); + old_chain = make_cleanup (free_current_contents, &foo); + + to arrange to free the object thus allocated. */ + +void +free_current_contents (void *ptr) +{ + void **location = ptr; + if (location == NULL) + internal_error (__FILE__, __LINE__, + "free_current_contents: NULL pointer"); + if (*location != NULL) + { + xfree (*location); + *location = NULL; + } +} + +/* Provide a known function that does nothing, to use as a base for + for a possibly long chain of cleanups. This is useful where we + use the cleanup chain for handling normal cleanups as well as dealing + with cleanups that need to be done as a result of a call to error(). + In such cases, we may not be certain where the first cleanup is, unless + we have a do-nothing one to always use as the base. */ + +void +null_cleanup (void *arg) +{ +} + +/* Add a continuation to the continuation list, the global list + cmd_continuation. The new continuation will be added at the front.*/ +void +add_continuation (void (*continuation_hook) (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = cmd_continuation; + cmd_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = cmd_continuation; + cmd_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_continuations (void) +{ + struct continuation *continuation_ptr; + + while (cmd_continuation) + { + continuation_ptr = cmd_continuation; + cmd_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + +/* Add a continuation to the continuation list, the global list + intermediate_continuation. The new continuation will be added at the front.*/ +void +add_intermediate_continuation (void (*continuation_hook) + (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = intermediate_continuation; + intermediate_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = intermediate_continuation; + intermediate_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + + while (intermediate_continuation) + { + continuation_ptr = intermediate_continuation; + intermediate_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + + + +/* Print a warning message. The first argument STRING is the warning + message, used as an fprintf format string, the second is the + va_list of arguments for that string. A warning is unfiltered (not + paginated) so that the user does not need to page through each + screen full of warnings when there are lots of them. */ + +void +vwarning (const char *string, va_list args) +{ + if (warning_hook) + (*warning_hook) (string, args); + else + { + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + va_end (args); + } +} + +/* Print a warning message. + The first argument STRING is the warning message, used as a fprintf string, + and the remaining args are passed as arguments to it. + The primary difference between warnings and errors is that a warning + does not force the return to command level. */ + +void +warning (const char *string, ...) +{ + va_list args; + va_start (args, string); + vwarning (string, args); + va_end (args); +} + +/* Print an error message and return to command level. + The first argument STRING is the error message, used as a fprintf string, + and the remaining args are passed as arguments to it. */ + +NORETURN void +verror (const char *string, va_list args) +{ + struct ui_file *tmp_stream = mem_fileopen (); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + error_stream (tmp_stream); +} + +NORETURN void +error (const char *string, ...) +{ + va_list args; + va_start (args, string); + verror (string, args); + va_end (args); +} + +static void +do_write (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +/* Cause a silent error to occur. Any error message is recorded + though it is not issued. */ +NORETURN void +error_silent (const char *string, ...) +{ + va_list args; + struct ui_file *tmp_stream = mem_fileopen (); + va_start (args, string); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (tmp_stream, do_write, gdb_lasterr); + va_end (args); + + throw_exception (RETURN_ERROR); +} + +/* Output an error message including any pre-print text to gdb_stderr. */ +void +error_output_message (char *pre_print, char *msg) +{ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (pre_print) + fputs_filtered (pre_print, gdb_stderr); + fputs_filtered (msg, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +} + +NORETURN void +error_stream (struct ui_file *stream) +{ + if (error_begin_hook) + error_begin_hook (); + + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (stream, do_write, gdb_lasterr); + + /* Write the message plus any error_pre_print to gdb_stderr. */ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (error_pre_print) + fputs_filtered (error_pre_print, gdb_stderr); + ui_file_put (stream, do_write, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +#ifdef CRASH_MERGE + if (error_hook) + (*error_hook)(); + else { + int console(char *, ...); + console("verror() called without error_hook\n"); + } +#endif + throw_exception (RETURN_ERROR); +} + +/* Get the last error message issued by gdb */ + +char * +error_last_message (void) +{ + long len; + return ui_file_xstrdup (gdb_lasterr, &len); +} + +/* This is to be called by main() at the very beginning */ + +void +error_init (void) +{ + gdb_lasterr = mem_fileopen (); +} + +/* Print a message reporting an internal error/warning. Ask the user + if they want to continue, dump core, or just exit. Return + something to indicate a quit. */ + +struct internal_problem +{ + const char *name; + /* FIXME: cagney/2002-08-15: There should be ``maint set/show'' + commands available for controlling these variables. */ + enum auto_boolean should_quit; + enum auto_boolean should_dump_core; +}; + +/* Report a problem, internal to GDB, to the user. Once the problem + has been reported, and assuming GDB didn't quit, the caller can + either allow execution to resume or throw an error. */ + +static void +internal_vproblem (struct internal_problem *problem, + const char *file, int line, const char *fmt, va_list ap) +{ + static int dejavu; + int quit_p; + int dump_core_p; + char *reason; + + /* Don't allow infinite error/warning recursion. */ + { + static char msg[] = "Recursive internal problem.\n"; + switch (dejavu) + { + case 0: + dejavu = 1; + break; + case 1: + dejavu = 2; + fputs_unfiltered (msg, gdb_stderr); + abort (); /* NOTE: GDB has only three calls to abort(). */ + default: + dejavu = 3; + write (STDERR_FILENO, msg, sizeof (msg)); + exit (1); + } + } + + /* Try to get the message out and at the start of a new line. */ + target_terminal_ours (); + begin_line (); + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason + (error/warning) and question become separated. Format using a + style similar to a compiler error message. Include extra detail + so that the user knows that they are living on the edge. */ + { + char *msg; + xvasprintf (&msg, fmt, ap); + xasprintf (&reason, "\ +%s:%d: %s: %s\n\ +A problem internal to GDB has been detected,\n\ +further debugging may prove unreliable.", file, line, problem->name, msg); + xfree (msg); + make_cleanup (xfree, reason); + } + + switch (problem->should_quit) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to quit GDB. When in batch mode + this lessens the likelhood of GDB going into an infinate + loop. */ + quit_p = query ("%s\nQuit this debugging session? ", reason); + break; + case AUTO_BOOLEAN_TRUE: + quit_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + quit_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + switch (problem->should_dump_core) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to dump core. This leaves a GDB + `dropping' so that it is easier to see that something went + wrong in GDB. */ + dump_core_p = query ("%s\nCreate a core file of GDB? ", reason); + break; + break; + case AUTO_BOOLEAN_TRUE: + dump_core_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + dump_core_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + if (quit_p) + { + if (dump_core_p) + abort (); /* NOTE: GDB has only three calls to abort(). */ + else + exit (1); + } + else + { + if (dump_core_p) + { + if (fork () == 0) + abort (); /* NOTE: GDB has only three calls to abort(). */ + } + } + + dejavu = 0; +} + +static struct internal_problem internal_error_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +NORETURN void +internal_verror (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_error_problem, file, line, fmt, ap); + throw_exception (RETURN_ERROR); +} + +NORETURN void +internal_error (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_verror (file, line, string, ap); + va_end (ap); +} + +static struct internal_problem internal_warning_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +void +internal_vwarning (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_warning_problem, file, line, fmt, ap); +} + +void +internal_warning (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_vwarning (file, line, string, ap); + va_end (ap); +} + +/* The strerror() function can return NULL for errno values that are + out of range. Provide a "safe" version that always returns a + printable string. */ + +char * +safe_strerror (int errnum) +{ + char *msg; + static char buf[32]; + + msg = strerror (errnum); + if (msg == NULL) + { + sprintf (buf, "(undocumented errno %d)", errnum); + msg = buf; + } + return (msg); +} + +/* Print the system error message for errno, and also mention STRING + as the file name for which the error was encountered. + Then return to command level. */ + +NORETURN void +perror_with_name (const char *string) +{ + char *err; + char *combined; + + err = safe_strerror (errno); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* I understand setting these is a matter of taste. Still, some people + may clear errno but not know about bfd_error. Doing this here is not + unreasonable. */ + bfd_set_error (bfd_error_no_error); + errno = 0; + + error ("%s.", combined); +} + +/* Print the system error message for ERRCODE, and also mention STRING + as the file name for which the error was encountered. */ + +void +print_sys_errmsg (const char *string, int errcode) +{ + char *err; + char *combined; + + err = safe_strerror (errcode); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* We want anything which was printed on stdout to come out first, before + this message. */ + gdb_flush (gdb_stdout); + fprintf_unfiltered (gdb_stderr, "%s.\n", combined); +} + +/* Control C eventually causes this to be called, at a convenient time. */ + +void +quit (void) +{ + struct serial *gdb_stdout_serial = serial_fdopen (1); + + target_terminal_ours (); + + /* We want all output to appear now, before we print "Quit". We + have 3 levels of buffering we have to flush (it's possible that + some of these should be changed to flush the lower-level ones + too): */ + + /* 1. The _filtered buffer. */ + wrap_here ((char *) 0); + + /* 2. The stdio buffer. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + + /* 3. The system-level buffer. */ + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + + annotate_error_begin (); + + /* Don't use *_filtered; we don't want to prompt the user to continue. */ + if (quit_pre_print) + fputs_unfiltered (quit_pre_print, gdb_stderr); + +#ifdef __MSDOS__ + /* No steenking SIGINT will ever be coming our way when the + program is resumed. Don't lie. */ + fprintf_unfiltered (gdb_stderr, "Quit\n"); +#else + if (job_control + /* If there is no terminal switching for this target, then we can't + possibly get screwed by the lack of job control. */ + || current_target.to_terminal_ours == NULL) + fprintf_unfiltered (gdb_stderr, "Quit\n"); + else + fprintf_unfiltered (gdb_stderr, + "Quit (expect signal SIGINT when the program is resumed)\n"); +#endif + throw_exception (RETURN_QUIT); +} + +/* Control C comes here */ +void +request_quit (int signo) +{ + quit_flag = 1; + /* Restore the signal handler. Harmless with BSD-style signals, needed + for System V-style signals. So just always do it, rather than worrying + about USG defines and stuff like that. */ + signal (signo, request_quit); + + if (immediate_quit) + quit (); +} + +/* Memory management stuff (malloc friends). */ + +static void * +mmalloc (void *md, size_t size) +{ + return malloc (size); /* NOTE: GDB's only call to malloc() */ +} + +static void * +mrealloc (void *md, void *ptr, size_t size) +{ + if (ptr == 0) /* Guard against old realloc's */ + return mmalloc (md, size); + else + return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */ +} + +static void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); /* NOTE: GDB's only call to calloc() */ +} + +static void +mfree (void *md, void *ptr) +{ + free (ptr); /* NOTE: GDB's only call to free() */ +} + +/* This used to do something interesting with USE_MMALLOC. + * It can be retired any time. -- chastain 2004-01-19. */ +void +init_malloc (void *md) +{ +} + +/* Called when a memory allocation fails, with the number of bytes of + memory requested in SIZE. */ + +NORETURN void +nomem (long size) +{ + if (size > 0) + { + internal_error (__FILE__, __LINE__, + "virtual memory exhausted: can't allocate %ld bytes.", + size); + } + else + { + internal_error (__FILE__, __LINE__, "virtual memory exhausted."); + } +} + +/* The xmmalloc() family of memory management routines. + + These are are like the mmalloc() family except that they implement + consistent semantics and guard against typical memory management + problems: if a malloc fails, an internal error is thrown; if + free(NULL) is called, it is ignored; if *alloc(0) is called, NULL + is returned. + + All these routines are implemented using the mmalloc() family. */ + +void * +xmmalloc (void *md, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmrealloc (void *md, void *ptr, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + if (ptr != NULL) + val = mrealloc (md, ptr, size); + else + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmcalloc (void *md, size_t number, size_t size) +{ + void *mem; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (number == 0 || size == 0) + { + number = 1; + size = 1; + } + + mem = mcalloc (md, number, size); + if (mem == NULL) + nomem (number * size); + + return mem; +} + +void +xmfree (void *md, void *ptr) +{ + if (ptr != NULL) + mfree (md, ptr); +} + +/* The xmalloc() (libiberty.h) family of memory management routines. + + These are like the ISO-C malloc() family except that they implement + consistent semantics and guard against typical memory management + problems. See xmmalloc() above for further information. + + All these routines are wrappers to the xmmalloc() family. */ + +/* NOTE: These are declared using PTR to ensure consistency with + "libiberty.h". xfree() is GDB local. */ + +PTR /* OK: PTR */ +xmalloc (size_t size) +{ + return xmmalloc (NULL, size); +} + +PTR /* OK: PTR */ +xrealloc (PTR ptr, size_t size) /* OK: PTR */ +{ + return xmrealloc (NULL, ptr, size); +} + +PTR /* OK: PTR */ +xcalloc (size_t number, size_t size) +{ + return xmcalloc (NULL, number, size); +} + +void +xfree (void *ptr) +{ + xmfree (NULL, ptr); +} + + +/* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + +void +xasprintf (char **ret, const char *format, ...) +{ + va_list args; + va_start (args, format); + xvasprintf (ret, format, args); + va_end (args); +} + +void +xvasprintf (char **ret, const char *format, va_list ap) +{ + int status = vasprintf (ret, format, ap); + /* NULL could be returned due to a memory allocation problem; a + badly format string; or something else. */ + if ((*ret) == NULL) + internal_error (__FILE__, __LINE__, + "vasprintf returned NULL buffer (errno %d)", errno); + /* A negative status with a non-NULL buffer shouldn't never + happen. But to be sure. */ + if (status < 0) + internal_error (__FILE__, __LINE__, + "vasprintf call failed (errno %d)", errno); +} + + +/* My replacement for the read system call. + Used like `read' but keeps going if `read' returns too soon. */ + +int +myread (int desc, char *addr, int len) +{ + int val; + int orglen = len; + + while (len > 0) + { + val = read (desc, addr, len); + if (val < 0) + return val; + if (val == 0) + return orglen - len; + len -= val; + addr += val; + } + return orglen; +} + +/* Make a copy of the string at PTR with SIZE characters + (and add a null character at the end in the copy). + Uses malloc to get the space. Returns the address of the copy. */ + +char * +savestring (const char *ptr, size_t size) +{ + char *p = (char *) xmalloc (size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +msavestring (void *md, const char *ptr, size_t size) +{ + char *p = (char *) xmmalloc (md, size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +mstrsave (void *md, const char *ptr) +{ + return (msavestring (md, ptr, strlen (ptr))); +} + +void +print_spaces (int n, struct ui_file *file) +{ + fputs_unfiltered (n_spaces (n), file); +} + +/* Print a host address. */ + +void +gdb_print_host_address (const void *addr, struct ui_file *stream) +{ + + /* We could use the %p conversion specifier to fprintf if we had any + way of knowing whether this host supports it. But the following + should work on the Alpha and on 32 bit machines. */ + + fprintf_filtered (stream, "0x%lx", (unsigned long) addr); +} + +/* Ask user a y-or-n question and return 1 iff answer is yes. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +/* VARARGS */ +int +query (const char *ctlstr, ...) +{ + va_list args; + int answer; + int ans2; + int retval; + + va_start (args, ctlstr); + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer "yes" if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return 1; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-query\n"); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(y or n) "); + + if (annotation_level > 1) + printf_filtered ("\n\032\032query\n"); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = 1; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + if (answer == 'Y') + { + retval = 1; + break; + } + if (answer == 'N') + { + retval = 0; + break; + } + printf_filtered ("Please answer y or n.\n"); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-query\n"); + return retval; +} + + +/* This function supports the nquery() and yquery() functions. + Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or default the answer to the specified default. + DEFCHAR is either 'y' or 'n' and refers to the default answer. + CTLSTR is the control string and should end in "? ". It should + not say how to answer, because we do that. + ARGS are the arguments passed along with the CTLSTR argument to + printf. */ + +static int +defaulted_query (const char *ctlstr, const char defchar, va_list args) +{ + int answer; + int ans2; + int retval; + int def_value; + char def_answer, not_def_answer; + char *y_string, *n_string; + + /* Set up according to which answer is the default. */ + if (defchar == 'y') + { + def_value = 1; + def_answer = 'Y'; + not_def_answer = 'N'; + y_string = "[y]"; + n_string = "n"; + } + else + { + def_value = 0; + def_answer = 'N'; + not_def_answer = 'Y'; + y_string = "y"; + n_string = "[n]"; + } + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer default value if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return def_value; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-%cquery\n", defchar); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(%s or %s) ", y_string, n_string); + + if (annotation_level > 1) + printf_filtered ("\n\032\032%cquery\n", defchar); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = def_value; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + /* Check answer. For the non-default, the user must specify + the non-default explicitly. */ + if (answer == not_def_answer) + { + retval = !def_value; + break; + } + /* Otherwise, for the default, the user may either specify + the required input or have it default by entering nothing. */ + if (answer == def_answer || answer == '\n' || + answer == '\r' || answer == EOF) + { + retval = def_value; + break; + } + /* Invalid entries are not defaulted and require another selection. */ + printf_filtered ("Please answer %s or %s.\n", + y_string, n_string); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-%cquery\n", defchar); + return retval; +} + + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 0 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +nquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'n', args); + va_end (args); +} + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 1 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +yquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'y', args); + va_end (args); +} + +/* Print an error message saying that we couldn't make sense of a + \^mumble sequence in a string or character constant. START and END + indicate a substring of some larger string that contains the + erroneous backslash sequence, missing the initial backslash. */ +static NORETURN int +no_control_char_error (const char *start, const char *end) +{ + int len = end - start; + char *copy = alloca (end - start + 1); + + memcpy (copy, start, len); + copy[len] = '\0'; + + error ("There is no control character `\\%s' in the `%s' character set.", + copy, target_charset ()); +} + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + should point to the character after the \. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +int +parse_escape (char **string_ptr) +{ + int target_char; + int c = *(*string_ptr)++; + if (c_parse_backslash (c, &target_char)) + return target_char; + else + switch (c) + { + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + case '^': + { + /* Remember where this escape sequence started, for reporting + errors. */ + char *sequence_start_pos = *string_ptr - 1; + + c = *(*string_ptr)++; + + if (c == '?') + { + /* XXXCHARSET: What is `delete' in the host character set? */ + c = 0177; + + if (!host_char_to_target (c, &target_char)) + error ("There is no character corresponding to `Delete' " + "in the target character set `%s'.", host_charset ()); + + return target_char; + } + else if (c == '\\') + target_char = parse_escape (string_ptr); + else + { + if (!host_char_to_target (c, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + } + + /* Now target_char is something like `c', and we want to find + its control-character equivalent. */ + if (!target_char_to_control_char (target_char, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + + return target_char; + } + + /* XXXCHARSET: we need to use isdigit and value-of-digit + methods of the host character set here. */ + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int i = c - '0'; + int count = 0; + while (++count < 3) + { + c = (**string_ptr); + if (c >= '0' && c <= '7') + { + (*string_ptr)++; + i *= 8; + i += c - '0'; + } + else + { + break; + } + } + return i; + } + default: + if (!host_char_to_target (c, &target_char)) + error + ("The escape sequence `\%c' is equivalent to plain `%c', which" + " has no equivalent\n" "in the `%s' character set.", c, c, + target_charset ()); + return target_char; + } +} + +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that this routine should only + be call for printing things which are independent of the language + of the program being debugged. */ + +static void +printchar (int c, void (*do_fputs) (const char *, struct ui_file *), + void (*do_fprintf) (struct ui_file *, const char *, ...), + struct ui_file *stream, int quoter) +{ + + c &= 0xFF; /* Avoid sign bit follies */ + + if (c < 0x20 || /* Low control chars */ + (c >= 0x7F && c < 0xA0) || /* DEL, High controls */ + (sevenbit_strings && c >= 0x80)) + { /* high order bit set */ + switch (c) + { + case '\n': + do_fputs ("\\n", stream); + break; + case '\b': + do_fputs ("\\b", stream); + break; + case '\t': + do_fputs ("\\t", stream); + break; + case '\f': + do_fputs ("\\f", stream); + break; + case '\r': + do_fputs ("\\r", stream); + break; + case '\033': + do_fputs ("\\e", stream); + break; + case '\007': + do_fputs ("\\a", stream); + break; + default: + do_fprintf (stream, "\\%.3o", (unsigned int) c); + break; + } + } + else + { + if (c == '\\' || c == quoter) + do_fputs ("\\", stream); + do_fprintf (stream, "%c", c); + } +} + +/* Print the character C on STREAM as part of the contents of a + literal string whose delimiter is QUOTER. Note that these routines + should only be call for printing things which are independent of + the language of the program being debugged. */ + +void +fputstr_filtered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter); +} + +void +fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + +void +fputstrn_unfiltered (const char *str, int n, int quoter, + struct ui_file *stream) +{ + int i; + for (i = 0; i < n; i++) + printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + + +/* Number of lines per page or UINT_MAX if paging is disabled. */ +static unsigned int lines_per_page; + +/* Number of chars per line or UINT_MAX if line folding is disabled. */ +static unsigned int chars_per_line; + +/* Current count of lines printed on this page, chars on this line. */ +static unsigned int lines_printed, chars_printed; + +/* Buffer and start column of buffered text, for doing smarter word- + wrapping. When someone calls wrap_here(), we start buffering output + that comes through fputs_filtered(). If we see a newline, we just + spit it out and forget about the wrap_here(). If we see another + wrap_here(), we spit it out and remember the newer one. If we see + the end of the line, we spit out a newline, the indent, and then + the buffered output. */ + +/* Malloc'd buffer with chars_per_line+2 bytes. Contains characters which + are waiting to be output (they have already been counted in chars_printed). + When wrap_buffer[0] is null, the buffer is empty. */ +static char *wrap_buffer; + +/* Pointer in wrap_buffer to the next character to fill. */ +static char *wrap_pointer; + +/* String to indent by if the wrap occurs. Must not be NULL if wrap_column + is non-zero. */ +static char *wrap_indent; + +/* Column number on the screen where wrap_buffer begins, or 0 if wrapping + is not in effect. */ +static int wrap_column; + + +/* Inialize the number of lines per page and chars per line. */ + +void +init_page_info (void) +{ +#if defined(TUI) + if (!tui_get_command_dimension (&chars_per_line, &lines_per_page)) +#endif + { + int rows, cols; + +#if defined(__GO32__) + rows = ScreenRows (); + cols = ScreenCols (); + lines_per_page = rows; + chars_per_line = cols; +#else + /* Make sure Readline has initialized its terminal settings. */ + rl_reset_terminal (NULL); + + /* Get the screen size from Readline. */ + rl_get_screen_size (&rows, &cols); + lines_per_page = rows; + chars_per_line = cols; + + /* Readline should have fetched the termcap entry for us. */ + if (tgetnum ("li") < 0 || getenv ("EMACS")) + { + /* The number of lines per page is not mentioned in the + terminal description. This probably means that paging is + not useful (e.g. emacs shell window), so disable paging. */ + lines_per_page = UINT_MAX; + } + + /* FIXME: Get rid of this junk. */ +#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) + SIGWINCH_HANDLER (SIGWINCH); +#endif + + /* If the output is not a terminal, don't paginate it. */ + if (!ui_file_isatty (gdb_stdout)) + lines_per_page = UINT_MAX; +#endif + } + + set_screen_size (); + set_width (); +} + +/* Set the screen size based on LINES_PER_PAGE and CHARS_PER_LINE. */ + +static void +set_screen_size (void) +{ + int rows = lines_per_page; + int cols = chars_per_line; + + if (rows <= 0) + rows = INT_MAX; + + if (cols <= 0) + rl_get_screen_size (NULL, &cols); + + /* Update Readline's idea of the terminal size. */ + rl_set_screen_size (rows, cols); +} + +/* Reinitialize WRAP_BUFFER according to the current value of + CHARS_PER_LINE. */ + +static void +set_width (void) +{ + if (chars_per_line == 0) + init_page_info (); + + if (!wrap_buffer) + { + wrap_buffer = (char *) xmalloc (chars_per_line + 2); + wrap_buffer[0] = '\0'; + } + else + wrap_buffer = (char *) xrealloc (wrap_buffer, chars_per_line + 2); + wrap_pointer = wrap_buffer; /* Start it at the beginning. */ +} + +static void +set_width_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); + set_width (); +} + +static void +set_height_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); +} + +/* Wait, so the user can read what's on the screen. Prompt the user + to continue by pressing RETURN. */ + +static void +prompt_for_continue (void) +{ + char *ignore; + char cont_prompt[120]; + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032pre-prompt-for-continue\n"); + + strcpy (cont_prompt, + "---Type to continue, or q to quit---"); + if (annotation_level > 1) + strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); + + /* We must do this *before* we call gdb_readline, else it will eventually + call us -- thinking that we're trying to print beyond the end of the + screen. */ + reinitialize_more_filter (); + + immediate_quit++; + /* On a real operating system, the user can quit with SIGINT. + But not on GO32. + + 'q' is provided on all systems so users don't have to change habits + from system to system, and because telling them what to do in + the prompt is more user-friendly than expecting them to think of + SIGINT. */ + /* Call readline, not gdb_readline, because GO32 readline handles control-C + whereas control-C to gdb_readline will cause the user to get dumped + out to DOS. */ + ignore = gdb_readline_wrapper (cont_prompt); + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032post-prompt-for-continue\n"); + + if (ignore) + { + char *p = ignore; + while (*p == ' ' || *p == '\t') + ++p; + if (p[0] == 'q') + { + if (!event_loop_p) + request_quit (SIGINT); + else + async_request_quit (0); + } + xfree (ignore); + } + immediate_quit--; + + /* Now we have to do this again, so that GDB will know that it doesn't + need to save the ---Type --- line at the top of the screen. */ + reinitialize_more_filter (); + + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ +} + +/* Reinitialize filter; ie. tell it to reset to original values. */ + +void +reinitialize_more_filter (void) +{ + lines_printed = 0; + chars_printed = 0; +} + +/* Indicate that if the next sequence of characters overflows the line, + a newline should be inserted here rather than when it hits the end. + If INDENT is non-null, it is a string to be printed to indent the + wrapped part on the next line. INDENT must remain accessible until + the next call to wrap_here() or until a newline is printed through + fputs_filtered(). + + If the line is already overfull, we immediately print a newline and + the indentation, and disable further wrapping. + + If we don't know the width of lines, but we know the page height, + we must not wrap words, but should still keep track of newlines + that were explicitly printed. + + INDENT should not contain tabs, as that will mess up the char count + on the next line. FIXME. + + This routine is guaranteed to force out any output which has been + squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be + used to force out output from the wrap_buffer. */ + +void +wrap_here (char *indent) +{ + /* This should have been allocated, but be paranoid anyway. */ + if (!wrap_buffer) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + if (wrap_buffer[0]) + { + *wrap_pointer = '\0'; + fputs_unfiltered (wrap_buffer, gdb_stdout); + } + wrap_pointer = wrap_buffer; + wrap_buffer[0] = '\0'; + if (chars_per_line == UINT_MAX) /* No line overflow checking */ + { + wrap_column = 0; + } + else if (chars_printed >= chars_per_line) + { + puts_filtered ("\n"); + if (indent != NULL) + puts_filtered (indent); + wrap_column = 0; + } + else + { + wrap_column = chars_printed; + if (indent == NULL) + wrap_indent = ""; + else + wrap_indent = indent; + } +} + +/* Print input string to gdb_stdout, filtered, with wrap, + arranging strings in columns of n chars. String can be + right or left justified in the column. Never prints + trailing spaces. String should never be longer than + width. FIXME: this could be useful for the EXAMINE + command, which currently doesn't tabulate very well */ + +void +puts_filtered_tabular (char *string, int width, int right) +{ + int spaces = 0; + int stringlen; + char *spacebuf; + + gdb_assert (chars_per_line > 0); + if (chars_per_line == UINT_MAX) + { + fputs_filtered (string, gdb_stdout); + fputs_filtered ("\n", gdb_stdout); + return; + } + + if (((chars_printed - 1) / width + 2) * width >= chars_per_line) + fputs_filtered ("\n", gdb_stdout); + + if (width >= chars_per_line) + width = chars_per_line - 1; + + stringlen = strlen (string); + + if (chars_printed > 0) + spaces = width - (chars_printed - 1) % width - 1; + if (right) + spaces += width - stringlen; + + spacebuf = alloca (spaces + 1); + spacebuf[spaces] = '\0'; + while (spaces--) + spacebuf[spaces] = ' '; + + fputs_filtered (spacebuf, gdb_stdout); + fputs_filtered (string, gdb_stdout); +} + + +/* Ensure that whatever gets printed next, using the filtered output + commands, starts at the beginning of the line. I.E. if there is + any pending output for the current line, flush it and start a new + line. Otherwise do nothing. */ + +void +begin_line (void) +{ + if (chars_printed > 0) + { + puts_filtered ("\n"); + } +} + + +/* Like fputs but if FILTER is true, pause after every screenful. + + Regardless of FILTER can wrap at points other than the final + character of a line. + + Unlike fputs, fputs_maybe_filtered does not return a value. + It is OK for LINEBUFFER to be NULL, in which case just don't print + anything. + + Note that a longjmp to top level may occur in this routine (only if + FILTER is true) (since prompt_for_continue may do so) so this + routine should not be called when cleanups are not in place. */ + +static void +fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + int filter) +{ + const char *lineptr; + + if (linebuffer == 0) + return; + + /* Don't do any filtering if it is disabled. */ + if ((stream != gdb_stdout) || !pagination_enabled + || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) + { + fputs_unfiltered (linebuffer, stream); + return; + } + + /* Go through and output each character. Show line extension + when this is necessary; prompt user for new page when this is + necessary. */ + + lineptr = linebuffer; + while (*lineptr) + { + /* Possible new page. */ + if (filter && (lines_printed >= lines_per_page - 1)) + prompt_for_continue (); + + while (*lineptr && *lineptr != '\n') + { + /* Print a single line. */ + if (*lineptr == '\t') + { + if (wrap_column) + *wrap_pointer++ = '\t'; + else + fputc_unfiltered ('\t', stream); + /* Shifting right by 3 produces the number of tab stops + we have already passed, and then adding one and + shifting left 3 advances to the next tab stop. */ + chars_printed = ((chars_printed >> 3) + 1) << 3; + lineptr++; + } + else + { + if (wrap_column) + *wrap_pointer++ = *lineptr; + else + fputc_unfiltered (*lineptr, stream); + chars_printed++; + lineptr++; + } + + if (chars_printed >= chars_per_line) + { + unsigned int save_chars = chars_printed; + + chars_printed = 0; + lines_printed++; + /* If we aren't actually wrapping, don't output newline -- + if chars_per_line is right, we probably just overflowed + anyway; if it's wrong, let us keep going. */ + if (wrap_column) + fputc_unfiltered ('\n', stream); + + /* Possible new page. */ + if (lines_printed >= lines_per_page - 1) + prompt_for_continue (); + + /* Now output indentation and wrapped string */ + if (wrap_column) + { + fputs_unfiltered (wrap_indent, stream); + *wrap_pointer = '\0'; /* Null-terminate saved stuff */ + fputs_unfiltered (wrap_buffer, stream); /* and eject it */ + /* FIXME, this strlen is what prevents wrap_indent from + containing tabs. However, if we recurse to print it + and count its chars, we risk trouble if wrap_indent is + longer than (the user settable) chars_per_line. + Note also that this can set chars_printed > chars_per_line + if we are printing a long string. */ + chars_printed = strlen (wrap_indent) + + (save_chars - wrap_column); + wrap_pointer = wrap_buffer; /* Reset buffer */ + wrap_buffer[0] = '\0'; + wrap_column = 0; /* And disable fancy wrap */ + } + } + } + + if (*lineptr == '\n') + { + chars_printed = 0; + wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */ + lines_printed++; + fputc_unfiltered ('\n', stream); + lineptr++; + } + } +} + +void +fputs_filtered (const char *linebuffer, struct ui_file *stream) +{ + fputs_maybe_filtered (linebuffer, stream, 1); +} + +int +putchar_unfiltered (int c) +{ + char buf = c; + ui_file_write (gdb_stdout, &buf, 1); + return c; +} + +/* Write character C to gdb_stdout using GDB's paging mechanism and return C. + May return nonlocally. */ + +int +putchar_filtered (int c) +{ + return fputc_filtered (c, gdb_stdout); +} + +int +fputc_unfiltered (int c, struct ui_file *stream) +{ + char buf = c; + ui_file_write (stream, &buf, 1); + return c; +} + +int +fputc_filtered (int c, struct ui_file *stream) +{ + char buf[2]; + + buf[0] = c; + buf[1] = 0; + fputs_filtered (buf, stream); + return c; +} + +/* puts_debug is like fputs_unfiltered, except it prints special + characters in printable fashion. */ + +void +puts_debug (char *prefix, char *string, char *suffix) +{ + int ch; + + /* Print prefix and suffix after each line. */ + static int new_line = 1; + static int return_p = 0; + static char *prev_prefix = ""; + static char *prev_suffix = ""; + + if (*string == '\n') + return_p = 0; + + /* If the prefix is changing, print the previous suffix, a new line, + and the new prefix. */ + if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line) + { + fputs_unfiltered (prev_suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + fputs_unfiltered (prefix, gdb_stdlog); + } + + /* Print prefix if we printed a newline during the previous call. */ + if (new_line) + { + new_line = 0; + fputs_unfiltered (prefix, gdb_stdlog); + } + + prev_prefix = prefix; + prev_suffix = suffix; + + /* Output characters in a printable format. */ + while ((ch = *string++) != '\0') + { + switch (ch) + { + default: + if (isprint (ch)) + fputc_unfiltered (ch, gdb_stdlog); + + else + fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff); + break; + + case '\\': + fputs_unfiltered ("\\\\", gdb_stdlog); + break; + case '\b': + fputs_unfiltered ("\\b", gdb_stdlog); + break; + case '\f': + fputs_unfiltered ("\\f", gdb_stdlog); + break; + case '\n': + new_line = 1; + fputs_unfiltered ("\\n", gdb_stdlog); + break; + case '\r': + fputs_unfiltered ("\\r", gdb_stdlog); + break; + case '\t': + fputs_unfiltered ("\\t", gdb_stdlog); + break; + case '\v': + fputs_unfiltered ("\\v", gdb_stdlog); + break; + } + + return_p = ch == '\r'; + } + + /* Print suffix if we printed a newline. */ + if (new_line) + { + fputs_unfiltered (suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + } +} + + +/* Print a variable number of ARGS using format FORMAT. If this + information is going to put the amount written (since the last call + to REINITIALIZE_MORE_FILTER or the last page break) over the page size, + call prompt_for_continue to get the users permision to continue. + + Unlike fprintf, this function does not return a value. + + We implement three variants, vfprintf (takes a vararg list and stream), + fprintf (takes a stream to write on), and printf (the usual). + + Note also that a longjmp to top level may occur in this routine + (since prompt_for_continue may do so) so this routine should not be + called when cleanups are not in place. */ + +static void +vfprintf_maybe_filtered (struct ui_file *stream, const char *format, + va_list args, int filter) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_maybe_filtered (linebuffer, stream, filter); + do_cleanups (old_cleanups); +} + + +void +vfprintf_filtered (struct ui_file *stream, const char *format, va_list args) +{ + vfprintf_maybe_filtered (stream, format, args, 1); +} + +void +vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_unfiltered (linebuffer, stream); + do_cleanups (old_cleanups); +} + +void +vprintf_filtered (const char *format, va_list args) +{ + vfprintf_maybe_filtered (gdb_stdout, format, args, 1); +} + +void +vprintf_unfiltered (const char *format, va_list args) +{ + vfprintf_unfiltered (gdb_stdout, format, args); +} + +void +fprintf_filtered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (stream, format, args); + va_end (args); +} + +void +fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (stream, format, args); + va_end (args); +} + +/* Like fprintf_filtered, but prints its result indented. + Called as fprintfi_filtered (spaces, stream, format, ...); */ + +void +fprintfi_filtered (int spaces, struct ui_file *stream, const char *format, + ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, stream); + + vfprintf_filtered (stream, format, args); + va_end (args); +} + + +void +printf_filtered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + + +void +printf_unfiltered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (gdb_stdout, format, args); + va_end (args); +} + +/* Like printf_filtered, but prints it's result indented. + Called as printfi_filtered (spaces, format, ...); */ + +void +printfi_filtered (int spaces, const char *format, ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, gdb_stdout); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + +/* Easy -- but watch out! + + This routine is *not* a replacement for puts()! puts() appends a newline. + This one doesn't, and had better not! */ + +void +puts_filtered (const char *string) +{ + fputs_filtered (string, gdb_stdout); +} + +void +puts_unfiltered (const char *string) +{ + fputs_unfiltered (string, gdb_stdout); +} + +/* Return a pointer to N spaces and a null. The pointer is good + until the next call to here. */ +char * +n_spaces (int n) +{ + char *t; + static char *spaces = 0; + static int max_spaces = -1; + + if (n > max_spaces) + { + if (spaces) + xfree (spaces); + spaces = (char *) xmalloc (n + 1); + for (t = spaces + n; t != spaces;) + *--t = ' '; + spaces[n] = '\0'; + max_spaces = n; + } + + return spaces + max_spaces - n; +} + +/* Print N spaces. */ +void +print_spaces_filtered (int n, struct ui_file *stream) +{ + fputs_filtered (n_spaces (n), stream); +} + +/* C++/ObjC demangler stuff. */ + +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + +void +fprintf_symbol_filtered (struct ui_file *stream, char *name, + enum language lang, int arg_mode) +{ + char *demangled; + + if (name != NULL) + { + /* If user wants to see raw output, no problem. */ + if (!demangle) + { + fputs_filtered (name, stream); + } + else + { + demangled = language_demangle (language_def (lang), name, arg_mode); + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + xfree (demangled); + } + } + } +} + +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any + differences in whitespace. Returns 0 if they match, non-zero if they + don't (slightly different than strcmp()'s range of return values). + + As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO". + This "feature" is useful when searching for matching C++ function names + (such as if the user types 'break FOO', where FOO is a mangled C++ + function). */ + +int +strcmp_iw (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0'); +} + +/* This is like strcmp except that it ignores whitespace and treats + '(' as the first non-NULL character in terms of ordering. Like + strcmp (and unlike strcmp_iw), it returns negative if STRING1 < + STRING2, 0 if STRING2 = STRING2, and positive if STRING1 > STRING2 + according to that ordering. + + If a list is sorted according to this function and if you want to + find names in the list that match some fixed NAME according to + strcmp_iw(LIST_ELT, NAME), then the place to start looking is right + where this function would put NAME. + + Here are some examples of why using strcmp to sort is a bad idea: + + Whitespace example: + + Say your partial symtab contains: "foo", "goo". Then, if + we try to do a search for "foo", strcmp will locate this + after "foo" and before "goo". Then lookup_partial_symbol + will start looking at strings beginning with "goo", and will never + see the correct match of "foo". + + Parenthesis example: + + In practice, this is less like to be an issue, but I'll give it a + shot. Let's assume that '$' is a legitimate character to occur in + symbols. (Which may well even be the case on some systems.) Then + say that the partial symbol table contains "foo$" and "foo(int)". + strcmp will put them in this order, since '$' < '('. Now, if the + user searches for "foo", then strcmp will sort "foo" before "foo$". + Then lookup_partial_symbol will notice that strcmp_iw("foo$", + "foo") is false, so it won't proceed to the actual match of + "foo(int)" with "foo". */ + +int +strcmp_iw_ordered (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + + switch (*string1) + { + /* Characters are non-equal unless they're both '\0'; we want to + make sure we get the comparison right according to our + comparison in the cases where one of them is '\0' or '('. */ + case '\0': + if (*string2 == '\0') + return 0; + else + return -1; + case '(': + if (*string2 == '\0') + return 1; + else + return -1; + default: + if (*string2 == '(') + return 1; + else + return *string1 - *string2; + } +} + +/* A simple comparison function with opposite semantics to strcmp. */ + +int +streq (const char *lhs, const char *rhs) +{ + return !strcmp (lhs, rhs); +} + + +/* + ** subset_compare() + ** Answer whether string_to_compare is a full or partial match to + ** template_string. The partial match must be in sequence starting + ** at index 0. + */ +int +subset_compare (char *string_to_compare, char *template_string) +{ + int match; + if (template_string != (char *) NULL && string_to_compare != (char *) NULL + && strlen (string_to_compare) <= strlen (template_string)) + match = + (strncmp + (template_string, string_to_compare, strlen (string_to_compare)) == 0); + else + match = 0; + return match; +} + + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_on_command (char *arg, int from_tty) +{ + pagination_enabled = 1; +} + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_off_command (char *arg, int from_tty) +{ + pagination_enabled = 0; +} + + +void +initialize_utils (void) +{ + struct cmd_list_element *c; + + c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, + "Set number of characters gdb thinks are in a line.", + &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_width_command); + + c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, + "Set number of lines gdb thinks are in a page.", &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_height_command); + + init_page_info (); + + add_show_from_set + (add_set_cmd ("demangle", class_support, var_boolean, + (char *) &demangle, + "Set demangling of encoded C++/ObjC names when displaying symbols.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("pagination", class_support, + var_boolean, (char *) &pagination_enabled, + "Set state of pagination.", &setlist), &showlist); + + if (xdb_commands) + { + add_com ("am", class_support, pagination_on_command, + "Enable pagination"); + add_com ("sm", class_support, pagination_off_command, + "Disable pagination"); + } + + add_show_from_set + (add_set_cmd ("sevenbit-strings", class_support, var_boolean, + (char *) &sevenbit_strings, + "Set printing of 8-bit characters in strings as \\nnn.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("asm-demangle", class_support, var_boolean, + (char *) &asm_demangle, + "Set demangling of C++/ObjC names in disassembly listings.", + &setprintlist), &showprintlist); +} + +/* Machine specific function to handle SIGWINCH signal. */ + +#ifdef SIGWINCH_HANDLER_BODY +SIGWINCH_HANDLER_BODY +#endif +/* print routines to handle variable size regs, etc. */ +/* temporary storage using circular buffer */ +#define NUMCELLS 16 +#define CELLSIZE 32 +static char * +get_cell (void) +{ + static char buf[NUMCELLS][CELLSIZE]; + static int cell = 0; + if (++cell >= NUMCELLS) + cell = 0; + return buf[cell]; +} + +int +strlen_paddr (void) +{ + return (TARGET_ADDR_BIT / 8 * 2); +} + +char * +paddr (CORE_ADDR addr) +{ + return phex (addr, TARGET_ADDR_BIT / 8); +} + +char * +paddr_nz (CORE_ADDR addr) +{ + return phex_nz (addr, TARGET_ADDR_BIT / 8); +} + +static void +decimal2str (char *paddr_str, char *sign, ULONGEST addr) +{ + /* steal code from valprint.c:print_decimal(). Should this worry + about the real size of addr as the above does? */ + unsigned long temp[3]; + int i = 0; + do + { + temp[i] = addr % (1000 * 1000 * 1000); + addr /= (1000 * 1000 * 1000); + i++; + } + while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); + switch (i) + { + case 1: + sprintf (paddr_str, "%s%lu", sign, temp[0]); + break; + case 2: + sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]); + break; + case 3: + sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]); + break; + default: + internal_error (__FILE__, __LINE__, + "failed internal consistency check"); + } +} + +char * +paddr_u (CORE_ADDR addr) +{ + char *paddr_str = get_cell (); + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +char * +paddr_d (LONGEST addr) +{ + char *paddr_str = get_cell (); + if (addr < 0) + decimal2str (paddr_str, "-", -addr); + else + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +/* eliminate warning from compiler on 32-bit systems */ +static int thirty_two = 32; + +char * +phex (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + str = get_cell (); + sprintf (str, "%08lx%08lx", + (unsigned long) (l >> thirty_two), + (unsigned long) (l & 0xffffffff)); + break; + case 4: + str = get_cell (); + sprintf (str, "%08lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%04x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex (l, sizeof (l)); + break; + } + return str; +} + +char * +phex_nz (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + { + unsigned long high = (unsigned long) (l >> thirty_two); + str = get_cell (); + if (high == 0) + sprintf (str, "%lx", (unsigned long) (l & 0xffffffff)); + else + sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff)); + break; + } + case 4: + str = get_cell (); + sprintf (str, "%lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex_nz (l, sizeof (l)); + break; + } + return str; +} + + +/* Convert a CORE_ADDR into a string. */ +const char * +core_addr_to_string (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex (addr, sizeof (addr))); + return str; +} + +const char * +core_addr_to_string_nz (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex_nz (addr, sizeof (addr))); + return str; +} + +/* Convert a string back into a CORE_ADDR. */ +CORE_ADDR +string_to_core_addr (const char *my_string) +{ + CORE_ADDR addr = 0; + if (my_string[0] == '0' && tolower (my_string[1]) == 'x') + { + /* Assume that it is in decimal. */ + int i; + for (i = 2; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 16); + else if (isxdigit (my_string[i])) + addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16); + else + internal_error (__FILE__, __LINE__, "invalid hex"); + } + } + else + { + /* Assume that it is in decimal. */ + int i; + for (i = 0; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 10); + else + internal_error (__FILE__, __LINE__, "invalid decimal"); + } + } + return addr; +} + +char * +gdb_realpath (const char *filename) +{ + /* Method 1: The system has a compile time upper bound on a filename + path. Use that and realpath() to canonicalize the name. This is + the most common case. Note that, if there isn't a compile time + upper bound, you want to avoid realpath() at all costs. */ +#if defined(HAVE_REALPATH) + { +# if defined (PATH_MAX) + char buf[PATH_MAX]; +# define USE_REALPATH +# elif defined (MAXPATHLEN) + char buf[MAXPATHLEN]; +# define USE_REALPATH +# endif +# if defined (USE_REALPATH) + const char *rp = realpath (filename, buf); + if (rp == NULL) + rp = filename; + return xstrdup (rp); +# endif + } +#endif /* HAVE_REALPATH */ + + /* Method 2: The host system (i.e., GNU) has the function + canonicalize_file_name() which malloc's a chunk of memory and + returns that, use that. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) + { + char *rp = canonicalize_file_name (filename); + if (rp == NULL) + return xstrdup (filename); + else + return rp; + } +#endif + + /* FIXME: cagney/2002-11-13: + + Method 2a: Use realpath() with a NULL buffer. Some systems, due + to the problems described in in method 3, have modified their + realpath() implementation so that it will allocate a buffer when + NULL is passed in. Before this can be used, though, some sort of + configure time test would need to be added. Otherwize the code + will likely core dump. */ + + /* Method 3: Now we're getting desperate! The system doesn't have a + compile time buffer size and no alternative function. Query the + OS, using pathconf(), for the buffer limit. Care is needed + though, some systems do not limit PATH_MAX (return -1 for + pathconf()) making it impossible to pass a correctly sized buffer + to realpath() (it could always overflow). On those systems, we + skip this. */ +#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA) + { + /* Find out the max path size. */ + long path_max = pathconf ("/", _PC_PATH_MAX); + if (path_max > 0) + { + /* PATH_MAX is bounded. */ + char *buf = alloca (path_max); + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); + } + } +#endif + + /* This system is a lost cause, just dup the buffer. */ + return xstrdup (filename); +} + +/* Return a copy of FILENAME, with its directory prefix canonicalized + by gdb_realpath. */ + +char * +xfullpath (const char *filename) +{ + const char *base_name = lbasename (filename); + char *dir_name; + char *real_path; + char *result; + + /* Extract the basename of filename, and return immediately + a copy of filename if it does not contain any directory prefix. */ + if (base_name == filename) + return xstrdup (filename); + + dir_name = alloca ((size_t) (base_name - filename + 2)); + /* Allocate enough space to store the dir_name + plus one extra + character sometimes needed under Windows (see below), and + then the closing \000 character */ + strncpy (dir_name, filename, base_name - filename); + dir_name[base_name - filename] = '\000'; + +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + /* We need to be careful when filename is of the form 'd:foo', which + is equivalent of d:./foo, which is totally different from d:/foo. */ + if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') + { + dir_name[2] = '.'; + dir_name[3] = '\000'; + } +#endif + + /* Canonicalize the directory prefix, and build the resulting + filename. If the dirname realpath already contains an ending + directory separator, avoid doubling it. */ + real_path = gdb_realpath (dir_name); + if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) + result = concat (real_path, base_name, NULL); + else + result = concat (real_path, SLASH_STRING, base_name, NULL); + + xfree (real_path); + return result; +} + + +/* This is the 32-bit CRC function used by the GNU separate debug + facility. An executable may contain a section named + .gnu_debuglink, which holds the name of a separate executable file + containing its debug info, and a checksum of that file's contents, + computed using this function. */ +unsigned long +gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) +{ + static const unsigned long crc32_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d + }; + unsigned char *end; + + crc = ~crc & 0xffffffff; + for (end = buf + len; buf < end; ++buf) + crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return ~crc & 0xffffffff;; +} + +ULONGEST +align_up (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v + n - 1) & -n; +} + +ULONGEST +align_down (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v & -n); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/dwarf2read.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/dwarf2read.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/dwarf2read.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/dwarf2read.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,8077 @@ +/* DWARF 2 debugging format support for GDB. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, + Inc. with support from Florida State University (under contract + with the Ada Joint Program Office), and Silicon Graphics, Inc. + Initial contribution by Brent Benson, Harris Computer Systems, Inc., + based on Fred Fish's (Cygnus Support) implementation of DWARF 1 + support in dwarfread.c + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "objfiles.h" +#include "elf/dwarf2.h" +#include "buildsym.h" +#include "demangle.h" +#include "expression.h" +#include "filenames.h" /* for DOSish file names */ +#include "macrotab.h" +#include "language.h" +#include "complaints.h" +#include "bcache.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" +#include "cp-support.h" + +#include +#include "gdb_string.h" +#include "gdb_assert.h" +#include + +#ifndef DWARF2_REG_TO_REGNUM +#define DWARF2_REG_TO_REGNUM(REG) (REG) +#endif + +#if 0 +/* .debug_info header for a compilation unit + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct comp_unit_header + { + unsigned int length; /* length of the .debug_info + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int abbrev_offset; /* offset into .debug_abbrev section */ + unsigned char addr_size; /* byte size of an address -- 4 */ + } +_COMP_UNIT_HEADER; +#define _ACTUAL_COMP_UNIT_HEADER_SIZE 11 +#endif + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct pubnames_header + { + unsigned int length; /* length of the .debug_pubnames + contribution */ + unsigned char version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned int info_size; /* byte size of .debug_info section + portion */ + } +_PUBNAMES_HEADER; +#define _ACTUAL_PUBNAMES_HEADER_SIZE 13 + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct aranges_header + { + unsigned int length; /* byte len of the .debug_aranges + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned char addr_size; /* byte size of an address */ + unsigned char seg_size; /* byte size of segment descriptor */ + } +_ARANGES_HEADER; +#define _ACTUAL_ARANGES_HEADER_SIZE 12 + +/* .debug_line statement program prologue + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct statement_prologue + { + unsigned int total_length; /* byte length of the statement + information */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int prologue_length; /* # bytes between prologue & + stmt program */ + unsigned char minimum_instruction_length; /* byte size of + smallest instr */ + unsigned char default_is_stmt; /* initial value of is_stmt + register */ + char line_base; + unsigned char line_range; + unsigned char opcode_base; /* number assigned to first special + opcode */ + unsigned char *standard_opcode_lengths; + } +_STATEMENT_PROLOGUE; + +/* offsets and sizes of debugging sections */ + +static unsigned int dwarf_info_size; +static unsigned int dwarf_abbrev_size; +static unsigned int dwarf_line_size; +static unsigned int dwarf_pubnames_size; +static unsigned int dwarf_aranges_size; +static unsigned int dwarf_loc_size; +static unsigned int dwarf_macinfo_size; +static unsigned int dwarf_str_size; +static unsigned int dwarf_ranges_size; +unsigned int dwarf_frame_size; +unsigned int dwarf_eh_frame_size; + +static asection *dwarf_info_section; +static asection *dwarf_abbrev_section; +static asection *dwarf_line_section; +static asection *dwarf_pubnames_section; +static asection *dwarf_aranges_section; +static asection *dwarf_loc_section; +static asection *dwarf_macinfo_section; +static asection *dwarf_str_section; +static asection *dwarf_ranges_section; +asection *dwarf_frame_section; +asection *dwarf_eh_frame_section; + +/* names of the debugging sections */ + +#define INFO_SECTION ".debug_info" +#define ABBREV_SECTION ".debug_abbrev" +#define LINE_SECTION ".debug_line" +#define PUBNAMES_SECTION ".debug_pubnames" +#define ARANGES_SECTION ".debug_aranges" +#define LOC_SECTION ".debug_loc" +#define MACINFO_SECTION ".debug_macinfo" +#define STR_SECTION ".debug_str" +#define RANGES_SECTION ".debug_ranges" +#define FRAME_SECTION ".debug_frame" +#define EH_FRAME_SECTION ".eh_frame" + +/* local data types */ + +/* We hold several abbreviation tables in memory at the same time. */ +#ifndef ABBREV_HASH_SIZE +#define ABBREV_HASH_SIZE 121 +#endif + +/* The data in a compilation unit header, after target2host + translation, looks like this. */ +struct comp_unit_head + { + unsigned long length; + short version; + unsigned int abbrev_offset; + unsigned char addr_size; + unsigned char signed_addr_p; + unsigned int offset_size; /* size of file offsets; either 4 or 8 */ + unsigned int initial_length_size; /* size of the length field; either + 4 or 12 */ + + /* Offset to the first byte of this compilation unit header in the + * .debug_info section, for resolving relative reference dies. */ + + unsigned int offset; + + /* Pointer to this compilation unit header in the .debug_info + * section */ + + char *cu_head_ptr; + + /* Pointer to the first die of this compilatio unit. This will + * be the first byte following the compilation unit header. */ + + char *first_die_ptr; + + /* Pointer to the next compilation unit header in the program. */ + + struct comp_unit_head *next; + + /* DWARF abbreviation table associated with this compilation unit */ + + struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE]; + + /* Base address of this compilation unit. */ + + CORE_ADDR base_address; + + /* Non-zero if base_address has been set. */ + + int base_known; + }; + +/* Internal state when decoding a particular compilation unit. */ +struct dwarf2_cu +{ + /* The objfile containing this compilation unit. */ + struct objfile *objfile; + + /* The header of the compilation unit. + + FIXME drow/2003-11-10: Some of the things from the comp_unit_head + should be moved to the dwarf2_cu structure; for instance the abbrevs + hash table. */ + struct comp_unit_head header; + + struct function_range *first_fn, *last_fn, *cached_fn; + + /* The language we are debugging. */ + enum language language; + const struct language_defn *language_defn; + + /* The generic symbol table building routines have separate lists for + file scope symbols and all all other scopes (local scopes). So + we need to select the right one to pass to add_symbol_to_list(). + We do it by keeping a pointer to the correct list in list_in_scope. + + FIXME: The original dwarf code just treated the file scope as the + first local scope, and all other local scopes as nested local + scopes, and worked fine. Check to see if we really need to + distinguish these in buildsym.c. */ + struct pending **list_in_scope; + + /* Maintain an array of referenced fundamental types for the current + compilation unit being read. For DWARF version 1, we have to construct + the fundamental types on the fly, since no information about the + fundamental types is supplied. Each such fundamental type is created by + calling a language dependent routine to create the type, and then a + pointer to that type is then placed in the array at the index specified + by it's FT_ value. The array has a fixed size set by the + FT_NUM_MEMBERS compile time constant, which is the number of predefined + fundamental types gdb knows how to construct. */ + struct type *ftypes[FT_NUM_MEMBERS]; /* Fundamental types */ +}; + +/* The line number information for a compilation unit (found in the + .debug_line section) begins with a "statement program header", + which contains the following information. */ +struct line_header +{ + unsigned int total_length; + unsigned short version; + unsigned int header_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + + /* standard_opcode_lengths[i] is the number of operands for the + standard opcode whose value is i. This means that + standard_opcode_lengths[0] is unused, and the last meaningful + element is standard_opcode_lengths[opcode_base - 1]. */ + unsigned char *standard_opcode_lengths; + + /* The include_directories table. NOTE! These strings are not + allocated with xmalloc; instead, they are pointers into + debug_line_buffer. If you try to free them, `free' will get + indigestion. */ + unsigned int num_include_dirs, include_dirs_size; + char **include_dirs; + + /* The file_names table. NOTE! These strings are not allocated + with xmalloc; instead, they are pointers into debug_line_buffer. + Don't try to free them directly. */ + unsigned int num_file_names, file_names_size; + struct file_entry + { + char *name; + unsigned int dir_index; + unsigned int mod_time; + unsigned int length; + } *file_names; + + /* The start and end of the statement program following this + header. These point into dwarf_line_buffer. */ + char *statement_program_start, *statement_program_end; +}; + +/* When we construct a partial symbol table entry we only + need this much information. */ +struct partial_die_info + { + enum dwarf_tag tag; + unsigned char has_children; + unsigned char is_external; + unsigned char is_declaration; + unsigned char has_type; + unsigned int offset; + unsigned int abbrev; + char *name; + int has_pc_info; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct dwarf_block *locdesc; + unsigned int language; + char *sibling; + }; + +/* This data structure holds the information of an abbrev. */ +struct abbrev_info + { + unsigned int number; /* number identifying abbrev */ + enum dwarf_tag tag; /* dwarf tag */ + int has_children; /* boolean */ + unsigned int num_attrs; /* number of attributes */ + struct attr_abbrev *attrs; /* an array of attribute descriptions */ + struct abbrev_info *next; /* next in chain */ + }; + +struct attr_abbrev + { + enum dwarf_attribute name; + enum dwarf_form form; + }; + +/* This data structure holds a complete die structure. */ +struct die_info + { + enum dwarf_tag tag; /* Tag indicating type of die */ + unsigned int abbrev; /* Abbrev number */ + unsigned int offset; /* Offset in .debug_info section */ + unsigned int num_attrs; /* Number of attributes */ + struct attribute *attrs; /* An array of attributes */ + struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ + struct die_info *child; /* Its first child, if any. */ + struct die_info *sibling; /* Its next sibling, if any. */ + struct die_info *parent; /* Its parent, if any. */ + + struct type *type; /* Cached type information */ + }; + +/* Attributes have a name and a value */ +struct attribute + { + enum dwarf_attribute name; + enum dwarf_form form; + union + { + char *str; + struct dwarf_block *blk; + unsigned long unsnd; + long int snd; + CORE_ADDR addr; + } + u; + }; + +struct function_range +{ + const char *name; + CORE_ADDR lowpc, highpc; + int seen_line; + struct function_range *next; +}; + +/* Get at parts of an attribute structure */ + +#define DW_STRING(attr) ((attr)->u.str) +#define DW_UNSND(attr) ((attr)->u.unsnd) +#define DW_BLOCK(attr) ((attr)->u.blk) +#define DW_SND(attr) ((attr)->u.snd) +#define DW_ADDR(attr) ((attr)->u.addr) + +/* Blocks are a bunch of untyped bytes. */ +struct dwarf_block + { + unsigned int size; + char *data; + }; + +#ifndef ATTR_ALLOC_CHUNK +#define ATTR_ALLOC_CHUNK 4 +#endif + +/* A hash table of die offsets for following references. */ +#ifndef REF_HASH_SIZE +#define REF_HASH_SIZE 1021 +#endif + +static struct die_info *die_ref_table[REF_HASH_SIZE]; + +/* Obstack for allocating temporary storage used during symbol reading. */ +static struct obstack dwarf2_tmp_obstack; + +/* Allocate fields for structs, unions and enums in this size. */ +#ifndef DW_FIELD_ALLOC_CHUNK +#define DW_FIELD_ALLOC_CHUNK 4 +#endif + +/* Actually data from the sections. */ +static char *dwarf_info_buffer; +static char *dwarf_abbrev_buffer; +static char *dwarf_line_buffer; +static char *dwarf_str_buffer; +static char *dwarf_macinfo_buffer; +static char *dwarf_ranges_buffer; +static char *dwarf_loc_buffer; + +/* A zeroed version of a partial die for initialization purposes. */ +static struct partial_die_info zeroed_partial_die; + +/* FIXME: decode_locdesc sets these variables to describe the location + to the caller. These ought to be a structure or something. If + none of the flags are set, the object lives at the address returned + by decode_locdesc. */ + +static int isreg; /* Object lives in register. + decode_locdesc's return value is + the register number. */ + +/* We put a pointer to this structure in the read_symtab_private field + of the psymtab. + The complete dwarf information for an objfile is kept in the + objfile_obstack, so that absolute die references can be handled. + Most of the information in this structure is related to an entire + object file and could be passed via the sym_private field of the objfile. + It is however conceivable that dwarf2 might not be the only type + of symbols read from an object file. */ + +struct dwarf2_pinfo + { + /* Pointer to start of dwarf info buffer for the objfile. */ + + char *dwarf_info_buffer; + + /* Offset in dwarf_info_buffer for this compilation unit. */ + + unsigned long dwarf_info_offset; + + /* Pointer to start of dwarf abbreviation buffer for the objfile. */ + + char *dwarf_abbrev_buffer; + + /* Size of dwarf abbreviation section for the objfile. */ + + unsigned int dwarf_abbrev_size; + + /* Pointer to start of dwarf line buffer for the objfile. */ + + char *dwarf_line_buffer; + + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + + /* Pointer to start of dwarf string buffer for the objfile. */ + + char *dwarf_str_buffer; + + /* Size of dwarf string section for the objfile. */ + + unsigned int dwarf_str_size; + + /* Pointer to start of dwarf macro buffer for the objfile. */ + + char *dwarf_macinfo_buffer; + + /* Size of dwarf macinfo section for the objfile. */ + + unsigned int dwarf_macinfo_size; + + /* Pointer to start of dwarf ranges buffer for the objfile. */ + + char *dwarf_ranges_buffer; + + /* Size of dwarf ranges buffer for the objfile. */ + + unsigned int dwarf_ranges_size; + + /* Pointer to start of dwarf locations buffer for the objfile. */ + + char *dwarf_loc_buffer; + + /* Size of dwarf locations buffer for the objfile. */ + + unsigned int dwarf_loc_size; + }; + +#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private) +#define DWARF_INFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_info_buffer) +#define DWARF_INFO_OFFSET(p) (PST_PRIVATE(p)->dwarf_info_offset) +#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) +#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) +#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) +#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) +#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) +#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer) +#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size) +#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer) +#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size) +#define DWARF_LOC_BUFFER(p) (PST_PRIVATE(p)->dwarf_loc_buffer) +#define DWARF_LOC_SIZE(p) (PST_PRIVATE(p)->dwarf_loc_size) + +/* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, + but this would require a corresponding change in unpack_field_as_long + and friends. */ +static int bits_per_byte = 8; + +/* The routines that read and process dies for a C struct or C++ class + pass lists of data member fields and lists of member function fields + in an instance of a field_info structure, as defined below. */ +struct field_info + { + /* List of data member and baseclasses fields. */ + struct nextfield + { + struct nextfield *next; + int accessibility; + int virtuality; + struct field field; + } + *fields; + + /* Number of fields. */ + int nfields; + + /* Number of baseclasses. */ + int nbaseclasses; + + /* Set if the accesibility of one of the fields is not public. */ + int non_public_fields; + + /* Member function fields array, entries are allocated in the order they + are encountered in the object file. */ + struct nextfnfield + { + struct nextfnfield *next; + struct fn_field fnfield; + } + *fnfields; + + /* Member function fieldlist array, contains name of possibly overloaded + member function, number of overloaded member functions and a pointer + to the head of the member function field chain. */ + struct fnfieldlist + { + char *name; + int length; + struct nextfnfield *head; + } + *fnfieldlists; + + /* Number of entries in the fnfieldlists array. */ + int nfnfields; + }; + +/* Various complaints about symbol reading that don't abort the process */ + +static void +dwarf2_statement_list_fits_in_line_number_section_complaint (void) +{ + complaint (&symfile_complaints, + "statement list doesn't fit in .debug_line section"); +} + +static void +dwarf2_complex_location_expr_complaint (void) +{ + complaint (&symfile_complaints, "location expression too complex"); +} + +static void +dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, + int arg3) +{ + complaint (&symfile_complaints, + "const value length mismatch for '%s', got %d, expected %d", arg1, + arg2, arg3); +} + +static void +dwarf2_macros_too_long_complaint (void) +{ + complaint (&symfile_complaints, + "macro info runs off end of `.debug_macinfo' section"); +} + +static void +dwarf2_macro_malformed_definition_complaint (const char *arg1) +{ + complaint (&symfile_complaints, + "macro debug info contains a malformed macro definition:\n`%s'", + arg1); +} + +static void +dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2) +{ + complaint (&symfile_complaints, + "invalid attribute class or form for '%s' in '%s'", arg1, arg2); +} + +/* local function prototypes */ + +static void dwarf2_locate_sections (bfd *, asection *, void *); + +#if 0 +static void dwarf2_build_psymtabs_easy (struct objfile *, int); +#endif + +static void dwarf2_build_psymtabs_hard (struct objfile *, int); + +static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *, + const char *namespace); + +static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *, + const char *namespace); + +static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace); + +static char *add_partial_namespace (struct partial_die_info *pdi, + char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_structure (struct partial_die_info *struct_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_enumeration (struct partial_die_info *enum_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *locate_pdi_sibling (struct partial_die_info *orig_pdi, + char *info_ptr, + bfd *abfd, + struct dwarf2_cu *cu); + +static void dwarf2_psymtab_to_symtab (struct partial_symtab *); + +static void psymtab_to_symtab_1 (struct partial_symtab *); + +char *dwarf2_read_section (struct objfile *, asection *); + +static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu); + +static void dwarf2_empty_abbrev_table (void *); + +static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int, + struct dwarf2_cu *); + +static char *read_partial_die (struct partial_die_info *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_full_die (struct die_info **, bfd *, char *, + struct dwarf2_cu *, int *); + +static char *read_attribute (struct attribute *, struct attr_abbrev *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_attribute_value (struct attribute *, unsigned, + bfd *, char *, struct dwarf2_cu *); + +static unsigned int read_1_byte (bfd *, char *); + +static int read_1_signed_byte (bfd *, char *); + +static unsigned int read_2_bytes (bfd *, char *); + +static unsigned int read_4_bytes (bfd *, char *); + +static unsigned long read_8_bytes (bfd *, char *); + +static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *, + int *bytes_read); + +static LONGEST read_initial_length (bfd *, char *, + struct comp_unit_head *, int *bytes_read); + +static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *, + int *bytes_read); + +static char *read_n_bytes (bfd *, char *, unsigned int); + +static char *read_string (bfd *, char *, unsigned int *); + +static char *read_indirect_string (bfd *, char *, const struct comp_unit_head *, + unsigned int *); + +static unsigned long read_unsigned_leb128 (bfd *, char *, unsigned int *); + +static long read_signed_leb128 (bfd *, char *, unsigned int *); + +static void set_cu_language (unsigned int, struct dwarf2_cu *); + +static struct attribute *dwarf2_attr (struct die_info *, unsigned int, + struct dwarf2_cu *); + +static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); + +static struct die_info *die_specification (struct die_info *die, + struct dwarf2_cu *); + +static void free_line_header (struct line_header *lh); + +static struct line_header *(dwarf_decode_line_header + (unsigned int offset, + bfd *abfd, struct dwarf2_cu *cu)); + +static void dwarf_decode_lines (struct line_header *, char *, bfd *, + struct dwarf2_cu *); + +static void dwarf2_start_subfile (char *, char *); + +static struct symbol *new_symbol (struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_const_value (struct attribute *, struct symbol *, + struct dwarf2_cu *); + +static void dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits); + +static struct type *die_type (struct die_info *, struct dwarf2_cu *); + +static struct type *die_containing_type (struct die_info *, + struct dwarf2_cu *); + +#if 0 +static struct type *type_at_offset (unsigned int, struct objfile *); +#endif + +static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *); + +static void read_type_die (struct die_info *, struct dwarf2_cu *); + +static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); + +static char *typename_concat (const char *prefix, const char *suffix); + +static void read_typedef (struct die_info *, struct dwarf2_cu *); + +static void read_base_type (struct die_info *, struct dwarf2_cu *); + +static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu); + +static void read_file_scope (struct die_info *, struct dwarf2_cu *); + +static void read_func_scope (struct die_info *, struct dwarf2_cu *); + +static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *); + +static int dwarf2_get_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *); + +static void get_scope_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *); + +static void dwarf2_add_field (struct field_info *, struct die_info *, + struct dwarf2_cu *); + +static void dwarf2_attach_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void dwarf2_add_member_fn (struct field_info *, + struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_attach_fn_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); + +static void read_common_block (struct die_info *, struct dwarf2_cu *); + +static void read_namespace (struct die_info *die, struct dwarf2_cu *); + +static const char *namespace_name (struct die_info *die, + int *is_anonymous, struct dwarf2_cu *); + +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); + +static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); + +static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *); + +static void read_array_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_ptr_to_member_type (struct die_info *, + struct dwarf2_cu *); + +static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_const_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_string_type (struct die_info *, struct dwarf2_cu *); + +static void read_subroutine_type (struct die_info *, struct dwarf2_cu *); + +static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *); + +static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static void free_die_list (struct die_info *); + +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + +static void process_die (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_linkage_name (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_name (struct die_info *die, struct dwarf2_cu *); + +static struct die_info *dwarf2_extension (struct die_info *die, + struct dwarf2_cu *); + +static char *dwarf_tag_name (unsigned int); + +static char *dwarf_attr_name (unsigned int); + +static char *dwarf_form_name (unsigned int); + +static char *dwarf_stack_op_name (unsigned int); + +static char *dwarf_bool_name (unsigned int); + +static char *dwarf_type_encoding_name (unsigned int); + +#if 0 +static char *dwarf_cfi_name (unsigned int); + +struct die_info *copy_die (struct die_info *); +#endif + +static struct die_info *sibling_die (struct die_info *); + +static void dump_die (struct die_info *); + +static void dump_die_list (struct die_info *); + +static void store_in_ref_table (unsigned int, struct die_info *); + +static void dwarf2_empty_hash_tables (void); + +static unsigned int dwarf2_get_ref_die_offset (struct attribute *, + struct dwarf2_cu *); + +static int dwarf2_get_attr_constant_value (struct attribute *, int); + +static struct die_info *follow_die_ref (unsigned int); + +static struct type *dwarf2_fundamental_type (struct objfile *, int, + struct dwarf2_cu *); + +/* memory allocation interface */ + +static void dwarf2_free_tmp_obstack (void *); + +static struct dwarf_block *dwarf_alloc_block (void); + +static struct abbrev_info *dwarf_alloc_abbrev (void); + +static struct die_info *dwarf_alloc_die (void); + +static void initialize_cu_func_list (struct dwarf2_cu *); + +static void add_to_cu_func_list (const char *, CORE_ADDR, CORE_ADDR, + struct dwarf2_cu *); + +static void dwarf_decode_macros (struct line_header *, unsigned int, + char *, bfd *, struct dwarf2_cu *); + +static int attr_form_is_block (struct attribute *); + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu); + +/* Try to locate the sections we need for DWARF 2 debugging + information and return true if we have enough to do something. */ + +int +dwarf2_has_info (bfd *abfd) +{ + dwarf_info_section = 0; + dwarf_abbrev_section = 0; + dwarf_line_section = 0; + dwarf_str_section = 0; + dwarf_macinfo_section = 0; + dwarf_frame_section = 0; + dwarf_eh_frame_section = 0; + dwarf_ranges_section = 0; + dwarf_loc_section = 0; + + bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); + return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL); +} + +/* This function is mapped across the sections and remembers the + offset and size of each of the debugging sections we are interested + in. */ + +static void +dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) +{ + if (strcmp (sectp->name, INFO_SECTION) == 0) + { + dwarf_info_size = bfd_get_section_size_before_reloc (sectp); + dwarf_info_section = sectp; + } + else if (strcmp (sectp->name, ABBREV_SECTION) == 0) + { + dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp); + dwarf_abbrev_section = sectp; + } + else if (strcmp (sectp->name, LINE_SECTION) == 0) + { + dwarf_line_size = bfd_get_section_size_before_reloc (sectp); + dwarf_line_section = sectp; + } + else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0) + { + dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp); + dwarf_pubnames_section = sectp; + } + else if (strcmp (sectp->name, ARANGES_SECTION) == 0) + { + dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_aranges_section = sectp; + } + else if (strcmp (sectp->name, LOC_SECTION) == 0) + { + dwarf_loc_size = bfd_get_section_size_before_reloc (sectp); + dwarf_loc_section = sectp; + } + else if (strcmp (sectp->name, MACINFO_SECTION) == 0) + { + dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp); + dwarf_macinfo_section = sectp; + } + else if (strcmp (sectp->name, STR_SECTION) == 0) + { + dwarf_str_size = bfd_get_section_size_before_reloc (sectp); + dwarf_str_section = sectp; + } + else if (strcmp (sectp->name, FRAME_SECTION) == 0) + { + dwarf_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_frame_section = sectp; + } + else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0) + { + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } + } + else if (strcmp (sectp->name, RANGES_SECTION) == 0) + { + dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_ranges_section = sectp; + } +} + +/* Build a partial symbol table. */ + +void +dwarf2_build_psymtabs (struct objfile *objfile, int mainline) +{ + + /* We definitely need the .debug_info and .debug_abbrev sections */ + + dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section); + dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section); + + if (dwarf_line_section) + dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section); + else + dwarf_line_buffer = NULL; + + if (dwarf_str_section) + dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section); + else + dwarf_str_buffer = NULL; + + if (dwarf_macinfo_section) + dwarf_macinfo_buffer = dwarf2_read_section (objfile, + dwarf_macinfo_section); + else + dwarf_macinfo_buffer = NULL; + + if (dwarf_ranges_section) + dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section); + else + dwarf_ranges_buffer = NULL; + + if (dwarf_loc_section) + dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section); + else + dwarf_loc_buffer = NULL; + + if (mainline + || (objfile->global_psymbols.size == 0 + && objfile->static_psymbols.size == 0)) + { + init_psymbol_list (objfile, 1024); + } + +#if 0 + if (dwarf_aranges_offset && dwarf_pubnames_offset) + { + /* Things are significantly easier if we have .debug_aranges and + .debug_pubnames sections */ + + dwarf2_build_psymtabs_easy (objfile, mainline); + } + else +#endif + /* only test this case for now */ + { + /* In this case we have to work a bit harder */ + dwarf2_build_psymtabs_hard (objfile, mainline); + } +} + +#if 0 +/* Build the partial symbol table from the information in the + .debug_pubnames and .debug_aranges sections. */ + +static void +dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + char *aranges_buffer, *pubnames_buffer; + char *aranges_ptr, *pubnames_ptr; + unsigned int entry_length, version, info_offset, info_size; + + pubnames_buffer = dwarf2_read_section (objfile, + dwarf_pubnames_section); + pubnames_ptr = pubnames_buffer; + while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size) + { + struct comp_unit_head cu_header; + int bytes_read; + + entry_length = read_initial_length (abfd, pubnames_ptr, &cu_header, + &bytes_read); + pubnames_ptr += bytes_read; + version = read_1_byte (abfd, pubnames_ptr); + pubnames_ptr += 1; + info_offset = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + info_size = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + } + + aranges_buffer = dwarf2_read_section (objfile, + dwarf_aranges_section); + +} +#endif + +/* Read in the comp unit header information from the debug_info at + info_ptr. */ + +static char * +read_comp_unit_head (struct comp_unit_head *cu_header, + char *info_ptr, bfd *abfd) +{ + int signed_addr; + int bytes_read; + cu_header->length = read_initial_length (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->version = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + cu_header->abbrev_offset = read_offset (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->addr_size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + signed_addr = bfd_get_sign_extend_vma (abfd); + if (signed_addr < 0) + internal_error (__FILE__, __LINE__, + "read_comp_unit_head: dwarf from non elf file"); + cu_header->signed_addr_p = signed_addr; + return info_ptr; +} + +/* Build the partial symbol table by doing a quick pass through the + .debug_info and .debug_abbrev sections. */ + +static void +dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) +{ + /* Instead of reading this into a big buffer, we should probably use + mmap() on architectures that support it. (FIXME) */ + bfd *abfd = objfile->obfd; + char *info_ptr, *abbrev_ptr; + char *beg_of_comp_unit; + struct partial_die_info comp_unit_die; + struct partial_symtab *pst; + struct cleanup *back_to; + CORE_ADDR lowpc, highpc, baseaddr; + + info_ptr = dwarf_info_buffer; + abbrev_ptr = dwarf_abbrev_buffer; + + /* We use dwarf2_tmp_obstack for objects that don't need to survive + the partial symbol scan, like attribute values. + + We could reduce our peak memory consumption during partial symbol + table construction by freeing stuff from this obstack more often + --- say, after processing each compilation unit, or each die --- + but it turns out that this saves almost nothing. For an + executable with 11Mb of Dwarf 2 data, I found about 64k allocated + on dwarf2_tmp_obstack. Some investigation showed: + + 1) 69% of the attributes used forms DW_FORM_addr, DW_FORM_data*, + DW_FORM_flag, DW_FORM_[su]data, and DW_FORM_ref*. These are + all fixed-length values not requiring dynamic allocation. + + 2) 30% of the attributes used the form DW_FORM_string. For + DW_FORM_string, read_attribute simply hands back a pointer to + the null-terminated string in dwarf_info_buffer, so no dynamic + allocation is needed there either. + + 3) The remaining 1% of the attributes all used DW_FORM_block1. + 75% of those were DW_AT_frame_base location lists for + functions; the rest were DW_AT_location attributes, probably + for the global variables. + + Anyway, what this all means is that the memory the dwarf2 + reader uses as temporary space reading partial symbols is about + 0.5% as much as we use for dwarf_*_buffer. That's noise. */ + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ + while (info_ptr < dwarf_info_buffer + dwarf_info_size) + { + struct dwarf2_cu cu; + beg_of_comp_unit = info_ptr; + + cu.objfile = objfile; + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + if (cu.header.version != 2) + { + error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd)); + return; + } + if (cu.header.abbrev_offset >= dwarf_abbrev_size) + { + error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]", + (long) cu.header.abbrev_offset, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size + > dwarf_info_buffer + dwarf_info_size) + { + error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]", + (long) cu.header.length, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + /* Complete the cu_header */ + cu.header.offset = beg_of_comp_unit - dwarf_info_buffer; + cu.header.first_die_ptr = info_ptr; + cu.header.cu_head_ptr = beg_of_comp_unit; + + cu.list_in_scope = &file_symbols; + + /* Read the abbrevs for this compilation unit into a table */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + /* Read the compilation unit die */ + info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr, + &cu); + + /* Set the language we're debugging */ + set_cu_language (comp_unit_die.language, &cu); + + /* Allocate a new partial symbol table structure */ + pst = start_psymtab_common (objfile, objfile->section_offsets, + comp_unit_die.name ? comp_unit_die.name : "", + comp_unit_die.lowpc, + objfile->global_psymbols.next, + objfile->static_psymbols.next); + + pst->read_symtab_private = (char *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo)); + DWARF_INFO_BUFFER (pst) = dwarf_info_buffer; + DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf_info_buffer; + DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; + DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; + DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; + DWARF_STR_BUFFER (pst) = dwarf_str_buffer; + DWARF_STR_SIZE (pst) = dwarf_str_size; + DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer; + DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size; + DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer; + DWARF_RANGES_SIZE (pst) = dwarf_ranges_size; + DWARF_LOC_BUFFER (pst) = dwarf_loc_buffer; + DWARF_LOC_SIZE (pst) = dwarf_loc_size; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Store the function that reads in the rest of the symbol table */ + pst->read_symtab = dwarf2_psymtab_to_symtab; + + /* Check if comp unit has_children. + If so, read the rest of the partial symbols from this comp unit. + If not, there's no more debug_info for this comp unit. */ + if (comp_unit_die.has_children) + { + lowpc = ((CORE_ADDR) -1); + highpc = ((CORE_ADDR) 0); + + info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc, + &cu, NULL); + + /* If we didn't find a lowpc, set it to highpc to avoid + complaints from `maint check'. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + + /* If the compilation unit didn't have an explicit address range, + then use the information extracted from its child dies. */ + if (! comp_unit_die.has_pc_info) + { + comp_unit_die.lowpc = lowpc; + comp_unit_die.highpc = highpc; + } + } + pst->textlow = comp_unit_die.lowpc + baseaddr; + pst->texthigh = comp_unit_die.highpc + baseaddr; + + pst->n_global_syms = objfile->global_psymbols.next - + (objfile->global_psymbols.list + pst->globals_offset); + pst->n_static_syms = objfile->static_psymbols.next - + (objfile->static_psymbols.list + pst->statics_offset); + sort_pst_symbols (pst); + + /* If there is already a psymtab or symtab for a file of this + name, remove it. (If there is a symtab, more drastic things + also happen.) This happens in VxWorks. */ + free_named_symtabs (pst->filename); + + info_ptr = beg_of_comp_unit + cu.header.length + + cu.header.initial_length_size; + } + do_cleanups (back_to); +} + +/* Read in all interesting dies to the end of the compilation unit or + to the end of the current namespace. NAMESPACE is NULL if we + haven't yet encountered any DW_TAG_namespace entries; otherwise, + it's the name of the current namespace. In particular, it's the + empty string if we're currently in the global namespace but have + previously encountered a DW_TAG_namespace. */ + +static char * +scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu, + const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + /* Now, march along the PDI's, descending into ones which have + interesting children but skipping the children of the other ones, + until we reach the end of the compilation unit. */ + + while (1) + { + /* This flag tells whether or not info_ptr has gotten updated + inside the loop. */ + int info_ptr_updated = 0; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + /* Anonymous namespaces have no name but have interesting + children, so we need to look at them. Ditto for anonymous + enums. */ + + if (pdi.name != NULL || pdi.tag == DW_TAG_namespace + || pdi.tag == DW_TAG_enumeration_type) + { + switch (pdi.tag) + { + case DW_TAG_subprogram: + if (pdi.has_pc_info) + { + if (pdi.lowpc < *lowpc) + { + *lowpc = pdi.lowpc; + } + if (pdi.highpc > *highpc) + { + *highpc = pdi.highpc; + } + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + } + break; + case DW_TAG_variable: + case DW_TAG_typedef: + case DW_TAG_union_type: + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_structure (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_enumeration_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_enumeration (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + /* File scope base type definitions are added to the partial + symbol table. */ + add_partial_symbol (&pdi, cu, namespace); + break; + case DW_TAG_namespace: + /* We've hit a DW_TAG_namespace entry, so we know this + file has been compiled using a compiler that + generates them; update NAMESPACE to reflect that. */ + if (namespace == NULL) + namespace = ""; + info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc, + cu, namespace); + info_ptr_updated = 1; + break; + default: + break; + } + } + + if (pdi.tag == 0) + break; + + /* If the die has a sibling, skip to the sibling, unless another + function has already updated info_ptr for us. */ + + /* NOTE: carlton/2003-06-16: This is a bit hackish, but whether + or not we want to update this depends on enough stuff (not + only pdi.tag but also whether or not pdi.name is NULL) that + this seems like the easiest way to handle the issue. */ + + if (!info_ptr_updated) + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } + + return info_ptr; +} + +static void +add_partial_symbol (struct partial_die_info *pdi, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + CORE_ADDR addr = 0; + char *actual_name = pdi->name; + const struct partial_symbol *psym = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* If we're not in the global namespace and if the namespace name + isn't encoded in a mangled actual_name, add it. */ + + if (pdi_needs_namespace (pdi->tag, namespace)) + { + actual_name = alloca (strlen (pdi->name) + 2 + strlen (namespace) + 1); + strcpy (actual_name, namespace); + strcat (actual_name, "::"); + strcat (actual_name, pdi->name); + } + + switch (pdi->tag) + { + case DW_TAG_subprogram: + if (pdi->is_external) + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->global_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + else + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_file_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->static_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_variable: + if (pdi->is_external) + { + /* Global Variable. + Don't enter into the minimal symbol tables as there is + a minimal symbol table entry from the ELF symbols already. + Enter into partial symbol table if it has a location + descriptor or a type. + If the location descriptor is missing, new_symbol will create + a LOC_UNRESOLVED symbol, the address of the variable will then + be determined from the minimal symbol table whenever the variable + is referenced. + The address for the partial symbol table entry is not + used by GDB, but it comes in handy for debugging partial symbol + table building. */ + + if (pdi->locdesc) + addr = decode_locdesc (pdi->locdesc, cu); + if (pdi->locdesc || pdi->has_type) + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->global_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + else + { + /* Static Variable. Skip symbols without location descriptors. */ + if (pdi->locdesc == NULL) + return; + addr = decode_locdesc (pdi->locdesc, cu); + /*prim_record_minimal_symbol (actual_name, addr + baseaddr, + mst_file_data, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->static_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_typedef: + case DW_TAG_base_type: + case DW_TAG_subrange_type: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + /* Skip aggregate types without children, these are external + references. */ + /* NOTE: carlton/2003-10-07: See comment in new_symbol about + static vs. global. */ + if (pdi->has_children == 0) + return; + add_psymbol_to_list (actual_name, strlen (actual_name), + STRUCT_DOMAIN, LOC_TYPEDEF, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + + if (cu->language == language_cplus) + { + /* For C++, these implicitly act as typedefs as well. */ + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + } + break; + case DW_TAG_enumerator: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_CONST, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + default: + break; + } + + /* Check to see if we should scan the name for possible namespace + info. Only do this if this is C++, if we don't have namespace + debugging info in the file, if the psym is of an appropriate type + (otherwise we'll have psym == NULL), and if we actually had a + mangled name to begin with. */ + + if (cu->language == language_cplus + && namespace == NULL + && psym != NULL + && SYMBOL_CPLUS_DEMANGLED_NAME (psym) != NULL) + cp_check_possible_namespace_symbols (SYMBOL_CPLUS_DEMANGLED_NAME (psym), + objfile); +} + +/* Determine whether a die of type TAG living in the C++ namespace + NAMESPACE needs to have the name of the namespace prepended to the + name listed in the die. */ + +static int +pdi_needs_namespace (enum dwarf_tag tag, const char *namespace) +{ + if (namespace == NULL || namespace[0] == '\0') + return 0; + + switch (tag) + { + case DW_TAG_typedef: + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + case DW_TAG_enumerator: + return 1; + default: + return 0; + } +} + +/* Read a partial die corresponding to a namespace; also, add a symbol + corresponding to that namespace to the symbol table. NAMESPACE is + the name of the enclosing namespace. */ + +static char * +add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + const char *new_name = pdi->name; + char *full_name; + + /* Calculate the full name of the namespace that we just entered. */ + + if (new_name == NULL) + new_name = "(anonymous namespace)"; + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + strcpy (full_name, namespace); + if (*namespace != '\0') + strcat (full_name, "::"); + strcat (full_name, new_name); + + /* FIXME: carlton/2003-10-07: We can't just replace this by a call + to add_partial_symbol, because we don't have a way to pass in the + full name to that function; that might be a flaw in + add_partial_symbol's interface. */ + + add_psymbol_to_list (full_name, strlen (full_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, 0, cu->language, objfile); + + /* Now scan partial symbols in that namespace. */ + + if (pdi->has_children) + info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name); + + return info_ptr; +} + +/* Read a partial die corresponding to a class or structure. */ + +static char * +add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace) +{ + bfd *abfd = cu->objfile->obfd; + char *actual_class_name = NULL; + + if (cu->language == language_cplus + && (namespace == NULL || namespace[0] == '\0') + && struct_pdi->name != NULL + && struct_pdi->has_children) + { + /* See if we can figure out if the class lives in a namespace + (or is nested within another class.) We do this by looking + for a member function; its demangled name will contain + namespace info, if there is any. */ + + /* NOTE: carlton/2003-10-07: Getting the info this way changes + what template types look like, because the demangler + frequently doesn't give the same name as the debug info. We + could fix this by only using the demangled name to get the + prefix (but see comment in read_structure_type). */ + + /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have + the appropriate debug information, so it would be nice to be + able to avoid this hack. But NAMESPACE may not be the + namespace where this class was defined: NAMESPACE reflects + where STRUCT_PDI occurs in the tree of dies, but because of + DW_AT_specification, that may not actually tell us where the + class is defined. (See the comment in read_func_scope for an + example of how this could occur.) + + Unfortunately, our current partial symtab data structures are + completely unable to deal with DW_AT_specification. So, for + now, the best thing to do is to get nesting information from + places other than the tree structure of dies if there's any + chance that a DW_AT_specification is involved. :-( */ + + char *next_child = info_ptr; + + while (1) + { + struct partial_die_info child_pdi; + + next_child = read_partial_die (&child_pdi, abfd, next_child, + cu); + if (!child_pdi.tag) + break; + if (child_pdi.tag == DW_TAG_subprogram) + { + actual_class_name = class_name_from_physname (child_pdi.name); + if (actual_class_name != NULL) + struct_pdi->name = actual_class_name; + break; + } + else + { + next_child = locate_pdi_sibling (&child_pdi, next_child, + abfd, cu); + } + } + } + + add_partial_symbol (struct_pdi, cu, namespace); + xfree (actual_class_name); + + return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu); +} + +/* Read a partial die corresponding to an enumeration type. */ + +static char * +add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + if (enum_pdi->name != NULL) + add_partial_symbol (enum_pdi, cu, namespace); + + while (1) + { + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + if (pdi.tag == 0) + break; + if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL) + complaint (&symfile_complaints, "malformed enumerator DIE ignored"); + else + add_partial_symbol (&pdi, cu, namespace); + } + + return info_ptr; +} + +/* Locate ORIG_PDI's sibling; INFO_PTR should point to the next DIE + after ORIG_PDI. */ + +static char * +locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr, + bfd *abfd, struct dwarf2_cu *cu) +{ + /* Do we know the sibling already? */ + + if (orig_pdi->sibling) + return orig_pdi->sibling; + + /* Are there any children to deal with? */ + + if (!orig_pdi->has_children) + return info_ptr; + + /* Okay, we don't know the sibling, but we have children that we + want to skip. So read children until we run into one without a + tag; return whatever follows it. */ + + while (1) + { + struct partial_die_info pdi; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + if (pdi.tag == 0) + return info_ptr; + else + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } +} + +/* Expand this partial symbol table into a full symbol table. */ + +static void +dwarf2_psymtab_to_symtab (struct partial_symtab *pst) +{ + /* FIXME: This is barely more than a stub. */ + if (pst != NULL) + { + if (pst->readin) + { + warning ("bug: psymtab for %s is already read in.", pst->filename); + } + else + { + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + gdb_flush (gdb_stdout); + } + + psymtab_to_symtab_1 (pst); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); + } + } +} + +static void +psymtab_to_symtab_1 (struct partial_symtab *pst) +{ + struct objfile *objfile = pst->objfile; + bfd *abfd = objfile->obfd; + struct dwarf2_cu cu; + struct die_info *dies; + unsigned long offset; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + char *info_ptr; + struct symtab *symtab; + struct cleanup *back_to; + struct attribute *attr; + CORE_ADDR baseaddr; + + /* Set local variables from the partial symbol table info. */ + offset = DWARF_INFO_OFFSET (pst); + dwarf_info_buffer = DWARF_INFO_BUFFER (pst); + dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); + dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); + dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); + dwarf_str_buffer = DWARF_STR_BUFFER (pst); + dwarf_str_size = DWARF_STR_SIZE (pst); + dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst); + dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst); + dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst); + dwarf_ranges_size = DWARF_RANGES_SIZE (pst); + dwarf_loc_buffer = DWARF_LOC_BUFFER (pst); + dwarf_loc_size = DWARF_LOC_SIZE (pst); + info_ptr = dwarf_info_buffer + offset; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* We're in the global namespace. */ + processing_current_prefix = ""; + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + buildsym_init (); + make_cleanup (really_free_pendings, NULL); + + cu.objfile = objfile; + + /* read in the comp_unit header */ + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + /* Read the abbrevs for this compilation unit */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + cu.header.offset = offset; + + cu.list_in_scope = &file_symbols; + + dies = read_comp_unit (info_ptr, abfd, &cu); + + make_cleanup_free_die_list (dies); + + /* Find the base address of the compilation unit for range lists and + location lists. It will normally be specified by DW_AT_low_pc. + In DWARF-3 draft 4, the base address could be overridden by + DW_AT_entry_pc. It's been removed, but GCC still uses this for + compilation units with discontinuous ranges. */ + + cu.header.base_known = 0; + cu.header.base_address = 0; + + attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + else + { + attr = dwarf2_attr (dies, DW_AT_low_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + } + + /* Do line number decoding in read_file_scope () */ + process_die (dies, &cu); + + /* Some compilers don't define a DW_AT_high_pc attribute for the + compilation unit. If the DW_AT_high_pc is missing, synthesize + it, by scanning the DIE's below the compilation unit. */ + get_scope_pc_bounds (dies, &lowpc, &highpc, &cu); + + symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + + /* Set symtab language to language from DW_AT_language. + If the compilation is from a C file generated by language preprocessors, + do not set the language if it was already deduced by start_subfile. */ + if (symtab != NULL + && !(cu.language == language_c && symtab->language != language_c)) + { + symtab->language = cu.language; + } + pst->symtab = symtab; + pst->readin = 1; + + do_cleanups (back_to); +} + +/* Process a die and its children. */ + +static void +process_die (struct die_info *die, struct dwarf2_cu *cu) +{ + switch (die->tag) + { + case DW_TAG_padding: + break; + case DW_TAG_compile_unit: + read_file_scope (die, cu); + break; + case DW_TAG_subprogram: + read_subroutine_type (die, cu); + read_func_scope (die, cu); + break; + case DW_TAG_inlined_subroutine: + /* FIXME: These are ignored for now. + They could be used to set breakpoints on all inlined instances + of a function and make GDB `next' properly over inlined functions. */ + break; + case DW_TAG_lexical_block: + case DW_TAG_try_block: + case DW_TAG_catch_block: + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); + process_structure_scope (die, cu); + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); + break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + /* END FIXME */ + + case DW_TAG_base_type: + read_base_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_common_block: + read_common_block (die, cu); + break; + case DW_TAG_common_inclusion: + break; + case DW_TAG_namespace: + processing_has_namespace_info = 1; + read_namespace (die, cu); + break; + case DW_TAG_imported_declaration: + case DW_TAG_imported_module: + /* FIXME: carlton/2002-10-16: Eventually, we should use the + information contained in these. DW_TAG_imported_declaration + dies shouldn't have children; DW_TAG_imported_module dies + shouldn't in the C++ case, but conceivably could in the + Fortran case, so we'll have to replace this gdb_assert if + Fortran compilers start generating that info. */ + processing_has_namespace_info = 1; + gdb_assert (die->child == NULL); + break; + default: + new_symbol (die, NULL, cu); + break; + } +} + +static void +initialize_cu_func_list (struct dwarf2_cu *cu) +{ + cu->first_fn = cu->last_fn = cu->cached_fn = NULL; +} + +static void +read_file_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct cleanup *back_to = make_cleanup (null_cleanup, 0); + CORE_ADDR lowpc = ((CORE_ADDR) -1); + CORE_ADDR highpc = ((CORE_ADDR) 0); + struct attribute *attr; + char *name = ""; + char *comp_dir = NULL; + struct die_info *child_die; + bfd *abfd = objfile->obfd; + struct line_header *line_header = 0; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + get_scope_pc_bounds (die, &lowpc, &highpc, cu); + + /* If we didn't find a lowpc, set it to highpc to avoid complaints + from finish_block. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + lowpc += baseaddr; + highpc += baseaddr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr) + { + name = DW_STRING (attr); + } + attr = dwarf2_attr (die, DW_AT_comp_dir, cu); + if (attr) + { + comp_dir = DW_STRING (attr); + if (comp_dir) + { + /* Irix 6.2 native cc prepends .: to the compilation + directory, get rid of it. */ + char *cp = strchr (comp_dir, ':'); + + if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/') + comp_dir = cp + 1; + } + } + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.deprecated_entry_file_lowpc = lowpc; + objfile->ei.deprecated_entry_file_highpc = highpc; + } + + attr = dwarf2_attr (die, DW_AT_language, cu); + if (attr) + { + set_cu_language (DW_UNSND (attr), cu); + } + + /* We assume that we're processing GCC output. */ + processing_gcc_compilation = 2; +#if 0 + /* FIXME:Do something here. */ + if (dip->at_producer != NULL) + { + handle_producer (dip->at_producer); + } +#endif + + /* The compilation unit may be in a different language or objfile, + zero out all remembered fundamental types. */ + memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *)); + + start_symtab (name, comp_dir, lowpc); + record_debugformat ("DWARF 2"); + + initialize_cu_func_list (cu); + + /* Process all dies in compilation unit. */ + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + /* Decode line number information if present. */ + attr = dwarf2_attr (die, DW_AT_stmt_list, cu); + if (attr) + { + unsigned int line_offset = DW_UNSND (attr); + line_header = dwarf_decode_line_header (line_offset, abfd, cu); + if (line_header) + { + make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) line_header); + dwarf_decode_lines (line_header, comp_dir, abfd, cu); + } + } + + /* Decode macro information, if present. Dwarf 2 macro information + refers to information in the line number info statement program + header, so we can only read it if we've read the header + successfully. */ + attr = dwarf2_attr (die, DW_AT_macro_info, cu); + if (attr && line_header) + { + unsigned int macro_offset = DW_UNSND (attr); + dwarf_decode_macros (line_header, macro_offset, + comp_dir, abfd, cu); + } + do_cleanups (back_to); +} + +static void +add_to_cu_func_list (const char *name, CORE_ADDR lowpc, CORE_ADDR highpc, + struct dwarf2_cu *cu) +{ + struct function_range *thisfn; + + thisfn = (struct function_range *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct function_range)); + thisfn->name = name; + thisfn->lowpc = lowpc; + thisfn->highpc = highpc; + thisfn->seen_line = 0; + thisfn->next = NULL; + + if (cu->last_fn == NULL) + cu->first_fn = thisfn; + else + cu->last_fn->next = thisfn; + + cu->last_fn = thisfn; +} + +static void +read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct die_info *child_die; + struct attribute *attr; + char *name; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + name = dwarf2_linkage_name (die, cu); + + /* Ignore functions with missing or empty names and functions with + missing or invalid low and high pc attributes. */ + if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + + if (cu->language == language_cplus) + { + struct die_info *spec_die = die_specification (die, cu); + + /* NOTE: carlton/2004-01-23: We have to be careful in the + presence of DW_AT_specification. For example, with GCC 3.4, + given the code + + namespace N { + void foo() { + // Definition of N::foo. + } + } + + then we'll have a tree of DIEs like this: + + 1: DW_TAG_compile_unit + 2: DW_TAG_namespace // N + 3: DW_TAG_subprogram // declaration of N::foo + 4: DW_TAG_subprogram // definition of N::foo + DW_AT_specification // refers to die #3 + + Thus, when processing die #4, we have to pretend that we're + in the context of its DW_AT_specification, namely the contex + of die #3. */ + + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + } + + lowpc += baseaddr; + highpc += baseaddr; + + /* Record the function range for dwarf_decode_lines. */ + add_to_cu_func_list (name, lowpc, highpc, cu); + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.entry_func_lowpc = lowpc; + objfile->ei.entry_func_highpc = highpc; + } + + new = push_context (0, lowpc); + new->name = new_symbol (die, die->type, cu); + + /* If there is a location expression for DW_AT_frame_base, record + it. */ + attr = dwarf2_attr (die, DW_AT_frame_base, cu); + if (attr) + /* FIXME: cagney/2004-01-26: The DW_AT_frame_base's location + expression is being recorded directly in the function's symbol + and not in a separate frame-base object. I guess this hack is + to avoid adding some sort of frame-base adjunct/annex to the + function's symbol :-(. The problem with doing this is that it + results in a function symbol with a location expression that + has nothing to do with the location of the function, ouch! The + relationship should be: a function's symbol has-a frame base; a + frame-base has-a location expression. */ + dwarf2_symbol_mark_computed (attr, new->name, cu); + + cu->list_in_scope = &local_symbols; + + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + new = pop_context (); + /* Make a block for the local symbols within. */ + finish_block (new->name, &local_symbols, new->old_blocks, + lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + + /* If we've finished processing a top-level function, subsequent + symbols go in the file symbol list. */ + if (outermost_context_p ()) + cu->list_in_scope = &file_symbols; + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +/* Process all the DIES contained within a lexical block scope. Start + a new scope, process the dies, and then close the scope. */ + +static void +read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Ignore blocks with missing or invalid low and high pc attributes. */ + /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges + as multiple lexical blocks? Handling children in a sane way would + be nasty. Might be easier to properly extend generic blocks to + describe ranges. */ + if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + lowpc += baseaddr; + highpc += baseaddr; + + push_context (0, lowpc); + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + new = pop_context (); + + if (local_symbols != NULL) + { + finish_block (0, &local_symbols, new->old_blocks, new->start_addr, + highpc, objfile); + } + local_symbols = new->locals; +} + +/* Get low and high pc attributes from a die. Return 1 if the attributes + are present and valid, otherwise, return 0. Return -1 if the range is + discontinuous, i.e. derived from DW_AT_ranges information. */ +static int +dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct attribute *attr; + bfd *obfd = objfile->obfd; + CORE_ADDR low = 0; + CORE_ADDR high = 0; + int ret = 0; + + attr = dwarf2_attr (die, DW_AT_high_pc, cu); + if (attr) + { + high = DW_ADDR (attr); + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + low = DW_ADDR (attr); + else + /* Found high w/o low attribute. */ + return 0; + + /* Found consecutive range of addresses. */ + ret = 1; + } + else + { + attr = dwarf2_attr (die, DW_AT_ranges, cu); + if (attr != NULL) + { + unsigned int addr_size = cu_header->addr_size; + CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1)); + /* Value of the DW_AT_ranges attribute is the offset in the + .debug_ranges section. */ + unsigned int offset = DW_UNSND (attr); + /* Base address selection entry. */ + CORE_ADDR base; + int found_base; + int dummy; + char *buffer; + CORE_ADDR marker; + int low_set; + + found_base = cu_header->base_known; + base = cu_header->base_address; + + if (offset >= dwarf_ranges_size) + { + complaint (&symfile_complaints, + "Offset %d out of bounds for DW_AT_ranges attribute", + offset); + return 0; + } + buffer = dwarf_ranges_buffer + offset; + + /* Read in the largest possible address. */ + marker = read_address (obfd, buffer, cu, &dummy); + if ((marker & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + buffer += 2 * addr_size; + offset += 2 * addr_size; + found_base = 1; + } + + low_set = 0; + + while (1) + { + CORE_ADDR range_beginning, range_end; + + range_beginning = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + range_end = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + offset += 2 * addr_size; + + /* An end of list marker is a pair of zero addresses. */ + if (range_beginning == 0 && range_end == 0) + /* Found the end of list entry. */ + break; + + /* Each base address selection entry is a pair of 2 values. + The first is the largest possible address, the second is + the base address. Check for a base address here. */ + if ((range_beginning & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + found_base = 1; + continue; + } + + if (!found_base) + { + /* We have no valid base address for the ranges + data. */ + complaint (&symfile_complaints, + "Invalid .debug_ranges data (no base address)"); + return 0; + } + + range_beginning += base; + range_end += base; + + /* FIXME: This is recording everything as a low-high + segment of consecutive addresses. We should have a + data structure for discontiguous block ranges + instead. */ + if (! low_set) + { + low = range_beginning; + high = range_end; + low_set = 1; + } + else + { + if (range_beginning < low) + low = range_beginning; + if (range_end > high) + high = range_end; + } + } + + if (! low_set) + /* If the first entry is an end-of-list marker, the range + describes an empty scope, i.e. no instructions. */ + return 0; + + ret = -1; + } + } + + if (high < low) + return 0; + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0) + return 0; + + *lowpc = low; + *highpc = high; + return ret; +} + +/* Get the low and high pc's represented by the scope DIE, and store + them in *LOWPC and *HIGHPC. If the correct values can't be + determined, set *LOWPC to -1 and *HIGHPC to 0. */ + +static void +get_scope_pc_bounds (struct die_info *die, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu) +{ + CORE_ADDR best_low = (CORE_ADDR) -1; + CORE_ADDR best_high = (CORE_ADDR) 0; + CORE_ADDR current_low, current_high; + + if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu)) + { + best_low = current_low; + best_high = current_high; + } + else + { + struct die_info *child = die->child; + + while (child && child->tag) + { + switch (child->tag) { + case DW_TAG_subprogram: + if (dwarf2_get_pc_bounds (child, ¤t_low, ¤t_high, cu)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + case DW_TAG_namespace: + /* FIXME: carlton/2004-01-16: Should we do this for + DW_TAG_class_type/DW_TAG_structure_type, too? I think + that current GCC's always emit the DIEs corresponding + to definitions of methods of classes as children of a + DW_TAG_compile_unit or DW_TAG_namespace (as opposed to + the DIEs giving the declarations, which could be + anywhere). But I don't see any reason why the + standards says that they have to be there. */ + get_scope_pc_bounds (child, ¤t_low, ¤t_high, cu); + + if (current_low != ((CORE_ADDR) -1)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + default: + /* Ignore. */ + break; + } + + child = sibling_die (child); + } + } + + *lowpc = best_low; + *highpc = best_high; +} + +/* Add an aggregate field to the field list. */ + +static void +dwarf2_add_field (struct field_info *fip, struct die_info *die, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct nextfield *new_field; + struct attribute *attr; + struct field *fp; + char *fieldname = ""; + + /* Allocate a new field list entry and link it in. */ + new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield)); + make_cleanup (xfree, new_field); + memset (new_field, 0, sizeof (struct nextfield)); + new_field->next = fip->fields; + fip->fields = new_field; + fip->nfields++; + + /* Handle accessibility and virtuality of field. + The default accessibility for members is public, the default + accessibility for inheritance is private. */ + if (die->tag != DW_TAG_inheritance) + new_field->accessibility = DW_ACCESS_public; + else + new_field->accessibility = DW_ACCESS_private; + new_field->virtuality = DW_VIRTUALITY_none; + + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + new_field->accessibility = DW_UNSND (attr); + if (new_field->accessibility != DW_ACCESS_public) + fip->non_public_fields = 1; + attr = dwarf2_attr (die, DW_AT_virtuality, cu); + if (attr) + new_field->virtuality = DW_UNSND (attr); + + fp = &new_field->field; + + if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu)) + { + /* Data member other than a C++ static data member. */ + + /* Get type of field. */ + fp->type = die_type (die, cu); + + FIELD_STATIC_KIND (*fp) = 0; + + /* Get bit size of field (zero if none). */ + attr = dwarf2_attr (die, DW_AT_bit_size, cu); + if (attr) + { + FIELD_BITSIZE (*fp) = DW_UNSND (attr); + } + else + { + FIELD_BITSIZE (*fp) = 0; + } + + /* Get bit offset of field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + { + FIELD_BITPOS (*fp) = + decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte; + } + else + FIELD_BITPOS (*fp) = 0; + attr = dwarf2_attr (die, DW_AT_bit_offset, cu); + if (attr) + { + if (BITS_BIG_ENDIAN) + { + /* For big endian bits, the DW_AT_bit_offset gives the + additional bit offset from the MSB of the containing + anonymous object to the MSB of the field. We don't + have to do anything special since we don't need to + know the size of the anonymous object. */ + FIELD_BITPOS (*fp) += DW_UNSND (attr); + } + else + { + /* For little endian bits, compute the bit offset to the + MSB of the anonymous object, subtract off the number of + bits from the MSB of the field to the MSB of the + object, and then subtract off the number of bits of + the field itself. The result is the bit offset of + the LSB of the field. */ + int anonymous_size; + int bit_offset = DW_UNSND (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + /* The size of the anonymous object containing + the bit field is explicit, so use the + indicated size (in bytes). */ + anonymous_size = DW_UNSND (attr); + } + else + { + /* The size of the anonymous object containing + the bit field must be inferred from the type + attribute of the data member containing the + bit field. */ + anonymous_size = TYPE_LENGTH (fp->type); + } + FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp); + } + } + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + fp->name = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + + /* Change accessibility for artificial fields (e.g. virtual table + pointer or virtual base class pointer) to private. */ + if (dwarf2_attr (die, DW_AT_artificial, cu)) + { + new_field->accessibility = DW_ACCESS_private; + fip->non_public_fields = 1; + } + } + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) + { + /* C++ static member. */ + + /* NOTE: carlton/2002-11-05: It should be a DW_TAG_member that + is a declaration, but all versions of G++ as of this writing + (so through at least 3.2.1) incorrectly generate + DW_TAG_variable tags. */ + + char *physname; + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get physical name. */ + physname = dwarf2_linkage_name (die, cu); + + SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname), + &objfile->objfile_obstack)); + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + } + else if (die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); + FIELD_BITSIZE (*fp) = 0; + FIELD_STATIC_KIND (*fp) = 0; + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = type_name_no_tag (fp->type); + fip->nbaseclasses++; + } +} + +/* Create the vector of fields, and attach it to the type. */ + +static void +dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + int nfields = fip->nfields; + + /* Record the field count, allocate space for the array of fields, + and create blank accessibility bitfields if necessary. */ + TYPE_NFIELDS (type) = nfields; + TYPE_FIELDS (type) = (struct field *) + TYPE_ALLOC (type, sizeof (struct field) * nfields); + memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + + if (fip->non_public_fields) + { + ALLOCATE_CPLUS_STRUCT_TYPE (type); + + TYPE_FIELD_PRIVATE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields); + + TYPE_FIELD_PROTECTED_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields); + + TYPE_FIELD_IGNORE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields); + } + + /* If the type has baseclasses, allocate and clear a bit vector for + TYPE_FIELD_VIRTUAL_BITS. */ + if (fip->nbaseclasses) + { + int num_bytes = B_BYTES (fip->nbaseclasses); + char *pointer; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + pointer = (char *) TYPE_ALLOC (type, num_bytes); + TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; + B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses); + TYPE_N_BASECLASSES (type) = fip->nbaseclasses; + } + + /* Copy the saved-up fields into the field vector. Start from the head + of the list, adding to the tail of the field array, so that they end + up in the same order in the array in which they were added to the list. */ + while (nfields-- > 0) + { + TYPE_FIELD (type, nfields) = fip->fields->field; + switch (fip->fields->accessibility) + { + case DW_ACCESS_private: + SET_TYPE_FIELD_PRIVATE (type, nfields); + break; + + case DW_ACCESS_protected: + SET_TYPE_FIELD_PROTECTED (type, nfields); + break; + + case DW_ACCESS_public: + break; + + default: + /* Unknown accessibility. Complain and treat it as public. */ + { + complaint (&symfile_complaints, "unsupported accessibility %d", + fip->fields->accessibility); + } + break; + } + if (nfields < fip->nbaseclasses) + { + switch (fip->fields->virtuality) + { + case DW_VIRTUALITY_virtual: + case DW_VIRTUALITY_pure_virtual: + SET_TYPE_FIELD_VIRTUAL (type, nfields); + break; + } + } + fip->fields = fip->fields->next; + } +} + +/* Add a member function to the proper fieldlist. */ + +static void +dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, + struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + struct fnfieldlist *flp; + int i; + struct fn_field *fnp; + char *fieldname; + char *physname; + struct nextfnfield *new_fnfield; + + /* Get name of member function. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get the mangled name. */ + physname = dwarf2_linkage_name (die, cu); + + /* Look up member function name in fieldlist. */ + for (i = 0; i < fip->nfnfields; i++) + { + if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0) + break; + } + + /* Create new list element if necessary. */ + if (i < fip->nfnfields) + flp = &fip->fnfieldlists[i]; + else + { + if ((fip->nfnfields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fip->fnfieldlists = (struct fnfieldlist *) + xrealloc (fip->fnfieldlists, + (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct fnfieldlist)); + if (fip->nfnfields == 0) + make_cleanup (free_current_contents, &fip->fnfieldlists); + } + flp = &fip->fnfieldlists[fip->nfnfields]; + flp->name = fieldname; + flp->length = 0; + flp->head = NULL; + fip->nfnfields++; + } + + /* Create a new member function field and chain it to the field list + entry. */ + new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield)); + make_cleanup (xfree, new_fnfield); + memset (new_fnfield, 0, sizeof (struct nextfnfield)); + new_fnfield->next = flp->head; + flp->head = new_fnfield; + flp->length++; + + /* Fill in the member function field info. */ + fnp = &new_fnfield->fnfield; + fnp->physname = obsavestring (physname, strlen (physname), + &objfile->objfile_obstack); + fnp->type = alloc_type (objfile); + if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC) + { + int nparams = TYPE_NFIELDS (die->type); + + /* TYPE is the domain of this method, and DIE->TYPE is the type + of the method itself (TYPE_CODE_METHOD). */ + smash_to_method_type (fnp->type, type, + TYPE_TARGET_TYPE (die->type), + TYPE_FIELDS (die->type), + TYPE_NFIELDS (die->type), + TYPE_VARARGS (die->type)); + + /* Handle static member functions. + Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We obtain this information + from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */ + if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (die->type, 0) == 0) + fnp->voffset = VOFFSET_STATIC; + } + else + complaint (&symfile_complaints, "member function type missing for '%s'", + physname); + + /* Get fcontext from DW_AT_containing_type if present. */ + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + fnp->fcontext = die_containing_type (die, cu); + + /* dwarf2 doesn't have stubbed physical names, so the setting of is_const + and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */ + + /* Get accessibility. */ + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + { + switch (DW_UNSND (attr)) + { + case DW_ACCESS_private: + fnp->is_private = 1; + break; + case DW_ACCESS_protected: + fnp->is_protected = 1; + break; + } + } + + /* Check for artificial methods. */ + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr && DW_UNSND (attr) != 0) + fnp->is_artificial = 1; + + /* Get index in virtual function table if it is a virtual member function. */ + attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2; + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location", + fieldname); + } + } +} + +/* Create the vector of member function fields, and attach it to the type. */ + +static void +dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + struct fnfieldlist *flp; + int total_length = 0; + int i; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *) + TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * fip->nfnfields); + + for (i = 0, flp = fip->fnfieldlists; i < fip->nfnfields; i++, flp++) + { + struct nextfnfield *nfp = flp->head; + struct fn_fieldlist *fn_flp = &TYPE_FN_FIELDLIST (type, i); + int k; + + TYPE_FN_FIELDLIST_NAME (type, i) = flp->name; + TYPE_FN_FIELDLIST_LENGTH (type, i) = flp->length; + fn_flp->fn_fields = (struct fn_field *) + TYPE_ALLOC (type, sizeof (struct fn_field) * flp->length); + for (k = flp->length; (k--, nfp); nfp = nfp->next) + fn_flp->fn_fields[k] = nfp->fnfield; + + total_length += flp->length; + } + + TYPE_NFN_FIELDS (type) = fip->nfnfields; + TYPE_NFN_FIELDS_TOTAL (type) = total_length; +} + +/* Called when we find the DIE that starts a structure or union scope + (definition) to process all dies that define the members of the + structure or union. + + NOTE: we need to call struct_type regardless of whether or not the + DIE has an at_name attribute, since it might be an anonymous + structure or union. This gets the type entered into our set of + user defined types. + + However, if the structure is incomplete (an opaque struct/union) + then suppress creating a symbol table entry for it since gdb only + wants to find the one with the complete definition. Note that if + it is complete, we just call new_symbol, which does it's own + checking about whether the struct/union is anonymous or not (and + suppresses creating a symbol table entry itself). */ + +static void +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + + if (die->type) + return; + + type = alloc_type (objfile); + + INIT_CPLUS_SPECIFIC (type); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + if (cu->language == language_cplus) + { + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); + processing_current_prefix = new_prefix; + } + else + { + TYPE_TAG_NAME (type) = DW_STRING (attr); + } + } + + if (die->tag == DW_TAG_structure_type) + { + TYPE_CODE (type) = TYPE_CODE_STRUCT; + } + else if (die->tag == DW_TAG_union_type) + { + TYPE_CODE (type) = TYPE_CODE_UNION; + } + else + { + /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT + in gdbtypes.h. */ + TYPE_CODE (type) = TYPE_CODE_CLASS; + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + /* We need to add the type field to the die immediately so we don't + infinitely recurse when dealing with pointers to the structure + type within the structure itself. */ + die->type = type; + + if (die->child != NULL && ! die_is_declaration (die, cu)) + { + struct field_info fi; + struct die_info *child_die; + struct cleanup *back_to = make_cleanup (null_cleanup, NULL); + + memset (&fi, 0, sizeof (struct field_info)); + + child_die = die->child; + + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable) + { + /* NOTE: carlton/2002-11-05: A C++ static data member + should be a DW_TAG_member that is a declaration, but + all versions of G++ as of this writing (so through at + least 3.2.1) incorrectly generate DW_TAG_variable + tags for them instead. */ + dwarf2_add_field (&fi, child_die, cu); + } + else if (child_die->tag == DW_TAG_subprogram) + { + /* C++ member function. */ + read_type_die (child_die, cu); + dwarf2_add_member_fn (&fi, child_die, type, cu); + } + else if (child_die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + dwarf2_add_field (&fi, child_die, cu); + } + child_die = sibling_die (child_die); + } + + /* Attach fields and member functions to the type. */ + if (fi.nfields) + dwarf2_attach_fields_to_type (&fi, type, cu); + if (fi.nfnfields) + { + dwarf2_attach_fn_fields_to_type (&fi, type, cu); + + /* Get the type which refers to the base class (possibly this + class itself) which contains the vtable pointer for the current + class from the DW_AT_containing_type attribute. */ + + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + { + struct type *t = die_containing_type (die, cu); + + TYPE_VPTR_BASETYPE (type) = t; + if (type == t) + { + static const char vptr_name[] = + {'_', 'v', 'p', 't', 'r', '\0'}; + int i; + + /* Our own class provides vtbl ptr. */ + for (i = TYPE_NFIELDS (t) - 1; + i >= TYPE_N_BASECLASSES (t); + --i) + { + char *fieldname = TYPE_FIELD_NAME (t, i); + + if ((strncmp (fieldname, vptr_name, + strlen (vptr_name) - 1) + == 0) + && is_cplus_marker (fieldname[strlen (vptr_name)])) + { + TYPE_VPTR_FIELDNO (type) = i; + break; + } + } + + /* Complain if virtual function table field not found. */ + if (i < TYPE_N_BASECLASSES (t)) + complaint (&symfile_complaints, + "virtual function table pointer not found when defining class '%s'", + TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) : + ""); + } + else + { + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); + } + } + } + + do_cleanups (back_to); + } + else + { + /* No children, must be stub. */ + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + } + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; + + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); + + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ + +static void +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + type = alloc_type (objfile); + + TYPE_CODE (type) = TYPE_CODE_ENUM; + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + const char *name = DW_STRING (attr); + + if (processing_has_namespace_info) + { + TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + processing_current_prefix[0] == '\0' + ? "" : "::", + name); + } + else + { + TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), + &objfile->objfile_obstack); + } + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + + num_fields = 0; + fields = NULL; + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag != DW_TAG_enumerator) + { + process_die (child_die, cu); + } + else + { + attr = dwarf2_attr (child_die, DW_AT_name, cu); + if (attr) + { + sym = new_symbol (child_die, die->type, cu); + if (SYMBOL_VALUE (sym) < 0) + unsigned_enum = 0; + + if ((num_fields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fields = (struct field *) + xrealloc (fields, + (num_fields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct field)); + } + + FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym); + FIELD_TYPE (fields[num_fields]) = NULL; + FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + FIELD_BITSIZE (fields[num_fields]) = 0; + FIELD_STATIC_KIND (fields[num_fields]) = 0; + + num_fields++; + } + } + + child_die = sibling_die (child_die); + } + + if (num_fields) + { + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, + sizeof (struct field) * num_fields); + xfree (fields); + } + if (unsigned_enum) + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; + } + + new_symbol (die, die->type, cu); +} + +/* Extract all information from a DW_TAG_array_type DIE and put it in + the DIE's type field. For now, this only handles one dimensional + arrays. */ + +static void +read_array_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct type *type = NULL; + struct type *element_type, *range_type, *index_type; + struct type **range_types = NULL; + struct attribute *attr; + int ndim = 0; + struct cleanup *back_to; + + /* Return if we've already decoded this type. */ + if (die->type) + { + return; + } + + element_type = die_type (die, cu); + + /* Irix 6.2 native cc creates array types without children for + arrays with unspecified length. */ + if (die->child == NULL) + { + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 0, -1); + die->type = create_array_type (NULL, element_type, range_type); + return; + } + + back_to = make_cleanup (null_cleanup, NULL); + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_subrange_type) + { + read_subrange_type (child_die, cu); + + if (child_die->type != NULL) + { + /* The range type was succesfully read. Save it for + the array type creation. */ + if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0) + { + range_types = (struct type **) + xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct type *)); + if (ndim == 0) + make_cleanup (free_current_contents, &range_types); + } + range_types[ndim++] = child_die->type; + } + } + child_die = sibling_die (child_die); + } + + /* Dwarf2 dimensions are output from left to right, create the + necessary array types in backwards order. */ + type = element_type; + while (ndim-- > 0) + type = create_array_type (NULL, type, range_types[ndim]); + + /* Understand Dwarf2 support for vector types (like they occur on + the PowerPC w/ AltiVec). Gcc just adds another attribute to the + array type. This is not part of the Dwarf2/3 standard yet, but a + custom vendor extension. The main difference between a regular + array and the vector variant is that vectors are passed by value + to functions. */ + attr = dwarf2_attr (die, DW_AT_GNU_vector, cu); + if (attr) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; + + do_cleanups (back_to); + + /* Install the type in the die. */ + die->type = type; +} + +/* First cut: install each common block member as a global variable. */ + +static void +read_common_block (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *child_die; + struct attribute *attr; + struct symbol *sym; + CORE_ADDR base = (CORE_ADDR) 0; + + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + base = decode_locdesc (DW_BLOCK (attr), cu); + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "common block member"); + } + } + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + sym = new_symbol (child_die, NULL, cu); + attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = + base + decode_locdesc (DW_BLOCK (attr), cu); + add_symbol_to_list (sym, &global_symbols); + } + child_die = sibling_die (child_die); + } + } +} + +/* Read a C++ namespace. */ + +static void +read_namespace (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + const char *name; + int is_anonymous; + struct die_info *current_die; + + name = namespace_name (die, &is_anonymous, cu); + + /* Now build the name of the current namespace. */ + + if (previous_prefix[0] == '\0') + { + processing_current_prefix = name; + } + else + { + /* We need temp_name around because processing_current_prefix + is a const char *. */ + char *temp_name = alloca (strlen (previous_prefix) + + 2 + strlen(name) + 1); + strcpy (temp_name, previous_prefix); + strcat (temp_name, "::"); + strcat (temp_name, name); + + processing_current_prefix = temp_name; + } + + /* Add a symbol associated to this if we haven't seen the namespace + before. Also, add a using directive if it's an anonymous + namespace. */ + + if (dwarf2_extension (die, cu) == NULL) + { + struct type *type; + + /* FIXME: carlton/2003-06-27: Once GDB is more const-correct, + this cast will hopefully become unnecessary. */ + type = init_type (TYPE_CODE_NAMESPACE, 0, 0, + (char *) processing_current_prefix, + objfile); + TYPE_TAG_NAME (type) = TYPE_NAME (type); + + new_symbol (die, type, cu); + die->type = type; + + if (is_anonymous) + cp_add_using_directive (processing_current_prefix, + strlen (previous_prefix), + strlen (processing_current_prefix)); + } + + if (die->child != NULL) + { + struct die_info *child_die = die->child; + + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + processing_current_prefix = previous_prefix; +} + +/* Return the name of the namespace represented by DIE. Set + *IS_ANONYMOUS to tell whether or not the namespace is an anonymous + namespace. */ + +static const char * +namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu) +{ + struct die_info *current_die; + const char *name = NULL; + + /* Loop through the extensions until we find a name. */ + + for (current_die = die; + current_die != NULL; + current_die = dwarf2_extension (die, cu)) + { + name = dwarf2_name (current_die, cu); + if (name != NULL) + break; + } + + /* Is it an anonymous namespace? */ + + *is_anonymous = (name == NULL); + if (*is_anonymous) + name = "(anonymous namespace)"; + + return name; +} + +/* Extract all information from a DW_TAG_pointer_type DIE and add to + the user defined type vector. */ + +static void +read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr_byte_size; + struct attribute *attr_address_class; + int byte_size, addr_class; + + if (die->type) + { + return; + } + + type = lookup_pointer_type (die_type (die, cu)); + + attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr_byte_size) + byte_size = DW_UNSND (attr_byte_size); + else + byte_size = cu_header->addr_size; + + attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu); + if (attr_address_class) + addr_class = DW_UNSND (attr_address_class); + else + addr_class = DW_ADDR_none; + + /* If the pointer size or address class is different than the + default, create a type variant marked as such and set the + length accordingly. */ + if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) + { + if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + { + int type_flags; + + type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); + type = make_type_with_address_space (type, type_flags); + } + else if (TYPE_LENGTH (type) != byte_size) + { + complaint (&symfile_complaints, "invalid pointer size %d", byte_size); + } + else { + /* Should we also complain about unhandled address classes? */ + } + } + + TYPE_LENGTH (type) = byte_size; + die->type = type; +} + +/* Extract all information from a DW_TAG_ptr_to_member_type DIE and add to + the user defined type vector. */ + +static void +read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct type *to_type; + struct type *domain; + + if (die->type) + { + return; + } + + type = alloc_type (objfile); + to_type = die_type (die, cu); + domain = die_containing_type (die, cu); + smash_to_member_type (type, domain, to_type); + + die->type = type; +} + +/* Extract all information from a DW_TAG_reference_type DIE and add to + the user defined type vector. */ + +static void +read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr; + + if (die->type) + { + return; + } + + type = lookup_reference_type (die_type (die, cu)); + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = cu_header->addr_size; + } + die->type = type; +} + +static void +read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); +} + +static void +read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0); +} + +/* Extract all information from a DW_TAG_string_type DIE and add to + the user defined type vector. It isn't really a user defined type, + but it behaves like one, with other DIE's using an AT_user_def_type + attribute to reference it. */ + +static void +read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type, *range_type, *index_type, *char_type; + struct attribute *attr; + unsigned int length; + + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_string_length, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + /* check for the DW_AT_byte_size attribute */ + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + length = 1; + } + } + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 1, length); + if (cu->language == language_fortran) + { + /* Need to create a unique string type for bounds + information */ + type = create_string_type (0, range_type); + } + else + { + char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu); + type = create_string_type (char_type, range_type); + } + die->type = type; +} + +/* Handle DIES due to C code like: + + struct foo + { + int (*funcp)(int a, long l); + int b; + }; + + ('funcp' generates a DW_TAG_subroutine_type DIE) + */ + +static void +read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; /* Type that this function returns */ + struct type *ftype; /* Function that returns above type */ + struct attribute *attr; + + /* Decode the type that this subroutine returns */ + if (die->type) + { + return; + } + type = die_type (die, cu); + ftype = lookup_function_type (type); + + /* All functions in C++ have prototypes. */ + attr = dwarf2_attr (die, DW_AT_prototyped, cu); + if ((attr && (DW_UNSND (attr) != 0)) + || cu->language == language_cplus) + TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED; + + if (die->child != NULL) + { + struct die_info *child_die; + int nparams = 0; + int iparams = 0; + + /* Count the number of parameters. + FIXME: GDB currently ignores vararg functions, but knows about + vararg member functions. */ + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + nparams++; + else if (child_die->tag == DW_TAG_unspecified_parameters) + TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS; + child_die = sibling_die (child_die); + } + + /* Allocate storage for parameters and fill them in. */ + TYPE_NFIELDS (ftype) = nparams; + TYPE_FIELDS (ftype) = (struct field *) + TYPE_ALLOC (ftype, nparams * sizeof (struct field)); + + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + { + /* Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We pass this information + to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL. */ + attr = dwarf2_attr (child_die, DW_AT_artificial, cu); + if (attr) + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr); + else + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; + TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu); + iparams++; + } + child_die = sibling_die (child_die); + } + } + + die->type = ftype; +} + +static void +read_typedef (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + char *name = NULL; + + if (!die->type) + { + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + name = DW_STRING (attr); + } + die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB, name, objfile); + TYPE_TARGET_TYPE (die->type) = die_type (die, cu); + } +} + +/* Find a representation of a given base type and install + it in the TYPE field of the die. */ + +static void +read_base_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + int encoding = 0, size = 0; + + /* If we've already decoded this die, this is a no-op. */ + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_encoding, cu); + if (attr) + { + encoding = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + size = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + enum type_code code = TYPE_CODE_INT; + int type_flags = 0; + + switch (encoding) + { + case DW_ATE_address: + /* Turn DW_ATE_address into a void * pointer. */ + code = TYPE_CODE_PTR; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_boolean: + code = TYPE_CODE_BOOL; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_complex_float: + code = TYPE_CODE_COMPLEX; + break; + case DW_ATE_float: + code = TYPE_CODE_FLT; + break; + case DW_ATE_signed: + case DW_ATE_signed_char: + break; + case DW_ATE_unsigned: + case DW_ATE_unsigned_char: + type_flags |= TYPE_FLAG_UNSIGNED; + break; + default: + complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'", + dwarf_type_encoding_name (encoding)); + break; + } + type = init_type (code, size, type_flags, DW_STRING (attr), objfile); + if (encoding == DW_ATE_address) + TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID, + cu); + else if (encoding == DW_ATE_complex_float) + { + if (size == 32) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu); + else if (size == 16) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + else if (size == 8) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + } + else + { + type = dwarf_base_type (encoding, size, cu); + } + die->type = type; +} + +/* Read the given DW_AT_subrange DIE. */ + +static void +read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + struct type *range_type; + struct attribute *attr; + int low = 0; + int high = -1; + + /* If we have already decoded this die, then nothing more to do. */ + if (die->type) + return; + + base_type = die_type (die, cu); + if (base_type == NULL) + { + complaint (&symfile_complaints, + "DW_AT_type missing from DW_TAG_subrange_type"); + return; + } + + if (TYPE_CODE (base_type) == TYPE_CODE_VOID) + base_type = alloc_type (NULL); + + if (cu->language == language_fortran) + { + /* FORTRAN implies a lower bound of 1, if not given. */ + low = 1; + } + + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); + if (attr) + low = dwarf2_get_attr_constant_value (attr, 0); + + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (attr) + { + if (attr->form == DW_FORM_block1) + { + /* GCC encodes arrays with unspecified or dynamic length + with a DW_FORM_block1 attribute. + FIXME: GDB does not yet know how to handle dynamic + arrays properly, treat them as arrays with unspecified + length for now. + + FIXME: jimb/2003-09-22: GDB does not really know + how to handle arrays of unspecified length + either; we just represent them as zero-length + arrays. Choose an appropriate upper bound given + the lower bound we've computed above. */ + high = low - 1; + } + else + high = dwarf2_get_attr_constant_value (attr, 1); + } + + range_type = create_range_type (NULL, base_type, low, high); + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + TYPE_NAME (range_type) = DW_STRING (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + TYPE_LENGTH (range_type) = DW_UNSND (attr); + + die->type = range_type; +} + + +/* Read a whole compilation unit into a linked list of dies. */ + +static struct die_info * +read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu) +{ + /* Reset die reference table; we are + building new ones now. */ + dwarf2_empty_hash_tables (); + + return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL); +} + +/* Read a single die and all its descendents. Set the die's sibling + field to NULL; set other fields in the die correctly, and set all + of the descendents' fields correctly. Set *NEW_INFO_PTR to the + location of the info_ptr after reading all of those dies. PARENT + is the parent of the die in question. */ + +static struct die_info * +read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *die; + char *cur_ptr; + int has_children; + + cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children); + store_in_ref_table (die->offset, die); + + if (has_children) + { + die->child = read_die_and_siblings (cur_ptr, abfd, cu, + new_info_ptr, die); + } + else + { + die->child = NULL; + *new_info_ptr = cur_ptr; + } + + die->sibling = NULL; + die->parent = parent; + return die; +} + +/* Read a die, all of its descendents, and all of its siblings; set + all of the fields of all of the dies correctly. Arguments are as + in read_die_and_children. */ + +static struct die_info * +read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *first_die, *last_sibling; + char *cur_ptr; + + cur_ptr = info_ptr; + first_die = last_sibling = NULL; + + while (1) + { + struct die_info *die + = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent); + + if (!first_die) + { + first_die = die; + } + else + { + last_sibling->sibling = die; + } + + if (die->tag == 0) + { + *new_info_ptr = cur_ptr; + return first_die; + } + else + { + last_sibling = die; + } + } +} + +/* Free a linked list of dies. */ + +static void +free_die_list (struct die_info *dies) +{ + struct die_info *die, *next; + + die = dies; + while (die) + { + if (die->child != NULL) + free_die_list (die->child); + next = die->sibling; + xfree (die->attrs); + xfree (die); + die = next; + } +} + +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + +/* Read the contents of the section at OFFSET and of size SIZE from the + object file specified by OBJFILE into the objfile_obstack and return it. */ + +char * +dwarf2_read_section (struct objfile *objfile, asection *sectp) +{ + bfd *abfd = objfile->obfd; + char *buf, *retbuf; + bfd_size_type size = bfd_get_section_size_before_reloc (sectp); + + if (size == 0) + return NULL; + + buf = (char *) obstack_alloc (&objfile->objfile_obstack, size); + retbuf + = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf); + if (retbuf != NULL) + return retbuf; + + if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 + || bfd_bread (buf, size, abfd) != size) + error ("Dwarf Error: Can't read DWARF data from '%s'", + bfd_get_filename (abfd)); + + return buf; +} + +/* In DWARF version 2, the description of the debugging information is + stored in a separate .debug_abbrev section. Before we read any + dies from a section we read in all abbreviations and install them + in a hash table. */ + +static void +dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + char *abbrev_ptr; + struct abbrev_info *cur_abbrev; + unsigned int abbrev_number, bytes_read, abbrev_name; + unsigned int abbrev_form, hash_number; + + /* Initialize dwarf2 abbrevs */ + memset (cu_header->dwarf2_abbrevs, 0, + ABBREV_HASH_SIZE*sizeof (struct abbrev_info *)); + + abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + + /* loop until we reach an abbrev number of 0 */ + while (abbrev_number) + { + cur_abbrev = dwarf_alloc_abbrev (); + + /* read in abbrev header */ + cur_abbrev->number = abbrev_number; + cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + abbrev_ptr += 1; + + /* now read in declarations */ + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + while (abbrev_name) + { + if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) + { + cur_abbrev->attrs = (struct attr_abbrev *) + xrealloc (cur_abbrev->attrs, + (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK) + * sizeof (struct attr_abbrev)); + } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; + cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + } + + hash_number = abbrev_number % ABBREV_HASH_SIZE; + cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number]; + cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev; + + /* Get next abbreviation. + Under Irix6 the abbreviations for a compilation unit are not + always properly terminated with an abbrev number of 0. + Exit loop if we encounter an abbreviation which we have + already read (which means we are about to read the abbreviations + for the next compile unit) or if the end of the abbreviation + table is reached. */ + if ((unsigned int) (abbrev_ptr - dwarf_abbrev_buffer) + >= dwarf_abbrev_size) + break; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL) + break; + } +} + +/* Empty the abbrev table for a new compilation unit. */ + +static void +dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table) +{ + int i; + struct abbrev_info *abbrev, *next; + struct abbrev_info **abbrevs; + + abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table; + + for (i = 0; i < ABBREV_HASH_SIZE; ++i) + { + next = NULL; + abbrev = abbrevs[i]; + while (abbrev) + { + next = abbrev->next; + xfree (abbrev->attrs); + xfree (abbrev); + abbrev = next; + } + abbrevs[i] = NULL; + } +} + +/* Lookup an abbrev_info structure in the abbrev hash table. */ + +static struct abbrev_info * +dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int hash_number; + struct abbrev_info *abbrev; + + hash_number = number % ABBREV_HASH_SIZE; + abbrev = cu_header->dwarf2_abbrevs[hash_number]; + + while (abbrev) + { + if (abbrev->number == number) + return abbrev; + else + abbrev = abbrev->next; + } + return NULL; +} + +/* Read a minimal amount of information into the minimal die structure. */ + +static char * +read_partial_die (struct partial_die_info *part_die, bfd *abfd, + char *info_ptr, struct dwarf2_cu *cu) +{ + unsigned int abbrev_number, bytes_read, i; + struct abbrev_info *abbrev; + struct attribute attr; + struct attribute spec_attr; + int found_spec_attr = 0; + int has_low_pc_attr = 0; + int has_high_pc_attr = 0; + + *part_die = zeroed_partial_die; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + return info_ptr; + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + bfd_get_filename (abfd)); + } + part_die->offset = info_ptr - dwarf_info_buffer; + part_die->tag = abbrev->tag; + part_die->has_children = abbrev->has_children; + part_die->abbrev = abbrev_number; + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu); + + /* Store the data if it is of an attribute we want to keep in a + partial symbol table. */ + switch (attr.name) + { + case DW_AT_name: + + /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ + if (part_die->name == NULL) + part_die->name = DW_STRING (&attr); + break; + case DW_AT_MIPS_linkage_name: + part_die->name = DW_STRING (&attr); + break; + case DW_AT_low_pc: + has_low_pc_attr = 1; + part_die->lowpc = DW_ADDR (&attr); + break; + case DW_AT_high_pc: + has_high_pc_attr = 1; + part_die->highpc = DW_ADDR (&attr); + break; + case DW_AT_location: + /* Support the .debug_loc offsets */ + if (attr_form_is_block (&attr)) + { + part_die->locdesc = DW_BLOCK (&attr); + } + else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "partial symbol information"); + } + break; + case DW_AT_language: + part_die->language = DW_UNSND (&attr); + break; + case DW_AT_external: + part_die->is_external = DW_UNSND (&attr); + break; + case DW_AT_declaration: + part_die->is_declaration = DW_UNSND (&attr); + break; + case DW_AT_type: + part_die->has_type = 1; + break; + case DW_AT_abstract_origin: + case DW_AT_specification: + found_spec_attr = 1; + spec_attr = attr; + break; + case DW_AT_sibling: + /* Ignore absolute siblings, they might point outside of + the current compile unit. */ + if (attr.form == DW_FORM_ref_addr) + complaint (&symfile_complaints, "ignoring absolute DW_AT_sibling"); + else + part_die->sibling = + dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu); + break; + default: + break; + } + } + + /* If we found a reference attribute and the die has no name, try + to find a name in the referred to die. */ + + if (found_spec_attr && part_die->name == NULL) + { + struct partial_die_info spec_die; + char *spec_ptr; + + spec_ptr = dwarf_info_buffer + + dwarf2_get_ref_die_offset (&spec_attr, cu); + read_partial_die (&spec_die, abfd, spec_ptr, cu); + if (spec_die.name) + { + part_die->name = spec_die.name; + + /* Copy DW_AT_external attribute if it is set. */ + if (spec_die.is_external) + part_die->is_external = spec_die.is_external; + } + } + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (has_low_pc_attr && has_high_pc_attr + && part_die->lowpc < part_die->highpc + && (part_die->lowpc != 0 + || (bfd_get_file_flags (abfd) & HAS_RELOC))) + part_die->has_pc_info = 1; + return info_ptr; +} + +/* Read the die from the .debug_info section buffer. Set DIEP to + point to a newly allocated die with its information, except for its + child, sibling, and parent fields. Set HAS_CHILDREN to tell + whether the die has children or not. */ + +static char * +read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu, int *has_children) +{ + unsigned int abbrev_number, bytes_read, i, offset; + struct abbrev_info *abbrev; + struct die_info *die; + + offset = info_ptr - dwarf_info_buffer; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + { + die = dwarf_alloc_die (); + die->tag = 0; + die->abbrev = abbrev_number; + die->type = NULL; + *diep = die; + *has_children = 0; + return info_ptr; + } + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: could not find abbrev number %d [in module %s]", + abbrev_number, + bfd_get_filename (abfd)); + } + die = dwarf_alloc_die (); + die->offset = offset; + die->tag = abbrev->tag; + die->abbrev = abbrev_number; + die->type = NULL; + + die->num_attrs = abbrev->num_attrs; + die->attrs = (struct attribute *) + xmalloc (die->num_attrs * sizeof (struct attribute)); + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i], + abfd, info_ptr, cu); + } + + *diep = die; + *has_children = abbrev->has_children; + return info_ptr; +} + +/* Read an attribute value described by an attribute form. */ + +static char * +read_attribute_value (struct attribute *attr, unsigned form, + bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int bytes_read; + struct dwarf_block *blk; + + attr->form = form; + switch (form) + { + case DW_FORM_addr: + case DW_FORM_ref_addr: + DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block2: + blk = dwarf_alloc_block (); + blk->size = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block4: + blk = dwarf_alloc_block (); + blk->size = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_data4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_data8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_string: + DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block: + blk = dwarf_alloc_block (); + blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block1: + blk = dwarf_alloc_block (); + blk->size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_flag: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_sdata: + DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_ref1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_ref2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_ref4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_ref8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_ref_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); + break; + default: + error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + dwarf_form_name (form), + bfd_get_filename (abfd)); + } + return info_ptr; +} + +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (struct attribute *attr, struct attr_abbrev *abbrev, + bfd *abfd, char *info_ptr, struct dwarf2_cu *cu) +{ + attr->name = abbrev->name; + return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu); +} + +/* read dwarf information from a buffer */ + +static unsigned int +read_1_byte (bfd *abfd, char *buf) +{ + return bfd_get_8 (abfd, (bfd_byte *) buf); +} + +static int +read_1_signed_byte (bfd *abfd, char *buf) +{ + return bfd_get_signed_8 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_2_bytes (bfd *abfd, char *buf) +{ + return bfd_get_16 (abfd, (bfd_byte *) buf); +} + +static int +read_2_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_16 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_4_bytes (bfd *abfd, char *buf) +{ + return bfd_get_32 (abfd, (bfd_byte *) buf); +} + +static int +read_4_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_32 (abfd, (bfd_byte *) buf); +} + +static unsigned long +read_8_bytes (bfd *abfd, char *buf) +{ + return bfd_get_64 (abfd, (bfd_byte *) buf); +} + +static CORE_ADDR +read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read) +{ + struct comp_unit_head *cu_header = &cu->header; + CORE_ADDR retval = 0; + + if (cu_header->signed_addr_p) + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_signed_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_signed_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, signed [in module %s]", + bfd_get_filename (abfd)); + } + } + else + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, unsigned [in module %s]", + bfd_get_filename (abfd)); + } + } + + *bytes_read = cu_header->addr_size; + return retval; +} + +/* Read the initial length from a section. The (draft) DWARF 3 + specification allows the initial length to take up either 4 bytes + or 12 bytes. If the first 4 bytes are 0xffffffff, then the next 8 + bytes describe the length and all offsets will be 8 bytes in length + instead of 4. + + An older, non-standard 64-bit format is also handled by this + function. The older format in question stores the initial length + as an 8-byte quantity without an escape value. Lengths greater + than 2^32 aren't very common which means that the initial 4 bytes + is almost always zero. Since a length value of zero doesn't make + sense for the 32-bit format, this initial zero can be considered to + be an escape value which indicates the presence of the older 64-bit + format. As written, the code can't detect (old format) lengths + greater than 4GB. If it becomes necessary to handle lengths somewhat + larger than 4GB, we could allow other small values (such as the + non-sensical values of 1, 2, and 3) to also be used as escape values + indicating the presence of the old format. + + The value returned via bytes_read should be used to increment + the relevant pointer after calling read_initial_length(). + + As a side effect, this function sets the fields initial_length_size + and offset_size in cu_header to the values appropriate for the + length field. (The format of the initial length field determines + the width of file offsets to be fetched later with fetch_offset().) + + [ Note: read_initial_length() and read_offset() are based on the + document entitled "DWARF Debugging Information Format", revision + 3, draft 8, dated November 19, 2001. This document was obtained + from: + + http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf + + This document is only a draft and is subject to change. (So beware.) + + Details regarding the older, non-standard 64-bit format were + determined empirically by examining 64-bit ELF files produced + by the SGI toolchain on an IRIX 6.5 machine. + + - Kevin, July 16, 2002 + ] */ + +static LONGEST +read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + + if (retval == 0xffffffff) + { + retval = bfd_get_64 (abfd, (bfd_byte *) buf + 4); + *bytes_read = 12; + if (cu_header != NULL) + { + cu_header->initial_length_size = 12; + cu_header->offset_size = 8; + } + } + else if (retval == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats such as that used + by IRIX. */ + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + if (cu_header != NULL) + { + cu_header->initial_length_size = 8; + cu_header->offset_size = 8; + } + } + else + { + *bytes_read = 4; + if (cu_header != NULL) + { + cu_header->initial_length_size = 4; + cu_header->offset_size = 4; + } + } + + return retval; +} + +/* Read an offset from the data stream. The size of the offset is + given by cu_header->offset_size. */ + +static LONGEST +read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + switch (cu_header->offset_size) + { + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + *bytes_read = 4; + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + break; + default: + internal_error (__FILE__, __LINE__, + "read_offset: bad switch [in module %s]", + bfd_get_filename (abfd)); + } + + return retval; +} + +static char * +read_n_bytes (bfd *abfd, char *buf, unsigned int size) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the buffer, otherwise we have to copy the data to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + return buf; +} + +static char * +read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the string, otherwise we have to copy the string to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + if (*buf == '\0') + { + *bytes_read_ptr = 1; + return NULL; + } + *bytes_read_ptr = strlen (buf) + 1; + return buf; +} + +static char * +read_indirect_string (bfd *abfd, char *buf, + const struct comp_unit_head *cu_header, + unsigned int *bytes_read_ptr) +{ + LONGEST str_offset = read_offset (abfd, buf, cu_header, + (int *) bytes_read_ptr); + + if (dwarf_str_buffer == NULL) + { + error ("DW_FORM_strp used without .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + if (str_offset >= dwarf_str_size) + { + error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + gdb_assert (HOST_CHAR_BIT == 8); + if (dwarf_str_buffer[str_offset] == '\0') + return NULL; + return dwarf_str_buffer + str_offset; +} + +static unsigned long +read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + unsigned long result; + unsigned int num_read; + int i, shift; + unsigned char byte; + + result = 0; + shift = 0; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((unsigned long)(byte & 127) << shift); + if ((byte & 128) == 0) + { + break; + } + shift += 7; + } + *bytes_read_ptr = num_read; + return result; +} + +static long +read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + long result; + int i, shift, size, num_read; + unsigned char byte; + + result = 0; + shift = 0; + size = 32; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((long)(byte & 127) << shift); + shift += 7; + if ((byte & 128) == 0) + { + break; + } + } + if ((shift < size) && (byte & 0x40)) + { + result |= -(1 << shift); + } + *bytes_read_ptr = num_read; + return result; +} + +static void +set_cu_language (unsigned int lang, struct dwarf2_cu *cu) +{ + switch (lang) + { + case DW_LANG_C89: + case DW_LANG_C: + cu->language = language_c; + break; + case DW_LANG_C_plus_plus: + cu->language = language_cplus; + break; + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + cu->language = language_fortran; + break; + case DW_LANG_Mips_Assembler: + cu->language = language_asm; + break; + case DW_LANG_Java: + cu->language = language_java; + break; + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + default: + cu->language = language_minimal; + break; + } + cu->language_defn = language_def (cu->language); +} + +/* Return the named attribute or NULL if not there. */ + +static struct attribute * +dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) +{ + unsigned int i; + struct attribute *spec = NULL; + + for (i = 0; i < die->num_attrs; ++i) + { + if (die->attrs[i].name == name) + { + return &die->attrs[i]; + } + if (die->attrs[i].name == DW_AT_specification + || die->attrs[i].name == DW_AT_abstract_origin) + spec = &die->attrs[i]; + } + if (spec) + { + struct die_info *ref_die = + follow_die_ref (dwarf2_get_ref_die_offset (spec, cu)); + + if (ref_die) + return dwarf2_attr (ref_die, name, cu); + } + + return NULL; +} + +static int +die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) +{ + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); +} + +/* Return the die giving the specification for DIE, if there is + one. */ + +static struct die_info * +die_specification (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu); + + if (spec_attr == NULL) + return NULL; + else + return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu)); +} + +/* Free the line_header structure *LH, and any arrays and strings it + refers to. */ +static void +free_line_header (struct line_header *lh) +{ + if (lh->standard_opcode_lengths) + xfree (lh->standard_opcode_lengths); + + /* Remember that all the lh->file_names[i].name pointers are + pointers into debug_line_buffer, and don't need to be freed. */ + if (lh->file_names) + xfree (lh->file_names); + + /* Similarly for the include directory names. */ + if (lh->include_dirs) + xfree (lh->include_dirs); + + xfree (lh); +} + + +/* Add an entry to LH's include directory table. */ +static void +add_include_dir (struct line_header *lh, char *include_dir) +{ + /* Grow the array if necessary. */ + if (lh->include_dirs_size == 0) + { + lh->include_dirs_size = 1; /* for testing */ + lh->include_dirs = xmalloc (lh->include_dirs_size + * sizeof (*lh->include_dirs)); + } + else if (lh->num_include_dirs >= lh->include_dirs_size) + { + lh->include_dirs_size *= 2; + lh->include_dirs = xrealloc (lh->include_dirs, + (lh->include_dirs_size + * sizeof (*lh->include_dirs))); + } + + lh->include_dirs[lh->num_include_dirs++] = include_dir; +} + + +/* Add an entry to LH's file name table. */ +static void +add_file_name (struct line_header *lh, + char *name, + unsigned int dir_index, + unsigned int mod_time, + unsigned int length) +{ + struct file_entry *fe; + + /* Grow the array if necessary. */ + if (lh->file_names_size == 0) + { + lh->file_names_size = 1; /* for testing */ + lh->file_names = xmalloc (lh->file_names_size + * sizeof (*lh->file_names)); + } + else if (lh->num_file_names >= lh->file_names_size) + { + lh->file_names_size *= 2; + lh->file_names = xrealloc (lh->file_names, + (lh->file_names_size + * sizeof (*lh->file_names))); + } + + fe = &lh->file_names[lh->num_file_names++]; + fe->name = name; + fe->dir_index = dir_index; + fe->mod_time = mod_time; + fe->length = length; +} + + +/* Read the statement program header starting at OFFSET in + dwarf_line_buffer, according to the endianness of ABFD. Return a + pointer to a struct line_header, allocated using xmalloc. + + NOTE: the strings in the include directory and file name tables of + the returned object point into debug_line_buffer, and must not be + freed. */ +static struct line_header * +dwarf_decode_line_header (unsigned int offset, bfd *abfd, + struct dwarf2_cu *cu) +{ + struct cleanup *back_to; + struct line_header *lh; + char *line_ptr; + int bytes_read; + int i; + char *cur_dir, *cur_file; + + if (dwarf_line_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_line section"); + return 0; + } + + /* Make sure that at least there's room for the total_length field. That + could be 12 bytes long, but we're just going to fudge that. */ + if (offset + 4 >= dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + + lh = xmalloc (sizeof (*lh)); + memset (lh, 0, sizeof (*lh)); + back_to = make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) lh); + + line_ptr = dwarf_line_buffer + offset; + + /* read in the header */ + lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read); + line_ptr += bytes_read; + if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + lh->statement_program_end = line_ptr + lh->total_length; + lh->version = read_2_bytes (abfd, line_ptr); + line_ptr += 2; + lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read); + line_ptr += bytes_read; + lh->minimum_instruction_length = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->default_is_stmt = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_base = read_1_signed_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_range = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->opcode_base = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->standard_opcode_lengths + = (unsigned char *) xmalloc (lh->opcode_base * sizeof (unsigned char)); + + lh->standard_opcode_lengths[0] = 1; /* This should never be used anyway. */ + for (i = 1; i < lh->opcode_base; ++i) + { + lh->standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + line_ptr += 1; + } + + /* Read directory table */ + while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + line_ptr += bytes_read; + add_include_dir (lh, cur_dir); + } + line_ptr += bytes_read; + + /* Read file name table */ + while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + unsigned int dir_index, mod_time, length; + + line_ptr += bytes_read; + dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + line_ptr += bytes_read; + lh->statement_program_start = line_ptr; + + if (line_ptr > dwarf_line_buffer + dwarf_line_size) + complaint (&symfile_complaints, + "line number info header doesn't fit in `.debug_line' section"); + + discard_cleanups (back_to); + return lh; +} + +/* This function exists to work around a bug in certain compilers + (particularly GCC 2.95), in which the first line number marker of a + function does not show up until after the prologue, right before + the second line number marker. This function shifts ADDRESS down + to the beginning of the function if necessary, and is called on + addresses passed to record_line. */ + +static CORE_ADDR +check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu) +{ + struct function_range *fn; + + /* Find the function_range containing address. */ + if (!cu->first_fn) + return address; + + if (!cu->cached_fn) + cu->cached_fn = cu->first_fn; + + fn = cu->cached_fn; + while (fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + fn = cu->first_fn; + while (fn && fn != cu->cached_fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + return address; + + found: + if (fn->seen_line) + return address; + if (address != fn->lowpc) + complaint (&symfile_complaints, + "misplaced first line number at 0x%lx for '%s'", + (unsigned long) address, fn->name); + fn->seen_line = 1; + return fn->lowpc; +} + +/* Decode the line number information for the compilation unit whose + line number info is at OFFSET in the .debug_line section. + The compilation directory of the file is passed in COMP_DIR. */ + +static void +dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *line_ptr; + char *line_end; + unsigned int bytes_read; + unsigned char op_code, extended_op, adj_opcode; + CORE_ADDR baseaddr; + struct objfile *objfile = cu->objfile; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + line_ptr = lh->statement_program_start; + line_end = lh->statement_program_end; + + /* Read the statement sequences until there's nothing left. */ + while (line_ptr < line_end) + { + /* state machine registers */ + CORE_ADDR address = 0; + unsigned int file = 1; + unsigned int line = 1; + unsigned int column = 0; + int is_stmt = lh->default_is_stmt; + int basic_block = 0; + int end_sequence = 0; + + /* Start a subfile for the current file of the state machine. */ + if (lh->num_file_names >= file) + { + /* lh->include_dirs and lh->file_names are 0-based, but the + directory and file name numbers in the statement program + are 1-based. */ + struct file_entry *fe = &lh->file_names[file - 1]; + char *dir; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + + /* Decode the table. */ + while (!end_sequence) + { + op_code = read_1_byte (abfd, line_ptr); + line_ptr += 1; + + if (op_code >= lh->opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh->opcode_base; + address += (adj_opcode / lh->line_range) + * lh->minimum_instruction_length; + line += lh->line_base + (adj_opcode % lh->line_range); + /* append row to matrix using current values */ + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 1; + } + else switch (op_code) + { + case DW_LNS_extended_op: + line_ptr += 1; /* ignore length */ + extended_op = read_1_byte (abfd, line_ptr); + line_ptr += 1; + switch (extended_op) + { + case DW_LNE_end_sequence: + end_sequence = 1; + record_line (current_subfile, 0, address); + break; + case DW_LNE_set_address: + address = read_address (abfd, line_ptr, cu, &bytes_read); + line_ptr += bytes_read; + address += baseaddr; + break; + case DW_LNE_define_file: + { + char *cur_file; + unsigned int dir_index, mod_time, length; + + cur_file = read_string (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + dir_index = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + break; + default: + complaint (&symfile_complaints, + "mangled .debug_line section"); + return; + } + break; + case DW_LNS_copy: + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 0; + break; + case DW_LNS_advance_pc: + address += lh->minimum_instruction_length + * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_advance_line: + line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_set_file: + { + /* lh->include_dirs and lh->file_names are 0-based, + but the directory and file name numbers in the + statement program are 1-based. */ + struct file_entry *fe; + char *dir; + file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + fe = &lh->file_names[file - 1]; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + break; + case DW_LNS_set_column: + column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_negate_stmt: + is_stmt = (!is_stmt); + break; + case DW_LNS_set_basic_block: + basic_block = 1; + break; + /* Add to the address register of the state machine the + address increment value corresponding to special opcode + 255. Ie, this value is scaled by the minimum instruction + length since special opcode 255 would have scaled the + the increment. */ + case DW_LNS_const_add_pc: + address += (lh->minimum_instruction_length + * ((255 - lh->opcode_base) / lh->line_range)); + break; + case DW_LNS_fixed_advance_pc: + address += read_2_bytes (abfd, line_ptr); + line_ptr += 2; + break; + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh->standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } + } + } + } +} + +/* Start a subfile for DWARF. FILENAME is the name of the file and + DIRNAME the name of the source directory which contains FILENAME + or NULL if not known. + This routine tries to keep line numbers from identical absolute and + relative file names in a common subfile. + + Using the `list' example from the GDB testsuite, which resides in + /srcdir and compiling it with Irix6.2 cc in /compdir using a filename + of /srcdir/list0.c yields the following debugging information for list0.c: + + DW_AT_name: /srcdir/list0.c + DW_AT_comp_dir: /compdir + files.files[0].name: list0.h + files.files[0].dir: /srcdir + files.files[1].name: list0.c + files.files[1].dir: /srcdir + + The line number information for list0.c has to end up in a single + subfile, so that `break /srcdir/list0.c:1' works as expected. */ + +static void +dwarf2_start_subfile (char *filename, char *dirname) +{ + /* If the filename isn't absolute, try to match an existing subfile + with the full pathname. */ + + if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) + { + struct subfile *subfile; + char *fullname = concat (dirname, "/", filename, NULL); + + for (subfile = subfiles; subfile; subfile = subfile->next) + { + if (FILENAME_CMP (subfile->name, fullname) == 0) + { + current_subfile = subfile; + xfree (fullname); + return; + } + } + xfree (fullname); + } + start_subfile (filename, dirname); +} + +static void +var_decode_location (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + + /* NOTE drow/2003-01-30: There used to be a comment and some special + code here to turn a symbol with DW_AT_external and a + SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was + necessary for platforms (maybe Alpha, certainly PowerPC GNU/Linux + with some versions of binutils) where shared libraries could have + relocations against symbols in their debug information - the + minimal symbol would have the right address, but the debug info + would not. It's no longer necessary, because we will explicitly + apply relocations when we read in the debug information now. */ + + /* A DW_AT_location attribute with no contents indicates that a + variable has been optimized away. */ + if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0) + { + SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; + return; + } + + /* Handle one degenerate form of location expression specially, to + preserve GDB's previous behavior when section offsets are + specified. If this is just a DW_OP_addr then mark this symbol + as LOC_STATIC. */ + + if (attr_form_is_block (attr) + && DW_BLOCK (attr)->size == 1 + cu_header->addr_size + && DW_BLOCK (attr)->data[0] == DW_OP_addr) + { + int dummy; + + SYMBOL_VALUE_ADDRESS (sym) = + read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy); + fixup_symbol_section (sym, objfile); + SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, + SYMBOL_SECTION (sym)); + SYMBOL_CLASS (sym) = LOC_STATIC; + return; + } + + /* NOTE drow/2002-01-30: It might be worthwhile to have a static + expression evaluator, and use LOC_COMPUTED only when necessary + (i.e. when the value of a register or memory location is + referenced, or a thread-local block, etc.). Then again, it might + not be worthwhile. I'm assuming that it isn't unless performance + or memory numbers show me otherwise. */ + + dwarf2_symbol_mark_computed (attr, sym, cu); + SYMBOL_CLASS (sym) = LOC_COMPUTED; +} + +/* Given a pointer to a DWARF information entry, figure out if we need + to make a symbol table entry for it, and if so, create a new entry + and return a pointer to it. + If TYPE is NULL, determine symbol type from the die, otherwise + used the passed type. */ + +static struct symbol * +new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct symbol *sym = NULL; + char *name; + struct attribute *attr = NULL; + struct attribute *attr2 = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + + if (name) + { + sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + OBJSTAT (objfile, n_syms++); + memset (sym, 0, sizeof (struct symbol)); + + /* Cache this symbol's name and the name's demangled form (if any). */ + SYMBOL_LANGUAGE (sym) = cu->language; + SYMBOL_SET_NAMES (sym, name, strlen (name), objfile); + + /* Default assumptions. + Use the passed type or decode it from the die. */ + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_CLASS (sym) = LOC_STATIC; + if (type != NULL) + SYMBOL_TYPE (sym) = type; + else + SYMBOL_TYPE (sym) = die_type (die, cu); + attr = dwarf2_attr (die, DW_AT_decl_line, cu); + if (attr) + { + SYMBOL_LINE (sym) = DW_UNSND (attr); + } + switch (die->tag) + { + case DW_TAG_label: + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = DW_ADDR (attr) + baseaddr; + } + SYMBOL_CLASS (sym) = LOC_LABEL; + break; + case DW_TAG_subprogram: + /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by + finish_block. */ + SYMBOL_CLASS (sym) = LOC_BLOCK; + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + { + add_symbol_to_list (sym, &global_symbols); + } + else + { + add_symbol_to_list (sym, cu->list_in_scope); + } + break; + case DW_TAG_variable: + /* Compilation with minimal debug info may result in variables + with missing type entries. Change the misleading `void' type + to something sensible. */ + if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID) + SYMBOL_TYPE (sym) = init_type (TYPE_CODE_INT, + TARGET_INT_BIT / HOST_CHAR_BIT, 0, + "", + objfile); + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + break; + } + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + } + else + { + /* We do not know the address of this symbol. + If it is an external symbol and we have type information + for it, enter the symbol as a LOC_UNRESOLVED symbol. + The address of the variable will then be determined from + the minimal symbol table whenever the variable is + referenced. */ + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0) + && dwarf2_attr (die, DW_AT_type, cu) != NULL) + { + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; + add_symbol_to_list (sym, &global_symbols); + } + } + break; + case DW_TAG_formal_parameter: + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_unspecified_parameters: + /* From varargs functions; gdb doesn't seem to have any + interest in this information, so just ignore it for now. + (FIXME?) */ + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; + + /* Make sure that the symbol includes appropriate enclosing + classes/namespaces in its name. These are calculated in + read_structure_type, and the correct name is saved in + the type. */ + + if (cu->language == language_cplus) + { + struct type *type = SYMBOL_TYPE (sym); + + if (TYPE_TAG_NAME (type) != NULL) + { + /* FIXME: carlton/2003-11-10: Should this use + SYMBOL_SET_NAMES instead? (The same problem also + arises a further down in the function.) */ + SYMBOL_LINKAGE_NAME (sym) + = obsavestring (TYPE_TAG_NAME (type), + strlen (TYPE_TAG_NAME (type)), + &objfile->objfile_obstack); + } + } + + { + /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't + really ever be static objects: otherwise, if you try + to, say, break of a class's method and you're in a file + which doesn't mention that class, it won't work unless + the check for all static symbols in lookup_symbol_aux + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + + /* The semantics of C++ state that "struct foo { ... }" also + defines a typedef for "foo". Synthesize a typedef symbol so + that "ptype foo" works as expected. */ + if (cu->language == language_cplus) + { + struct symbol *typedef_sym = (struct symbol *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + *typedef_sym = *sym; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; + if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + TYPE_NAME (SYMBOL_TYPE (sym)) = + obsavestring (SYMBOL_NATURAL_NAME (sym), + strlen (SYMBOL_NATURAL_NAME (sym)), + &objfile->objfile_obstack); + add_symbol_to_list (typedef_sym, list_to_add); + } + } + break; + case DW_TAG_typedef: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_enumerator: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + { + /* NOTE: carlton/2003-11-10: See comment above in the + DW_TAG_class_type, etc. block. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + } + break; + case DW_TAG_namespace: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + add_symbol_to_list (sym, &global_symbols); + break; + default: + /* Not a tag we recognize. Hopefully we aren't processing + trash data, but since we must specifically ignore things + we don't recognize, there is nothing else we should do at + this point. */ + complaint (&symfile_complaints, "unsupported tag: '%s'", + dwarf_tag_name (die->tag)); + break; + } + } + return (sym); +} + +/* Copy constant value from an attribute to a symbol. */ + +static void +dwarf2_const_value (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct dwarf_block *blk; + + switch (attr->form) + { + case DW_FORM_addr: + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + cu_header->addr_size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); + /* NOTE: cagney/2003-05-09: In-lined store_address call with + it's body - store_unsigned_integer. */ + store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, + DW_ADDR (attr)); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + blk = DW_BLOCK (attr); + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + blk->size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, blk->size); + memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + + /* The DW_AT_const_value attributes are supposed to carry the + symbol's value "represented as it would be on the target + architecture." By the time we get here, it's already been + converted to host endianness, so we just need to sign- or + zero-extend it as appropriate. */ + case DW_FORM_data1: + dwarf2_const_value_data (attr, sym, 8); + break; + case DW_FORM_data2: + dwarf2_const_value_data (attr, sym, 16); + break; + case DW_FORM_data4: + dwarf2_const_value_data (attr, sym, 32); + break; + case DW_FORM_data8: + dwarf2_const_value_data (attr, sym, 64); + break; + + case DW_FORM_sdata: + SYMBOL_VALUE (sym) = DW_SND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + case DW_FORM_udata: + SYMBOL_VALUE (sym) = DW_UNSND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + default: + complaint (&symfile_complaints, + "unsupported const value attribute form: '%s'", + dwarf_form_name (attr->form)); + SYMBOL_VALUE (sym) = 0; + SYMBOL_CLASS (sym) = LOC_CONST; + break; + } +} + + +/* Given an attr with a DW_FORM_dataN value in host byte order, sign- + or zero-extend it as appropriate for the symbol's type. */ +static void +dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits) +{ + LONGEST l = DW_UNSND (attr); + + if (bits < sizeof (l) * 8) + { + if (TYPE_UNSIGNED (SYMBOL_TYPE (sym))) + l &= ((LONGEST) 1 << bits) - 1; + else + l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits); + } + + SYMBOL_VALUE (sym) = l; + SYMBOL_CLASS (sym) = LOC_CONST; +} + + +/* Return the type of the die in question using its DW_AT_type attribute. */ + +static struct type * +die_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *type_attr; + struct die_info *type_die; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_type, cu); + if (!type_attr) + { + /* A missing DW_AT_type represents a void type. */ + return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu); + } + else + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", + ref, cu->objfile->name); + return NULL; + } + } + type = tag_type_to_type (type_die, cu); + if (!type) + { + dump_die (type_die); + error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +/* Return the containing type of the die in question using its + DW_AT_containing_type attribute. */ + +static struct type * +die_containing_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type = NULL; + struct attribute *type_attr; + struct die_info *type_die = NULL; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_containing_type, cu); + if (type_attr) + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref, + cu->objfile->name); + return NULL; + } + type = tag_type_to_type (type_die, cu); + } + if (!type) + { + if (type_die) + dump_die (type_die); + error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +#if 0 +static struct type * +type_at_offset (unsigned int offset, struct dwarf2_cu *cu) +{ + struct die_info *die; + struct type *type; + + die = follow_die_ref (offset); + if (!die) + { + error ("Dwarf Error: Cannot find type referent at offset %d.", offset); + return NULL; + } + type = tag_type_to_type (die, cu); + return type; +} +#endif + +static struct type * +tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) +{ + if (die->type) + { + return die->type; + } + else + { + read_type_die (die, cu); + if (!die->type) + { + dump_die (die); + error ("Dwarf Error: Cannot find type of die [in module %s]", + cu->objfile->name); + } + return die->type; + } +} + +static void +read_type_die (struct die_info *die, struct dwarf2_cu *cu) +{ + char *prefix = determine_prefix (die, cu); + const char *old_prefix = processing_current_prefix; + struct cleanup *back_to = make_cleanup (xfree, prefix); + processing_current_prefix = prefix; + + switch (die->tag) + { + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +#ifdef CRASH_MERGE + process_structure_scope (die, cu); +#endif + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); +#ifdef CRASH_MERGE + process_enumeration_scope (die, cu); +#endif + break; + case DW_TAG_subprogram: + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_const_type: + read_tag_const_type (die, cu); + break; + case DW_TAG_volatile_type: + read_tag_volatile_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + case DW_TAG_typedef: + read_typedef (die, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + break; + case DW_TAG_base_type: + read_base_type (die, cu); +#ifdef CRASH_MERGE + new_symbol (die, die->type, cu); +#endif + break; + default: + complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'", + dwarf_tag_name (die->tag)); + break; + } + + processing_current_prefix = old_prefix; + do_cleanups (back_to); +} + +/* Return the name of the namespace/class that DIE is defined within, + or "" if we can't tell. The caller should xfree the result. */ + +/* NOTE: carlton/2004-01-23: See read_func_scope (and the comment + therein) for an example of how to use this function to deal with + DW_AT_specification. */ + +static char * +determine_prefix (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *parent; + + if (cu->language != language_cplus) + return NULL; + + parent = die->parent; + + if (parent == NULL) + { + return xstrdup (""); + } + else + { + switch (parent->tag) { + case DW_TAG_namespace: + { + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } + } + default: + return determine_prefix (parent, cu); + } + } +} + +/* Return a newly-allocated string formed by concatenating PREFIX, + "::", and SUFFIX, except that if PREFIX is NULL or the empty + string, just return a copy of SUFFIX. */ + +static char * +typename_concat (const char *prefix, const char *suffix) +{ + if (prefix == NULL || prefix[0] == '\0') + return xstrdup (suffix); + else + { + char *retval = xmalloc (strlen (prefix) + 2 + strlen (suffix) + 1); + + strcpy (retval, prefix); + strcat (retval, "::"); + strcat (retval, suffix); + + return retval; + } +} + +static struct type * +dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + + /* FIXME - this should not produce a new (struct type *) + every time. It should cache base types. */ + struct type *type; + switch (encoding) + { + case DW_ATE_address: + type = dwarf2_fundamental_type (objfile, FT_VOID, cu); + return type; + case DW_ATE_boolean: + type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu); + return type; + case DW_ATE_complex_float: + if (size == 16) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu); + } + return type; + case DW_ATE_float: + if (size == 8) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + return type; + case DW_ATE_signed: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_signed_char: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + return type; + case DW_ATE_unsigned: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_unsigned_char: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + return type; + default: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + return type; + } +} + +#if 0 +struct die_info * +copy_die (struct die_info *old_die) +{ + struct die_info *new_die; + int i, num_attrs; + + new_die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (new_die, 0, sizeof (struct die_info)); + + new_die->tag = old_die->tag; + new_die->has_children = old_die->has_children; + new_die->abbrev = old_die->abbrev; + new_die->offset = old_die->offset; + new_die->type = NULL; + + num_attrs = old_die->num_attrs; + new_die->num_attrs = num_attrs; + new_die->attrs = (struct attribute *) + xmalloc (num_attrs * sizeof (struct attribute)); + + for (i = 0; i < old_die->num_attrs; ++i) + { + new_die->attrs[i].name = old_die->attrs[i].name; + new_die->attrs[i].form = old_die->attrs[i].form; + new_die->attrs[i].u.addr = old_die->attrs[i].u.addr; + } + + new_die->next = NULL; + return new_die; +} +#endif + +/* Return sibling of die, NULL if no sibling. */ + +static struct die_info * +sibling_die (struct die_info *die) +{ + return die->sibling; +} + +/* Get linkage name of a die, return NULL if not found. */ + +static char * +dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Get name of a die, return NULL if not found. */ + +static char * +dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Return the die that this die in an extension of, or NULL if there + is none. */ + +static struct die_info * +dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + struct die_info *extension_die; + unsigned int ref; + + attr = dwarf2_attr (die, DW_AT_extension, cu); + if (attr == NULL) + return NULL; + + ref = dwarf2_get_ref_die_offset (attr, cu); + extension_die = follow_die_ref (ref); + if (!extension_die) + { + error ("Dwarf Error: Cannot find referent at offset %d.", ref); + } + + return extension_die; +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (unsigned tag) +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_dwarf_procedure: + return "DW_TAG_dwarf_procedure"; + case DW_TAG_restrict_type: + return "DW_TAG_restrict_type"; + case DW_TAG_interface_type: + return "DW_TAG_interface_type"; + case DW_TAG_namespace: + return "DW_TAG_namespace"; + case DW_TAG_imported_module: + return "DW_TAG_imported_module"; + case DW_TAG_unspecified_type: + return "DW_TAG_unspecified_type"; + case DW_TAG_partial_unit: + return "DW_TAG_partial_unit"; + case DW_TAG_imported_unit: + return "DW_TAG_imported_unit"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (unsigned attr) +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + case DW_AT_allocated: + return "DW_AT_allocated"; + case DW_AT_associated: + return "DW_AT_associated"; + case DW_AT_data_location: + return "DW_AT_data_location"; + case DW_AT_stride: + return "DW_AT_stride"; + case DW_AT_entry_pc: + return "DW_AT_entry_pc"; + case DW_AT_use_UTF8: + return "DW_AT_use_UTF8"; + case DW_AT_extension: + return "DW_AT_extension"; + case DW_AT_ranges: + return "DW_AT_ranges"; + case DW_AT_trampoline: + return "DW_AT_trampoline"; + case DW_AT_call_column: + return "DW_AT_call_column"; + case DW_AT_call_file: + return "DW_AT_call_file"; + case DW_AT_call_line: + return "DW_AT_call_line"; +#ifdef MIPS + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; +#endif + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + default: + return "DW_AT_"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (unsigned form) +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (unsigned op) +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + /* DWARF 3 extensions. */ + case DW_OP_push_object_address: + return "DW_OP_push_object_address"; + case DW_OP_call2: + return "DW_OP_call2"; + case DW_OP_call4: + return "DW_OP_call4"; + case DW_OP_call_ref: + return "DW_OP_call_ref"; + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + return "DW_OP_GNU_push_tls_address"; + default: + return "OP_"; + } +} + +static char * +dwarf_bool_name (unsigned mybool) +{ + if (mybool) + return "TRUE"; + else + return "FALSE"; +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (unsigned enc) +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + case DW_ATE_imaginary_float: + return "DW_ATE_imaginary_float"; + default: + return "DW_ATE_"; + } +} + +/* Convert a DWARF call frame info operation to its string name. */ + +#if 0 +static char * +dwarf_cfi_name (unsigned cfi_opc) +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ + case DW_CFA_def_cfa_expression: + return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + case DW_CFA_GNU_negative_offset_extended: + return "DW_CFA_GNU_negative_offset_extended"; + + default: + return "DW_CFA_"; + } +} +#endif + +static void +dump_die (struct die_info *die) +{ + unsigned int i; + + fprintf_unfiltered (gdb_stderr, "Die: %s (abbrev = %d, offset = %d)\n", + dwarf_tag_name (die->tag), die->abbrev, die->offset); + fprintf_unfiltered (gdb_stderr, "\thas children: %s\n", + dwarf_bool_name (die->child != NULL)); + + fprintf_unfiltered (gdb_stderr, "\tattributes:\n"); + for (i = 0; i < die->num_attrs; ++i) + { + fprintf_unfiltered (gdb_stderr, "\t\t%s (%s) ", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); + switch (die->attrs[i].form) + { + case DW_FORM_ref_addr: + case DW_FORM_addr: + fprintf_unfiltered (gdb_stderr, "address: "); + print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr); + break; + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_block1: + fprintf_unfiltered (gdb_stderr, "block: size %d", DW_BLOCK (&die->attrs[i])->size); + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_udata: + case DW_FORM_sdata: + fprintf_unfiltered (gdb_stderr, "constant: %ld", DW_UNSND (&die->attrs[i])); + break; + case DW_FORM_string: + case DW_FORM_strp: + fprintf_unfiltered (gdb_stderr, "string: \"%s\"", + DW_STRING (&die->attrs[i]) + ? DW_STRING (&die->attrs[i]) : ""); + break; + case DW_FORM_flag: + if (DW_UNSND (&die->attrs[i])) + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + else + fprintf_unfiltered (gdb_stderr, "flag: FALSE"); + break; + case DW_FORM_indirect: + /* the reader will have reduced the indirect form to + the "base form" so this form should not occur */ + fprintf_unfiltered (gdb_stderr, "unexpected attribute form: DW_FORM_indirect"); + break; + default: + fprintf_unfiltered (gdb_stderr, "unsupported attribute form: %d.", + die->attrs[i].form); + } + fprintf_unfiltered (gdb_stderr, "\n"); + } +} + +static void +dump_die_list (struct die_info *die) +{ + while (die) + { + dump_die (die); + if (die->child != NULL) + dump_die_list (die->child); + if (die->sibling != NULL) + dump_die_list (die->sibling); + } +} + +static void +store_in_ref_table (unsigned int offset, struct die_info *die) +{ + int h; + struct die_info *old; + + h = (offset % REF_HASH_SIZE); + old = die_ref_table[h]; + die->next_ref = old; + die_ref_table[h] = die; +} + + +static void +dwarf2_empty_hash_tables (void) +{ + memset (die_ref_table, 0, sizeof (die_ref_table)); +} + +static unsigned int +dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu) +{ + unsigned int result = 0; + + switch (attr->form) + { + case DW_FORM_ref_addr: + result = DW_ADDR (attr); + break; + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_ref8: + case DW_FORM_ref_udata: + result = cu->header.offset + DW_UNSND (attr); + break; + default: + complaint (&symfile_complaints, + "unsupported die ref attribute form: '%s'", + dwarf_form_name (attr->form)); + } + return result; +} + +/* Return the constant value held by the given attribute. Return -1 + if the value held by the attribute is not constant. */ + +static int +dwarf2_get_attr_constant_value (struct attribute *attr, int default_value) +{ + if (attr->form == DW_FORM_sdata) + return DW_SND (attr); + else if (attr->form == DW_FORM_udata + || attr->form == DW_FORM_data1 + || attr->form == DW_FORM_data2 + || attr->form == DW_FORM_data4 + || attr->form == DW_FORM_data8) + return DW_UNSND (attr); + else + { + complaint (&symfile_complaints, "Attribute value is not a constant (%s)", + dwarf_form_name (attr->form)); + return default_value; + } +} + +static struct die_info * +follow_die_ref (unsigned int offset) +{ + struct die_info *die; + int h; + + h = (offset % REF_HASH_SIZE); + die = die_ref_table[h]; + while (die) + { + if (die->offset == offset) + { + return die; + } + die = die->next_ref; + } + return NULL; +} + +static struct type * +dwarf2_fundamental_type (struct objfile *objfile, int typeid, + struct dwarf2_cu *cu) +{ + if (typeid < 0 || typeid >= FT_NUM_MEMBERS) + { + error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + typeid, objfile->name); + } + + /* Look for this particular type in the fundamental type vector. If + one is not found, create and install one appropriate for the + current language and the current target machine. */ + + if (cu->ftypes[typeid] == NULL) + { + cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid); + } + + return (cu->ftypes[typeid]); +} + +/* Decode simple location descriptions. + Given a pointer to a dwarf block that defines a location, compute + the location and return the value. + + NOTE drow/2003-11-18: This function is called in two situations + now: for the address of static or global variables (partial symbols + only) and for offsets into structures which are expected to be + (more or less) constant. The partial symbol case should go away, + and only the constant case should remain. That will let this + function complain more accurately. A few special modes are allowed + without complaint for global variables (for instance, global + register values and thread-local values). + + A location description containing no operations indicates that the + object is optimized out. The return value is 0 for that case. + FIXME drow/2003-11-16: No callers check for this case any more; soon all + callers will only want a very basic result and this can become a + complaint. + + When the result is a register number, the global isreg flag is set, + otherwise it is cleared. + + Note that stack[0] is unused except as a default error return. + Note that stack overflow is not yet handled. */ + +static CORE_ADDR +decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + int i; + int size = blk->size; + char *data = blk->data; + CORE_ADDR stack[64]; + int stacki; + unsigned int bytes_read, unsnd; + unsigned char op; + + i = 0; + stacki = 0; + stack[stacki] = 0; + isreg = 0; + + while (i < size) + { + op = data[i++]; + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + stack[++stacki] = op - DW_OP_lit0; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + isreg = 1; + stack[++stacki] = op - DW_OP_reg0; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_regx: + isreg = 1; + unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + stack[++stacki] = unsnd; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_addr: + stack[++stacki] = read_address (objfile->obfd, &data[i], + cu, &bytes_read); + i += bytes_read; + break; + + case DW_OP_const1u: + stack[++stacki] = read_1_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const1s: + stack[++stacki] = read_1_signed_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const2u: + stack[++stacki] = read_2_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const2s: + stack[++stacki] = read_2_signed_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const4u: + stack[++stacki] = read_4_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_const4s: + stack[++stacki] = read_4_signed_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_constu: + stack[++stacki] = read_unsigned_leb128 (NULL, (data + i), + &bytes_read); + i += bytes_read; + break; + + case DW_OP_consts: + stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_dup: + stack[stacki + 1] = stack[stacki]; + stacki++; + break; + + case DW_OP_plus: + stack[stacki - 1] += stack[stacki]; + stacki--; + break; + + case DW_OP_plus_uconst: + stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_minus: + stack[stacki - 1] -= stack[stacki]; + stacki--; + break; + + case DW_OP_deref: + /* If we're not the last op, then we definitely can't encode + this using GDB's address_class enum. This is valid for partial + global symbols, although the variable's address will be bogus + in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_GNU_push_tls_address: + /* The top of the stack has the offset from the beginning + of the thread control block at which the variable is located. */ + /* Nothing should follow this operator, so the top of stack would + be returned. */ + /* This is valid for partial global symbols, but the variable's + address will be bogus in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + default: + complaint (&symfile_complaints, "unsupported stack op: '%s'", + dwarf_stack_op_name (op)); + return (stack[stacki]); + } + } + return (stack[stacki]); +} + +/* memory allocation interface */ + +static void +dwarf2_free_tmp_obstack (void *ignore) +{ + obstack_free (&dwarf2_tmp_obstack, NULL); +} + +static struct dwarf_block * +dwarf_alloc_block (void) +{ + struct dwarf_block *blk; + + blk = (struct dwarf_block *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct dwarf_block)); + return (blk); +} + +static struct abbrev_info * +dwarf_alloc_abbrev (void) +{ + struct abbrev_info *abbrev; + + abbrev = (struct abbrev_info *) xmalloc (sizeof (struct abbrev_info)); + memset (abbrev, 0, sizeof (struct abbrev_info)); + return (abbrev); +} + +static struct die_info * +dwarf_alloc_die (void) +{ + struct die_info *die; + + die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (die, 0, sizeof (struct die_info)); + return (die); +} + + +/* Macro support. */ + + +/* Return the full name of file number I in *LH's file name table. + Use COMP_DIR as the name of the current directory of the + compilation. The result is allocated using xmalloc; the caller is + responsible for freeing it. */ +static char * +file_full_name (int file, struct line_header *lh, const char *comp_dir) +{ + struct file_entry *fe = &lh->file_names[file - 1]; + + if (IS_ABSOLUTE_PATH (fe->name)) + return xstrdup (fe->name); + else + { + const char *dir; + int dir_len; + char *full_name; + + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + + if (dir) + { + dir_len = strlen (dir); + full_name = xmalloc (dir_len + 1 + strlen (fe->name) + 1); + strcpy (full_name, dir); + full_name[dir_len] = '/'; + strcpy (full_name + dir_len + 1, fe->name); + return full_name; + } + else + return xstrdup (fe->name); + } +} + + +static struct macro_source_file * +macro_start_file (int file, int line, + struct macro_source_file *current_file, + const char *comp_dir, + struct line_header *lh, struct objfile *objfile) +{ + /* The full name of this source file. */ + char *full_name = file_full_name (file, lh, comp_dir); + + /* We don't create a macro table for this compilation unit + at all until we actually get a filename. */ + if (! pending_macros) + pending_macros = new_macro_table (&objfile->objfile_obstack, + objfile->macro_cache); + + if (! current_file) + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + else + current_file = macro_include (current_file, line, full_name); + + xfree (full_name); + + return current_file; +} + + +/* Copy the LEN characters at BUF to a xmalloc'ed block of memory, + followed by a null byte. */ +static char * +copy_string (const char *buf, int len) +{ + char *s = xmalloc (len + 1); + memcpy (s, buf, len); + s[len] = '\0'; + + return s; +} + + +static const char * +consume_improper_spaces (const char *p, const char *body) +{ + if (*p == ' ') + { + complaint (&symfile_complaints, + "macro definition contains spaces in formal argument list:\n`%s'", + body); + + while (*p == ' ') + p++; + } + + return p; +} + + +static void +parse_macro_definition (struct macro_source_file *file, int line, + const char *body) +{ + const char *p; + + /* The body string takes one of two forms. For object-like macro + definitions, it should be: + + " " + + For function-like macro definitions, it should be: + + "() " + or + "(" ( "," ) * ") " + + Spaces may appear only where explicitly indicated, and in the + . + + The Dwarf 2 spec says that an object-like macro's name is always + followed by a space, but versions of GCC around March 2002 omit + the space when the macro's definition is the empty string. + + The Dwarf 2 spec says that there should be no spaces between the + formal arguments in a function-like macro's formal argument list, + but versions of GCC around March 2002 include spaces after the + commas. */ + + + /* Find the extent of the macro name. The macro name is terminated + by either a space or null character (for an object-like macro) or + an opening paren (for a function-like macro). */ + for (p = body; *p; p++) + if (*p == ' ' || *p == '(') + break; + + if (*p == ' ' || *p == '\0') + { + /* It's an object-like macro. */ + int name_len = p - body; + char *name = copy_string (body, name_len); + const char *replacement; + + if (*p == ' ') + replacement = body + name_len + 1; + else + { + dwarf2_macro_malformed_definition_complaint (body); + replacement = body + name_len; + } + + macro_define_object (file, line, name, replacement); + + xfree (name); + } + else if (*p == '(') + { + /* It's a function-like macro. */ + char *name = copy_string (body, p - body); + int argc = 0; + int argv_size = 1; + char **argv = xmalloc (argv_size * sizeof (*argv)); + + p++; + + p = consume_improper_spaces (p, body); + + /* Parse the formal argument list. */ + while (*p && *p != ')') + { + /* Find the extent of the current argument name. */ + const char *arg_start = p; + + while (*p && *p != ',' && *p != ')' && *p != ' ') + p++; + + if (! *p || p == arg_start) + dwarf2_macro_malformed_definition_complaint (body); + else + { + /* Make sure argv has room for the new argument. */ + if (argc >= argv_size) + { + argv_size *= 2; + argv = xrealloc (argv, argv_size * sizeof (*argv)); + } + + argv[argc++] = copy_string (arg_start, p - arg_start); + } + + p = consume_improper_spaces (p, body); + + /* Consume the comma, if present. */ + if (*p == ',') + { + p++; + + p = consume_improper_spaces (p, body); + } + } + + if (*p == ')') + { + p++; + + if (*p == ' ') + /* Perfectly formed definition, no complaints. */ + macro_define_function (file, line, name, + argc, (const char **) argv, + p + 1); + else if (*p == '\0') + { + /* Complain, but do define it. */ + dwarf2_macro_malformed_definition_complaint (body); + macro_define_function (file, line, name, + argc, (const char **) argv, + p); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + + xfree (name); + { + int i; + + for (i = 0; i < argc; i++) + xfree (argv[i]); + } + xfree (argv); + } + else + dwarf2_macro_malformed_definition_complaint (body); +} + + +static void +dwarf_decode_macros (struct line_header *lh, unsigned int offset, + char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *mac_ptr, *mac_end; + struct macro_source_file *current_file = 0; + + if (dwarf_macinfo_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_macinfo section"); + return; + } + + mac_ptr = dwarf_macinfo_buffer + offset; + mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size; + + for (;;) + { + enum dwarf_macinfo_record_type macinfo_type; + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + macinfo_type = read_1_byte (abfd, mac_ptr); + mac_ptr++; + + switch (macinfo_type) + { + /* A zero macinfo type indicates the end of the macro + information. */ + case 0: + return; + + case DW_MACINFO_define: + case DW_MACINFO_undef: + { + int bytes_read; + int line; + char *body; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + body = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + if (! current_file) + complaint (&symfile_complaints, + "debug info gives macro %s outside of any file: %s", + macinfo_type == + DW_MACINFO_define ? "definition" : macinfo_type == + DW_MACINFO_undef ? "undefinition" : + "something-or-other", body); + else + { + if (macinfo_type == DW_MACINFO_define) + parse_macro_definition (current_file, line, body); + else if (macinfo_type == DW_MACINFO_undef) + macro_undef (current_file, line, body); + } + } + break; + + case DW_MACINFO_start_file: + { + int bytes_read; + int line, file; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + current_file = macro_start_file (file, line, + current_file, comp_dir, + lh, cu->objfile); + } + break; + + case DW_MACINFO_end_file: + if (! current_file) + complaint (&symfile_complaints, + "macro debug info has an unmatched `close_file' directive"); + else + { + current_file = current_file->included_by; + if (! current_file) + { + enum dwarf_macinfo_record_type next_type; + + /* GCC circa March 2002 doesn't produce the zero + type byte marking the end of the compilation + unit. Complain if it's not there, but exit no + matter what. */ + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + /* We don't increment mac_ptr here, so this is just + a look-ahead. */ + next_type = read_1_byte (abfd, mac_ptr); + if (next_type != 0) + complaint (&symfile_complaints, + "no terminating 0-type entry for macros in `.debug_macinfo' section"); + + return; + } + } + break; + + case DW_MACINFO_vendor_ext: + { + int bytes_read; + int constant; + char *string; + + constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + string = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + /* We don't recognize any vendor extensions. */ + } + break; + } + } +} + +/* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ +static int +attr_form_is_block (struct attribute *attr) +{ + return (attr == NULL ? 0 : + attr->form == DW_FORM_block1 + || attr->form == DW_FORM_block2 + || attr->form == DW_FORM_block4 + || attr->form == DW_FORM_block); +} + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + struct dwarf2_loclist_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_loclist_baton)); + baton->objfile = cu->objfile; + + /* We don't know how long the location list is, but make sure we + don't run off the edge of the section. */ + baton->size = dwarf_loc_size - DW_UNSND (attr); + baton->data = dwarf_loc_buffer + DW_UNSND (attr); + baton->base_address = cu->header.base_address; + if (cu->header.base_known == 0) + complaint (&symfile_complaints, + "Location list used without specifying the CU base address."); + + SYMBOL_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } + else + { + struct dwarf2_locexpr_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_locexpr_baton)); + baton->objfile = cu->objfile; + + if (attr_form_is_block (attr)) + { + /* Note that we're just copying the block's data pointer + here, not the actual data. We're still pointing into the + dwarf_info_buffer for SYM's objfile; right now we never + release that buffer, but when we do clean up properly + this may need to change. */ + baton->size = DW_BLOCK (attr)->size; + baton->data = DW_BLOCK (attr)->data; + } + else + { + dwarf2_invalid_attrib_class_complaint ("location description", + SYMBOL_NATURAL_NAME (sym)); + baton->size = 0; + baton->data = NULL; + } + + SYMBOL_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/elfread.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/elfread.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/elfread.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/elfread.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,754 @@ +/* Read ELF (Executable and Linking Format) object files for GDB. + + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Written by Fred Fish at Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "gdb_string.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "symtab.h" +#include "symfile.h" +#include "objfiles.h" +#include "buildsym.h" +#include "stabsread.h" +#include "gdb-stabs.h" +#include "complaints.h" +#include "demangle.h" + +extern void _initialize_elfread (void); + +/* The struct elfinfo is available only during ELF symbol table and + psymtab reading. It is destroyed at the completion of psymtab-reading. + It's local to elf_symfile_read. */ + +struct elfinfo + { + file_ptr dboffset; /* Offset to dwarf debug section */ + unsigned int dbsize; /* Size of dwarf debug section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ + unsigned int lnsize; /* Size of dwarf line number section */ + asection *stabsect; /* Section pointer for .stab section */ + asection *stabindexsect; /* Section pointer for .stab.index section */ + asection *mdebugsect; /* Section pointer for .mdebug section */ + }; + +static void free_elfinfo (void *); + +/* We are called once per section from elf_symfile_read. We + need to examine each section we are passed, check to see + if it is something we are interested in processing, and + if so, stash away some access information for the section. + + For now we recognize the dwarf debug information sections and + line number sections from matching their section names. The + ELF definition is no real help here since it has no direct + knowledge of DWARF (by design, so any debugging format can be + used). + + We also recognize the ".stab" sections used by the Sun compilers + released with Solaris 2. + + FIXME: The section names should not be hardwired strings (what + should they be? I don't think most object file formats have enough + section flags to specify what kind of debug section it is + -kingdon). */ + +static void +elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) +{ + struct elfinfo *ei; + + ei = (struct elfinfo *) eip; + if (strcmp (sectp->name, ".debug") == 0) + { + ei->dboffset = sectp->filepos; + ei->dbsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".line") == 0) + { + ei->lnoffset = sectp->filepos; + ei->lnsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".stab") == 0) + { + ei->stabsect = sectp; + } + else if (strcmp (sectp->name, ".stab.index") == 0) + { + ei->stabindexsect = sectp; + } + else if (strcmp (sectp->name, ".mdebug") == 0) + { + ei->mdebugsect = sectp; + } +} + +static struct minimal_symbol * +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) +{ + if (ms_type == mst_text || ms_type == mst_file_text) + address = SMASH_TEXT_ADDRESS (address); + + return prim_record_minimal_symbol_and_info + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); +} + +/* + + LOCAL FUNCTION + + elf_symtab_read -- read the symbol table of an ELF file + + SYNOPSIS + + void elf_symtab_read (struct objfile *objfile, int dynamic) + + DESCRIPTION + + Given an objfile and a flag that specifies whether or not the objfile + is for an executable or not (may be shared library for example), add + all the global function and data symbols to the minimal symbol table. + + In stabs-in-ELF, as implemented by Sun, there are some local symbols + defined in the ELF symbol table, which can be used to locate + the beginnings of sections from each ".o" file that was linked to + form the executable objfile. We gather any such info and record it + in data structures hung off the objfile's private data. + + */ + +static void +elf_symtab_read (struct objfile *objfile, int dynamic) +{ + long storage_needed; + asymbol *sym; + asymbol **symbol_table; + long number_of_symbols; + long i; + struct cleanup *back_to; + CORE_ADDR symaddr; + CORE_ADDR offset; + enum minimal_symbol_type ms_type; + /* If sectinfo is nonNULL, it contains section info that should end up + filed in the objfile. */ + struct stab_section_info *sectinfo = NULL; + /* If filesym is nonzero, it points to a file symbol, but we haven't + seen any section info for it yet. */ + asymbol *filesym = 0; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + /* Name of filesym, as saved on the objfile_obstack. */ + char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); +#endif + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + int stripped = (bfd_get_symcount (objfile->obfd) == 0); + + if (dynamic) + { + storage_needed = bfd_get_dynamic_symtab_upper_bound (objfile->obfd); + + /* Nothing to be done if there is no dynamic symtab. */ + if (storage_needed < 0) + return; + } + else + { + storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); + if (storage_needed < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + } + if (storage_needed > 0) + { + symbol_table = (asymbol **) xmalloc (storage_needed); + back_to = make_cleanup (xfree, symbol_table); + if (dynamic) + number_of_symbols = bfd_canonicalize_dynamic_symtab (objfile->obfd, + symbol_table); + else + number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); + if (number_of_symbols < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + + for (i = 0; i < number_of_symbols; i++) + { + sym = symbol_table[i]; + if (sym->name == NULL || *sym->name == '\0') + { + /* Skip names that don't exist (shouldn't happen), or names + that are null strings (may happen). */ + continue; + } + + offset = ANOFFSET (objfile->section_offsets, sym->section->index); + if (dynamic + && sym->section == &bfd_und_section + && (sym->flags & BSF_FUNCTION)) + { + struct minimal_symbol *msym; + + /* Symbol is a reference to a function defined in + a shared library. + If its value is non zero then it is usually the address + of the corresponding entry in the procedure linkage table, + plus the desired section offset. + If its value is zero then the dynamic linker has to resolve + the symbol. We are unable to find any meaningful address + for this symbol in the executable file, so we skip it. */ + symaddr = sym->value; + if (symaddr == 0) + continue; + symaddr += offset; + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + mst_solib_trampoline, sym->section, objfile); +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + continue; + } + + /* If it is a nonstripped executable, do not enter dynamic + symbols, as the dynamic symbol table is usually a subset + of the main symbol table. */ + if (dynamic && !stripped) + continue; + if (sym->flags & BSF_FILE) + { + /* STT_FILE debugging symbol that helps stabs-in-elf debugging. + Chain any old one onto the objfile; remember new sym. */ + if (sectinfo != NULL) + { + sectinfo->next = dbx->stab_section_info; + dbx->stab_section_info = sectinfo; + sectinfo = NULL; + } + filesym = sym; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + filesymname = + obsavestring ((char *) filesym->name, strlen (filesym->name), + &objfile->objfile_obstack); +#endif + } + else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) + { + struct minimal_symbol *msym; + + /* Select global/local/weak symbols. Note that bfd puts abs + symbols in their own section, so all symbols we are + interested in will have a section. */ + /* Bfd symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate all non-absolute symbols by the section offset. */ + if (sym->section != &bfd_abs_section) + { + symaddr += offset; + } + /* For non-absolute symbols, use the type of the section + they are relative to, to intuit text/data. Bfd provides + no way of figuring this out for absolute symbols. */ + if (sym->section == &bfd_abs_section) + { + /* This is a hack to get the minimal symbol type + right for Irix 5, which has absolute addresses + with special section indices for dynamic symbols. */ + unsigned short shndx = + ((elf_symbol_type *) sym)->internal_elf_sym.st_shndx; + + switch (shndx) + { + case SHN_MIPS_TEXT: + ms_type = mst_text; + break; + case SHN_MIPS_DATA: + ms_type = mst_data; + break; + case SHN_MIPS_ACOMMON: + ms_type = mst_bss; + break; + default: + ms_type = mst_abs; + } + + /* If it is an Irix dynamic symbol, skip section name + symbols, relocate all others by section offset. */ + if (ms_type != mst_abs) + { + if (sym->name[0] == '.') + continue; + symaddr += offset; + } + } + else if (sym->section->flags & SEC_CODE) + { + if (sym->flags & BSF_GLOBAL) + { + ms_type = mst_text; + } + else if ((sym->name[0] == '.' && sym->name[1] == 'L') + || ((sym->flags & BSF_LOCAL) + && sym->name[0] == '$' + && sym->name[1] == 'L')) + /* Looks like a compiler-generated label. Skip + it. The assembler should be skipping these (to + keep executables small), but apparently with + gcc on the (deleted) delta m88k SVR4, it loses. + So to have us check too should be harmless (but + I encourage people to fix this in the assembler + instead of adding checks here). */ + continue; + else + { + ms_type = mst_file_text; + } + } + else if (sym->section->flags & SEC_ALLOC) + { + if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) + { + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_data; + } + else + { + ms_type = mst_bss; + } + } + else if (sym->flags & BSF_LOCAL) + { + /* Named Local variable in a Data section. + Check its name for stabs-in-elf. */ + int special_local_sect; + if (strcmp ("Bbss.bss", sym->name) == 0) + special_local_sect = SECT_OFF_BSS (objfile); + else if (strcmp ("Ddata.data", sym->name) == 0) + special_local_sect = SECT_OFF_DATA (objfile); + else if (strcmp ("Drodata.rodata", sym->name) == 0) + special_local_sect = SECT_OFF_RODATA (objfile); + else + special_local_sect = -1; + if (special_local_sect >= 0) + { + /* Found a special local symbol. Allocate a + sectinfo, if needed, and fill it in. */ + if (sectinfo == NULL) + { + int max_index; + size_t size; + + max_index + = max (SECT_OFF_BSS (objfile), + max (SECT_OFF_DATA (objfile), + SECT_OFF_RODATA (objfile))); + + /* max_index is the largest index we'll + use into this array, so we must + allocate max_index+1 elements for it. + However, 'struct stab_section_info' + already includes one element, so we + need to allocate max_index aadditional + elements. */ + size = (sizeof (struct stab_section_info) + + (sizeof (CORE_ADDR) + * max_index)); + sectinfo = (struct stab_section_info *) + xmmalloc (objfile->md, size); + memset (sectinfo, 0, size); + sectinfo->num_sections = max_index; + if (filesym == NULL) + { + complaint (&symfile_complaints, + "elf/stab section information %s without a preceding file symbol", + sym->name); + } + else + { + sectinfo->filename = + (char *) filesym->name; + } + } + if (sectinfo->sections[special_local_sect] != 0) + complaint (&symfile_complaints, + "duplicated elf/stab section information for %s", + sectinfo->filename); + /* BFD symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate non-absolute symbols by the + section offset. */ + if (sym->section != &bfd_abs_section) + symaddr += offset; + sectinfo->sections[special_local_sect] = symaddr; + /* The special local symbols don't go in the + minimal symbol table, so ignore this one. */ + continue; + } + /* Not a special stabs-in-elf symbol, do regular + symbol processing. */ + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_file_data; + } + else + { + ms_type = mst_file_bss; + } + } + else + { + ms_type = mst_unknown; + } + } + else + { + /* FIXME: Solaris2 shared libraries include lots of + odd "absolute" and "undefined" symbols, that play + hob with actions like finding what function the PC + is in. Ignore them if they aren't text, data, or bss. */ + /* ms_type = mst_unknown; */ + continue; /* Skip this symbol. */ + } + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, + struct minimal_symbol *); + patch_load_module(objfile, msym); + } +#endif +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + } + } + do_cleanups (back_to); + } +} + +/* Scan and build partial symbols for a symbol file. + We have been initialized by a call to elf_symfile_init, which + currently does nothing. + + SECTION_OFFSETS is a set of offsets to apply to relocate the symbols + in each section. We simplify it down to a single offset for all + symbols. FIXME. + + MAINLINE is true if we are reading the main symbol + table (as opposed to a shared lib or dynamically loaded file). + + This function only does the minimum work necessary for letting the + user "name" things symbolically; it does not read the entire symtab. + Instead, it reads the external and static symbols and puts them in partial + symbol tables. When more extensive information is requested of a + file, the corresponding partial symbol table is mutated into a full + fledged symbol table by going back and reading the symbols + for real. + + We look for sections with specific names, to tell us what debug + format to look for: FIXME!!! + + dwarf_build_psymtabs() builds psymtabs for DWARF symbols; + elfstab_build_psymtabs() handles STABS symbols; + mdebug_build_psymtabs() handles ECOFF debugging information. + + Note that ELF files have a "minimal" symbol table, which looks a lot + like a COFF symbol table, but has only the minimal information necessary + for linking. We process this also, and use the information to + build gdb's minimal symbol table. This gives us some minimal debugging + capability even for files compiled without -g. */ + +static void +elf_symfile_read (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + struct elfinfo ei; + struct cleanup *back_to; + CORE_ADDR offset; + + init_minimal_symbol_collection (); + back_to = make_cleanup_discard_minimal_symbols (); + + memset ((char *) &ei, 0, sizeof (ei)); + + /* Allocate struct to keep track of the symfile */ + objfile->sym_stab_info = (struct dbx_symfile_info *) + xmmalloc (objfile->md, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + make_cleanup (free_elfinfo, (void *) objfile); + + /* Process the normal ELF symbol table first. This may write some + chain of info into the dbx_symfile_info in objfile->sym_stab_info, + which can later be used by elfstab_offset_sections. */ + + elf_symtab_read (objfile, 0); + + /* Add the dynamic symbols. */ + + elf_symtab_read (objfile, 1); + + /* Install any minimal symbols that have been collected as the current + minimal symbols for this objfile. The debug readers below this point + should not generate new minimal symbols; if they do it's their + responsibility to install them. "mdebug" appears to be the only one + which will do this. */ + + install_minimal_symbols (objfile); + do_cleanups (back_to); + + /* Now process debugging information, which is contained in + special ELF sections. */ + + /* If we are reinitializing, or if we have never loaded syms yet, + set table to empty. MAINLINE is cleared so that *_read_psymtab + functions do not all also re-initialize the psymbol table. */ + if (mainline) + { + init_psymbol_list (objfile, 0); + mainline = 0; + } + + /* We first have to find them... */ + bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei); + + /* ELF debugging information is inserted into the psymtab in the + order of least informative first - most informative last. Since + the psymtab table is searched `most recent insertion first' this + increases the probability that more detailed debug information + for a section is found. + + For instance, an object file might contain both .mdebug (XCOFF) + and .debug_info (DWARF2) sections then .mdebug is inserted first + (searched last) and DWARF2 is inserted last (searched first). If + we don't do this then the XCOFF info is found first - for code in + an included file XCOFF info is useless. */ + + if (ei.mdebugsect) + { + const struct ecoff_debug_swap *swap; + + /* .mdebug section, presumably holding ECOFF debugging + information. */ + swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; + if (swap) + elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect); + } + if (ei.stabsect) + { + asection *str_sect; + + /* Stab sections have an associated string table that looks like + a separate section. */ + str_sect = bfd_get_section_by_name (abfd, ".stabstr"); + + /* FIXME should probably warn about a stab section without a stabstr. */ + if (str_sect) + elfstab_build_psymtabs (objfile, + mainline, + ei.stabsect, + str_sect->filepos, + bfd_section_size (abfd, str_sect)); + } + if (dwarf2_has_info (abfd)) + { + /* DWARF 2 sections */ + dwarf2_build_psymtabs (objfile, mainline); + } + else if (ei.dboffset && ei.lnoffset) + { + /* DWARF sections */ + dwarf_build_psymtabs (objfile, + mainline, + ei.dboffset, ei.dbsize, + ei.lnoffset, ei.lnsize); + } + + /* FIXME: kettenis/20030504: This still needs to be integrated with + dwarf2read.c in a better way. */ + dwarf2_build_frame_info (objfile); +} + +/* This cleans up the objfile's sym_stab_info pointer, and the chain of + stab_section_info's, that might be dangling from it. */ + +static void +free_elfinfo (void *objp) +{ + struct objfile *objfile = (struct objfile *) objp; + struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct stab_section_info *ssi, *nssi; + + ssi = dbxinfo->stab_section_info; + while (ssi) + { + nssi = ssi->next; + xmfree (objfile->md, ssi); + ssi = nssi; + } + + dbxinfo->stab_section_info = 0; /* Just say No mo info about this. */ +} + + +/* Initialize anything that needs initializing when a completely new symbol + file is specified (not just adding some symbols from another file, e.g. a + shared library). + + We reinitialize buildsym, since we may be reading stabs from an ELF file. */ + +static void +elf_new_init (struct objfile *ignore) +{ + stabsread_new_init (); + buildsym_new_init (); +} + +/* Perform any local cleanups required when we are done with a particular + objfile. I.E, we are in the process of discarding all symbol information + for an objfile, freeing up all memory held for it, and unlinking the + objfile struct from the global list of known objfiles. */ + +static void +elf_symfile_finish (struct objfile *objfile) +{ + if (objfile->sym_stab_info != NULL) + { + xmfree (objfile->md, objfile->sym_stab_info); + } +} + +/* ELF specific initialization routine for reading symbols. + + It is passed a pointer to a struct sym_fns which contains, among other + things, the BFD for the file whose symbols are being read, and a slot for + a pointer to "private data" which we can fill with goodies. + + For now at least, we have nothing in particular to do, so this function is + just a stub. */ + +static void +elf_symfile_init (struct objfile *objfile) +{ + /* ELF objects may be reordered, so set OBJF_REORDERED. If we + find this causes a significant slowdown in gdb then we could + set it in the debug symbol readers only when necessary. */ + objfile->flags |= OBJF_REORDERED; +} + +/* When handling an ELF file that contains Sun STABS debug info, + some of the debug info is relative to the particular chunk of the + section that was generated in its individual .o file. E.g. + offsets to static variables are relative to the start of the data + segment *for that module before linking*. This information is + painfully squirreled away in the ELF symbol table as local symbols + with wierd names. Go get 'em when needed. */ + +void +elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +{ + char *filename = pst->filename; + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct stab_section_info *maybe = dbx->stab_section_info; + struct stab_section_info *questionable = 0; + int i; + char *p; + + /* The ELF symbol info doesn't include path names, so strip the path + (if any) from the psymtab filename. */ + while (0 != (p = strchr (filename, '/'))) + filename = p + 1; + + /* FIXME: This linear search could speed up significantly + if it was chained in the right order to match how we search it, + and if we unchained when we found a match. */ + for (; maybe; maybe = maybe->next) + { + if (filename[0] == maybe->filename[0] + && strcmp (filename, maybe->filename) == 0) + { + /* We found a match. But there might be several source files + (from different directories) with the same name. */ + if (0 == maybe->found) + break; + questionable = maybe; /* Might use it later. */ + } + } + + if (maybe == 0 && questionable != 0) + { + complaint (&symfile_complaints, + "elf/stab section information questionable for %s", filename); + maybe = questionable; + } + + if (maybe) + { + /* Found it! Allocate a new psymtab struct, and fill it in. */ + maybe->found++; + pst->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + for (i = 0; i < maybe->num_sections; i++) + (pst->section_offsets)->offsets[i] = maybe->sections[i]; + return; + } + + /* We were unable to find any offsets for this file. Complain. */ + if (dbx->stab_section_info) /* If there *is* any info, */ + complaint (&symfile_complaints, + "elf/stab section information missing for %s", filename); +} + +/* Register that we are able to handle ELF object file formats. */ + +static struct sym_fns elf_sym_fns = +{ + bfd_target_elf_flavour, + elf_new_init, /* sym_new_init: init anything gbl to entire symtab */ + elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */ + elf_symfile_read, /* sym_read: read a symbol file into symtab */ + elf_symfile_finish, /* sym_finish: finished with file, cleanup */ + default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */ + NULL /* next: pointer to next struct sym_fns */ +}; + +void +_initialize_elfread (void) +{ + add_symtab_fns (&elf_sym_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/main.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/main.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,924 @@ +/* Top level stuff for GDB, the GNU debugger. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "top.h" +#include "target.h" +#include "inferior.h" +#include "symfile.h" +#include "gdbcore.h" + +#include "getopt.h" + +#include +#include "gdb_stat.h" +#include + +#include "gdb_string.h" +#include "event-loop.h" +#include "ui-out.h" + +#include "interps.h" +#include "main.h" + +/* If nonzero, display time usage both at startup and for each command. */ + +int display_time; + +/* If nonzero, display space usage both at startup and for each command. */ + +int display_space; + +/* Whether this is the async version or not. The async version is + invoked on the command line with the -nw --async options. In this + version, the usual command_loop is substituted by and event loop which + processes UI events asynchronously. */ +int event_loop_p = 1; + +/* The selected interpreter. This will be used as a set command + variable, so it should always be malloc'ed - since + do_setshow_command will free it. */ +char *interpreter_p; + +/* Whether xdb commands will be handled */ +int xdb_commands = 0; + +/* Whether dbx commands will be handled */ +int dbx_commands = 0; + +/* System root path, used to find libraries etc. */ +char *gdb_sysroot = 0; + +struct ui_file *gdb_stdout; +struct ui_file *gdb_stderr; +struct ui_file *gdb_stdlog; +struct ui_file *gdb_stdin; +/* target IO streams */ +struct ui_file *gdb_stdtargin; +struct ui_file *gdb_stdtarg; +struct ui_file *gdb_stdtargerr; + +/* Whether to enable writing into executable and core files */ +extern int write_files; + +static void print_gdb_help (struct ui_file *); + +/* These two are used to set the external editor commands when gdb is farming + out files to be edited by another program. */ + +extern char *external_editor_command; + +/* Call command_loop. If it happens to return, pass that through as a + non-zero return status. */ + +static int +captured_command_loop (void *data) +{ + current_interp_command_loop (); + /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton + would clean things up (restoring the cleanup chain) to the state + they were just prior to the call. Technically, this means that + the do_cleanups() below is redundant. Unfortunately, many FUNCs + are not that well behaved. do_cleanups should either be replaced + with a do_cleanups call (to cover the problem) or an assertion + check to detect bad FUNCs code. */ + do_cleanups (ALL_CLEANUPS); + /* If the command_loop returned, normally (rather than threw an + error) we try to quit. If the quit is aborted, catch_errors() + which called this catch the signal and restart the command + loop. */ + quit_command (NULL, instream == stdin); + return 1; +} + +static int +captured_main (void *data) +{ + struct captured_main_args *context = data; + int argc = context->argc; + char **argv = context->argv; + int count; + static int quiet = 0; + static int batch = 0; + static int set_args = 0; + + /* Pointers to various arguments from command line. */ + char *symarg = NULL; + char *execarg = NULL; + char *corearg = NULL; + char *cdarg = NULL; + char *ttyarg = NULL; + + /* These are static so that we can take their address in an initializer. */ + static int print_help; + static int print_version; + + /* Pointers to all arguments of --command option. */ + char **cmdarg; + /* Allocated size of cmdarg. */ + int cmdsize; + /* Number of elements of cmdarg used. */ + int ncmd; + + /* Indices of all arguments of --directory option. */ + char **dirarg; + /* Allocated size. */ + int dirsize; + /* Number of elements used. */ + int ndir; + + struct stat homebuf, cwdbuf; + char *homedir, *homeinit; + + int i; + + long time_at_startup = get_run_time (); + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* This needs to happen before the first use of malloc. */ + init_malloc (NULL); + +#ifdef HAVE_SBRK + lim_at_start = (char *) sbrk (0); +#endif + +#if defined (ALIGN_STACK_ON_STARTUP) + i = (int) &count & 0x3; + if (i != 0) + alloca (4 - i); +#endif + + cmdsize = 1; + cmdarg = (char **) xmalloc (cmdsize * sizeof (*cmdarg)); + ncmd = 0; + dirsize = 1; + dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg)); + ndir = 0; + + quit_flag = 0; + line = (char *) xmalloc (linesize); + line[0] = '\0'; /* Terminate saved (now empty) cmd line */ + instream = stdin; + + getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); + current_directory = gdb_dirbuf; + + gdb_stdout = stdio_fileopen (stdout); + gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ + gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdin = stdio_fileopen (stdin); + gdb_stdtargerr = gdb_stderr; /* for moment */ + gdb_stdtargin = gdb_stdin; /* for moment */ + + /* initialize error() */ + error_init (); + + /* Set the sysroot path. */ +#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE + gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT); + if (gdb_sysroot) + { + struct stat s; + int res = 0; + + if (stat (gdb_sysroot, &s) == 0) + if (S_ISDIR (s.st_mode)) + res = 1; + + if (res == 0) + { + xfree (gdb_sysroot); + gdb_sysroot = TARGET_SYSTEM_ROOT; + } + } + else + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else +#if defined (TARGET_SYSTEM_ROOT) + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else + gdb_sysroot = ""; +#endif +#endif + + /* There will always be an interpreter. Either the one passed into + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); + + /* Parse arguments and options. */ + { + int c; + /* When var field is 0, use flag field to record the equivalent + short option (or arbitrary numbers starting at 10 for those + with no equivalent). */ + enum { + OPT_SE = 10, + OPT_CD, + OPT_ANNOTATE, + OPT_STATISTICS, + OPT_TUI, + OPT_NOWINDOWS, + OPT_WINDOWS + }; + static struct option long_options[] = + { + {"async", no_argument, &event_loop_p, 1}, + {"noasync", no_argument, &event_loop_p, 0}, +#if defined(TUI) + {"tui", no_argument, 0, OPT_TUI}, +#endif + {"xdb", no_argument, &xdb_commands, 1}, + {"dbx", no_argument, &dbx_commands, 1}, + {"readnow", no_argument, &readnow_symbol_files, 1}, + {"r", no_argument, &readnow_symbol_files, 1}, + {"quiet", no_argument, &quiet, 1}, + {"q", no_argument, &quiet, 1}, + {"silent", no_argument, &quiet, 1}, + {"nx", no_argument, &inhibit_gdbinit, 1}, + {"n", no_argument, &inhibit_gdbinit, 1}, + {"batch", no_argument, &batch, 1}, + {"epoch", no_argument, &epoch_interface, 1}, + + /* This is a synonym for "--annotate=1". --annotate is now preferred, + but keep this here for a long time because people will be running + emacses which use --fullname. */ + {"fullname", no_argument, 0, 'f'}, + {"f", no_argument, 0, 'f'}, + + {"annotate", required_argument, 0, OPT_ANNOTATE}, + {"help", no_argument, &print_help, 1}, + {"se", required_argument, 0, OPT_SE}, + {"symbols", required_argument, 0, 's'}, + {"s", required_argument, 0, 's'}, + {"exec", required_argument, 0, 'e'}, + {"e", required_argument, 0, 'e'}, + {"core", required_argument, 0, 'c'}, + {"c", required_argument, 0, 'c'}, + {"pid", required_argument, 0, 'p'}, + {"p", required_argument, 0, 'p'}, + {"command", required_argument, 0, 'x'}, + {"version", no_argument, &print_version, 1}, + {"x", required_argument, 0, 'x'}, +#ifdef GDBTK + {"tclcommand", required_argument, 0, 'z'}, + {"enable-external-editor", no_argument, 0, 'y'}, + {"editor-command", required_argument, 0, 'w'}, +#endif + {"ui", required_argument, 0, 'i'}, + {"interpreter", required_argument, 0, 'i'}, + {"i", required_argument, 0, 'i'}, + {"directory", required_argument, 0, 'd'}, + {"d", required_argument, 0, 'd'}, + {"cd", required_argument, 0, OPT_CD}, + {"tty", required_argument, 0, 't'}, + {"baud", required_argument, 0, 'b'}, + {"b", required_argument, 0, 'b'}, + {"nw", no_argument, NULL, OPT_NOWINDOWS}, + {"nowindows", no_argument, NULL, OPT_NOWINDOWS}, + {"w", no_argument, NULL, OPT_WINDOWS}, + {"windows", no_argument, NULL, OPT_WINDOWS}, + {"statistics", no_argument, 0, OPT_STATISTICS}, + {"write", no_argument, &write_files, 1}, + {"args", no_argument, &set_args, 1}, + {0, no_argument, 0, 0} + }; + + while (1) + { + int option_index; + + c = getopt_long_only (argc, argv, "", + long_options, &option_index); + if (c == EOF || set_args) + break; + + /* Long option that takes an argument. */ + if (c == 0 && long_options[option_index].flag == 0) + c = long_options[option_index].val; + + switch (c) + { + case 0: + /* Long option that just sets a flag. */ + break; + case OPT_SE: + symarg = optarg; + execarg = optarg; + break; + case OPT_CD: + cdarg = optarg; + break; + case OPT_ANNOTATE: + /* FIXME: what if the syntax is wrong (e.g. not digits)? */ + annotation_level = atoi (optarg); + break; + case OPT_STATISTICS: + /* Enable the display of both time and space usage. */ + display_time = 1; + display_space = 1; + break; + case OPT_TUI: + /* --tui is equivalent to -i=tui. */ + xfree (interpreter_p); + interpreter_p = xstrdup ("tui"); + break; + case OPT_WINDOWS: + /* FIXME: cagney/2003-03-01: Not sure if this option is + actually useful, and if it is, what it should do. */ + use_windows = 1; + break; + case OPT_NOWINDOWS: + /* -nw is equivalent to -i=console. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_CONSOLE); + use_windows = 0; + break; + case 'f': + annotation_level = 1; +/* We have probably been invoked from emacs. Disable window interface. */ + use_windows = 0; + break; + case 's': + symarg = optarg; + break; + case 'e': + execarg = optarg; + break; + case 'c': + corearg = optarg; + break; + case 'p': + /* "corearg" is shared by "--core" and "--pid" */ + corearg = optarg; + break; + case 'x': + cmdarg[ncmd++] = optarg; + if (ncmd >= cmdsize) + { + cmdsize *= 2; + cmdarg = (char **) xrealloc ((char *) cmdarg, + cmdsize * sizeof (*cmdarg)); + } + break; +#ifdef GDBTK + case 'z': + { +extern int gdbtk_test (char *); + if (!gdbtk_test (optarg)) + { + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), + argv[0], optarg); + exit (1); + } + break; + } + case 'y': + /* Backwards compatibility only. */ + break; + case 'w': + { + external_editor_command = xstrdup (optarg); + break; + } +#endif /* GDBTK */ + case 'i': + xfree (interpreter_p); + interpreter_p = xstrdup (optarg); + break; + case 'd': + dirarg[ndir++] = optarg; + if (ndir >= dirsize) + { + dirsize *= 2; + dirarg = (char **) xrealloc ((char *) dirarg, + dirsize * sizeof (*dirarg)); + } + break; + case 't': + ttyarg = optarg; + break; + case 'q': + quiet = 1; + break; + case 'b': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set baud rate to `%s'.\n"), optarg); + else + baud_rate = i; + } + break; + case 'l': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set timeout limit to `%s'.\n"), optarg); + else + remote_timeout = i; + } + break; + + case '?': + fprintf_unfiltered (gdb_stderr, + _("Use `%s --help' for a complete list of options.\n"), + argv[0]); + exit (1); + } + } + + /* If --help or --version, disable window interface. */ + if (print_help || print_version) + { + use_windows = 0; + } + + if (set_args) + { + /* The remaining options are the command-line options for the + inferior. The first one is the sym/exec file, and the rest + are arguments. */ + if (optind >= argc) + { + fprintf_unfiltered (gdb_stderr, + _("%s: `--args' specified but no program specified\n"), + argv[0]); + exit (1); + } + symarg = argv[optind]; + execarg = argv[optind]; + ++optind; + set_inferior_args_vector (argc - optind, &argv[optind]); + } + else + { + /* OK, that's all the options. The other arguments are filenames. */ + count = 0; + for (; optind < argc; optind++) + switch (++count) + { + case 1: + symarg = argv[optind]; + execarg = argv[optind]; + break; + case 2: + /* The documentation says this can be a "ProcID" as well. + We will try it as both a corefile and a pid. */ + corearg = argv[optind]; + break; + case 3: + fprintf_unfiltered (gdb_stderr, + _("Excess command line arguments ignored. (%s%s)\n"), + argv[optind], (optind == argc - 1) ? "" : " ..."); + break; + } + } + if (batch) + quiet = 1; + } + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ + gdb_init (argv[0]); + + /* Do these (and anything which might call wrap_here or *_filtered) + after initialize_all_files() but before the interpreter has been + installed. Otherwize the help/version messages will be eaten by + the interpreter's output handler. */ + + if (print_version) + { + print_gdb_version (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + + if (print_help) + { + print_gdb_help (gdb_stdout); + fputs_unfiltered ("\n", gdb_stdout); + exit (0); + } + + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message before the interpreter is installed. That way + it isn't encapsulated in MI output. */ + if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + + /* Install the default UI. All the interpreters should have had a + look at things by now. Initialize the default interpreter. */ + + { + /* Find it. */ + struct interp *interp = interp_lookup (interpreter_p); + if (interp == NULL) + error ("Interpreter `%s' unrecognized", interpreter_p); + /* Install it. */ + if (!interp_set (interp)) + { + fprintf_unfiltered (gdb_stderr, + "Interpreter `%s' failed to initialize.\n", + interpreter_p); + exit (1); + } + } +#ifdef CRASH_MERGE +{ + extern void update_gdb_hooks(void); + update_gdb_hooks(); +} +#endif + + /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message after the interpreter is installed when it is + any sane interpreter. */ + if (!quiet && !current_interp_named_p (INTERP_MI1)) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + error_pre_print = "\n\n"; + quit_pre_print = error_pre_print; + + /* We may get more than one warning, don't double space all of them... */ + warning_pre_print = _("\nwarning: "); + + /* Read and execute $HOME/.gdbinit file, if it exists. This is done + *before* all the command line arguments are processed; it sets + global parameters, which are independent of what file you are + debugging or what directory you are in. */ + homedir = getenv ("HOME"); + if (homedir) + { + homeinit = (char *) alloca (strlen (homedir) + + strlen (gdbinit) + 10); + strcpy (homeinit, homedir); + strcat (homeinit, "/"); + strcat (homeinit, gdbinit); + + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only + need them if homedir is set. Make sure that they are + zero in case one of them fails (this guarantees that they + won't match if either exists). */ + + memset (&homebuf, 0, sizeof (struct stat)); + memset (&cwdbuf, 0, sizeof (struct stat)); + + stat (homeinit, &homebuf); + stat (gdbinit, &cwdbuf); /* We'll only need this if + homedir was set. */ + } + + /* Now perform all the actions indicated by the arguments. */ + if (cdarg != NULL) + { + catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ndir; i++) + catch_command_errors (directory_command, dirarg[i], 0, RETURN_MASK_ALL); + xfree (dirarg); + + if (execarg != NULL + && symarg != NULL + && strcmp (execarg, symarg) == 0) + { + /* The exec file and the symbol-file are the same. If we can't + open it, better only print one error message. + catch_command_errors returns non-zero on success! */ + if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL)) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + else + { + if (execarg != NULL) + catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL); + if (symarg != NULL) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + + /* After the symbol file has been read, print a newline to get us + beyond the copyright line... But errors should still set off + the error message with a (single) blank line. */ + if (!quiet) + printf_filtered ("\n"); + error_pre_print = "\n"; + quit_pre_print = error_pre_print; + warning_pre_print = _("\nwarning: "); + + if (corearg != NULL) + { + /* corearg may be either a corefile or a pid. + If its first character is a digit, try attach first + and then corefile. Otherwise try corefile first. */ + + if (isdigit (corearg[0])) + { + if (catch_command_errors (attach_command, corearg, + !batch, RETURN_MASK_ALL) == 0) + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + else /* Can't be a pid, better be a corefile. */ + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + + if (ttyarg != NULL) + catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL); + + /* Error messages should no longer be distinguished with extra output. */ + error_pre_print = NULL; + quit_pre_print = NULL; + warning_pre_print = _("warning: "); + + /* Read the .gdbinit file in the current directory, *if* it isn't + the same as the $HOME/.gdbinit file (it should exist, also). */ + + if (!homedir + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) + { +#if 0 + /* NOTE: cagney/1999-11-03: SET_TOP_LEVEL() was a macro that + expanded into a call to setjmp(). */ + if (!SET_TOP_LEVEL ()) /* NB: This is #if 0'd out */ + { + /* NOTE: I am commenting this out, because it is not clear + where this feature is used. It is very old and + undocumented. ezannoni: 1999-05-04 */ +#if 0 + if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0') + read_command_file (stdin); + else +#endif + source_command (cmdarg[i], !batch); + do_cleanups (ALL_CLEANUPS); + } +#endif + catch_command_errors (source_command, cmdarg[i], !batch, RETURN_MASK_ALL); + } + xfree (cmdarg); + + /* Read in the old history after all the command files have been read. */ + init_history (); + + if (batch) + { + /* We have hit the end of the batch file. */ + exit (0); + } + + /* Do any host- or target-specific hacks. This is used for i960 targets + to force the user to set a nindy target and spec its parameters. */ + +#ifdef BEFORE_MAIN_LOOP_HOOK + BEFORE_MAIN_LOOP_HOOK; +#endif + + /* Show time and/or space usage. */ + + if (display_time) + { + long init_time = get_run_time () - time_at_startup; + + printf_unfiltered (_("Startup time: %ld.%06ld\n"), + init_time / 1000000, init_time % 1000000); + } + + if (display_space) + { +#ifdef HAVE_SBRK + extern char **environ; + char *lim = (char *) sbrk (0); + + printf_unfiltered (_("Startup size: data size %ld\n"), + (long) (lim - (char *) &environ)); +#endif + } + +#if 0 + /* FIXME: cagney/1999-11-06: The original main loop was like: */ + while (1) + { + if (!SET_TOP_LEVEL ()) + { + do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ + /* GUIs generally have their own command loop, mainloop, or whatever. + This is a good place to gain control because many error + conditions will end up here via longjmp(). */ + if (command_loop_hook) + command_loop_hook (); + else + command_loop (); + quit_command ((char *) 0, instream == stdin); + } + } + /* NOTE: If the command_loop() returned normally, the loop would + attempt to exit by calling the function quit_command(). That + function would either call exit() or throw an error returning + control to SET_TOP_LEVEL. */ + /* NOTE: The function do_cleanups() was called once each time round + the loop. The usefulness of the call isn't clear. If an error + was thrown, everything would have already been cleaned up. If + command_loop() returned normally and quit_command() was called, + either exit() or error() (again cleaning up) would be called. */ +#endif + /* NOTE: cagney/1999-11-07: There is probably no reason for not + moving this loop and the code found in captured_command_loop() + into the command_loop() proper. The main thing holding back that + change - SET_TOP_LEVEL() - has been eliminated. */ + while (1) + { + catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); +#ifdef CRASH_MERGE + { + int console(char *, ...); + console("\n"); + } +#endif + } + /* No exit -- exit is through quit_command. */ +} + +int +gdb_main (struct captured_main_args *args) +{ + use_windows = args->use_windows; +#ifdef CRASH_MERGE + event_loop_p = 0; +#endif + catch_errors (captured_main, args, "", RETURN_MASK_ALL); + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; +} + +#ifdef CRASH_MERGE +/* + * NOTE: adapted from gdb.c, which is no longer built in; changed name of + * original main() to gdb_main_entry() for use as crash entry point + */ +int +gdb_main_entry (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; + return gdb_main (&args); +} +#endif + +/* Don't use *_filtered for printing help. We don't want to prompt + for continue no matter how small the screen or how much we're going + to print. */ + +static void +print_gdb_help (struct ui_file *stream) +{ + fputs_unfiltered (_("\ +This is the GNU debugger. Usage:\n\n\ + gdb [options] [executable-file [core-file or process-id]]\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ +Options:\n\n\ +"), stream); + fputs_unfiltered (_("\ + --args Arguments after executable-file are passed to inferior\n\ +"), stream); + fputs_unfiltered (_("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +"), stream); + fputs_unfiltered (_("\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + --batch Exit after processing options.\n\ + --cd=DIR Change current directory to DIR.\n\ + --command=FILE Execute GDB commands from FILE.\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --pid=PID Attach to running process PID.\n\ +"), stream); + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --directory=DIR Search for source files in DIR.\n\ + --epoch Output information used by epoch emacs-GDB interface.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --fullname Output information used by emacs-GDB interface.\n\ + --help Print this message.\n\ +"), stream); + fputs_unfiltered (_("\ + --interpreter=INTERP\n\ + Select a specific interpreter / user interface\n\ +"), stream); + fputs_unfiltered (_("\ + --mapped Use mapped symbol files if supported on this system.\n\ + --nw Do not use a window interface.\n\ + --nx Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file.\n\ + --quiet Do not print version number on startup.\n\ + --readnow Fully read symbol files on first access.\n\ +"), stream); + fputs_unfiltered (_("\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --tty=TTY Use TTY for input/output by the program being debugged.\n\ +"), stream); +#if defined(TUI) + fputs_unfiltered (_("\ + --tui Use a terminal user interface.\n\ +"), stream); +#endif + fputs_unfiltered (_("\ + --version Print version information and then exit.\n\ + -w Use a window interface.\n\ + --write Set writing into executable and core files.\n\ + --xdb XDB compatibility mode.\n\ +"), stream); + fputs_unfiltered (_("\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n\ +Report bugs to \"bug-gdb@gnu.org\".\ +"), stream); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2882 @@ +# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +# 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, +# Inc. +# Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. +# Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + +# This file is part of GDB. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +bindir = @bindir@ +libdir = @libdir@ +tooldir = $(libdir)/$(target_alias) + +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 +infodir = @infodir@ +htmldir = $(prefix)/html +includedir = @includedir@ + +# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT. +top_builddir = . + +SHELL = @SHELL@ +EXEEXT = @EXEEXT@ + +AWK = @AWK@ +LN_S = @LN_S@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DESTDIR = + +AR = @AR@ +AR_FLAGS = qv +RANLIB = @RANLIB@ +DLLTOOL = @DLLTOOL@ +WINDRES = @WINDRES@ +MIG = @MIG@ + +# If you are compiling with GCC, make sure that either 1) You have the +# fixed include files where GCC can reach them, or 2) You use the +# -traditional flag. Otherwise the ioctl calls in inflow.c +# will be incorrectly compiled. The "fixincludes" script in the gcc +# distribution will fix your include files up. +CC=@CC@ + +# Directory containing source files. +srcdir = @srcdir@ +VPATH = @srcdir@ + +YACC=@YACC@ + +# This is used to rebuild ada-lex.c from ada-lex.l. If the program is +# not defined, but ada-lex.c is present, compilation will continue, +# possibly with a warning. +FLEX = flex + +YLWRAP = $(srcdir)/../ylwrap + +# where to find makeinfo, preferably one designed for texinfo-2 +MAKEINFO=makeinfo + +MAKEHTML = texi2html + +MAKEHTMLFLAGS = -glossary -menu -split_chapter + +# Set this up with gcc if you have gnu ld and the loader will print out +# line numbers for undefined references. +#CC_LD=gcc -static +CC_LD=$(CC) + +# Where is our "include" directory? Typically $(srcdir)/../include. +# This is essentially the header file directory for the library +# routines in libiberty. +INCLUDE_DIR = $(srcdir)/../include +INCLUDE_CFLAGS = -I$(INCLUDE_DIR) + +# Where is the "-liberty" library? Typically in ../libiberty. +LIBIBERTY = ../libiberty/libiberty.a + +# Where is the BFD library? Typically in ../bfd. +BFD_DIR = ../bfd +BFD = $(BFD_DIR)/libbfd.a +BFD_SRC = $(srcdir)/$(BFD_DIR) +BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + +# Where is the READLINE library? Typically in ../readline. +READLINE_DIR = ../readline +READLINE = $(READLINE_DIR)/libreadline.a +READLINE_SRC = $(srcdir)/$(READLINE_DIR) +READLINE_CFLAGS = -I$(READLINE_SRC)/.. + +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ +GDB_WARN_CFLAGS = $(WARN_CFLAGS) +GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) + +# Where is the INTL library? Typically in ../intl. +INTL_DIR = ../intl +INTL = @INTLLIBS@ +INTL_DEPS = @INTLDEPS@ +INTL_SRC = $(srcdir)/$(INTL_DIR) +INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC) + +# Where is the ICONV library? This can be empty if libc has iconv. +LIBICONV = @LIBICONV@ + +# Did the user give us a --with-sysroot option? +TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + +# +# CLI sub directory definitons +# +SUBDIR_CLI_OBS = \ + cli-dump.o \ + cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ + cli-interp.o +SUBDIR_CLI_SRCS = \ + cli/cli-dump.c \ + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ + cli/cli-interp.c \ + cli/cli-utils.c +SUBDIR_CLI_DEPS = +SUBDIR_CLI_LDFLAGS= +SUBDIR_CLI_CFLAGS= + +# +# MI sub directory definitons +# +SUBDIR_MI_OBS = \ + mi-out.o mi-console.o \ + mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ + mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o \ + mi-interp.o \ + mi-main.o mi-parse.o mi-getopt.o +SUBDIR_MI_SRCS = \ + mi/mi-out.c mi/mi-console.c \ + mi/mi-cmds.c mi/mi-cmd-env.c \ + mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ + mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \ + mi/mi-interp.c \ + mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c +SUBDIR_MI_DEPS = +SUBDIR_MI_LDFLAGS= +SUBDIR_MI_CFLAGS= \ + -DMI_OUT=1 + +# +# TUI sub directory definitions +# + +# Name of the TUI program +TUI=gdbtui + +SUBDIR_TUI_OBS = \ + tui-command.o \ + tui-data.o \ + tui-disasm.o \ + tui-file.o tui.o \ + tui-hooks.o \ + tui-interp.o \ + tui-io.o \ + tui-layout.o \ + tui-out.o \ + tui-regs.o \ + tui-source.o \ + tui-stack.o \ + tui-win.o \ + tui-windata.o \ + tui-wingeneral.o \ + tui-winsource.o +SUBDIR_TUI_SRCS = \ + tui/tui-command.c \ + tui/tui-data.c \ + tui/tui-disasm.c \ + tui/tui-file.c \ + tui/tui-hooks.c \ + tui/tui-interp.c \ + tui/tui-io.c \ + tui/tui-layout.c \ + tui/tui-out.c \ + tui/tui-regs.c \ + tui/tui-source.c \ + tui/tui-stack.c \ + tui/tui-win.c \ + tui/tui-windata.c \ + tui/tui-wingeneral.c \ + tui/tui-winsource.c \ + tui/tui.c +SUBDIR_TUI_DEPS = +SUBDIR_TUI_LDFLAGS= +SUBDIR_TUI_CFLAGS= \ + -DTUI=1 + + +# Opcodes currently live in one of two places. Either they are in the +# opcode library, typically ../opcodes, or they are in a header file +# in INCLUDE_DIR. +# Where is the "-lopcodes" library, with (some of) the opcode tables and +# disassemblers? +OPCODES_DIR = ../opcodes +OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) +OPCODES = $(OPCODES_DIR)/libopcodes.a +# Where are the other opcode tables which only have header file +# versions? +OP_INCLUDE = $(INCLUDE_DIR)/opcode +OPCODES_CFLAGS = -I$(OP_INCLUDE) + +# The simulator is usually nonexistent; targets that include one +# should set this to list all the .o or .a files to be linked in. +SIM = + +WIN32LIBS = @WIN32LIBS@ + +# Where is the TCL library? Typically in ../tcl. +LIB_INSTALL_DIR = $(libdir) +# This variable is needed when doing dynamic linking. +LIB_RUNTIME_DIR = $(libdir) +TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ +TCL_CFLAGS = @TCLHDIR@ +GDBTKLIBS = @GDBTKLIBS@ +# Extra flags that the GDBTK files need: +GDBTK_CFLAGS = @GDBTK_CFLAGS@ + +# Where is the TK library? Typically in ../tk. +TK = @TK_BUILD_LIB_SPEC@ +TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@ + +# Where is Itcl? Typically in ../itcl/itcl. +ITCL_CFLAGS = @ITCLHDIR@ +ITCL = @ITCLLIB@ + +# Where is Itk? Typically in ../itcl/itk. +ITK_CFLAGS = @ITKHDIR@ +ITK = @ITKLIB@ + +X11_CFLAGS = @TK_XINCLUDES@ +X11_LDFLAGS = +X11_LIBS = + +WIN32LDAPP = @WIN32LDAPP@ + +LIBGUI = @LIBGUI@ +GUI_CFLAGS_X = @GUI_CFLAGS_X@ +IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) + +# The version of gdbtk we're building. This should be kept +# in sync with GDBTK_VERSION and friends in gdbtk.h. +GDBTK_VERSION = 1.0 +GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) + +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + +SUBDIR_GDBTK_OBS = \ + gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \ + gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o +SUBDIR_GDBTK_SRCS = \ + gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \ + gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \ + gdbtk/generic/gdbtk-interp.c \ + gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \ + gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \ + gdbtk/generic/gdbtk-main.c +SUBDIR_GDBTK_DEPS = \ + $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS) +SUBDIR_GDBTK_LDFLAGS= +SUBDIR_GDBTK_CFLAGS= -DGDBTK + +CONFIG_OBS= @CONFIG_OBS@ +CONFIG_SRCS= @CONFIG_SRCS@ +CONFIG_DEPS= @CONFIG_DEPS@ +CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ +ENABLE_CFLAGS= @ENABLE_CFLAGS@ +# CONFIG_ALL= @CONFIG_ALL@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_INSTALL = @CONFIG_INSTALL@ +CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ + +# -I. for config files. +# -I$(srcdir) for gdb internal headers. +# -I$(srcdir)/config for more generic config files. + +# It is also possible that you will need to add -I/usr/include/sys if +# your system doesn't have fcntl.h in /usr/include (which is where it +# should be according to Posix). +DEFS = -DCRASH_MERGE @DEFS@ +GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS) + +# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS +# from the config directory. +GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS) + +PROFILE_CFLAGS = @PROFILE_CFLAGS@ + +# CFLAGS is specifically reserved for setting from the command line +# when running make. I.E. "make CFLAGS=-Wmissing-prototypes". +CFLAGS = @CFLAGS@ + +# Need to pass this to testsuite for "make check". Probably should be +# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in +# so "make check" has the same result no matter where it is run. +CXXFLAGS = -g -O + +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_WARN_CFLAGS = \ + $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) $(ENABLE_CFLAGS) \ + $(GDB_WARN_CFLAGS) +INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) + +# LDFLAGS is specifically reserved for setting from the command line +# when running make. +LDFLAGS = @LDFLAGS@ + +# Profiling options need to go here to work. +# I think it's perfectly reasonable for a user to set -pg in CFLAGS +# and have it work; that's why CFLAGS is here. +# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. +INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) + +# If your system is missing alloca(), or, more likely, it's there but +# it doesn't work, then refer to libiberty. + +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# LIBIBERTY appears twice on purpose. +# If you have the Cygnus libraries installed, +# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' +INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + -lintl -liberty +CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + $(LIBICONV) \ + $(LIBIBERTY) $(WIN32LIBS) +CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) + +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) + +DIST=gdb + +LINT=/usr/5bin/lint +LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) + +RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \ + echo $${rootsrc}/../dejagnu/runtest ; else echo runtest; \ + fi` + +RUNTESTFLAGS= + +# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX +# interface to the serial port. Hopefully if get ported to OS/2, VMS, +# etc., then there will be (as part of the C library or perhaps as +# part of libiberty) a POSIX interface. But at least for now the +# host-dependent makefile fragment might need to use something else +# besides ser-unix.o +SER_HARDWIRE = @SER_HARDWIRE@ + +# The `remote' debugging target is supported for most architectures, +# but not all (e.g. 960) +REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o + +# This is remote-sim.o if a simulator is to be linked in. +SIM_OBS = + +# Host and target-dependent makefile fragments come in here. +@host_makefile_frag@ +@target_makefile_frag@ +# End of host and target-dependent makefile fragments + +# Possibly ignore the simulator. If the simulator is being ignored, +# these expand into SIM= and SIM_OBJ=, overriding the entries from +# target_makefile_frag +# +@IGNORE_SIM@ +@IGNORE_SIM_OBS@ + +FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "mandir=$(mandir)" \ + "datadir=$(datadir)" \ + "includedir=$(includedir)" \ + "against=$(against)" \ + "DESTDIR=$(DESTDIR)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "CXX=$(CXX)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "DLLTOOL=$(DLLTOOL)" \ + "LDFLAGS=$(LDFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# Flags that we pass when building the testsuite. + +# empty for native, $(target_alias)/ for cross +target_subdir = @target_subdir@ + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +# The use of $$(x_FOR_TARGET) reduces the command line length by not +# duplicating the lengthy definition. +TARGET_FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "against=$(against)" \ + 'CC=$$(CC_FOR_TARGET)' \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + 'CXX=$$(CXX_FOR_TARGET)' \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# All source files that go into linking GDB. +# Links made at configuration time should not be specified here, since +# SFILES is used in building the distribution archive. + +SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ + ax-general.c ax-gdb.c \ + bcache.c \ + bfd-target.c \ + block.c blockframe.c breakpoint.c buildsym.c \ + c-exp.y c-lang.c c-typeprint.c c-valprint.c \ + charset.c cli-out.c coffread.c coff-pe-read.c \ + complaints.c completer.c corefile.c \ + cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ + dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \ + dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \ + elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ + f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ + frame-base.c \ + frame-unwind.c \ + gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ + hpacc-abi.c \ + inf-loop.c \ + infcall.c \ + infcmd.c inflow.c infrun.c \ + interps.c \ + jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ + kod.c kod-cisco.c \ + language.c linespec.c \ + m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \ + macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \ + mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \ + nlmread.c \ + objc-exp.y objc-lang.c \ + objfiles.c osabi.c observer.c \ + p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \ + regcache.c reggroups.c remote.c remote-fileio.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + serial.c ser-unix.c source.c \ + stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \ + target.c thread.c top.c tracepoint.c \ + trad-frame.c \ + typeprint.c \ + ui-out.c utils.c ui-file.h ui-file.c \ + user-regs.c \ + valarith.c valops.c valprint.c values.c varobj.c \ + wrapper.c + +LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c + +# "system" headers. Using these in dependencies is a rather personal +# choice. (-rich, summer 1993) +# (Why would we not want to depend on them? If one of these changes in a +# non-binary-compatible way, it is a real pain to remake the right stuff +# without these dependencies -kingdon, 13 Mar 1994) +aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h +aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h +getopt_h = $(INCLUDE_DIR)/getopt.h +floatformat_h = $(INCLUDE_DIR)/floatformat.h +bfd_h = $(BFD_DIR)/bfd.h +callback_h = $(INCLUDE_DIR)/gdb/callback.h +coff_sym_h = $(INCLUDE_DIR)/coff/sym.h +coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h +coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h +coff_internal_h = $(INCLUDE_DIR)/coff/internal.h +dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h) +elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h +elf_sh_h = $(INCLUDE_DIR)/elf/sh.h +elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) +elf_bfd_h = $(BFD_SRC)/elf-bfd.h +libaout_h = $(BFD_SRC)/libaout.h +libbfd_h = $(BFD_SRC)/libbfd.h +remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h +demangle_h = $(INCLUDE_DIR)/demangle.h +obstack_h = $(INCLUDE_DIR)/obstack.h +opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h +readline_h = $(READLINE_SRC)/readline.h +readline_tilde_h = $(READLINE_SRC)/tilde.h +readline_history_h = $(READLINE_SRC)/history.h +frv_desc_h = $(OPCODES_SRC)/frv-desc.h +sh_opc_h = $(OPCODES_SRC)/sh-opc.h +gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h +gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h +gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h +gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h +splay_tree_h = $(INCLUDE_DIR)/splay-tree.h + +# +# $BUILD/ headers +# + +config_h = config.h +exc_request_U_h = exc_request_U.h +exc_request_S_h = exc_request_S.h +msg_reply_S_h = msg_reply_S.h +msg_U_h = msg_U.h +notify_S_h = notify_S.h +process_reply_S_h = process_reply_S.h + +# +# config/ headers +# + +xm_h = @xm_h@ +tm_h = @tm_h@ +nm_h = @nm_h@ + +# +# gdb/ headers +# + +ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) +alphabsd_tdep_h = alphabsd-tdep.h +alpha_tdep_h = alpha-tdep.h +amd64_linux_tdep_h = amd64-linux-tdep.h +amd64_nat_h = amd64-nat.h +amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) +annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) +arch_utils_h = arch-utils.h +arm_tdep_h = arm-tdep.h +auxv_h = auxv.h +ax_gdb_h = ax-gdb.h +ax_h = ax.h $(doublest_h) +bcache_h = bcache.h +bfd_target_h = bfd-target.h +block_h = block.h +breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) +buildsym_h = buildsym.h +call_cmds_h = call-cmds.h +charset_h = charset.h +c_lang_h = c-lang.h $(value_h) $(macroexp_h) +cli_out_h = cli-out.h +coff_pe_read_h = coff-pe-read.h +coff_solib_h = coff-solib.h +command_h = command.h +complaints_h = complaints.h +completer_h = completer.h +cp_abi_h = cp-abi.h +cp_support_h = cp-support.h $(symtab_h) +dcache_h = dcache.h +defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) +dictionary_h = dictionary.h +disasm_h = disasm.h +doublest_h = doublest.h $(floatformat_h) +dummy_frame_h = dummy-frame.h +dwarf2expr_h = dwarf2expr.h +dwarf2_frame_h = dwarf2-frame.h +dwarf2loc_h = dwarf2loc.h +environ_h = environ.h +event_loop_h = event-loop.h +event_top_h = event-top.h +exec_h = exec.h $(target_h) +expression_h = expression.h $(symtab_h) $(doublest_h) +f_lang_h = f-lang.h +frame_base_h = frame-base.h +frame_h = frame.h +frame_unwind_h = frame-unwind.h $(frame_h) +gdbarch_h = gdbarch.h +gdb_assert_h = gdb_assert.h +gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) +gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h +gdb_dirent_h = gdb_dirent.h +gdb_events_h = gdb-events.h +gdb_h = gdb.h +gdb_locale_h = gdb_locale.h +gdb_obstack_h = gdb_obstack.h $(obstack_h) +gdb_proc_service_h = gdb_proc_service.h $(gregset_h) +gdb_regex_h = gdb_regex.h $(xregex_h) +gdb_stabs_h = gdb-stabs.h +gdb_stat_h = gdb_stat.h +gdb_string_h = gdb_string.h +gdb_thread_db_h = gdb_thread_db.h +gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) +gdbtypes_h = gdbtypes.h +gdb_vfork_h = gdb_vfork.h +gdb_wait_h = gdb_wait.h +glibc_tdep_h = glibc-tdep.h +gnu_nat_h = gnu-nat.h +gregset_h = gregset.h +hppa_tdep_h = hppa-tdep.h +i386_linux_tdep_h = i386-linux-tdep.h +i386_tdep_h = i386-tdep.h +i387_tdep_h = i387-tdep.h +ia64_tdep_h = ia64-tdep.h +infcall_h = infcall.h +inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h) +inf_loop_h = inf-loop.h +inflow_h = inflow.h $(terminal_h) +infttrace_h = infttrace.h +interps_h = interps.h +jv_lang_h = jv-lang.h +kod_h = kod.h +language_h = language.h +libunwind_frame_h = libunwind-frame.h $(libunwind_h) +linespec_h = linespec.h +linux_nat_h = linux-nat.h +m2_lang_h = m2-lang.h +m68k_tdep_h = m68k-tdep.h +macroexp_h = macroexp.h +macroscope_h = macroscope.h $(macrotab_h) $(symtab_h) +macrotab_h = macrotab.h +main_h = main.h +memattr_h = memattr.h +minimon_h = minimon.h +mipsnbsd_tdep_h = mipsnbsd-tdep.h +mips_tdep_h = mips-tdep.h +monitor_h = monitor.h +nbsd_tdep_h = nbsd-tdep.h +ns32k_tdep_h = ns32k-tdep.h +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +objc_lang_h = objc-lang.h +objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) +observer_h = observer.h +ocd_h = ocd.h +osabi_h = osabi.h +pa64solib_h = pa64solib.h +parser_defs_h = parser-defs.h $(doublest_h) +p_lang_h = p-lang.h +ppcnbsd_tdep_h = ppcnbsd-tdep.h +ppc_tdep_h = ppc-tdep.h +proc_utils_h = proc-utils.h +regcache_h = regcache.h +reggroups_h = reggroups.h +regset_h = regset.h +remote_fileio_h = remote-fileio.h +remote_h = remote.h +remote_utils_h = remote-utils.h $(target_h) +s390_tdep_h = s390-tdep.h +scm_lang_h = scm-lang.h $(scm_tags_h) +scm_tags_h = scm-tags.h +sentinel_frame_h = sentinel-frame.h +serial_h = serial.h +ser_unix_h = ser-unix.h +shnbsd_tdep_h = shnbsd-tdep.h +sh_tdep_h = sh-tdep.h +sim_regno_h = sim-regno.h +solib_h = solib.h +solib_svr4_h = solib-svr4.h +solist_h = solist.h +somsolib_h = somsolib.h +source_h = source.h +sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) +sparc_nat_h = sparc-nat.h +sparc_tdep_h = sparc-tdep.h +srec_h = srec.h +stabsread_h = stabsread.h +stack_h = stack.h +symfile_h = symfile.h +symtab_h = symtab.h +target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) +terminal_h = terminal.h +top_h = top.h +tracepoint_h = tracepoint.h +trad_frame_h = trad-frame.h +typeprint_h = typeprint.h +ui_file_h = ui-file.h +ui_out_h = ui-out.h +user_regs_h = user-regs.h +valprint_h = valprint.h +value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) +varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) +vax_tdep_h = vax-tdep.h +version_h = version.h +wince_stub_h = wince-stub.h +wrapper_h = wrapper.h $(gdb_h) +xcoffsolib_h = xcoffsolib.h +xmodem_h = xmodem.h + +# +# gdb/cli/ headers +# + +cli_cmds_h = $(srcdir)/cli/cli-cmds.h +cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h) +cli_dump_h = $(srcdir)/cli/cli-dump.h +cli_script_h = $(srcdir)/cli/cli-script.h +cli_setshow_h = $(srcdir)/cli/cli-setshow.h +cli_utils_h = $(srcdir)/cli/cli-utils.h + +# +# gdb/mi/ headers +# + +mi_cmds_h = $(srcdir)/mi/mi-cmds.h +mi_console_h = $(srcdir)/mi/mi-console.h +mi_getopt_h = $(srcdir)/mi/mi-getopt.h +mi_main_h = $(srcdir)/mi/mi-main.h +mi_out_h = $(srcdir)/mi/mi-out.h +mi_parse_h = $(srcdir)/mi/mi-parse.h + +# +# gdb/tui/ headers +# + +tui_command_h = $(srcdir)/tui/tui-command.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) +tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) +tui_file_h = $(srcdir)/tui/tui-file.h +tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h +tui_io_h = $(srcdir)/tui/tui-io.h +tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) +tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) +tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h) +tui_stack_h = $(srcdir)/tui/tui-stack.h +tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h) +tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h +tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h) +tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) + +# Header files that need to have srcdir added. Note that in the cases +# where we use a macro like $(gdbcmd_h), things are carefully arranged +# so that each .h file is listed exactly once (M-x tags-search works +# wrong if TAGS has files twice). Because this is tricky to get +# right, it is probably easiest just to list .h files here directly. + +HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + environ.h $(gdbcmd_h) gdb.h gdbcore.h \ + gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ + objfiles.h parser-defs.h serial.h solib.h \ + symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \ + macrotab.h macroexp.h macroscope.h \ + c-lang.h f-lang.h \ + jv-lang.h \ + m2-lang.h p-lang.h \ + complaints.h valprint.h \ + vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \ + vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \ + dcache.h remote-utils.h top.h somsolib.h + +# Header files that already have srcdir in them, or which are in objdir. + +HFILES_WITH_SRCDIR = ../bfd/bfd.h + + +# GDB "info" files, which should be included in their entirety +INFOFILES = gdb.info* + +REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar + +# {X,T,NAT}DEPFILES are something of a pain in that it's hard to +# default their values the way we do for SER_HARDWIRE; in the future +# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other +# variables analogous to SER_HARDWIRE which get defaulted in this +# Makefile.in + +DEPFILES = $(TDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \ + $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS) + +SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) +# Don't include YYFILES (*.c) because we already include *.y in SFILES, +# and it's more useful to see it in the .y file. +TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ + $(SUBDIR_CLI_SRCS) +TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) + +COMMON_OBS = $(DEPFILES) $(YYOBJ) \ + version.o \ + annotate.o \ + auxv.o \ + bfd-target.o \ + blockframe.o breakpoint.o findvar.o regcache.o \ + charset.o disasm.o dummy-frame.o \ + source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ + block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \ + infcall.o \ + infcmd.o infrun.o \ + expprint.o environ.o stack.o thread.o \ + interps.o \ + main.o \ + macrotab.o macrocmd.o macroexp.o macroscope.o \ + event-loop.o event-top.o inf-loop.o completer.o \ + gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \ + memattr.o mem-break.o target.o parse.o language.o buildsym.o \ + std-regs.o \ + signals.o \ + kod.o kod-cisco.o \ + gdb-events.o \ + exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \ + dbxread.o coffread.o coff-pe-read.o elfread.o \ + dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + dwarf2expr.o dwarf2loc.o dwarf2-frame.o \ + c-lang.o f-lang.o objc-lang.o \ + ui-out.o cli-out.o \ + varobj.o wrapper.o \ + jv-lang.o jv-valprint.o jv-typeprint.o \ + m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ + scm-exp.o scm-lang.o scm-valprint.o \ + sentinel-frame.o \ + complaints.o typeprint.o \ + c-typeprint.o f-typeprint.o m2-typeprint.o \ + c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \ + nlmread.o serial.o mdebugread.o top.o utils.o \ + ui-file.o \ + user-regs.o \ + frame.o frame-unwind.o doublest.o \ + frame-base.o \ + gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ + cp-namespace.o \ + reggroups.o \ + trad-frame.o + +TSOBS = inflow.o + +SUBDIRS = build_no_subdirs + +# For now, shortcut the "configure GDB for fewer languages" stuff. +YYFILES = c-exp.c \ + objc-exp.c \ + ada-exp.c \ + jv-exp.c \ + f-exp.c m2-exp.c p-exp.c +YYOBJ = c-exp.o \ + objc-exp.o \ + jv-exp.o \ + f-exp.o m2-exp.o p-exp.o + +# Things which need to be built when making a distribution. + +DISTSTUFF = $(YYFILES) + +# Prevent Sun make from putting in the machine type. Setting +# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. +.c.o: + $(CC) -c $(INTERNAL_CFLAGS) $< + +all: gdb$(EXEEXT) $(CONFIG_ALL) + @$(MAKE) -s $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) + +installcheck: + +# The check target can not use subdir_do, because subdir_do does not +# use TARGET_FLAGS_TO_PASS. +check: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ + else true; fi + +info dvi install-info clean-info html install-html: force + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do + +gdb.z:gdb.1 + nroff -man $(srcdir)/gdb.1 | col -b > gdb.t + pack gdb.t ; rm -f gdb.t + mv gdb.t.z gdb.z + +# Traditionally "install" depends on "all". But it may be useful +# not to; for example, if the user has made some trivial change to a +# source file and doesn't care about rebuilding or just wants to save the +# time it takes for make to check that all is up to date. +# install-only is intended to address that need. +install: all install-only +install-only: $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + + +uninstall: force $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (top.o -> _initialize_top, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +# FIXME: There is a problem with this approach - init.c may force +# unnecessary files to be linked in. + +# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that +# the first call is to _initialize_gdbtypes (implemented by explicitly +# putting that function's name first in the init.l-tmp file). This is +# a hack to ensure that all the architecture dependant global +# builtin_type_* variables are initialized before anything else +# (per-architecture code is called in the same order that it is +# registered). The ``correct fix'' is to have all the builtin types +# made part of the architecture and initialize them on-demand (using +# gdbarch_data) just like everything else. The catch is that other +# modules still take the address of these builtin types forcing them +# to be variables, sigh! + +# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is +# anchored on the first column and excludes the ``/'' character so +# that it doesn't add the $(srcdir) prefix to any file that already +# has an absolute path. It turns out that $(DEC)'s True64 make +# automatically adds the $(srcdir) prefixes when it encounters files +# in sub-directories such as cli/ and mi/. + +# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates +# duplicates. Files in the gdb/ directory can end up appearing in +# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file). + +INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) +init.c: $(INIT_FILES) + @echo Making init.c + @rm -f init.c-tmp init.l-tmp + @touch init.c-tmp + @echo gdbtypes > init.l-tmp + @-echo $(INIT_FILES) | \ + tr ' ' '\012' | \ + sed \ + -e '/^gdbtypes.[co]$$/d' \ + -e '/^init.[co]$$/d' \ + -e '/xdr_ld.[co]$$/d' \ + -e '/xdr_ptrace.[co]$$/d' \ + -e '/xdr_rdb.[co]$$/d' \ + -e '/udr.[co]$$/d' \ + -e '/udip2soc.[co]$$/d' \ + -e '/udi2go32.[co]$$/d' \ + -e '/version.[co]$$/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \ + -e 's/\.[co]$$/.c/' \ + -e 's,signals\.c,signals/signals\.c,' \ + -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ + while read f; do \ + sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ + done | \ + while read f; do \ + case " $$fs " in \ + *" $$f "* ) ;; \ + * ) echo $$f ; fs="$$fs $$f";; \ + esac; \ + done >> init.l-tmp + @echo '/* Do not modify this file. */' >>init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp + @echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp + @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' >init.c-tmp + @echo 'void' >>init.c-tmp + @echo 'initialize_all_files (void)' >>init.c-tmp + @echo '{' >>init.c-tmp + @sed -e 's/\(.*\)/ _initialize_\1 ();/' >init.c-tmp + @echo '}' >>init.c-tmp + @rm init.l-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c + +init.o: init.c $(defs_h) $(call_cmds_h) + +# Removing the old gdb first works better if it is running, at least on SunOS. +gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + @(cd ../..; make --no-print-directory GDB_FLAGS=-DGDB_6_1 library) + @rm -f gdb$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o `cat mergeobj` libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) `cat mergelibs` + +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +nlm: force + rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do + +# Create a library of the gdb object files and build GDB by linking +# against that. +# +# init.o is very important. It pulls in the rest of GDB. +LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o +libgdb.a: $(LIBGDB_OBS) + -rm -f libgdb.a + $(AR) q libgdb.a $(LIBGDB_OBS) + $(RANLIB) libgdb.a + +# A Mach 3.0 program to force gdb back to command level + +stop-gdb: stop-gdb.o + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + stop-gdb.o $(CLIBS) $(LOADLIBES) + +# This is useful when debugging GDB, because some Unix's don't let you run GDB +# on itself without copying the executable. So "make gdb1" will make +# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". +# Removing gdb1 before the copy is the right thing if gdb1 is open +# in another process. +gdb1$(EXEEXT): gdb$(EXEEXT) + rm -f gdb1$(EXEEXT) + cp gdb$(EXEEXT) gdb1$(EXEEXT) + +# FIXME. These are not generated by "make depend" because they only are there +# for some machines. +# But these rules don't do what we want; we want to hack the foo.o: tm.h +# dependency to do the right thing. +tm-sun3.h tm-altos.h: tm-m68k.h +tm-sun2.h tm-3b1.h: tm-m68k.h +xm-vaxult.h: xm-vax.h +xm-vaxbsd.h: xm-vax.h + +# Put the proper machine-specific files first, so M-. on a machine +# specific routine gets the one for the correct machine. (FIXME: those +# files go in twice; we should be removing them from the main list). + +# TAGS depends on all the files that go into it so you can rebuild TAGS +# with `make TAGS' and not have to say `rm TAGS' first. + +TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) + @echo Making TAGS + @etags $(srcdir)/$(TM_FILE) \ + $(srcdir)/$(XM_FILE) \ + $(srcdir)/$(NAT_FILE) \ + `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ + echo $(srcdir)/$$i ; \ + done ; for i in $(TAGFILES_WITH_SRCDIR); do \ + echo $$i ; \ + done) | sed -e 's/\.o$$/\.c/'` \ + `find $(srcdir)/config -name '*.h' -print` + +tags: TAGS + +clean mostlyclean: $(CONFIG_CLEAN) + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do + rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp + rm -f init.c version.c + rm -f gdb$(EXEEXT) core make.log + rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) + +# This used to depend on c-exp.c m2-exp.c TAGS +# I believe this is wrong; the makefile standards for distclean just +# describe removing files; the only sort of "re-create a distribution" +# functionality described is if the distributed files are unmodified. +# NB: While GDBSERVER might be configured on native systems, it isn't +# always included in SUBDIRS. Remove the gdbserver files explictly. +distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do + rm -f gdbserver/config.status gdbserver/config.log + rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h + rm -f gdbserver/Makefile gdbserver/config.cache + rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit + rm -f y.output yacc.acts yacc.tmp y.tab.h + rm -f config.log config.cache + rm -f Makefile + +maintainer-clean: local-maintainer-clean do-maintainer-clean distclean +realclean: maintainer-clean + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f c-exp.c \ + ada-lex.c ada-exp.c \ + objc-exp.c \ + jv-exp.tab \ + f-exp.c m2-exp.c p-exp.c + rm -f TAGS $(INFOFILES) + rm -f $(YYFILES) + rm -f nm.h tm.h xm.h config.status + +do-maintainer-clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \ + subdir_do + +diststuff: $(DISTSTUFF) + cd doc; $(MAKE) $(MFLAGS) diststuff + +subdir_do: force + @for i in $(DODIRS); do \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + +Makefile: Makefile.in config.status @frags@ + $(SHELL) config.status + +config.h: stamp-h ; @true +stamp-h: config.in config.status + CONFIG_HEADERS=config.h:config.in $(SHELL) config.status + +config.status: configure configure.tgt configure.host + $(SHELL) config.status --recheck + +force: + +# Documentation! +# GDB QUICK REFERENCE (TeX dvi file, CM fonts) +doc/refcard.dvi: + cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) + +# GDB QUICK REFERENCE (PostScript output, common PS fonts) +doc/refcard.ps: + cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) + +# GDB MANUAL: TeX dvi file +doc/gdb.dvi: + cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) + +# GDB MANUAL: info file +doc/gdb.info: + cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) + +# Make copying.c from COPYING +$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \ + $(srcdir)/COPYING $(srcdir)/copying.awk + awk -f $(srcdir)/copying.awk \ + < $(srcdir)/COPYING > $(srcdir)/copying.tmp + mv $(srcdir)/copying.tmp $(srcdir)/copying.c + +version.c: Makefile version.in + @rm -f version.c-tmp version.c + @echo '#include "version.h"' >> version.c-tmp + @echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp + @echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp + @echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp + @mv version.c-tmp version.c +version.o: version.c $(version_h) + + +lint: $(LINTFILES) + $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ + `echo $(DEPFILES) | sed 's/\.o /\.c /g'` + +gdb.cxref: $(SFILES) + cxref -I. $(SFILES) >gdb.cxref + +force_update: + +# GNU Make has an annoying habit of putting *all* the Makefile variables +# into the environment, unless you include this target as a circumvention. +# Rumor is that this will be fixed (and this target can be removed) +# in GNU Make 4.0. +.NOEXPORT: + +# GNU Make 3.63 has a different problem: it keeps tacking command line +# overrides onto the definition of $(MAKE). This variable setting +# will remove them. +MAKEOVERRIDES= + +ALLDEPFILES = \ + aix-thread.c \ + alpha-nat.c alphabsd-nat.c \ + alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \ + alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \ + amd64-nat.c amd64-tdep.c \ + amd64bsd-nat.c amdfbsd-nat.c amd64fbsd-tdep.c \ + amd64nbsd-nat.c amd64nbsd-tdep.c \ + amd64obsd-nat.c amd64obsd-tdep.c \ + amd64-linux-nat.c amd64-linux-tdep.c \ + arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \ + armnbsd-nat.c armnbsd-tdep.c \ + avr-tdep.c \ + coff-solib.c \ + core-regset.c core-aout.c corelow.c \ + dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \ + glibc-tdep.c \ + go32-nat.c h8300-tdep.c \ + hppa-tdep.c hppa-hpux-tdep.c \ + hppah-nat.c hpread.c \ + i386-tdep.c i386v-nat.c i386-linux-nat.c \ + i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \ + i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \ + i387-tdep.c \ + i386-linux-tdep.c i386-nat.c \ + i386gnu-nat.c i386gnu-tdep.c \ + ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ + libunwind-frame.c \ + lynx-nat.c m3-nat.c \ + m68hc11-tdep.c \ + m68k-tdep.c \ + mcore-tdep.c \ + mips-linux-nat.c mips-linux-tdep.c \ + mips-nat.c \ + mips-irix-tdep.c \ + mips-tdep.c mipsm3-nat.c mipsv4-nat.c \ + mipsnbsd-nat.c mipsnbsd-tdep.c \ + nbsd-tdep.c \ + ns32k-tdep.c solib-osf.c \ + somread.c somsolib.c $(HPREAD_SOURCE) \ + ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \ + ppcnbsd-nat.o ppcnbsd-tdep.o \ + procfs.c \ + remote-e7000.c \ + remote-hms.c remote-m32r-sdi.c remote-mips.c \ + remote-rdp.c remote-sim.c \ + remote-st.c remote-utils.c dcache.c \ + remote-vx.c \ + rs6000-nat.c rs6000-tdep.c \ + s390-tdep.c s390-nat.c \ + ser-go32.c ser-pipe.c ser-tcp.c \ + sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ + solib.c solib-irix.c solib-svr4.c solib-sunos.c \ + sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \ + sparc-tdep.c sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-linux-nat.c \ + sparc64-linux-tdep.c sparc64-nat.c sparc64-sol2-tdep.c \ + sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ + sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ + sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + sun3-nat.c \ + symm-tdep.c symm-nat.c \ + vax-tdep.c \ + vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ + win32-nat.c \ + xcoffread.c xcoffsolib.c \ + xstormy16-tdep.c + +# Some files need explict build rules (due to -Werror problems) or due +# to sub-directory fun 'n' games. + +# Provide explicit rule/dependency - works for more makes. +copying.o: $(srcdir)/copying.c + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c + +hpux-thread.o: $(srcdir)/hpux-thread.c + $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \ + -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \ + $(srcdir)/hpux-thread.c + +# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. +main.o: main.c + $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \ + -DBINDIR=\"$(bindir)\" $(srcdir)/main.c + +# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral +# errors. It turns out that that is the least of monitor.c's +# problems. The function print_vsprintf appears to be using +# va_arg(long) to extract CORE_ADDR parameters - something that +# definitly will not work. "monitor.c" needs to be rewritten so that +# it doesn't use format strings and instead uses callbacks. +monitor.o: $(srcdir)/monitor.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/monitor.c + +# FIXME: cagney/2003-08-10: Do not try to build "printcmd.c" with +# -Wformat-nonliteral. It needs to be overhauled so that it doesn't +# pass user input strings as the format parameter to host printf +# function calls. +printcmd.o: $(srcdir)/printcmd.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/printcmd.c + +# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't +# match output format strings. +procfs.o: $(srcdir)/procfs.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c + +# FIXME: Thread-db.o gets warnings because the definitions of the register +# sets are different from kernel to kernel. +thread-db.o: $(srcdir)/thread-db.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \ + $(srcdir)/thread-db.c + +v850ice.o: $(srcdir)/v850ice.c + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) \ + $(srcdir)/v850ice.c + +# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with +# -Wformat-nonliteral. It relies on local_hex_format et.al. and +# that's a mess. It needs a serious overhaul. +valprint.o: $(srcdir)/valprint.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c + +# +# YACC/LEX dependencies +# +# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't +# exist in srcdir, then compiled in objdir to LANG-exp.o. If we +# said LANG-exp.c rather than ./c-exp.c some makes would +# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus +# decls for malloc/realloc/free which conflict with everything else. +# Strictly speaking c-exp.c should therefore depend on +# Makefile.in, but that was a pretty big annoyance. + +.SUFFIXES: .y .l +.y.c: + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $@.tmp -- $(YFLAGS) + -sed -e '/extern.*malloc/d' \ + -e '/extern.*realloc/d' \ + -e '/extern.*free/d' \ + -e '/include.*malloc.h/d' \ + -e 's/malloc/xmalloc/g' \ + -e 's/realloc/xrealloc/g' \ + -e '/^#line.*y.tab.c/d' \ + < $@.tmp > $@.new + -rm $@.tmp + mv $@.new ./$*.c +.l.c: + @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ + echo $(FLEX) -Isit $< ">" $@; \ + $(FLEX) -Isit $< > $@; \ + elif [ ! -f $@ -a ! -f $< ]; then \ + echo "ada-lex.c missing and flex not available."; \ + false; \ + elif [ ! -f $@ ]; then \ + echo "Warning: $*.c older than $*.l and flex not available."; \ + fi + +.PRECIOUS: ada-exp.c ada-lex.c +.PRECIOUS: c-exp.c +.PRECIOUS: f-exp.c +.PRECIOUS: jv-exp.c +.PRECIOUS: m2-exp.c +.PRECIOUS: objc-exp.c +.PRECIOUS: p-exp.c + +# +# gdb/ dependencies +# + +abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \ + $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(frame_h) $(block_h) $(ada_lex_c) +ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \ + $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \ + $(infcall_h) $(dictionary_h) +ada-lex.o: ada-lex.c +ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \ + $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \ + $(gregset_h) $(ada_lang_h) +ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ + $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ + $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) +ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \ + $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) +aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ + $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \ + $(ppc_tdep_h) +alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h) +alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) +alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(alpha_tdep_h) +alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \ + $(osabi_h) $(alpha_tdep_h) +alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ + $(block_h) $(gdb_assert_h) $(alpha_tdep_h) +alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) +alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) $(nbsd_tdep_h) +alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h) +alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \ + $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \ + $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \ + $(elf_bfd_h) $(alpha_tdep_h) +amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(solib_svr4_h) +amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) +amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ + $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) +amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ + $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \ + $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(i387_tdep_h) +annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ + $(gdbtypes_h) $(breakpoint_h) +arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ + $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ + $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \ + $(floatformat_h) +arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) +arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \ + $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \ + $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \ + $(glibc_tdep_h) +armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \ + $(regcache_h) $(gdbcore_h) +armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \ + $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \ + $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \ + $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) +auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \ + $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \ + $(elf_common_h) +avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_string_h) $(dis_asm_h) +ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \ + $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \ + $(regcache_h) +ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h) +bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \ + $(gdb_assert_h) +bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \ + $(gdb_assert_h) $(gdb_string_h) +block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \ + $(gdb_obstack_h) $(cp_support_h) +blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \ + $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \ + $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \ + $(command_h) $(gdbcmd_h) $(block_h) +breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \ + $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ + $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \ + $(gdb_events_h) +buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ + $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \ + $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) +c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) +charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \ + $(gdb_string_h) +c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \ + $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \ + $(demangle_h) $(cp_support_h) +cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \ + $(gdb_assert_h) +coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \ + $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h) +coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \ + $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \ + $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \ + $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \ + $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h) +coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) +complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \ + $(command_h) $(gdbcmd_h) +completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \ + $(readline_h) $(completer_h) +copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h) +core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_dirent_h) $(gdb_stat_h) +corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ + $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ + $(dis_asm_h) $(gdb_stat_h) $(completer_h) +corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ + $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ + $(exec_h) $(readline_h) $(gdb_assert_h) +core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) +cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ + $(ui_out_h) $(gdb_string_h) +cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \ + $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \ + $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h) +cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \ + $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \ + $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \ + $(gdbtypes_h) +cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h) +cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \ + $(cp_abi_h) $(valprint_h) +cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \ + $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \ + $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \ + $(gdb_string_h) $(dis_asm_h) +c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \ + $(gdb_string_h) +c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(c_lang_h) $(cp_abi_h) $(target_h) +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ + $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ + $(disasm_h) $(trad_frame_h) $(gdb_assert_h) +dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ + $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ + $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ + $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \ + $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) +dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ + $(gdbcore_h) $(target_h) +delta68-nat.o: delta68-nat.c $(defs_h) +demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ + $(gdb_string_h) +dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(buildsym_h) $(gdb_assert_h) $(dictionary_h) +dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h) +disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \ + $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h) +doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h) +dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) +dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \ + $(gdb_string_h) +dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \ + $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \ + $(command_h) $(gdbcmd_h) +dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \ + $(mips_tdep_h) +dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ + $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) +dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \ + $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) +dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \ + $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \ + $(dwarf2loc_h) $(gdb_string_h) +dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \ + $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \ + $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \ + $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) +dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \ + $(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \ + $(language_h) $(complaints_h) $(gdb_string_h) +elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \ + $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) +environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h) +eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ + $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ + $(parser_defs_h) +event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ + $(gdb_string_h) +event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ + $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ + $(gdbcmd_h) $(readline_h) $(readline_history_h) +exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ + $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ + $(xcoffsolib_h) +expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ + $(gdb_string_h) $(block_h) +fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(gdb_string_h) $(elf_bfd_h) $(gregset_h) +f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \ + $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \ + $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \ + $(user_regs_h) $(block_h) +f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \ + $(valprint_h) $(value_h) +fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ + $(terminal_h) $(gdbthread_h) $(command_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ + $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ + $(command_h) $(gdbcmd_h) +frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdb_assert_h) $(dummy_frame_h) +frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) +f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(f_lang_h) $(gdb_string_h) +f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h) +gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \ + $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \ + $(gdb_assert_h) +gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ + $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) +gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) +gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \ + $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \ + $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) +glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(glibc_tdep_h) +gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \ + $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \ + $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \ + $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) +gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) +gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \ + $(demangle_h) $(gdb_assert_h) $(gdb_string_h) +go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ + $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ + $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ + $(gdb_string_h) +h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ + $(gdb_assert_h) $(dis_asm_h) +hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ + $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) +hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(gdb_wait_h) $(regcache_h) $(gdb_string_h) +hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(osabi_h) $(gdb_string_h) $(frame_h) +hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \ + $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \ + $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \ + $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \ + $(hppa_tdep_h) +hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ + $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ + $(somsolib_h) $(gdb_assert_h) $(gdb_string_h) +hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) +i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) +i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h) +i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \ + $(i386_tdep_h) +i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) +i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \ + $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \ + $(i387_tdep_h) $(gregset_h) +i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h) +i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \ + $(gdbcore_h) $(gregset_h) $(regcache_h) +i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \ + $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \ + $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) +i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(gdb_proc_service_h) +i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ + $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(glibc_tdep_h) +i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) +i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) +i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ + $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ + $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) +i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \ + $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(i386_tdep_h) +i386-stub.o: i386-stub.c +i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \ + $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \ + $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \ + $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) +i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(gregset_h) +i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \ + $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(i386_tdep_h) +i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \ + $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) +ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stat_h) +ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h) +ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) +ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \ + $(arch_utils_h) $(gdbcore_h) $(regcache_h) +ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ + $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ + $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \ + $(libunwind_frame_h) $(libunwind_ia64_h) +infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ + $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ + $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) +infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \ + $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \ + $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \ + $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ + $(gdb_assert_h) +inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ + $(event_top_h) $(inf_loop_h) $(remote_h) +inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ + $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ + $(inflow_h) +infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ + $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) +infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ + $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ + $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ + $(observer_h) $(language_h) $(gdb_assert_h) +inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) +infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \ + $(gdbcore_h) +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ + $(gdb_events_h) $(gdb_assert_h) $(top_h) +irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h) +jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \ + $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) +jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \ + $(c_lang_h) $(cp_abi_h) +jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ + $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) +kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \ + $(kod_h) +kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h) +language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ + $(parser_defs_h) $(jv_lang_h) $(demangle_h) +libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ + $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \ + $(gdb_string_h) $(libunwind_frame_h) $(complaints_h) +linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ + $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \ + $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \ + $(objc_lang_h) $(linespec_h) +lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ + $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \ + $(linux_nat_h) +linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \ + $(linux_nat_h) +linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \ + $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ + $(cli_decode_h) $(gdb_string_h) $(linux_nat_h) +lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \ + $(valprint_h) +m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h) +m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(m2_lang_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ + $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) +m32r-stub.o: m32r-stub.c $(syscall_h) +m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \ + $(dis_asm_h) $(gdb_assert_h) +m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ + $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \ + $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h) +m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ + $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \ + $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(gregset_h) +m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ + $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ + $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ + $(m68k_tdep_h) +m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) +m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) +m68k-stub.o: m68k-stub.c +m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \ + $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \ + $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \ + $(gregset_h) +macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \ + $(command_h) $(gdbcmd_h) +macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \ + $(macroexp_h) $(gdb_assert_h) +macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \ + $(target_h) $(frame_h) $(inferior_h) $(complaints_h) +macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ + $(bcache_h) $(complaints_h) +main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ + $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ + $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) +maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ + $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) +mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(gdb_string_h) $(regcache_h) $(serial_h) +mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ + $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ + $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) +mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ + $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ + $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) \ + $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \ + $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h) +memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \ + $(target_h) $(value_h) $(language_h) $(gdb_string_h) +mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \ + $(target_h) +minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) +mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) +mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) +mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ + $(gdb_assert_h) $(frame_h) +mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(mipsnbsd_tdep_h) +mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ + $(solib_svr4_h) +mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ + $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ + $(elf_common_h) $(elf_mips_h) +mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ + $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) +mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gregset_h) +mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \ + $(objfiles_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \ + $(dis_asm_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ + $(gdb_regex_h) $(srec_h) $(regcache_h) +nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) +nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) +ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ + $(gdb_string_h) +ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ + $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ + $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ + $(nto_tdep_h) $(command_h) $(regcache_h) +nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ + $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ + $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) +objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ + $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \ + $(block_h) +objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ + $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ + $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ + $(gdb_assert_h) +objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \ + $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \ + $(breakpoint_h) $(block_h) $(dictionary_h) +observer.o: observer.c $(defs_h) $(observer_h) +ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ + $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) +osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ + $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) +parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ + $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ + $(doublest_h) $(gdb_assert_h) $(block_h) +p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \ + $(valprint_h) $(value_h) +ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \ + $(regcache_h) +ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \ + $(ppc_tdep_h) +ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ + $(ppc_tdep_h) +ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) +ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ + $(ppc_tdep_h) $(target_h) $(objfiles_h) +printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ + $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ + $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) +proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ + $(proc_utils_h) +proc-events.o: proc-events.c $(defs_h) +proc-flags.o: proc-flags.c $(defs_h) +procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \ + $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \ + $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) $(gregset_h) +proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gregset_h) +proc-why.o: proc-why.c $(defs_h) $(proc_utils_h) +p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h) +p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \ + $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) +regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \ + $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \ + $(gdb_string_h) $(gdbcmd_h) +reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ + $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) +remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ + $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ + $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ + $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ + $(gdbcore_h) $(remote_fileio_h) +remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ + $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ + $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) +remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ + $(remote_fileio_h) +remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) +remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) +remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \ + $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h) +remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) +remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(regcache_h) $(serial_h) +remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ + $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \ + $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) +remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(serial_h) $(regcache_h) +remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \ + $(regcache_h) +remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \ + $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \ + $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \ + $(vx_share_dbgRpcLib_h) +remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \ + $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \ + $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \ + $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \ + $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \ + $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \ + $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(regcache_h) $(gdb_string_h) \ + $(sparc_tdep_h) $(vx_share_ptrace_h) $(vx_share_regPacket_h) +rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) +rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ + $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) +rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ + $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ + $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ + $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ + $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ + $(gdb_assert_h) $(dis_asm_h) +s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ + $(s390_tdep_h) +s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \ + $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ + $(solib_svr4_h) $(s390_tdep_h) +scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) +scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h) +scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \ + $(scm_lang_h) $(valprint_h) $(gdbcore_h) +sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \ + $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h) +ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h) +ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h) +serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h) +ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \ + $(gdb_string_h) +ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h) +ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \ + $(gdb_string_h) $(event_loop_h) +sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \ + $(sh_tdep_h) +sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(objfiles_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \ + $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \ + $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ + $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +sh-stub.o: sh-stub.c +sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \ + $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \ + $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ + $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \ + $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ + $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) +solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ + $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ + $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) +solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ + $(bcache_h) $(regcache_h) +solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \ + $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \ + $(bfd_target_h) $(exec_h) +sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \ + $(symfile_h) $(gdb_string_h) $(gregset_h) +somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ + $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) +source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ + $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ + $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ + $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \ + $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) +sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ + $(solib_svr4_h) $(sparc64_tdep_h) +sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) +sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \ + $(sparc_nat_h) +sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h) +sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \ + $(sparc_tdep_h) $(sparc64_tdep_h) +sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc_tdep_h) +sparc-stub.o: sparc-stub.c +sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ + $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \ + $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ + $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ + $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \ + $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) +stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ + $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ + $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) +standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(gdb_wait_h) +std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ + $(value_h) $(gdb_string_h) +stop-gdb.o: stop-gdb.c $(defs_h) +sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \ + $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ + $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ + $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ + $(gdb_string_h) $(gdb_stat_h) +symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ + $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ + $(dictionary_h) $(gdb_string_h) +symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ + $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ + $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ + $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) +target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ + $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) +thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ + $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) +thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \ + $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) +top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ + $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ + $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ + $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ + $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ + $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) +tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ + $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ + $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \ + $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \ + $(readline_history_h) +trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ + $(regcache_h) +typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ + $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ + $(gdb_string_h) +ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) +ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(ui_out_h) $(gdb_assert_h) +user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ + $(gdb_string_h) $(gdb_assert_h) $(frame_h) +utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ + $(filenames_h) $(inferior_h) $(readline_h) +uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ + $(regcache_h) $(gregset_h) +v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ + $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) +v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) +valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ + $(doublest_h) $(infcall_h) +valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \ + $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \ + $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \ + $(cp_support_h) +valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \ + $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) +values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \ + $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \ + $(gdb_assert_h) $(regcache_h) $(block_h) +varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ + $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) +vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \ + $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h) +win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ + $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ + $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ + $(regcache_h) $(mips_tdep_h) +wince-stub.o: wince-stub.c $(wince_stub_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ + $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ + $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \ + $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h) +xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \ + $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h) +xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h) +xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \ + $(dis_asm_h) + +# +# gdb/cli/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \ + $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \ + $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ + $(tui_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c +cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ + $(cli_decode_h) $(tui_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c +cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ + $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ + $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c +cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ + $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ + $(cli_script_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c +cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \ + $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \ + $(cli_setshow_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c +cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c + +# +# GDBTK sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +all-gdbtk: insight$(EXEEXT) + +install-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ + $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/help \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ + cd $(srcdir)/gdbtk/library ; \ + for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \ + do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ + done ; + +uninstall-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + rm -rf $(DESTDIR)$(GDBTK_LIBRARY) + +clean-gdbtk: + rm -f insight$(EXEEXT) + +# Removing the old gdb first works better if it is running, at least on SunOS. +insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \ + $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico + $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o + +gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) $(top_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(ITK_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" + +gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(breakpoint_h) $(tracepoint_h) \ + $(symfile_h) $(symtab_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \ + $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(dis_asm_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \ + $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \ + $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \ + $(srcdir)/gdbtk/generic/gdbtk.h + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \ + $(srcdir)/gdbtk/generic/gdbtk-interp.c + +gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(frame_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \ + $(block_h) $(dictionary_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-varobj.c + +gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(frame_h) $(value_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.c + +# +# gdb/mi/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ + $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c +mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ + $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c +mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \ + $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \ + $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \ + $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c +mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \ + $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c +mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c +mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ + $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \ + $(stack_h) $(dictionary_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c +mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c +mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c +mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ + $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c +mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ + $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ + $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ + $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_h) $(frame_h) $(mi_main_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c +mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c +mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c +mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \ + $(symtab_h) $(ui_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c + +# +# rdi-share sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +rdi-share/libangsd.a: force + @dir=rdi-share; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ + else \ + true; \ + fi + +# +# gdb/signals/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c + +# +# gdb/tui/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ + $(source_h) $(gdb_curses_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c +tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c +tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c +tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c +tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ + $(tui_io_h) $(tui_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c +tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ + $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ + $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ + $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c +tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ + $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ + $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c +tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ + $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c +tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ + $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ + $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ + $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c +tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ + $(gdb_string_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c +tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c +tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ + $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c +tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ + $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c +tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ + $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ + $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c +tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c +tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c +tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ + $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ + $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c + +# +# vx-share sub-directory +# + +xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ld.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c + +xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ptrace.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c + +xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_rdb.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c + +### end of the gdb Makefile.in. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/ppc-linux-tdep.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/ppc-linux-tdep.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/ppc-linux-tdep.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/ppc-linux-tdep.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1116 @@ +/* Target-dependent code for GDB, the GNU debugger. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "symtab.h" +#include "target.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "symfile.h" +#include "objfiles.h" +#include "regcache.h" +#include "value.h" +#include "osabi.h" + +#include "solib-svr4.h" +#include "ppc-tdep.h" + +/* The following instructions are used in the signal trampoline code + on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and + 0x7777 but now uses the sigreturn syscalls. We check for both. */ +#define INSTR_LI_R0_0x6666 0x38006666 +#define INSTR_LI_R0_0x7777 0x38007777 +#define INSTR_LI_R0_NR_sigreturn 0x38000077 +#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC + +#define INSTR_SC 0x44000002 + +/* Since the *-tdep.c files are platform independent (i.e, they may be + used to build cross platform debuggers), we can't include system + headers. Therefore, details concerning the sigcontext structure + must be painstakingly rerecorded. What's worse, if these details + ever change in the header files, they'll have to be changed here + as well. */ + +/* __SIGNAL_FRAMESIZE from */ +#define PPC_LINUX_SIGNAL_FRAMESIZE 64 + +/* From , offsetof(struct sigcontext_struct, regs) == 0x1c */ +#define PPC_LINUX_REGS_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x1c) + +/* From , + offsetof(struct sigcontext_struct, handler) == 0x14 */ +#define PPC_LINUX_HANDLER_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x14) + +/* From , values for PT_NIP, PT_R1, and PT_LNK */ +#define PPC_LINUX_PT_R0 0 +#define PPC_LINUX_PT_R1 1 +#define PPC_LINUX_PT_R2 2 +#define PPC_LINUX_PT_R3 3 +#define PPC_LINUX_PT_R4 4 +#define PPC_LINUX_PT_R5 5 +#define PPC_LINUX_PT_R6 6 +#define PPC_LINUX_PT_R7 7 +#define PPC_LINUX_PT_R8 8 +#define PPC_LINUX_PT_R9 9 +#define PPC_LINUX_PT_R10 10 +#define PPC_LINUX_PT_R11 11 +#define PPC_LINUX_PT_R12 12 +#define PPC_LINUX_PT_R13 13 +#define PPC_LINUX_PT_R14 14 +#define PPC_LINUX_PT_R15 15 +#define PPC_LINUX_PT_R16 16 +#define PPC_LINUX_PT_R17 17 +#define PPC_LINUX_PT_R18 18 +#define PPC_LINUX_PT_R19 19 +#define PPC_LINUX_PT_R20 20 +#define PPC_LINUX_PT_R21 21 +#define PPC_LINUX_PT_R22 22 +#define PPC_LINUX_PT_R23 23 +#define PPC_LINUX_PT_R24 24 +#define PPC_LINUX_PT_R25 25 +#define PPC_LINUX_PT_R26 26 +#define PPC_LINUX_PT_R27 27 +#define PPC_LINUX_PT_R28 28 +#define PPC_LINUX_PT_R29 29 +#define PPC_LINUX_PT_R30 30 +#define PPC_LINUX_PT_R31 31 +#define PPC_LINUX_PT_NIP 32 +#define PPC_LINUX_PT_MSR 33 +#define PPC_LINUX_PT_CTR 35 +#define PPC_LINUX_PT_LNK 36 +#define PPC_LINUX_PT_XER 37 +#define PPC_LINUX_PT_CCR 38 +#define PPC_LINUX_PT_MQ 39 +#define PPC_LINUX_PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ +#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31) +#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1) + +static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); + +/* Determine if pc is in a signal trampoline... + + Ha! That's not what this does at all. wait_for_inferior in + infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a + signal trampoline just after delivery of a signal. But on + GNU/Linux, signal trampolines are used for the return path only. + The kernel sets things up so that the signal handler is called + directly. + + If we use in_sigtramp2() in place of in_sigtramp() (see below) + we'll (often) end up with stop_pc in the trampoline and prev_pc in + the (now exited) handler. The code there will cause a temporary + breakpoint to be set on prev_pc which is not very likely to get hit + again. + + If this is confusing, think of it this way... the code in + wait_for_inferior() needs to be able to detect entry into a signal + trampoline just after a signal is delivered, not after the handler + has been run. + + So, we define in_sigtramp() below to return 1 if the following is + true: + + 1) The previous frame is a real signal trampoline. + + - and - + + 2) pc is at the first or second instruction of the corresponding + handler. + + Why the second instruction? It seems that wait_for_inferior() + never sees the first instruction when single stepping. When a + signal is delivered while stepping, the next instruction that + would've been stepped over isn't, instead a signal is delivered and + the first instruction of the handler is stepped over instead. That + puts us on the second instruction. (I added the test for the + first instruction long after the fact, just in case the observed + behavior is ever fixed.) + + PC_IN_SIGTRAMP is called from blockframe.c as well in order to set + the frame's type (if a SIGTRAMP_FRAME). Because of our strange + definition of in_sigtramp below, we can't rely on the frame's type + getting set correctly from within blockframe.c. This is why we + take pains to set it in init_extra_frame_info(). + + NOTE: cagney/2002-11-10: I suspect the real problem here is that + the get_prev_frame() only initializes the frame's type after the + call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this + code shouldn't be working its way around a bug :-(. */ + +int +ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) +{ + CORE_ADDR lr; + CORE_ADDR sp; + CORE_ADDR tramp_sp; + char buf[4]; + CORE_ADDR handler; + + lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); + if (!ppc_linux_at_sigtramp_return_path (lr)) + return 0; + + sp = read_register (SP_REGNUM); + + if (target_read_memory (sp, buf, sizeof (buf)) != 0) + return 0; + + tramp_sp = extract_unsigned_integer (buf, 4); + + if (target_read_memory (tramp_sp + PPC_LINUX_HANDLER_PTR_OFFSET, buf, + sizeof (buf)) != 0) + return 0; + + handler = extract_unsigned_integer (buf, 4); + + return (pc == handler || pc == handler + 4); +} + +static int +insn_is_sigreturn (unsigned long pcinsn) +{ + switch(pcinsn) + { + case INSTR_LI_R0_0x6666: + case INSTR_LI_R0_0x7777: + case INSTR_LI_R0_NR_sigreturn: + case INSTR_LI_R0_NR_rt_sigreturn: + return 1; + default: + return 0; + } +} + +/* + * The signal handler trampoline is on the stack and consists of exactly + * two instructions. The easiest and most accurate way of determining + * whether the pc is in one of these trampolines is by inspecting the + * instructions. It'd be faster though if we could find a way to do this + * via some simple address comparisons. + */ +static int +ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) +{ + char buf[12]; + unsigned long pcinsn; + if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) + return 0; + + /* extract the instruction at the pc */ + pcinsn = extract_unsigned_integer (buf + 4, 4); + + return ( + (insn_is_sigreturn (pcinsn) + && extract_unsigned_integer (buf + 8, 4) == INSTR_SC) + || + (pcinsn == INSTR_SC + && insn_is_sigreturn (extract_unsigned_integer (buf, 4)))); +} + +static CORE_ADDR +ppc_linux_skip_trampoline_code (CORE_ADDR pc) +{ + char buf[4]; + struct obj_section *sect; + struct objfile *objfile; + unsigned long insn; + CORE_ADDR plt_start = 0; + CORE_ADDR symtab = 0; + CORE_ADDR strtab = 0; + int num_slots = -1; + int reloc_index = -1; + CORE_ADDR plt_table; + CORE_ADDR reloc; + CORE_ADDR sym; + long symidx; + char symname[1024]; + struct minimal_symbol *msymbol; + + /* Find the section pc is in; return if not in .plt */ + sect = find_pc_section (pc); + if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0) + return 0; + + objfile = sect->objfile; + + /* Pick up the instruction at pc. It had better be of the + form + li r11, IDX + + where IDX is an index into the plt_table. */ + + if (target_read_memory (pc, buf, 4) != 0) + return 0; + insn = extract_unsigned_integer (buf, 4); + + if ((insn & 0xffff0000) != 0x39600000 /* li r11, VAL */ ) + return 0; + + reloc_index = (insn << 16) >> 16; + + /* Find the objfile that pc is in and obtain the information + necessary for finding the symbol name. */ + for (sect = objfile->sections; sect < objfile->sections_end; ++sect) + { + const char *secname = sect->the_bfd_section->name; + if (strcmp (secname, ".plt") == 0) + plt_start = sect->addr; + else if (strcmp (secname, ".rela.plt") == 0) + num_slots = ((int) sect->endaddr - (int) sect->addr) / 12; + else if (strcmp (secname, ".dynsym") == 0) + symtab = sect->addr; + else if (strcmp (secname, ".dynstr") == 0) + strtab = sect->addr; + } + + /* Make sure we have all the information we need. */ + if (plt_start == 0 || num_slots == -1 || symtab == 0 || strtab == 0) + return 0; + + /* Compute the value of the plt table */ + plt_table = plt_start + 72 + 8 * num_slots; + + /* Get address of the relocation entry (Elf32_Rela) */ + if (target_read_memory (plt_table + reloc_index, buf, 4) != 0) + return 0; + reloc = extract_unsigned_integer (buf, 4); + + sect = find_pc_section (reloc); + if (!sect) + return 0; + + if (strcmp (sect->the_bfd_section->name, ".text") == 0) + return reloc; + + /* Now get the r_info field which is the relocation type and symbol + index. */ + if (target_read_memory (reloc + 4, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Shift out the relocation type leaving just the symbol index */ + /* symidx = ELF32_R_SYM(symidx); */ + symidx = symidx >> 8; + + /* compute the address of the symbol */ + sym = symtab + symidx * 4; + + /* Fetch the string table index */ + if (target_read_memory (sym, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Fetch the string; we don't know how long it is. Is it possible + that the following will fail because we're trying to fetch too + much? */ + if (target_read_memory (strtab + symidx, symname, sizeof (symname)) != 0) + return 0; + + /* This might not work right if we have multiple symbols with the + same name; the only way to really get it right is to perform + the same sort of lookup as the dynamic linker. */ + msymbol = lookup_minimal_symbol_text (symname, NULL); + if (!msymbol) + return 0; + + return SYMBOL_VALUE_ADDRESS (msymbol); +} + +/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The + signal handler details are different, so we'll handle those here + and call the rs6000 version to do the rest. */ +CORE_ADDR +ppc_linux_frame_saved_pc (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return the NIP in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); + } + else if (get_next_frame (fi) + && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (get_next_frame (fi)) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return LNK in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); + } + else + return rs6000_frame_saved_pc (fi); +} + +void +ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) +{ + rs6000_init_extra_frame_info (fromleaf, fi); + + if (get_next_frame (fi) != 0) + { + /* We're called from get_prev_frame_info; check to see if + this is a signal frame by looking to see if the pc points + at trampoline code */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + deprecated_set_frame_type (fi, SIGTRAMP_FRAME); + else + /* FIXME: cagney/2002-11-10: Is this double bogus? What + happens if the frame has previously been marked as a dummy? */ + deprecated_set_frame_type (fi, NORMAL_FRAME); + } +} + +int +ppc_linux_frameless_function_invocation (struct frame_info *fi) +{ + /* We'll find the wrong thing if we let + rs6000_frameless_function_invocation () search for a signal trampoline */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + return 0; + else + return rs6000_frameless_function_invocation (fi); +} + +void +ppc_linux_frame_init_saved_regs (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr; + int i; + if (deprecated_get_frame_saved_regs (fi)) + return; + + frame_saved_regs_zalloc (fi); + + regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MSR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CCR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_LNK; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CTR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = + regs_addr + 4 * PPC_LINUX_PT_XER; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MQ; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = + regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; + } + else + rs6000_frame_init_saved_regs (fi); +} + +CORE_ADDR +ppc_linux_frame_chain (struct frame_info *thisframe) +{ + /* Kernel properly constructs the frame chain for the handler */ + if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) + return read_memory_integer (get_frame_base (thisframe), 4); + else + return rs6000_frame_chain (thisframe); +} + +/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint + in much the same fashion as memory_remove_breakpoint in mem-break.c, + but is careful not to write back the previous contents if the code + in question has changed in between inserting the breakpoint and + removing it. + + Here is the problem that we're trying to solve... + + Once upon a time, before introducing this function to remove + breakpoints from the inferior, setting a breakpoint on a shared + library function prior to running the program would not work + properly. In order to understand the problem, it is first + necessary to understand a little bit about dynamic linking on + this platform. + + A call to a shared library function is accomplished via a bl + (branch-and-link) instruction whose branch target is an entry + in the procedure linkage table (PLT). The PLT in the object + file is uninitialized. To gdb, prior to running the program, the + entries in the PLT are all zeros. + + Once the program starts running, the shared libraries are loaded + and the procedure linkage table is initialized, but the entries in + the table are not (necessarily) resolved. Once a function is + actually called, the code in the PLT is hit and the function is + resolved. In order to better illustrate this, an example is in + order; the following example is from the gdb testsuite. + + We start the program shmain. + + [kev@arroyo testsuite]$ ../gdb gdb.base/shmain + [...] + + We place two breakpoints, one on shr1 and the other on main. + + (gdb) b shr1 + Breakpoint 1 at 0x100409d4 + (gdb) b main + Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44. + + Examine the instruction (and the immediatly following instruction) + upon which the breakpoint was placed. Note that the PLT entry + for shr1 contains zeros. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : .long 0x0 + 0x100409d8 : .long 0x0 + + Now run 'til main. + + (gdb) r + Starting program: gdb.base/shmain + Breakpoint 1 at 0xffaf790: file gdb.base/shr1.c, line 19. + + Breakpoint 2, main () + at gdb.base/shmain.c:44 + 44 g = 1; + + Examine the PLT again. Note that the loading of the shared + library has initialized the PLT to code which loads a constant + (which I think is an index into the GOT) into r11 and then + branchs a short distance to the code which actually does the + resolving. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : li r11,4 + 0x100409d8 : b 0x10040984 + (gdb) c + Continuing. + + Breakpoint 1, shr1 (x=1) + at gdb.base/shr1.c:19 + 19 l = 1; + + Now we've hit the breakpoint at shr1. (The breakpoint was + reset from the PLT entry to the actual shr1 function after the + shared library was loaded.) Note that the PLT entry has been + resolved to contain a branch that takes us directly to shr1. + (The real one, not the PLT entry.) + + (gdb) x/2i 0x100409d4 + 0x100409d4 : b 0xffaf76c + 0x100409d8 : b 0x10040984 + + The thing to note here is that the PLT entry for shr1 has been + changed twice. + + Now the problem should be obvious. GDB places a breakpoint (a + trap instruction) on the zero value of the PLT entry for shr1. + Later on, after the shared library had been loaded and the PLT + initialized, GDB gets a signal indicating this fact and attempts + (as it always does when it stops) to remove all the breakpoints. + + The breakpoint removal was causing the former contents (a zero + word) to be written back to the now initialized PLT entry thus + destroying a portion of the initialization that had occurred only a + short time ago. When execution continued, the zero word would be + executed as an instruction an an illegal instruction trap was + generated instead. (0 is not a legal instruction.) + + The fix for this problem was fairly straightforward. The function + memory_remove_breakpoint from mem-break.c was copied to this file, + modified slightly, and renamed to ppc_linux_memory_remove_breakpoint. + In tm-linux.h, MEMORY_REMOVE_BREAKPOINT is defined to call this new + function. + + The differences between ppc_linux_memory_remove_breakpoint () and + memory_remove_breakpoint () are minor. All that the former does + that the latter does not is check to make sure that the breakpoint + location actually contains a breakpoint (trap instruction) prior + to attempting to write back the old contents. If it does contain + a trap instruction, we allow the old contents to be written back. + Otherwise, we silently do nothing. + + The big question is whether memory_remove_breakpoint () should be + changed to have the same functionality. The downside is that more + traffic is generated for remote targets since we'll have an extra + fetch of a memory word each time a breakpoint is removed. + + For the time being, we'll leave this self-modifying-code-friendly + version in ppc-linux-tdep.c, but it ought to be migrated somewhere + else in the event that some other platform has similar needs with + regard to removing breakpoints in some potentially self modifying + code. */ +int +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +{ + const unsigned char *bp; + int val; + int bplen; + char old_contents[BREAKPOINT_MAX]; + + /* Determine appropriate breakpoint contents and size for this address. */ + bp = BREAKPOINT_FROM_PC (&addr, &bplen); + if (bp == NULL) + error ("Software breakpoints not implemented for this target."); + + val = target_read_memory (addr, old_contents, bplen); + + /* If our breakpoint is no longer at the address, this means that the + program modified the code on us, so it is wrong to put back the + old value */ + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) + val = target_write_memory (addr, contents_cache, bplen); + + return val; +} + +/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather + than the 32 bit SYSV R4 ABI structure return convention - all + structures, no matter their size, are put in memory. Vectors, + which were added later, do get returned in a register though. */ + +static enum return_value_convention +ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, + struct regcache *regcache, void *readbuf, + const void *writebuf) +{ + if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT + || TYPE_CODE (valtype) == TYPE_CODE_UNION) + && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8) + && TYPE_VECTOR (valtype))) + return RETURN_VALUE_STRUCT_CONVENTION; + else + return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf, + writebuf); +} + +/* Fetch (and possibly build) an appropriate link_map_offsets + structure for GNU/Linux PPC targets using the struct offsets + defined in link.h (but without actual reference to that file). + + This makes it possible to access GNU/Linux PPC shared libraries + from a GDB that was not built on an GNU/Linux PPC host (for cross + debugging). */ + +struct link_map_offsets * +ppc_linux_svr4_fetch_link_map_offsets (void) +{ + static struct link_map_offsets lmo; + static struct link_map_offsets *lmp = NULL; + + if (lmp == NULL) + { + lmp = &lmo; + + lmo.r_debug_size = 8; /* The actual size is 20 bytes, but + this is all we need. */ + lmo.r_map_offset = 4; + lmo.r_map_size = 4; + + lmo.link_map_size = 20; /* The actual size is 560 bytes, but + this is all we need. */ + lmo.l_addr_offset = 0; + lmo.l_addr_size = 4; + + lmo.l_name_offset = 4; + lmo.l_name_size = 4; + + lmo.l_next_offset = 12; + lmo.l_next_size = 4; + + lmo.l_prev_offset = 16; + lmo.l_prev_size = 4; + } + + return lmp; +} + + +/* Macros for matching instructions. Note that, since all the + operands are masked off before they're or-ed into the instruction, + you can use -1 to make masks. */ + +#define insn_d(opcd, rts, ra, d) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xffff)) + +#define insn_ds(opcd, rts, ra, d, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xfffc) \ + | ((xo) & 0x3)) + +#define insn_xfx(opcd, rts, spr, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((spr) & 0x1f) << 16) \ + | (((spr) & 0x3e0) << 6) \ + | (((xo) & 0x3ff) << 1)) + +/* Read a PPC instruction from memory. PPC instructions are always + big-endian, no matter what endianness the program is running in, so + we can't use read_memory_integer or one of its friends here. */ +static unsigned int +read_insn (CORE_ADDR pc) +{ + unsigned char buf[4]; + + read_memory (pc, buf, 4); + return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; +} + + +/* An instruction to match. */ +struct insn_pattern +{ + unsigned int mask; /* mask the insn with this... */ + unsigned int data; /* ...and see if it matches this. */ + int optional; /* If non-zero, this insn may be absent. */ +}; + +/* Return non-zero if the instructions at PC match the series + described in PATTERN, or zero otherwise. PATTERN is an array of + 'struct insn_pattern' objects, terminated by an entry whose mask is + zero. + + When the match is successful, fill INSN[i] with what PATTERN[i] + matched. If PATTERN[i] is optional, and the instruction wasn't + present, set INSN[i] to 0 (which is not a valid PPC instruction). + INSN should have as many elements as PATTERN. Note that, if + PATTERN contains optional instructions which aren't present in + memory, then INSN will have holes, so INSN[i] isn't necessarily the + i'th instruction in memory. */ +static int +insns_match_pattern (CORE_ADDR pc, + struct insn_pattern *pattern, + unsigned int *insn) +{ + int i; + + for (i = 0; pattern[i].mask; i++) + { + insn[i] = read_insn (pc); + if ((insn[i] & pattern[i].mask) == pattern[i].data) + pc += 4; + else if (pattern[i].optional) + insn[i] = 0; + else + return 0; + } + + return 1; +} + + +/* Return the 'd' field of the d-form instruction INSN, properly + sign-extended. */ +static CORE_ADDR +insn_d_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000); +} + + +/* Return the 'ds' field of the ds-form instruction INSN, with the two + zero bits concatenated at the right, and properly + sign-extended. */ +static CORE_ADDR +insn_ds_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000); +} + + +/* If DESC is the address of a 64-bit PowerPC GNU/Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + +/* Pattern for the standard linkage function. These are built by + build_plt_stub in elf64-ppc.c, whose GLINK argument is always + zero. */ +static struct insn_pattern ppc64_standard_linkage[] = + { + /* addis r12, r2, */ + { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 }, + + /* std r2, 40(r1) */ + { -1, insn_ds (62, 2, 1, 40, 0), 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* ld r2, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* mtctr r11 */ + { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), + 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* bctr */ + { -1, 0x4e800420, 0 }, + + { 0, 0, 0 } + }; +#define PPC64_STANDARD_LINKAGE_LEN \ + (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0])) + + +/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB + calls a "solib trampoline". */ +static int +ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name) +{ + /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain. + + It's not specifically solib call trampolines that are the issue. + Any call from one function to another function that uses a + different TOC requires a trampoline, to save the caller's TOC + pointer and then load the callee's TOC. An executable or shared + library may have more than one TOC, so even intra-object calls + may require a trampoline. Since executable and shared libraries + will all have their own distinct TOCs, every inter-object call is + also an inter-TOC call, and requires a trampoline --- so "solib + call trampolines" are just a special case. + + The 64-bit PowerPC GNU/Linux ABI calls these call trampolines + "linkage functions". Since they need to be near the functions + that call them, they all appear in .text, not in any special + section. The .plt section just contains an array of function + descriptors, from which the linkage functions load the callee's + entry point, TOC value, and environment pointer. So + in_plt_section is useless. The linkage functions don't have any + special linker symbols to name them, either. + + The only way I can see to recognize them is to actually look at + their code. They're generated by ppc_build_one_stub and some + other functions in bfd/elf64-ppc.c, so that should show us all + the instruction sequences we need to recognize. */ + unsigned int insn[PPC64_STANDARD_LINKAGE_LEN]; + + return insns_match_pattern (pc, ppc64_standard_linkage, insn); +} + + +/* When the dynamic linker is doing lazy symbol resolution, the first + call to a function in another object will go like this: + + - The user's function calls the linkage function: + + 100007c4: 4b ff fc d5 bl 10000498 + 100007c8: e8 41 00 28 ld r2,40(r1) + + - The linkage function loads the entry point (and other stuff) from + the function descriptor in the PLT, and jumps to it: + + 10000498: 3d 82 00 00 addis r12,r2,0 + 1000049c: f8 41 00 28 std r2,40(r1) + 100004a0: e9 6c 80 98 ld r11,-32616(r12) + 100004a4: e8 4c 80 a0 ld r2,-32608(r12) + 100004a8: 7d 69 03 a6 mtctr r11 + 100004ac: e9 6c 80 a8 ld r11,-32600(r12) + 100004b0: 4e 80 04 20 bctr + + - But since this is the first time that PLT entry has been used, it + sends control to its glink entry. That loads the number of the + PLT entry and jumps to the common glink0 code: + + 10000c98: 38 00 00 00 li r0,0 + 10000c9c: 4b ff ff dc b 10000c78 + + - The common glink0 code then transfers control to the dynamic + linker's fixup code: + + 10000c78: e8 41 00 28 ld r2,40(r1) + 10000c7c: 3d 82 00 00 addis r12,r2,0 + 10000c80: e9 6c 80 80 ld r11,-32640(r12) + 10000c84: e8 4c 80 88 ld r2,-32632(r12) + 10000c88: 7d 69 03 a6 mtctr r11 + 10000c8c: e9 6c 80 90 ld r11,-32624(r12) + 10000c90: 4e 80 04 20 bctr + + Eventually, this code will figure out how to skip all of this, + including the dynamic linker. At the moment, we just get through + the linkage function. */ + +/* If the current thread is about to execute a series of instructions + at PC matching the ppc64_standard_linkage pattern, and INSN is the result + from that pattern match, return the code address to which the + standard linkage function will send them. (This doesn't deal with + dynamic linker lazy symbol resolution stubs.) */ +static CORE_ADDR +ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + /* The address of the function descriptor this linkage function + references. */ + CORE_ADDR desc + = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2) + + (insn_d_field (insn[0]) << 16) + + insn_ds_field (insn[2])); + + /* The first word of the descriptor is the entry point. Return that. */ + return ppc64_desc_entry_point (desc); +} + + +/* Given that we've begun executing a call trampoline at PC, return + the entry point of the function the trampoline will go to. */ +static CORE_ADDR +ppc64_skip_trampoline_code (CORE_ADDR pc) +{ + unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN]; + + if (insns_match_pattern (pc, ppc64_standard_linkage, + ppc64_standard_linkage_insn)) + return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn); + else + return 0; +} + + +/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64 + GNU/Linux. + + Usually a function pointer's representation is simply the address + of the function. On GNU/Linux on the 64-bit PowerPC however, a + function pointer is represented by a pointer to a TOC entry. This + TOC entry contains three words, the first word is the address of + the function, the second word is the TOC pointer (r2), and the + third word is the static chain value. Throughout GDB it is + currently assumed that a function pointer contains the address of + the function, which is not easy to fix. In addition, the + conversion of a function address to a function pointer would + require allocation of a TOC entry in the inferior's memory space, + with all its drawbacks. To be able to call C++ virtual methods in + the inferior (which are called via function pointers), + find_function_addr uses this function to get the function address + from a function pointer. */ + +/* If ADDR points at what is clearly a function descriptor, transform + it into the address of the corresponding function. Be + conservative, otherwize GDB will do the transformation on any + random addresses such as occures when there is no symbol table. */ + +static CORE_ADDR +ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + struct section_table *s = target_section_by_addr (targ, addr); + + /* Check if ADDR points to a function descriptor. */ + if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) + return get_target_memory_unsigned (targ, addr, 8); + + return addr; +} + +#ifdef CRASH_MERGE +enum { + PPC_ELF_NGREG = 48, + PPC_ELF_NFPREG = 33, + PPC_ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (PPC_ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (PPC_ELF_NFPREG * 8) +}; +#else +enum { + ELF_NGREG = 48, + ELF_NFPREG = 33, + ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) +}; +#endif + +void +ppc_linux_supply_gregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (regi, buf + 4 * regi); + + supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); + supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); + supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); + supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); + supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); + if (tdep->ppc_mq_regnum != -1) + supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); + supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); +} + +void +ppc_linux_supply_fpregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (FP0_REGNUM + regi, buf + 8 * regi); + + /* The FPSCR is stored in the low order word of the last doubleword in the + fpregset. */ + supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); +} + +/* + Use a local version of this function to get the correct types for regsets. +*/ + +static void +fetch_core_registers (char *core_reg_sect, + unsigned core_reg_size, + int which, + CORE_ADDR reg_addr) +{ + if (which == 0) + { + if (core_reg_size == ELF_GREGSET_SIZE) + ppc_linux_supply_gregset (core_reg_sect); + else + warning ("wrong size gregset struct in core file"); + } + else if (which == 2) + { + if (core_reg_size == ELF_FPREGSET_SIZE) + ppc_linux_supply_fpregset (core_reg_sect); + else + warning ("wrong size fpregset struct in core file"); + } +} + +/* Register that we are able to handle ELF file formats using standard + procfs "regset" structures. */ + +static struct core_fns ppc_linux_regset_core_fns = +{ + bfd_target_elf_flavour, /* core_flavour */ + default_check_format, /* check_format */ + default_core_sniffer, /* core_sniffer */ + fetch_core_registers, /* core_read_registers */ + NULL /* next */ +}; + +static void +ppc_linux_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if (tdep->wordsize == 4) + { + /* Until November 2001, gcc did not comply with the 32 bit SysV + R4 ABI requirement that structures less than or equal to 8 + bytes should be returned in registers. Instead GCC was using + the the AIX/PowerOpen ABI - everything returned in memory + (well ignoring vectors that is). When this was corrected, it + wasn't fixed for GNU/Linux native platform. Use the + PowerOpen struct convention. */ + set_gdbarch_return_value (gdbarch, ppc_linux_return_value); + + /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding + *_push_arguments(). The same remarks hold for the methods below. */ + set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); + set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); + set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); + + set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, + ppc_linux_frame_init_saved_regs); + set_gdbarch_deprecated_init_extra_frame_info (gdbarch, + ppc_linux_init_extra_frame_info); + + set_gdbarch_memory_remove_breakpoint (gdbarch, + ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, + ppc_linux_skip_trampoline_code); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); + } + + if (tdep->wordsize == 8) + { + /* Handle PPC64 GNU/Linux function pointers (which are really + function descriptors). */ + set_gdbarch_convert_from_func_ptr_addr + (gdbarch, ppc64_linux_convert_from_func_ptr_addr); + + set_gdbarch_in_solib_call_trampoline + (gdbarch, ppc64_in_solib_call_trampoline); + set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); + + /* PPC64 malloc's entry-point is called ".malloc". */ + set_gdbarch_name_of_malloc (gdbarch, ".malloc"); + } +} + +void +_initialize_ppc_linux_tdep (void) +{ + /* Register for all sub-familes of the POWER/PowerPC: 32-bit and + 64-bit PowerPC, and the older rs6k. */ + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, + ppc_linux_init_abi); + add_core_fns (&ppc_linux_regset_core_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/symfile.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/symfile.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/symfile.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/symfile.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3644 @@ +/* Generic symbol file reading for the GNU debugger, GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support, using pieces from other GDB modules. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfdlink.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "source.h" +#include "gdbcmd.h" +#include "breakpoint.h" +#include "language.h" +#include "complaints.h" +#include "demangle.h" +#include "inferior.h" /* for write_pc */ +#include "filenames.h" /* for DOSish file names */ +#include "gdb-stabs.h" +#include "gdb_obstack.h" +#include "completer.h" +#include "bcache.h" +#include "hashtab.h" +#include "readline/readline.h" +#include "gdb_assert.h" +#include "block.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifdef HPUXHPPA + +/* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + +extern int hp_som_som_object_present; +extern int hp_cxx_exception_support_initialized; +#define RESET_HP_UX_GLOBALS() do {\ + hp_som_som_object_present = 0; /* indicates HP-compiled code */ \ + hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \ + } while (0) +#endif + +int (*ui_load_progress_hook) (const char *section, unsigned long num); +void (*show_load_progress) (const char *section, + unsigned long section_sent, + unsigned long section_size, + unsigned long total_sent, + unsigned long total_size); +void (*pre_add_symbol_hook) (char *); +void (*post_add_symbol_hook) (void); +void (*target_new_objfile_hook) (struct objfile *); + +static void clear_symtab_users_cleanup (void *ignore); + +/* Global variables owned by this file */ +int readnow_symbol_files; /* Read full symbols immediately */ + +/* External variables and functions referenced. */ + +extern void report_transfer_performance (unsigned long, time_t, time_t); + +/* Functions this file defines */ + +#if 0 +static int simple_read_overlay_region_table (void); +static void simple_free_overlay_region_table (void); +#endif + +static void set_initial_language (void); + +static void load_command (char *, int); + +static void symbol_file_add_main_1 (char *args, int from_tty, int flags); + +static void add_symbol_file_command (char *, int); + +static void add_shared_symbol_files_command (char *, int); + +static void reread_separate_symbols (struct objfile *objfile); + +static void cashier_psymtab (struct partial_symtab *); + +bfd *symfile_bfd_open (char *); + +int get_section_index (struct objfile *, char *); + +static void find_sym_fns (struct objfile *); + +static void decrement_reading_symtab (void *); + +static void overlay_invalidate_all (void); + +static int overlay_is_mapped (struct obj_section *); + +void list_overlays_command (char *, int); + +void map_overlay_command (char *, int); + +void unmap_overlay_command (char *, int); + +static void overlay_auto_command (char *, int); + +static void overlay_manual_command (char *, int); + +static void overlay_off_command (char *, int); + +static void overlay_load_command (char *, int); + +static void overlay_command (char *, int); + +static void simple_free_overlay_table (void); + +static void read_target_long_array (CORE_ADDR, unsigned int *, int); + +static int simple_read_overlay_table (void); + +static int simple_overlay_update_1 (struct obj_section *); + +static void add_filename_language (char *ext, enum language lang); + +static void set_ext_lang_command (char *args, int from_tty); + +static void info_ext_lang_command (char *args, int from_tty); + +static char *find_separate_debug_file (struct objfile *objfile); + +static void init_filename_language_table (void); + +void _initialize_symfile (void); + +/* List of all available sym_fns. On gdb startup, each object file reader + calls add_symtab_fns() to register information on each format it is + prepared to read. */ + +static struct sym_fns *symtab_fns = NULL; + +/* Flag for whether user will be reloading symbols multiple times. + Defaults to ON for VxWorks, otherwise OFF. */ + +#ifdef SYMBOL_RELOADING_DEFAULT +int symbol_reloading = SYMBOL_RELOADING_DEFAULT; +#else +int symbol_reloading = 0; +#endif + +/* If non-zero, shared library symbols will be added automatically + when the inferior is created, new libraries are loaded, or when + attaching to the inferior. This is almost always what users will + want to have happen; but for very large programs, the startup time + will be excessive, and so if this is a problem, the user can clear + this flag and then add the shared library symbols as needed. Note + that there is a potential for confusion, since if the shared + library symbols are not loaded, commands like "info fun" will *not* + report all the functions that are actually present. */ + +int auto_solib_add = 1; + +/* For systems that support it, a threshold size in megabytes. If + automatically adding a new library's symbol table to those already + known to the debugger would cause the total shared library symbol + size to exceed this threshhold, then the shlib's symbols are not + added. The threshold is ignored if the user explicitly asks for a + shlib to be added, such as when using the "sharedlibrary" + command. */ + +int auto_solib_limit; + + +/* This compares two partial symbols by names, using strcmp_iw_ordered + for the comparison. */ + +static int +compare_psymbols (const void *s1p, const void *s2p) +{ + struct partial_symbol *const *s1 = s1p; + struct partial_symbol *const *s2 = s2p; + + return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1), + SYMBOL_NATURAL_NAME (*s2)); +} + +void +sort_pst_symbols (struct partial_symtab *pst) +{ + /* Sort the global list; don't sort the static list */ + + qsort (pst->objfile->global_psymbols.list + pst->globals_offset, + pst->n_global_syms, sizeof (struct partial_symbol *), + compare_psymbols); +} + +/* Make a null terminated copy of the string at PTR with SIZE characters in + the obstack pointed to by OBSTACKP . Returns the address of the copy. + Note that the string at PTR does not have to be null terminated, I.E. it + may be part of a larger string and we are only saving a substring. */ + +char * +obsavestring (const char *ptr, int size, struct obstack *obstackp) +{ + char *p = (char *) obstack_alloc (obstackp, size + 1); + /* Open-coded memcpy--saves function call time. These strings are usually + short. FIXME: Is this really still true with a compiler that can + inline memcpy? */ + { + const char *p1 = ptr; + char *p2 = p; + const char *end = ptr + size; + while (p1 != end) + *p2++ = *p1++; + } + p[size] = 0; + return p; +} + +/* Concatenate strings S1, S2 and S3; return the new string. Space is found + in the obstack pointed to by OBSTACKP. */ + +char * +obconcat (struct obstack *obstackp, const char *s1, const char *s2, + const char *s3) +{ + int len = strlen (s1) + strlen (s2) + strlen (s3) + 1; + char *val = (char *) obstack_alloc (obstackp, len); + strcpy (val, s1); + strcat (val, s2); + strcat (val, s3); + return val; +} + +/* True if we are nested inside psymtab_to_symtab. */ + +int currently_reading_symtab = 0; + +static void +decrement_reading_symtab (void *dummy) +{ + currently_reading_symtab--; +} + +/* Get the symbol table that corresponds to a partial_symtab. + This is fast after the first time you do it. In fact, there + is an even faster macro PSYMTAB_TO_SYMTAB that does the fast + case inline. */ + +struct symtab * +psymtab_to_symtab (struct partial_symtab *pst) +{ + /* If it's been looked up before, return it. */ + if (pst->symtab) + return pst->symtab; + + /* If it has not yet been read in, read it. */ + if (!pst->readin) + { + struct cleanup *back_to = make_cleanup (decrement_reading_symtab, NULL); + currently_reading_symtab++; + (*pst->read_symtab) (pst); + do_cleanups (back_to); + } + + return pst->symtab; +} + +/* Remember the lowest-addressed loadable section we've seen. + This function is called via bfd_map_over_sections. + + In case of equal vmas, the section with the largest size becomes the + lowest-addressed loadable section. + + If the vmas and sizes are equal, the last section is considered the + lowest-addressed loadable section. */ + +void +find_lowest_section (bfd *abfd, asection *sect, void *obj) +{ + asection **lowest = (asection **) obj; + + if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD)) + return; + if (!*lowest) + *lowest = sect; /* First loadable section */ + else if (bfd_section_vma (abfd, *lowest) > bfd_section_vma (abfd, sect)) + *lowest = sect; /* A lower loadable section */ + else if (bfd_section_vma (abfd, *lowest) == bfd_section_vma (abfd, sect) + && (bfd_section_size (abfd, (*lowest)) + <= bfd_section_size (abfd, sect))) + *lowest = sect; +} + +/* Create a new section_addr_info, with room for NUM_SECTIONS. */ + +struct section_addr_info * +alloc_section_addr_info (size_t num_sections) +{ + struct section_addr_info *sap; + size_t size; + + size = (sizeof (struct section_addr_info) + + sizeof (struct other_sections) * (num_sections - 1)); + sap = (struct section_addr_info *) xmalloc (size); + memset (sap, 0, size); + sap->num_sections = num_sections; + + return sap; +} + +/* Build (allocate and populate) a section_addr_info struct from + an existing section table. */ + +extern struct section_addr_info * +build_section_addr_info_from_section_table (const struct section_table *start, + const struct section_table *end) +{ + struct section_addr_info *sap; + const struct section_table *stp; + int oidx; + + sap = alloc_section_addr_info (end - start); + + for (stp = start, oidx = 0; stp != end; stp++) + { + if (bfd_get_section_flags (stp->bfd, + stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD) + && oidx < end - start) + { + sap->other[oidx].addr = stp->addr; + sap->other[oidx].name + = xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section)); + sap->other[oidx].sectindex = stp->the_bfd_section->index; + oidx++; + } + } + + return sap; +} + + +/* Free all memory allocated by build_section_addr_info_from_section_table. */ + +extern void +free_section_addr_info (struct section_addr_info *sap) +{ + int idx; + + for (idx = 0; idx < sap->num_sections; idx++) + if (sap->other[idx].name) + xfree (sap->other[idx].name); + xfree (sap); +} + + +/* Initialize OBJFILE's sect_index_* members. */ +static void +init_objfile_sect_indices (struct objfile *objfile) +{ + asection *sect; + int i; + + sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (sect) + objfile->sect_index_text = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".data"); + if (sect) + objfile->sect_index_data = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".bss"); + if (sect) + objfile->sect_index_bss = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".rodata"); + if (sect) + objfile->sect_index_rodata = sect->index; + + /* This is where things get really weird... We MUST have valid + indices for the various sect_index_* members or gdb will abort. + So if for example, there is no ".text" section, we have to + accomodate that. Except when explicitly adding symbol files at + some address, section_offsets contains nothing but zeros, so it + doesn't matter which slot in section_offsets the individual + sect_index_* members index into. So if they are all zero, it is + safe to just point all the currently uninitialized indices to the + first slot. */ + + for (i = 0; i < objfile->num_sections; i++) + { + if (ANOFFSET (objfile->section_offsets, i) != 0) + { + break; + } + } + if (i == objfile->num_sections) + { + if (objfile->sect_index_text == -1) + objfile->sect_index_text = 0; + if (objfile->sect_index_data == -1) + objfile->sect_index_data = 0; + if (objfile->sect_index_bss == -1) + objfile->sect_index_bss = 0; + if (objfile->sect_index_rodata == -1) + objfile->sect_index_rodata = 0; + } +} + + +/* Parse the user's idea of an offset for dynamic linking, into our idea + of how to represent it for fast symbol reading. This is the default + version of the sym_fns.sym_offsets function for symbol readers that + don't need to do anything special. It allocates a section_offsets table + for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */ + +void +default_symfile_offsets (struct objfile *objfile, + struct section_addr_info *addrs) +{ + int i; + + objfile->num_sections = bfd_count_sections (objfile->obfd); + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + memset (objfile->section_offsets, 0, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + + /* Now calculate offsets for section that were specified by the + caller. */ + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + struct other_sections *osp ; + + osp = &addrs->other[i] ; + if (osp->addr == 0) + continue; + + /* Record all sections in offsets */ + /* The section_offsets in the objfile are here filled in using + the BFD index. */ + (objfile->section_offsets)->offsets[osp->sectindex] = osp->addr; + } + + /* Remember the bfd indexes for the .text, .data, .bss and + .rodata sections. */ + init_objfile_sect_indices (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + OBJFILE is where the symbols are to be read from. + + ADDRS is the list of section load addresses. If the user has given + an 'add-symbol-file' command, then this is the list of offsets and + addresses he or she provided as arguments to the command; or, if + we're handling a shared library, these are the actual addresses the + sections are loaded at, according to the inferior's dynamic linker + (as gleaned by GDB's shared library code). We convert each address + into an offset from the section VMA's as it appears in the object + file, and then call the file's sym_offsets function to convert this + into a format-specific offset table --- a `struct section_offsets'. + If ADDRS is non-zero, OFFSETS must be zero. + + OFFSETS is a table of section offsets already in the right + format-specific representation. NUM_OFFSETS is the number of + elements present in OFFSETS->offsets. If OFFSETS is non-zero, we + assume this is the proper table the call to sym_offsets described + above would produce. Instead of calling sym_offsets, we just dump + it right into objfile->section_offsets. (When we're re-reading + symbols from an objfile, we don't have the original load address + list any more; all we have is the section offset table.) If + OFFSETS is non-zero, ADDRS must be zero. + + MAINLINE is nonzero if this is the main symbol file, or zero if + it's an extra symbol file such as dynamically loaded code. + + VERBO is nonzero if the caller has printed a verbose message about + the symbol reading (and complaints can be more terse about it). */ + +void +syms_from_objfile (struct objfile *objfile, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, + int verbo) +{ + struct section_addr_info *local_addr = NULL; + struct cleanup *old_chain; + + gdb_assert (! (addrs && offsets)); + + init_entry_point_info (objfile); + find_sym_fns (objfile); + + if (objfile->sf == NULL) + return; /* No symbols. */ + + /* Make sure that partially constructed symbol tables will be cleaned up + if an error occurs during symbol reading. */ + old_chain = make_cleanup_free_objfile (objfile); + + /* If ADDRS and OFFSETS are both NULL, put together a dummy address + list. We now establish the convention that an addr of zero means + no load address was specified. */ + if (! addrs && ! offsets) + { + local_addr + = alloc_section_addr_info (bfd_count_sections (objfile->obfd)); + make_cleanup (xfree, local_addr); + addrs = local_addr; + } + + /* Now either addrs or offsets is non-zero. */ + + if (mainline) + { + /* We will modify the main symbol table, make sure that all its users + will be cleaned up if an error occurs during symbol reading. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Since no error yet, throw away the old symbol table. */ + + if (symfile_objfile != NULL) + { + free_objfile (symfile_objfile); + symfile_objfile = NULL; + } + + /* Currently we keep symbols from the add-symbol-file command. + If the user wants to get rid of them, they should do "symbol-file" + without arguments first. Not sure this is the best behavior + (PR 2207). */ + + (*objfile->sf->sym_new_init) (objfile); + } + + /* Convert addr into an offset rather than an absolute address. + We find the lowest address of a loaded segment in the objfile, + and assume that is where that got loaded. + + We no longer warn if the lowest section is not a text segment (as + happens for the PA64 port. */ + if (!mainline && addrs && addrs->other[0].name) + { + asection *lower_sect; + asection *sect; + CORE_ADDR lower_offset; + int i; + + /* Find lowest loadable section to be used as starting point for + continguous sections. FIXME!! won't work without call to find + .text first, but this assumes text is lowest section. */ + lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (lower_sect == NULL) + bfd_map_over_sections (objfile->obfd, find_lowest_section, + &lower_sect); + if (lower_sect == NULL) + warning ("no loadable sections found in added symbol-file %s", + objfile->name); + else + if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) + warning ("Lowest section in %s is %s at %s", + objfile->name, + bfd_section_name (objfile->obfd, lower_sect), + paddr (bfd_section_vma (objfile->obfd, lower_sect))); + if (lower_sect != NULL) + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); + else + lower_offset = 0; + + /* Calculate offsets for the loadable sections. + FIXME! Sections must be in order of increasing loadable section + so that contiguous sections can use the lower-offset!!! + + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to + the offset of the highest loadable section lower than it + (the loadable section directly below it in memory). + this_offset = lower_offset = lower_addr - lower_orig_addr */ + + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + if (addrs->other[i].addr != 0) + { + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); + if (sect) + { + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); + lower_offset = addrs->other[i].addr; + /* This is the index used by BFD. */ + addrs->other[i].sectindex = sect->index ; + } + else + { + warning ("section %s not found in %s", + addrs->other[i].name, + objfile->name); + addrs->other[i].addr = 0; + } + } + else + addrs->other[i].addr = lower_offset; + } + } + + /* Initialize symbol reading routines for this objfile, allow complaints to + appear for this new file, and record how verbose to be, then do the + initial symbol reading for this file. */ + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, verbo); + + if (addrs) + (*objfile->sf->sym_offsets) (objfile, addrs); + else + { + size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets); + + /* Just copy in the offset table directly as given to us. */ + objfile->num_sections = num_offsets; + objfile->section_offsets + = ((struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, size)); + memcpy (objfile->section_offsets, offsets, size); + + init_objfile_sect_indices (objfile); + } + +#ifndef DEPRECATED_IBM6000_TARGET + /* This is a SVR4/SunOS specific hack, I think. In any event, it + screws RS/6000. sym_offsets should be doing this sort of thing, + because it knows the mapping between bfd sections and + section_offsets. */ + /* This is a hack. As far as I can tell, section offsets are not + target dependent. They are all set to addr with a couple of + exceptions. The exceptions are sysvr4 shared libraries, whose + offsets are kept in solib structures anyway and rs6000 xcoff + which handles shared libraries in a completely unique way. + + Section offsets are built similarly, except that they are built + by adding addr in all cases because there is no clear mapping + from section_offsets into actual sections. Note that solib.c + has a different algorithm for finding section offsets. + + These should probably all be collapsed into some target + independent form of shared library support. FIXME. */ + + if (addrs) + { + struct obj_section *s; + + /* Map section offsets in "addr" back to the object's + sections by comparing the section names with bfd's + section names. Then adjust the section address by + the offset. */ /* for gdb/13815 */ + + ALL_OBJFILE_OSECTIONS (objfile, s) + { + CORE_ADDR s_addr = 0; + int i; + + for (i = 0; + !s_addr && i < addrs->num_sections && addrs->other[i].name; + i++) + if (strcmp (bfd_section_name (s->objfile->obfd, + s->the_bfd_section), + addrs->other[i].name) == 0) + s_addr = addrs->other[i].addr; /* end added for gdb/13815 */ + + s->addr -= s->offset; + s->addr += s_addr; + s->endaddr -= s->offset; + s->endaddr += s_addr; + s->offset += s_addr; + } + } + +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, struct minimal_symbol *); + patch_load_module(objfile, NULL); + } +#endif +#endif /* not DEPRECATED_IBM6000_TARGET */ + + (*objfile->sf->sym_read) (objfile, mainline); + + /* Don't allow char * to have a typename (else would get caddr_t). + Ditto void *. FIXME: Check whether this is now done by all the + symbol readers themselves (many of them now do), and if so remove + it from here. */ + + TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0; + TYPE_NAME (lookup_pointer_type (builtin_type_void)) = 0; + + /* Mark the objfile has having had initial symbol read attempted. Note + that this does not mean we found any symbols... */ + + objfile->flags |= OBJF_SYMS; + + /* Discard cleanups as symbol reading was successful. */ + + discard_cleanups (old_chain); +} + +/* Perform required actions after either reading in the initial + symbols for a new objfile, or mapping in the symbols from a reusable + objfile. */ + +void +new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) +{ + + /* If this is the main symbol file we have to clean up all users of the + old main symbol file. Otherwise it is sufficient to fixup all the + breakpoints that may have been redefined by this symbol file. */ + if (mainline) + { + /* OK, make it the "real" symbol file. */ + symfile_objfile = objfile; + + clear_symtab_users (); + } + else + { + breakpoint_re_set (); + } + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, verbo); +} + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + NAME is the file name (which will be tilde-expanded and made + absolute herein) (but we don't free or modify NAME itself). + + FROM_TTY says how verbose to be. + + MAINLINE specifies whether this is the main symbol file, or whether + it's an extra symbol file such as dynamically loaded code. + + ADDRS, OFFSETS, and NUM_OFFSETS are as described for + syms_from_objfile, above. ADDRS is ignored when MAINLINE is + non-zero. + + Upon success, returns a pointer to the objfile that was added. + Upon failure, jumps back to command level (never returns). */ +static struct objfile * +symbol_file_add_with_addrs_or_offsets (char *name, int from_tty, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, int flags) +{ + struct objfile *objfile; + struct partial_symtab *psymtab; + char *debugfile; + bfd *abfd; + struct section_addr_info *orig_addrs; + struct cleanup *my_cleanups; + + /* Open a bfd for the file, and give user a chance to burp if we'd be + interactively wiping out any existing symbols. */ + + abfd = symfile_bfd_open (name); + + if ((have_full_symbols () || have_partial_symbols ()) + && mainline + && from_tty + && !query ("Load new symbol table from \"%s\"? ", name)) + error ("Not confirmed."); + + objfile = allocate_objfile (abfd, flags); + + orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); + my_cleanups = make_cleanup (xfree, orig_addrs); + if (addrs) + { + int i; + orig_addrs->num_sections = addrs->num_sections; + for (i = 0; i < addrs->num_sections; i++) + orig_addrs->other[i] = addrs->other[i]; + } + + /* We either created a new mapped symbol table, mapped an existing + symbol table file which has not had initial symbol reading + performed, or need to read an unmapped symbol table. */ + if (from_tty || info_verbose) + { + if (pre_add_symbol_hook) + pre_add_symbol_hook (name); + else + { + printf_unfiltered ("Reading symbols from %s...", name); + wrap_here (""); + gdb_flush (gdb_stdout); + } + } + syms_from_objfile (objfile, addrs, offsets, num_offsets, + mainline, from_tty); + + /* We now have at least a partial symbol table. Check to see if the + user requested that all symbols be read on initial access via either + the gdb startup command line or on a per symbol file basis. Expand + all partial symbol tables for this objfile if so. */ + + if ((flags & OBJF_READNOW) || readnow_symbol_files) + { + if (from_tty || info_verbose) + { + printf_unfiltered ("expanding to full symbols..."); + wrap_here (""); + gdb_flush (gdb_stdout); + } + + for (psymtab = objfile->psymtabs; + psymtab != NULL; + psymtab = psymtab->next) + { + psymtab_to_symtab (psymtab); + } + } + + debugfile = find_separate_debug_file (objfile); + if (debugfile) + { + if (addrs != NULL) + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags); + } + else + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, NULL, 0, flags); + } + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + + /* Put the separate debug object before the normal one, this is so that + usage of the ALL_OBJFILES_SAFE macro will stay safe. */ + put_objfile_before (objfile->separate_debug_objfile, objfile); + + xfree (debugfile); + } + + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)..."); + wrap_here (""); + } + + if (from_tty || info_verbose) + { + if (post_add_symbol_hook) + post_add_symbol_hook (); + else + { + printf_unfiltered ("done.\n"); + } + } + + /* We print some messages regardless of whether 'from_tty || + info_verbose' is true, so make sure they go out at the right + time. */ + gdb_flush (gdb_stdout); + + do_cleanups (my_cleanups); + + if (objfile->sf == NULL) + return objfile; /* No symbols. */ + + new_symfile_objfile (objfile, mainline, from_tty); + + if (target_new_objfile_hook) + target_new_objfile_hook (objfile); + + return (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. See symbol_file_add_with_addrs_or_offsets's comments + for details. */ +struct objfile * +symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs, + int mainline, int flags) +{ + return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0, + mainline, flags); +} + + +/* Call symbol_file_add() with default values and update whatever is + affected by the loading of a new main(). + Used when the file is supplied in the gdb command line + and by some targets with special loading requirements. + The auxiliary function, symbol_file_add_main_1(), has the flags + argument for the switches that can only be specified in the symbol_file + command itself. */ + +void +symbol_file_add_main (char *args, int from_tty) +{ + symbol_file_add_main_1 (args, from_tty, 0); +} + +static void +symbol_file_add_main_1 (char *args, int from_tty, int flags) +{ + symbol_file_add (args, from_tty, NULL, 1, flags); + +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + + /* Getting new symbols may change our opinion about + what is frameless. */ + reinit_frame_cache (); + + set_initial_language (); +} + +void +symbol_file_clear (int from_tty) +{ + if ((have_full_symbols () || have_partial_symbols ()) + && from_tty + && !query ("Discard symbol table from `%s'? ", + symfile_objfile->name)) + error ("Not confirmed."); + free_all_objfiles (); + + /* solib descriptors may have handles to objfiles. Since their + storage has just been released, we'd better wipe the solib + descriptors as well. + */ +#if defined(SOLIB_RESTART) + SOLIB_RESTART (); +#endif + + symfile_objfile = NULL; + if (from_tty) + printf_unfiltered ("No symbol file now.\n"); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif +} + +static char * +get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) +{ + asection *sect; + bfd_size_type debuglink_size; + unsigned long crc32; + char *contents; + int crc_offset; + unsigned char *p; + + sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); + + if (sect == NULL) + return NULL; + + debuglink_size = bfd_section_size (objfile->obfd, sect); + + contents = xmalloc (debuglink_size); + bfd_get_section_contents (objfile->obfd, sect, contents, + (file_ptr)0, (bfd_size_type)debuglink_size); + + /* Crc value is stored after the filename, aligned up to 4 bytes. */ + crc_offset = strlen (contents) + 1; + crc_offset = (crc_offset + 3) & ~3; + + crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); + + *crc32_out = crc32; + return contents; +} + +static int +separate_debug_file_exists (const char *name, unsigned long crc) +{ + unsigned long file_crc = 0; + int fd; + char buffer[8*1024]; + int count; + + fd = open (name, O_RDONLY | O_BINARY); + if (fd < 0) + return 0; + + while ((count = read (fd, buffer, sizeof (buffer))) > 0) + file_crc = gnu_debuglink_crc32 (file_crc, buffer, count); + + close (fd); + + return crc == file_crc; +} + +static char *debug_file_directory = NULL; + +#if ! defined (DEBUG_SUBDIRECTORY) +#define DEBUG_SUBDIRECTORY ".debug" +#endif + +static char * +find_separate_debug_file (struct objfile *objfile) +{ + asection *sect; + char *basename; + char *dir; + char *debugfile; + char *name_copy; + bfd_size_type debuglink_size; + unsigned long crc32; + int i; + + basename = get_debug_link_info (objfile, &crc32); + + if (basename == NULL) + return NULL; + + dir = xstrdup (objfile->name); + + /* Strip off the final filename part, leaving the directory name, + followed by a slash. Objfile names should always be absolute and + tilde-expanded, so there should always be a slash in there + somewhere. */ + for (i = strlen(dir) - 1; i >= 0; i--) + { + if (IS_DIR_SEPARATOR (dir[i])) + break; + } + gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i])); + dir[i+1] = '\0'; + + debugfile = alloca (strlen (debug_file_directory) + 1 + + strlen (dir) + + strlen (DEBUG_SUBDIRECTORY) + + strlen ("/") + + strlen (basename) + + 1); + + /* First try in the same directory as the original file. */ + strcpy (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */ + strcpy (debugfile, dir); + strcat (debugfile, DEBUG_SUBDIRECTORY); + strcat (debugfile, "/"); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the global debugfile directory. */ + strcpy (debugfile, debug_file_directory); + strcat (debugfile, "/"); + strcat (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + xfree (basename); + xfree (dir); +#ifdef CRASH_MERGE +{ + extern char *check_specified_debug_file(); + name_copy = check_specified_debug_file(); + return (name_copy ? xstrdup (name_copy) : NULL); +} +#else + return NULL; +#endif +} + + +/* This is the symbol-file command. Read the file, analyze its + symbols, and add a struct symtab to a symtab list. The syntax of + the command is rather bizarre--(1) buildargv implements various + quoting conventions which are undocumented and have little or + nothing in common with the way things are quoted (or not quoted) + elsewhere in GDB, (2) options are used, which are not generally + used in GDB (perhaps "set mapped on", "set readnow on" would be + better), (3) the order of options matters, which is contrary to GNU + conventions (because it is confusing and inconvenient). */ +/* Note: ezannoni 2000-04-17. This function used to have support for + rombug (see remote-os9k.c). It consisted of a call to target_link() + (target.c) to get the address of the text segment from the target, + and pass that to symbol_file_add(). This is no longer supported. */ + +void +symbol_file_command (char *args, int from_tty) +{ + char **argv; + char *name = NULL; + struct cleanup *cleanups; + int flags = OBJF_USERLOADED; + + dont_repeat (); + + if (args == NULL) + { + symbol_file_clear (from_tty); + } + else + { + if ((argv = buildargv (args)) == NULL) + { + nomem (0); + } + cleanups = make_cleanup_freeargv (argv); + while (*argv != NULL) + { + if (strcmp (*argv, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (**argv == '-') + error ("unknown option `%s'", *argv); + else + { + name = *argv; + + symbol_file_add_main_1 (name, from_tty, flags); + } + argv++; + } + + if (name == NULL) + { + error ("no symbol file name was specified"); + } + do_cleanups (cleanups); + } +} + +/* Set the initial language. + + A better solution would be to record the language in the psymtab when reading + partial symbols, and then use it (if known) to set the language. This would + be a win for formats that encode the language in an easily discoverable place, + such as DWARF. For stabs, we can jump through hoops looking for specially + named symbols or try to intuit the language from the specific type of stabs + we find, but we can't do that until later when we read in full symbols. + FIXME. */ + +static void +set_initial_language (void) +{ + struct partial_symtab *pst; + enum language lang = language_unknown; + + pst = find_main_psymtab (); + if (pst != NULL) + { + if (pst->filename != NULL) + { + lang = deduce_language_from_filename (pst->filename); + } + if (lang == language_unknown) + { + /* Make C the default language */ + lang = language_c; + } + set_language (lang); + expected_language = current_language; /* Don't warn the user */ + } +} + +/* Open file specified by NAME and hand it off to BFD for preliminary + analysis. Result is a newly initialized bfd *, which includes a newly + malloc'd` copy of NAME (tilde-expanded and made absolute). + In case of trouble, error() is called. */ + +bfd * +symfile_bfd_open (char *name) +{ + bfd *sym_bfd; + int desc; + char *absolute_name; + + + + name = tilde_expand (name); /* Returns 1st new malloc'd copy */ + + /* Look down path for it, allocate 2nd new malloc'd copy. */ + desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); +#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) + if (desc < 0) + { + char *exename = alloca (strlen (name) + 5); + strcat (strcpy (exename, name), ".exe"); + desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, + 0, &absolute_name); + } +#endif + if (desc < 0) + { + make_cleanup (xfree, name); + perror_with_name (name); + } + xfree (name); /* Free 1st new malloc'd copy */ + name = absolute_name; /* Keep 2nd malloc'd copy in bfd */ + /* It'll be freed in free_objfile(). */ + + sym_bfd = bfd_fdopenr (name, gnutarget, desc); + if (!sym_bfd) + { + close (desc); + make_cleanup (xfree, name); + error ("\"%s\": can't open to read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + bfd_set_cacheable (sym_bfd, 1); + + if (!bfd_check_format (sym_bfd, bfd_object)) + { + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + bfd_close (sym_bfd); /* This also closes desc */ + make_cleanup (xfree, name); + error ("\"%s\": can't read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + return (sym_bfd); +} + +/* Return the section index for the given section name. Return -1 if + the section was not found. */ +int +get_section_index (struct objfile *objfile, char *section_name) +{ + asection *sect = bfd_get_section_by_name (objfile->obfd, section_name); + if (sect) + return sect->index; + else + return -1; +} + +/* Link a new symtab_fns into the global symtab_fns list. Called on gdb + startup by the _initialize routine in each object file format reader, + to register information about each format the the reader is prepared + to handle. */ + +void +add_symtab_fns (struct sym_fns *sf) +{ + sf->next = symtab_fns; + symtab_fns = sf; +} + + +/* Initialize to read symbols from the symbol file sym_bfd. It either + returns or calls error(). The result is an initialized struct sym_fns + in the objfile structure, that contains cached information about the + symbol file. */ + +static void +find_sym_fns (struct objfile *objfile) +{ + struct sym_fns *sf; + enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd); + char *our_target = bfd_get_target (objfile->obfd); + + if (our_flavour == bfd_target_srec_flavour + || our_flavour == bfd_target_ihex_flavour + || our_flavour == bfd_target_tekhex_flavour) + return; /* No symbols. */ + + for (sf = symtab_fns; sf != NULL; sf = sf->next) + { + if (our_flavour == sf->sym_flavour) + { + objfile->sf = sf; + return; + } + } + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (objfile->obfd)); +} + +/* This function runs the load command of our current target. */ + +static void +load_command (char *arg, int from_tty) +{ + if (arg == NULL) + arg = get_exec_file (1); + target_load (arg, from_tty); + + /* After re-loading the executable, we don't really know which + overlays are mapped any more. */ + overlay_cache_invalid = 1; +} + +/* This version of "load" should be usable for any target. Currently + it is just used for remote targets, not inftarg.c or core files, + on the theory that only in that case is it useful. + + Avoiding xmodem and the like seems like a win (a) because we don't have + to worry about finding it, and (b) On VMS, fork() is very slow and so + we don't want to run a subprocess. On the other hand, I'm not sure how + performance compares. */ + +static int download_write_size = 512; +static int validate_download = 0; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +add_section_size_callback (bfd *abfd, asection *asec, void *data) +{ + bfd_size_type *sum = data; + + *sum += bfd_get_section_size_before_reloc (asec); +} + +/* Opaque data for load_section_callback. */ +struct load_section_data { + unsigned long load_offset; + unsigned long write_count; + unsigned long data_count; + bfd_size_type total_size; +}; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +load_section_callback (bfd *abfd, asection *asec, void *data) +{ + struct load_section_data *args = data; + + if (bfd_get_section_flags (abfd, asec) & SEC_LOAD) + { + bfd_size_type size = bfd_get_section_size_before_reloc (asec); + if (size > 0) + { + char *buffer; + struct cleanup *old_chain; + CORE_ADDR lma = bfd_section_lma (abfd, asec) + args->load_offset; + bfd_size_type block_size; + int err; + const char *sect_name = bfd_get_section_name (abfd, asec); + bfd_size_type sent; + + if (download_write_size > 0 && size > download_write_size) + block_size = download_write_size; + else + block_size = size; + + buffer = xmalloc (size); + old_chain = make_cleanup (xfree, buffer); + + /* Is this really necessary? I guess it gives the user something + to look at during a long download. */ + ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n", + sect_name, paddr_nz (size), paddr_nz (lma)); + + bfd_get_section_contents (abfd, asec, buffer, 0, size); + + sent = 0; + do + { + int len; + bfd_size_type this_transfer = size - sent; + + if (this_transfer >= block_size) + this_transfer = block_size; + len = target_write_memory_partial (lma, buffer, + this_transfer, &err); + if (err) + break; + if (validate_download) + { + /* Broken memories and broken monitors manifest + themselves here when bring new computers to + life. This doubles already slow downloads. */ + /* NOTE: cagney/1999-10-18: A more efficient + implementation might add a verify_memory() + method to the target vector and then use + that. remote.c could implement that method + using the ``qCRC'' packet. */ + char *check = xmalloc (len); + struct cleanup *verify_cleanups = + make_cleanup (xfree, check); + + if (target_read_memory (lma, check, len) != 0) + error ("Download verify read failed at 0x%s", + paddr (lma)); + if (memcmp (buffer, check, len) != 0) + error ("Download verify compare failed at 0x%s", + paddr (lma)); + do_cleanups (verify_cleanups); + } + args->data_count += len; + lma += len; + buffer += len; + args->write_count += 1; + sent += len; + if (quit_flag + || (ui_load_progress_hook != NULL + && ui_load_progress_hook (sect_name, sent))) + error ("Canceled the download"); + + if (show_load_progress != NULL) + show_load_progress (sect_name, sent, size, + args->data_count, args->total_size); + } + while (sent < size); + + if (err != 0) + error ("Memory access error while loading section %s.", sect_name); + + do_cleanups (old_chain); + } + } +} + +void +generic_load (char *args, int from_tty) +{ + asection *s; + bfd *loadfile_bfd; + time_t start_time, end_time; /* Start and end times of download */ + char *filename; + struct cleanup *old_cleanups; + char *offptr; + struct load_section_data cbdata; + CORE_ADDR entry; + + cbdata.load_offset = 0; /* Offset to add to vma for each section. */ + cbdata.write_count = 0; /* Number of writes needed. */ + cbdata.data_count = 0; /* Number of bytes written to target memory. */ + cbdata.total_size = 0; /* Total size of all bfd sectors. */ + + /* Parse the input argument - the user can specify a load offset as + a second argument. */ + filename = xmalloc (strlen (args) + 1); + old_cleanups = make_cleanup (xfree, filename); + strcpy (filename, args); + offptr = strchr (filename, ' '); + if (offptr != NULL) + { + char *endptr; + + cbdata.load_offset = strtoul (offptr, &endptr, 0); + if (offptr == endptr) + error ("Invalid download offset:%s\n", offptr); + *offptr = '\0'; + } + else + cbdata.load_offset = 0; + + /* Open the file for loading. */ + loadfile_bfd = bfd_openr (filename, gnutarget); + if (loadfile_bfd == NULL) + { + perror_with_name (filename); + return; + } + + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + make_cleanup_bfd_close (loadfile_bfd); + + if (!bfd_check_format (loadfile_bfd, bfd_object)) + { + error ("\"%s\" is not an object file: %s", filename, + bfd_errmsg (bfd_get_error ())); + } + + bfd_map_over_sections (loadfile_bfd, add_section_size_callback, + (void *) &cbdata.total_size); + + start_time = time (NULL); + + bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata); + + end_time = time (NULL); + + entry = bfd_get_start_address (loadfile_bfd); + ui_out_text (uiout, "Start address "); + ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry)); + ui_out_text (uiout, ", load size "); + ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count); + ui_out_text (uiout, "\n"); + /* We were doing this in remote-mips.c, I suspect it is right + for other targets too. */ + write_pc (entry); + + /* FIXME: are we supposed to call symbol_file_add or not? According + to a comment from remote-mips.c (where a call to symbol_file_add + was commented out), making the call confuses GDB if more than one + file is loaded in. Some targets do (e.g., remote-vx.c) but + others don't (or didn't - perhaphs they have all been deleted). */ + + print_transfer_performance (gdb_stdout, cbdata.data_count, + cbdata.write_count, end_time - start_time); + + do_cleanups (old_cleanups); +} + +/* Report how fast the transfer went. */ + +/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being + replaced by print_transfer_performance (with a very different + function signature). */ + +void +report_transfer_performance (unsigned long data_count, time_t start_time, + time_t end_time) +{ + print_transfer_performance (gdb_stdout, data_count, + end_time - start_time, 0); +} + +void +print_transfer_performance (struct ui_file *stream, + unsigned long data_count, + unsigned long write_count, + unsigned long time_count) +{ + ui_out_text (uiout, "Transfer rate: "); + if (time_count > 0) + { + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (data_count * 8) / time_count); + ui_out_text (uiout, " bits/sec"); + } + else + { + ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); + ui_out_text (uiout, " bits in <1 sec"); + } + if (write_count > 0) + { + ui_out_text (uiout, ", "); + ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); + ui_out_text (uiout, " bytes/write"); + } + ui_out_text (uiout, ".\n"); +} + +/* This function allows the addition of incrementally linked object files. + It does not modify any state in the target, only in the debugger. */ +/* Note: ezannoni 2000-04-13 This function/command used to have a + special case syntax for the rombug target (Rombug is the boot + monitor for Microware's OS-9 / OS-9000, see remote-os9k.c). In the + rombug case, the user doesn't need to supply a text address, + instead a call to target_link() (in target.c) would supply the + value to use. We are now discontinuing this type of ad hoc syntax. */ + +static void +add_symbol_file_command (char *args, int from_tty) +{ + char *filename = NULL; + int flags = OBJF_USERLOADED; + char *arg; + int expecting_option = 0; + int section_index = 0; + int argcnt = 0; + int sec_num = 0; + int i; + int expecting_sec_name = 0; + int expecting_sec_addr = 0; + + struct sect_opt + { + char *name; + char *value; + }; + + struct section_addr_info *section_addrs; + struct sect_opt *sect_opts = NULL; + size_t num_sect_opts = 0; + struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL); + + num_sect_opts = 16; + sect_opts = (struct sect_opt *) xmalloc (num_sect_opts + * sizeof (struct sect_opt)); + + dont_repeat (); + + if (args == NULL) + error ("add-symbol-file takes a file name and an address"); + + /* Make a copy of the string that we can safely write into. */ + args = xstrdup (args); + + while (*args != '\000') + { + /* Any leading spaces? */ + while (isspace (*args)) + args++; + + /* Point arg to the beginning of the argument. */ + arg = args; + + /* Move args pointer over the argument. */ + while ((*args != '\000') && !isspace (*args)) + args++; + + /* If there are more arguments, terminate arg and + proceed past it. */ + if (*args != '\000') + *args++ = '\000'; + + /* Now process the argument. */ + if (argcnt == 0) + { + /* The first argument is the file name. */ + filename = tilde_expand (arg); + make_cleanup (xfree, filename); + } + else + if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) + { + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + error ("USAGE: add-symbol-file [-mapped] [-readnow] [-s ]*"); + } + } + argcnt++; + } + + /* Print the prompt for the query below. And save the arguments into + a sect_addr_info structure to be passed around to other + functions. We have to split this up into separate print + statements because local_hex_string returns a local static + string. */ + + printf_unfiltered ("add symbol table from file \"%s\" at\n", filename); + section_addrs = alloc_section_addr_info (section_index); + make_cleanup (xfree, section_addrs); + for (i = 0; i < section_index; i++) + { + CORE_ADDR addr; + char *val = sect_opts[i].value; + char *sec = sect_opts[i].name; + + addr = parse_and_eval_address (val); + + /* Here we store the section offsets in the order they were + entered on the command line. */ + section_addrs->other[sec_num].name = sec; + section_addrs->other[sec_num].addr = addr; + printf_unfiltered ("\t%s_addr = %s\n", + sec, + local_hex_string ((unsigned long)addr)); + sec_num++; + + /* The object's sections are initialized when a + call is made to build_objfile_section_table (objfile). + This happens in reread_symbols. + At this point, we don't know what file type this is, + so we can't determine what section names are valid. */ + } + +#ifndef CRASH_MERGE + if (from_tty && (!query ("%s", ""))) + error ("Not confirmed."); +#endif + + symbol_file_add (filename, from_tty, section_addrs, 0, flags); + + /* Getting new symbols may change our opinion about what is + frameless. */ + reinit_frame_cache (); + do_cleanups (my_cleanups); +} + +static void +add_shared_symbol_files_command (char *args, int from_tty) +{ +#ifdef ADD_SHARED_SYMBOL_FILES + ADD_SHARED_SYMBOL_FILES (args, from_tty); +#else + error ("This command is not available in this configuration of GDB."); +#endif +} + +/* Re-read symbols if a symbol-file has changed. */ +void +reread_symbols (void) +{ + struct objfile *objfile; + long new_modtime; + int reread_one = 0; + struct stat new_statbuf; + int res; + + /* With the addition of shared libraries, this should be modified, + the load time should be saved in the partial symbol tables, since + different tables may come from different source files. FIXME. + This routine should then walk down each partial symbol table + and see if the symbol table that it originates from has been changed */ + + for (objfile = object_files; objfile; objfile = objfile->next) + { + if (objfile->obfd) + { +#ifdef DEPRECATED_IBM6000_TARGET + /* If this object is from a shared library, then you should + stat on the library name, not member name. */ + + if (objfile->obfd->my_archive) + res = stat (objfile->obfd->my_archive->filename, &new_statbuf); + else +#endif + res = stat (objfile->name, &new_statbuf); + if (res != 0) + { + /* FIXME, should use print_sys_errmsg but it's not filtered. */ + printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n", + objfile->name); + continue; + } + new_modtime = new_statbuf.st_mtime; + if (new_modtime != objfile->mtime) + { + struct cleanup *old_cleanups; + struct section_offsets *offsets; + int num_offsets; + char *obfd_filename; + + printf_unfiltered ("`%s' has changed; re-reading symbols.\n", + objfile->name); + + /* There are various functions like symbol_file_add, + symfile_bfd_open, syms_from_objfile, etc., which might + appear to do what we want. But they have various other + effects which we *don't* want. So we just do stuff + ourselves. We don't worry about mapped files (for one thing, + any mapped file will be out of date). */ + + /* If we get an error, blow away this objfile (not sure if + that is the correct response for things like shared + libraries). */ + old_cleanups = make_cleanup_free_objfile (objfile); + /* We need to do this whenever any symbols go away. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Clean up any state BFD has sitting around. We don't need + to close the descriptor but BFD lacks a way of closing the + BFD without closing the descriptor. */ + obfd_filename = bfd_get_filename (objfile->obfd); + if (!bfd_close (objfile->obfd)) + error ("Can't close BFD for %s: %s", objfile->name, + bfd_errmsg (bfd_get_error ())); + objfile->obfd = bfd_openr (obfd_filename, gnutarget); + if (objfile->obfd == NULL) + error ("Can't open %s to read symbols.", objfile->name); + /* bfd_openr sets cacheable to true, which is what we want. */ + if (!bfd_check_format (objfile->obfd, bfd_object)) + error ("Can't read symbols from %s: %s.", objfile->name, + bfd_errmsg (bfd_get_error ())); + + /* Save the offsets, we will nuke them with the rest of the + objfile_obstack. */ + num_offsets = objfile->num_sections; + offsets = ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets))); + memcpy (offsets, objfile->section_offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + + /* Nuke all the state that we will re-read. Much of the following + code which sets things to NULL really is necessary to tell + other parts of GDB that there is nothing currently there. */ + + /* FIXME: Do we have to free a whole linked list, or is this + enough? */ + if (objfile->global_psymbols.list) + xmfree (objfile->md, objfile->global_psymbols.list); + memset (&objfile->global_psymbols, 0, + sizeof (objfile->global_psymbols)); + if (objfile->static_psymbols.list) + xmfree (objfile->md, objfile->static_psymbols.list); + memset (&objfile->static_psymbols, 0, + sizeof (objfile->static_psymbols)); + + /* Free the obstacks for non-reusable objfiles */ + bcache_xfree (objfile->psymbol_cache); + objfile->psymbol_cache = bcache_xmalloc (); + bcache_xfree (objfile->macro_cache); + objfile->macro_cache = bcache_xmalloc (); + if (objfile->demangled_names_hash != NULL) + { + htab_delete (objfile->demangled_names_hash); + objfile->demangled_names_hash = NULL; + } + obstack_free (&objfile->objfile_obstack, 0); + objfile->sections = NULL; + objfile->symtabs = NULL; + objfile->psymtabs = NULL; + objfile->free_psymtabs = NULL; + objfile->cp_namespace_symtab = NULL; + objfile->msymbols = NULL; + objfile->sym_private = NULL; + objfile->minimal_symbol_count = 0; + memset (&objfile->msymbol_hash, 0, + sizeof (objfile->msymbol_hash)); + memset (&objfile->msymbol_demangled_hash, 0, + sizeof (objfile->msymbol_demangled_hash)); + objfile->fundamental_types = NULL; + clear_objfile_data (objfile); + if (objfile->sf != NULL) + { + (*objfile->sf->sym_finish) (objfile); + } + + /* We never make this a mapped file. */ + objfile->md = NULL; + objfile->psymbol_cache = bcache_xmalloc (); + objfile->macro_cache = bcache_xmalloc (); + /* obstack_init also initializes the obstack so it is + empty. We could use obstack_specify_allocation but + gdb_obstack.h specifies the alloc/dealloc + functions. */ + obstack_init (&objfile->objfile_obstack); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile->name, bfd_errmsg (bfd_get_error ())); + } + terminate_minimal_symbol_table (objfile); + + /* We use the same section offsets as from last time. I'm not + sure whether that is always correct for shared libraries. */ + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + memcpy (objfile->section_offsets, offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + objfile->num_sections = num_offsets; + + /* What the hell is sym_new_init for, anyway? The concept of + distinguishing between the main file and additional files + in this way seems rather dubious. */ + if (objfile == symfile_objfile) + { + (*objfile->sf->sym_new_init) (objfile); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + } + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, 1); + /* The "mainline" parameter is a hideous hack; I think leaving it + zero is OK since dbxread.c also does what it needs to do if + objfile->global_psymbols.size is 0. */ + (*objfile->sf->sym_read) (objfile, 0); + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)\n"); + wrap_here (""); + } + objfile->flags |= OBJF_SYMS; + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, 1); + + /* Getting new symbols may change our opinion about what is + frameless. */ + + reinit_frame_cache (); + + /* Discard cleanups as symbol reading was successful. */ + discard_cleanups (old_cleanups); + + /* If the mtime has changed between the time we set new_modtime + and now, we *want* this to be out of date, so don't call stat + again now. */ + objfile->mtime = new_modtime; + reread_one = 1; + reread_separate_symbols (objfile); + } + } + } + + if (reread_one) + clear_symtab_users (); +} + + +/* Handle separate debug info for OBJFILE, which has just been + re-read: + - If we had separate debug info before, but now we don't, get rid + of the separated objfile. + - If we didn't have separated debug info before, but now we do, + read in the new separated debug info file. + - If the debug link points to a different file, toss the old one + and read the new one. + This function does *not* handle the case where objfile is still + using the same separate debug info file, but that file's timestamp + has changed. That case should be handled by the loop in + reread_symbols already. */ +static void +reread_separate_symbols (struct objfile *objfile) +{ + char *debug_file; + unsigned long crc32; + + /* Does the updated objfile's debug info live in a + separate file? */ + debug_file = find_separate_debug_file (objfile); + + if (objfile->separate_debug_objfile) + { + /* There are two cases where we need to get rid of + the old separated debug info objfile: + - if the new primary objfile doesn't have + separated debug info, or + - if the new primary objfile has separate debug + info, but it's under a different filename. + + If the old and new objfiles both have separate + debug info, under the same filename, then we're + okay --- if the separated file's contents have + changed, we will have caught that when we + visited it in this function's outermost + loop. */ + if (! debug_file + || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0) + free_objfile (objfile->separate_debug_objfile); + } + + /* If the new objfile has separate debug info, and we + haven't loaded it already, do so now. */ + if (debug_file + && ! objfile->separate_debug_objfile) + { + /* Use the same section offset table as objfile itself. + Preserve the flags from objfile that make sense. */ + objfile->separate_debug_objfile + = (symbol_file_add_with_addrs_or_offsets + (debug_file, + info_verbose, /* from_tty: Don't override the default. */ + 0, /* No addr table. */ + objfile->section_offsets, objfile->num_sections, + 0, /* Not mainline. See comments about this above. */ + objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW + | OBJF_USERLOADED))); + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + } +} + + + + + +typedef struct +{ + char *ext; + enum language lang; +} +filename_language; + +static filename_language *filename_language_table; +static int fl_table_size, fl_table_next; + +static void +add_filename_language (char *ext, enum language lang) +{ + if (fl_table_next >= fl_table_size) + { + fl_table_size += 10; + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); + } + + filename_language_table[fl_table_next].ext = xstrdup (ext); + filename_language_table[fl_table_next].lang = lang; + fl_table_next++; +} + +static char *ext_args; + +static void +set_ext_lang_command (char *args, int from_tty) +{ + int i; + char *cp = ext_args; + enum language lang; + + /* First arg is filename extension, starting with '.' */ + if (*cp != '.') + error ("'%s': Filename extension must begin with '.'", ext_args); + + /* Find end of first arg. */ + while (*cp && !isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Null-terminate first arg */ + *cp++ = '\0'; + + /* Find beginning of second arg, which should be a source language. */ + while (*cp && isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Lookup the language from among those we know. */ + lang = language_enum (cp); + + /* Now lookup the filename extension: do we already know it? */ + for (i = 0; i < fl_table_next; i++) + if (0 == strcmp (ext_args, filename_language_table[i].ext)) + break; + + if (i >= fl_table_next) + { + /* new file extension */ + add_filename_language (ext_args, lang); + } + else + { + /* redefining a previously known filename extension */ + + /* if (from_tty) */ + /* query ("Really make files of type %s '%s'?", */ + /* ext_args, language_str (lang)); */ + + xfree (filename_language_table[i].ext); + filename_language_table[i].ext = xstrdup (ext_args); + filename_language_table[i].lang = lang; + } +} + +static void +info_ext_lang_command (char *args, int from_tty) +{ + int i; + + printf_filtered ("Filename extensions and the languages they represent:"); + printf_filtered ("\n\n"); + for (i = 0; i < fl_table_next; i++) + printf_filtered ("\t%s\t- %s\n", + filename_language_table[i].ext, + language_str (filename_language_table[i].lang)); +} + +static void +init_filename_language_table (void) +{ + if (fl_table_size == 0) /* protect against repetition */ + { + fl_table_size = 20; + fl_table_next = 0; + filename_language_table = + xmalloc (fl_table_size * sizeof (*filename_language_table)); + add_filename_language (".c", language_c); + add_filename_language (".C", language_cplus); + add_filename_language (".cc", language_cplus); + add_filename_language (".cp", language_cplus); + add_filename_language (".cpp", language_cplus); + add_filename_language (".cxx", language_cplus); + add_filename_language (".c++", language_cplus); + add_filename_language (".java", language_java); + add_filename_language (".class", language_java); + add_filename_language (".m", language_objc); + add_filename_language (".f", language_fortran); + add_filename_language (".F", language_fortran); + add_filename_language (".s", language_asm); + add_filename_language (".S", language_asm); + add_filename_language (".pas", language_pascal); + add_filename_language (".p", language_pascal); + add_filename_language (".pp", language_pascal); + } +} + +enum language +deduce_language_from_filename (char *filename) +{ + int i; + char *cp; + + if (filename != NULL) + if ((cp = strrchr (filename, '.')) != NULL) + for (i = 0; i < fl_table_next; i++) + if (strcmp (cp, filename_language_table[i].ext) == 0) + return filename_language_table[i].lang; + + return language_unknown; +} + +/* allocate_symtab: + + Allocate and partly initialize a new symbol table. Return a pointer + to it. error() if no space. + + Caller must set these fields: + LINETABLE(symtab) + symtab->blockvector + symtab->dirname + symtab->free_code + symtab->free_ptr + possibly free_named_symtabs (symtab->filename); + */ + +struct symtab * +allocate_symtab (char *filename, struct objfile *objfile) +{ + struct symtab *symtab; + + symtab = (struct symtab *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct symtab)); + memset (symtab, 0, sizeof (*symtab)); + symtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + symtab->fullname = NULL; + symtab->language = deduce_language_from_filename (filename); + symtab->debugformat = obsavestring ("unknown", 7, + &objfile->objfile_obstack); + + /* Hook it to the objfile it comes from */ + + symtab->objfile = objfile; + symtab->next = objfile->symtabs; + objfile->symtabs = symtab; + + /* FIXME: This should go away. It is only defined for the Z8000, + and the Z8000 definition of this macro doesn't have anything to + do with the now-nonexistent EXTRA_SYMTAB_INFO macro, it's just + here for convenience. */ +#ifdef INIT_EXTRA_SYMTAB_INFO + INIT_EXTRA_SYMTAB_INFO (symtab); +#endif + + return (symtab); +} + +struct partial_symtab * +allocate_psymtab (char *filename, struct objfile *objfile) +{ + struct partial_symtab *psymtab; + + if (objfile->free_psymtabs) + { + psymtab = objfile->free_psymtabs; + objfile->free_psymtabs = psymtab->next; + } + else + psymtab = (struct partial_symtab *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct partial_symtab)); + + memset (psymtab, 0, sizeof (struct partial_symtab)); + psymtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + psymtab->symtab = NULL; + + /* Prepend it to the psymtab list for the objfile it belongs to. + Psymtabs are searched in most recent inserted -> least recent + inserted order. */ + + psymtab->objfile = objfile; + psymtab->next = objfile->psymtabs; + objfile->psymtabs = psymtab; +#if 0 + { + struct partial_symtab **prev_pst; + psymtab->objfile = objfile; + psymtab->next = NULL; + prev_pst = &(objfile->psymtabs); + while ((*prev_pst) != NULL) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = psymtab; + } +#endif + + return (psymtab); +} + +void +discard_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab **prev_pst; + + /* From dbxread.c: + Empty psymtabs happen as a result of header files which don't + have any symbols in them. There can be a lot of them. But this + check is wrong, in that a psymtab with N_SLINE entries but + nothing else is not empty, but we don't realize that. Fixing + that without slowing things down might be tricky. */ + + /* First, snip it out of the psymtab chain */ + + prev_pst = &(pst->objfile->psymtabs); + while ((*prev_pst) != pst) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = pst->next; + + /* Next, put it on a free list for recycling */ + + pst->next = pst->objfile->free_psymtabs; + pst->objfile->free_psymtabs = pst; +} + + +/* Reset all data structures in gdb which may contain references to symbol + table data. */ + +void +clear_symtab_users (void) +{ + /* Someday, we should do better than this, by only blowing away + the things that really need to be blown. */ + clear_value_history (); + clear_displays (); + clear_internalvars (); + breakpoint_re_set (); + set_default_breakpoint (0, 0, 0, 0); + clear_current_source_symtab_and_line (); + clear_pc_function_cache (); + if (target_new_objfile_hook) + target_new_objfile_hook (NULL); +} + +static void +clear_symtab_users_cleanup (void *ignore) +{ + clear_symtab_users (); +} + +/* clear_symtab_users_once: + + This function is run after symbol reading, or from a cleanup. + If an old symbol table was obsoleted, the old symbol table + has been blown away, but the other GDB data structures that may + reference it have not yet been cleared or re-directed. (The old + symtab was zapped, and the cleanup queued, in free_named_symtab() + below.) + + This function can be queued N times as a cleanup, or called + directly; it will do all the work the first time, and then will be a + no-op until the next time it is queued. This works by bumping a + counter at queueing time. Much later when the cleanup is run, or at + the end of symbol processing (in case the cleanup is discarded), if + the queued count is greater than the "done-count", we do the work + and set the done-count to the queued count. If the queued count is + less than or equal to the done-count, we just ignore the call. This + is needed because reading a single .o file will often replace many + symtabs (one per .h file, for example), and we don't want to reset + the breakpoints N times in the user's face. + + The reason we both queue a cleanup, and call it directly after symbol + reading, is because the cleanup protects us in case of errors, but is + discarded if symbol reading is successful. */ + +#if 0 +/* FIXME: As free_named_symtabs is currently a big noop this function + is no longer needed. */ +static void clear_symtab_users_once (void); + +static int clear_symtab_users_queued; +static int clear_symtab_users_done; + +static void +clear_symtab_users_once (void) +{ + /* Enforce once-per-`do_cleanups'-semantics */ + if (clear_symtab_users_queued <= clear_symtab_users_done) + return; + clear_symtab_users_done = clear_symtab_users_queued; + + clear_symtab_users (); +} +#endif + +/* Delete the specified psymtab, and any others that reference it. */ + +static void +cashier_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab *ps, *pprev = NULL; + int i; + + /* Find its previous psymtab in the chain */ + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + if (ps == pst) + break; + pprev = ps; + } + + if (ps) + { + /* Unhook it from the chain. */ + if (ps == pst->objfile->psymtabs) + pst->objfile->psymtabs = ps->next; + else + pprev->next = ps->next; + + /* FIXME, we can't conveniently deallocate the entries in the + partial_symbol lists (global_psymbols/static_psymbols) that + this psymtab points to. These just take up space until all + the psymtabs are reclaimed. Ditto the dependencies list and + filename, which are all in the objfile_obstack. */ + + /* We need to cashier any psymtab that has this one as a dependency... */ + again: + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + for (i = 0; i < ps->number_of_dependencies; i++) + { + if (ps->dependencies[i] == pst) + { + cashier_psymtab (ps); + goto again; /* Must restart, chain has been munged. */ + } + } + } + } +} + +/* If a symtab or psymtab for filename NAME is found, free it along + with any dependent breakpoints, displays, etc. + Used when loading new versions of object modules with the "add-file" + command. This is only called on the top-level symtab or psymtab's name; + it is not called for subsidiary files such as .h files. + + Return value is 1 if we blew away the environment, 0 if not. + FIXME. The return value appears to never be used. + + FIXME. I think this is not the best way to do this. We should + work on being gentler to the environment while still cleaning up + all stray pointers into the freed symtab. */ + +int +free_named_symtabs (char *name) +{ +#if 0 + /* FIXME: With the new method of each objfile having it's own + psymtab list, this function needs serious rethinking. In particular, + why was it ever necessary to toss psymtabs with specific compilation + unit filenames, as opposed to all psymtabs from a particular symbol + file? -- fnf + Well, the answer is that some systems permit reloading of particular + compilation units. We want to blow away any old info about these + compilation units, regardless of which objfiles they arrived in. --gnu. */ + + struct symtab *s; + struct symtab *prev; + struct partial_symtab *ps; + struct blockvector *bv; + int blewit = 0; + + /* We only wack things if the symbol-reload switch is set. */ + if (!symbol_reloading) + return 0; + + /* Some symbol formats have trouble providing file names... */ + if (name == 0 || *name == '\0') + return 0; + + /* Look for a psymtab with the specified name. */ + +again2: + for (ps = partial_symtab_list; ps; ps = ps->next) + { + if (strcmp (name, ps->filename) == 0) + { + cashier_psymtab (ps); /* Blow it away...and its little dog, too. */ + goto again2; /* Must restart, chain has been munged */ + } + } + + /* Look for a symtab with the specified name. */ + + for (s = symtab_list; s; s = s->next) + { + if (strcmp (name, s->filename) == 0) + break; + prev = s; + } + + if (s) + { + if (s == symtab_list) + symtab_list = s->next; + else + prev->next = s->next; + + /* For now, queue a delete for all breakpoints, displays, etc., whether + or not they depend on the symtab being freed. This should be + changed so that only those data structures affected are deleted. */ + + /* But don't delete anything if the symtab is empty. + This test is necessary due to a bug in "dbxread.c" that + causes empty symtabs to be created for N_SO symbols that + contain the pathname of the object file. (This problem + has been fixed in GDB 3.9x). */ + + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) + { + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); + clear_symtab_users_queued++; + make_cleanup (clear_symtab_users_once, 0); + blewit = 1; + } + else + { + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); + } + + free_symtab (s); + } + else + { + /* It is still possible that some breakpoints will be affected + even though no symtab was found, since the file might have + been compiled without debugging, and hence not be associated + with a symtab. In order to handle this correctly, we would need + to keep a list of text address ranges for undebuggable files. + For now, we do nothing, since this is a fairly obscure case. */ + ; + } + + /* FIXME, what about the minimal symbol table? */ + return blewit; +#else + return (0); +#endif +} + +/* Allocate and partially fill a partial symtab. It will be + completely filled at the end of the symbol list. + + FILENAME is the name of the symbol-file we are reading from. */ + +struct partial_symtab * +start_psymtab_common (struct objfile *objfile, + struct section_offsets *section_offsets, char *filename, + CORE_ADDR textlow, struct partial_symbol **global_syms, + struct partial_symbol **static_syms) +{ + struct partial_symtab *psymtab; + + psymtab = allocate_psymtab (filename, objfile); + psymtab->section_offsets = section_offsets; + psymtab->textlow = textlow; + psymtab->texthigh = psymtab->textlow; /* default */ + psymtab->globals_offset = global_syms - objfile->global_psymbols.list; + psymtab->statics_offset = static_syms - objfile->static_psymbols.list; + return (psymtab); +} + +/* Add a symbol with a long value to a psymtab. + Since one arg is a struct, we pass in a ptr and deref it (sigh). + Return the partial symbol that has been added. */ + +/* NOTE: carlton/2003-09-11: The reason why we return the partial + symbol is so that callers can get access to the symbol's demangled + name, which they don't have any cheap way to determine otherwise. + (Currenly, dwarf2read.c is the only file who uses that information, + though it's possible that other readers might in the future.) + Elena wasn't thrilled about that, and I don't blame her, but we + couldn't come up with a better way to get that information. If + it's needed in other situations, we could consider breaking up + SYMBOL_SET_NAMES to provide access to the demangled name lookup + cache. */ + +const struct partial_symbol * +add_psymbol_to_list (char *name, int namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + + SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); + + return psym; +} + +/* Add a symbol with a long value to a psymtab. This differs from + * add_psymbol_to_list above in taking both a mangled and a demangled + * name. */ + +void +add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, + int dem_namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, + struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1, + objfile->psymbol_cache); + + buf = alloca (dem_namelength + 1); + memcpy (buf, dem_name, dem_namelength); + buf[dem_namelength] = '\0'; + + switch (language) + { + case language_c: + case language_cplus: + SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) = + deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache); + break; + /* FIXME What should be done for the default case? Ignoring for now. */ + } + + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); +} + +/* Initialize storage for partial symbols. */ + +void +init_psymbol_list (struct objfile *objfile, int total_symbols) +{ + /* Free any previously allocated psymbol lists. */ + + if (objfile->global_psymbols.list) + { + xmfree (objfile->md, objfile->global_psymbols.list); + } + if (objfile->static_psymbols.list) + { + xmfree (objfile->md, objfile->static_psymbols.list); + } + + /* Current best guess is that approximately a twentieth + of the total symbols (in a debugging file) are global or static + oriented symbols */ + + objfile->global_psymbols.size = total_symbols / 10; + objfile->static_psymbols.size = total_symbols / 10; + + if (objfile->global_psymbols.size > 0) + { + objfile->global_psymbols.next = + objfile->global_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->global_psymbols.size + * sizeof (struct partial_symbol *))); + } + if (objfile->static_psymbols.size > 0) + { + objfile->static_psymbols.next = + objfile->static_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->static_psymbols.size + * sizeof (struct partial_symbol *))); + } +} + +/* OVERLAYS: + The following code implements an abstraction for debugging overlay sections. + + The target model is as follows: + 1) The gnu linker will permit multiple sections to be mapped into the + same VMA, each with its own unique LMA (or load address). + 2) It is assumed that some runtime mechanism exists for mapping the + sections, one by one, from the load address into the VMA address. + 3) This code provides a mechanism for gdb to keep track of which + sections should be considered to be mapped from the VMA to the LMA. + This information is used for symbol lookup, and memory read/write. + For instance, if a section has been mapped then its contents + should be read from the VMA, otherwise from the LMA. + + Two levels of debugger support for overlays are available. One is + "manual", in which the debugger relies on the user to tell it which + overlays are currently mapped. This level of support is + implemented entirely in the core debugger, and the information about + whether a section is mapped is kept in the objfile->obj_section table. + + The second level of support is "automatic", and is only available if + the target-specific code provides functionality to read the target's + overlay mapping table, and translate its contents for the debugger + (by updating the mapped state information in the obj_section tables). + + The interface is as follows: + User commands: + overlay map -- tell gdb to consider this section mapped + overlay unmap -- tell gdb to consider this section unmapped + overlay list -- list the sections that GDB thinks are mapped + overlay read-target -- get the target's state of what's mapped + overlay off/manual/auto -- set overlay debugging state + Functional interface: + find_pc_mapped_section(pc): if the pc is in the range of a mapped + section, return that section. + find_pc_overlay(pc): find any overlay section that contains + the pc, either in its VMA or its LMA + overlay_is_mapped(sect): true if overlay is marked as mapped + section_is_overlay(sect): true if section's VMA != LMA + pc_in_mapped_range(pc,sec): true if pc belongs to section's VMA + pc_in_unmapped_range(...): true if pc belongs to section's LMA + sections_overlap(sec1, sec2): true if mapped sec1 and sec2 ranges overlap + overlay_mapped_address(...): map an address from section's LMA to VMA + overlay_unmapped_address(...): map an address from section's VMA to LMA + symbol_overlayed_address(...): Return a "current" address for symbol: + either in VMA or LMA depending on whether + the symbol's section is currently mapped + */ + +/* Overlay debugging state: */ + +enum overlay_debugging_state overlay_debugging = ovly_off; +int overlay_cache_invalid = 0; /* True if need to refresh mapped state */ + +/* Target vector for refreshing overlay mapped state */ +static void simple_overlay_update (struct obj_section *); +void (*target_overlay_update) (struct obj_section *) = simple_overlay_update; + +/* Function: section_is_overlay (SECTION) + Returns true if SECTION has VMA not equal to LMA, ie. + SECTION is loaded at an address different from where it will "run". */ + +int +section_is_overlay (asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section->lma != 0 && + section->vma != section->lma) + return 1; + + return 0; +} + +/* Function: overlay_invalidate_all (void) + Invalidate the mapped state of all overlay sections (mark it as stale). */ + +static void +overlay_invalidate_all (void) +{ + struct objfile *objfile; + struct obj_section *sect; + + ALL_OBJSECTIONS (objfile, sect) + if (section_is_overlay (sect->the_bfd_section)) + sect->ovly_mapped = -1; +} + +/* Function: overlay_is_mapped (SECTION) + Returns true if section is an overlay, and is currently mapped. + Private: public access is thru function section_is_mapped. + + Access to the ovly_mapped flag is restricted to this function, so + that we can do automatic update. If the global flag + OVERLAY_CACHE_INVALID is set (by wait_for_inferior), then call + overlay_invalidate_all. If the mapped state of the particular + section is stale, then call TARGET_OVERLAY_UPDATE to refresh it. */ + +static int +overlay_is_mapped (struct obj_section *osect) +{ + if (osect == 0 || !section_is_overlay (osect->the_bfd_section)) + return 0; + + switch (overlay_debugging) + { + default: + case ovly_off: + return 0; /* overlay debugging off */ + case ovly_auto: /* overlay debugging automatic */ + /* Unles there is a target_overlay_update function, + there's really nothing useful to do here (can't really go auto) */ + if (target_overlay_update) + { + if (overlay_cache_invalid) + { + overlay_invalidate_all (); + overlay_cache_invalid = 0; + } + if (osect->ovly_mapped == -1) + (*target_overlay_update) (osect); + } + /* fall thru to manual case */ + case ovly_on: /* overlay debugging manual */ + return osect->ovly_mapped == 1; + } +} + +/* Function: section_is_mapped + Returns true if section is an overlay, and is currently mapped. */ + +int +section_is_mapped (asection *section) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + ALL_OBJSECTIONS (objfile, osect) + if (osect->the_bfd_section == section) + return overlay_is_mapped (osect); + + return 0; +} + +/* Function: pc_in_unmapped_range + If PC falls into the lma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_unmapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->lma <= pc && pc < section->lma + size) + return 1; + } + return 0; +} + +/* Function: pc_in_mapped_range + If PC falls into the vma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_mapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->vma <= pc && pc < section->vma + size) + return 1; + } + return 0; +} + + +/* Return true if the mapped ranges of sections A and B overlap, false + otherwise. */ +static int +sections_overlap (asection *a, asection *b) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + CORE_ADDR a_start = a->vma; + CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a); + CORE_ADDR b_start = b->vma; + CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b); + + return (a_start < b_end && b_start < a_end); +} + +/* Function: overlay_unmapped_address (PC, SECTION) + Returns the address corresponding to PC in the unmapped (load) range. + May be the same as PC. */ + +CORE_ADDR +overlay_unmapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_mapped_range (pc, section)) + return pc + section->lma - section->vma; + + return pc; +} + +/* Function: overlay_mapped_address (PC, SECTION) + Returns the address corresponding to PC in the mapped (runtime) range. + May be the same as PC. */ + +CORE_ADDR +overlay_mapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_unmapped_range (pc, section)) + return pc + section->vma - section->lma; + + return pc; +} + + +/* Function: symbol_overlayed_address + Return one of two addresses (relative to the VMA or to the LMA), + depending on whether the section is mapped or not. */ + +CORE_ADDR +symbol_overlayed_address (CORE_ADDR address, asection *section) +{ + if (overlay_debugging) + { + /* If the symbol has no section, just return its regular address. */ + if (section == 0) + return address; + /* If the symbol's section is not an overlay, just return its address */ + if (!section_is_overlay (section)) + return address; + /* If the symbol's section is mapped, just return its address */ + if (section_is_mapped (section)) + return address; + /* + * HOWEVER: if the symbol is in an overlay section which is NOT mapped, + * then return its LOADED address rather than its vma address!! + */ + return overlay_unmapped_address (address, section); + } + return address; +} + +/* Function: find_pc_overlay (PC) + Return the best-match overlay section for PC: + If PC matches a mapped overlay section's VMA, return that section. + Else if PC matches an unmapped section's VMA, return that section. + Else if PC matches an unmapped section's LMA, return that section. */ + +asection * +find_pc_overlay (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect, *best_match = NULL; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + if (pc_in_mapped_range (pc, osect->the_bfd_section)) + { + if (overlay_is_mapped (osect)) + return osect->the_bfd_section; + else + best_match = osect; + } + else if (pc_in_unmapped_range (pc, osect->the_bfd_section)) + best_match = osect; + } + return best_match ? best_match->the_bfd_section : NULL; +} + +/* Function: find_pc_mapped_section (PC) + If PC falls into the VMA address range of an overlay section that is + currently marked as MAPPED, return that section. Else return NULL. */ + +asection * +find_pc_mapped_section (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (pc_in_mapped_range (pc, osect->the_bfd_section) && + overlay_is_mapped (osect)) + return osect->the_bfd_section; + + return NULL; +} + +/* Function: list_overlays_command + Print a list of mapped sections and their PC ranges */ + +void +list_overlays_command (char *args, int from_tty) +{ + int nmapped = 0; + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (overlay_is_mapped (osect)) + { + const char *name; + bfd_vma lma, vma; + int size; + + vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section); + lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section); + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + name = bfd_section_name (objfile->obfd, osect->the_bfd_section); + + printf_filtered ("Section %s, loaded at ", name); + print_address_numeric (lma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (lma + size, 1, gdb_stdout); + printf_filtered (", mapped at "); + print_address_numeric (vma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (vma + size, 1, gdb_stdout); + puts_filtered ("\n"); + + nmapped++; + } + if (nmapped == 0) + printf_filtered ("No sections are mapped.\n"); +} + +/* Function: map_overlay_command + Mark the named section as mapped (ie. residing at its VMA address). */ + +void +map_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile, *objfile2; + struct obj_section *sec, *sec2; + asection *bfdsec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + /* Now, check to see if the section is an overlay. */ + bfdsec = sec->the_bfd_section; + if (!section_is_overlay (bfdsec)) + continue; /* not an overlay section */ + + /* Mark the overlay as "mapped" */ + sec->ovly_mapped = 1; + + /* Next, make a pass and unmap any sections that are + overlapped by this new section: */ + ALL_OBJSECTIONS (objfile2, sec2) + if (sec2->ovly_mapped + && sec != sec2 + && sec->the_bfd_section != sec2->the_bfd_section + && sections_overlap (sec->the_bfd_section, + sec2->the_bfd_section)) + { + if (info_verbose) + printf_unfiltered ("Note: section %s unmapped by overlap\n", + bfd_section_name (objfile->obfd, + sec2->the_bfd_section)); + sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */ + } + return; + } + error ("No overlay section called %s", args); +} + +/* Function: unmap_overlay_command + Mark the overlay section as unmapped + (ie. resident in its LMA address range, rather than the VMA range). */ + +void +unmap_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile; + struct obj_section *sec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + if (!sec->ovly_mapped) + error ("Section %s is not mapped", args); + sec->ovly_mapped = 0; + return; + } + error ("No overlay section called %s", args); +} + +/* Function: overlay_auto_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_auto_command (char *args, int from_tty) +{ + overlay_debugging = ovly_auto; + enable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Automatic overlay debugging enabled."); +} + +/* Function: overlay_manual_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_manual_command (char *args, int from_tty) +{ + overlay_debugging = ovly_on; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging enabled."); +} + +/* Function: overlay_off_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_off_command (char *args, int from_tty) +{ + overlay_debugging = ovly_off; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging disabled."); +} + +static void +overlay_load_command (char *args, int from_tty) +{ + if (target_overlay_update) + (*target_overlay_update) (NULL); + else + error ("This target does not know how to read its overlay state."); +} + +/* Function: overlay_command + A place-holder for a mis-typed command */ + +/* Command list chain containing all defined "overlay" subcommands. */ +struct cmd_list_element *overlaylist; + +static void +overlay_command (char *args, int from_tty) +{ + printf_unfiltered + ("\"overlay\" must be followed by the name of an overlay command.\n"); + help_list (overlaylist, "overlay ", -1, gdb_stdout); +} + + +/* Target Overlays for the "Simplest" overlay manager: + + This is GDB's default target overlay layer. It works with the + minimal overlay manager supplied as an example by Cygnus. The + entry point is via a function pointer "target_overlay_update", + so targets that use a different runtime overlay manager can + substitute their own overlay_update function and take over the + function pointer. + + The overlay_update function pokes around in the target's data structures + to see what overlays are mapped, and updates GDB's overlay mapping with + this information. + + In this simple implementation, the target data structures are as follows: + unsigned _novlys; /# number of overlay sections #/ + unsigned _ovly_table[_novlys][4] = { + {VMA, SIZE, LMA, MAPPED}, /# one entry per overlay section #/ + {..., ..., ..., ...}, + } + unsigned _novly_regions; /# number of overlay regions #/ + unsigned _ovly_region_table[_novly_regions][3] = { + {VMA, SIZE, MAPPED_TO_LMA}, /# one entry per overlay region #/ + {..., ..., ...}, + } + These functions will attempt to update GDB's mappedness state in the + symbol section table, based on the target's mappedness state. + + To do this, we keep a cached copy of the target's _ovly_table, and + attempt to detect when the cached copy is invalidated. The main + entry point is "simple_overlay_update(SECT), which looks up SECT in + the cached table and re-reads only the entry for that section from + the target (whenever possible). + */ + +/* Cached, dynamically allocated copies of the target data structures: */ +static unsigned (*cache_ovly_table)[4] = 0; +#if 0 +static unsigned (*cache_ovly_region_table)[3] = 0; +#endif +static unsigned cache_novlys = 0; +#if 0 +static unsigned cache_novly_regions = 0; +#endif +static CORE_ADDR cache_ovly_table_base = 0; +#if 0 +static CORE_ADDR cache_ovly_region_table_base = 0; +#endif +enum ovly_index + { + VMA, SIZE, LMA, MAPPED + }; +#define TARGET_LONG_BYTES (TARGET_LONG_BIT / TARGET_CHAR_BIT) + +/* Throw away the cached copy of _ovly_table */ +static void +simple_free_overlay_table (void) +{ + if (cache_ovly_table) + xfree (cache_ovly_table); + cache_novlys = 0; + cache_ovly_table = NULL; + cache_ovly_table_base = 0; +} + +#if 0 +/* Throw away the cached copy of _ovly_region_table */ +static void +simple_free_overlay_region_table (void) +{ + if (cache_ovly_region_table) + xfree (cache_ovly_region_table); + cache_novly_regions = 0; + cache_ovly_region_table = NULL; + cache_ovly_region_table_base = 0; +} +#endif + +/* Read an array of ints from the target into a local buffer. + Convert to host order. int LEN is number of ints */ +static void +read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len) +{ + /* FIXME (alloca): Not safe if array is very large. */ + char *buf = alloca (len * TARGET_LONG_BYTES); + int i; + + read_memory (memaddr, buf, len * TARGET_LONG_BYTES); + for (i = 0; i < len; i++) + myaddr[i] = extract_unsigned_integer (TARGET_LONG_BYTES * i + buf, + TARGET_LONG_BYTES); +} + +/* Find and grab a copy of the target _ovly_table + (and _novlys, which is needed for the table's size) */ +static int +simple_read_overlay_table (void) +{ + struct minimal_symbol *novlys_msym, *ovly_table_msym; + + simple_free_overlay_table (); + novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); + if (! novlys_msym) + { + error ("Error reading inferior's overlay table: " + "couldn't find `_novlys' variable\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); + if (! ovly_table_msym) + { + error ("Error reading inferior's overlay table: couldn't find " + "`_ovly_table' array\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym), 4); + cache_ovly_table + = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); + cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym); + read_target_long_array (cache_ovly_table_base, + (int *) cache_ovly_table, + cache_novlys * 4); + + return 1; /* SUCCESS */ +} + +#if 0 +/* Find and grab a copy of the target _ovly_region_table + (and _novly_regions, which is needed for the table's size) */ +static int +simple_read_overlay_region_table (void) +{ + struct minimal_symbol *msym; + + simple_free_overlay_region_table (); + msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL); + if (msym != NULL) + cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym), 4); + else + return 0; /* failure */ + cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12); + if (cache_ovly_region_table != NULL) + { + msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL); + if (msym != NULL) + { + cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym); + read_target_long_array (cache_ovly_region_table_base, + (int *) cache_ovly_region_table, + cache_novly_regions * 3); + } + else + return 0; /* failure */ + } + else + return 0; /* failure */ + return 1; /* SUCCESS */ +} +#endif + +/* Function: simple_overlay_update_1 + A helper function for simple_overlay_update. Assuming a cached copy + of _ovly_table exists, look through it to find an entry whose vma, + lma and size match those of OSECT. Re-read the entry and make sure + it still matches OSECT (else the table may no longer be valid). + Set OSECT's mapped state to match the entry. Return: 1 for + success, 0 for failure. */ + +static int +simple_overlay_update_1 (struct obj_section *osect) +{ + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES, + (int *) cache_ovly_table[i], 4); + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + return 1; + } + else /* Warning! Warning! Target's ovly table has changed! */ + return 0; + } + return 0; +} + +/* Function: simple_overlay_update + If OSECT is NULL, then update all sections' mapped state + (after re-reading the entire target _ovly_table). + If OSECT is non-NULL, then try to find a matching entry in the + cached ovly_table and update only OSECT's mapped state. + If a cached entry can't be found or the cache isn't valid, then + re-read the entire cache, and go ahead and update all sections. */ + +static void +simple_overlay_update (struct obj_section *osect) +{ + struct objfile *objfile; + + /* Were we given an osect to look up? NULL means do all of them. */ + if (osect) + /* Have we got a cached copy of the target's overlay table? */ + if (cache_ovly_table != NULL) + /* Does its cached location match what's currently in the symtab? */ + if (cache_ovly_table_base == + SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL))) + /* Then go ahead and try to look up this single section in the cache */ + if (simple_overlay_update_1 (osect)) + /* Found it! We're done. */ + return; + + /* Cached table no good: need to read the entire table anew. + Or else we want all the sections, in which case it's actually + more efficient to read the whole table in one block anyway. */ + + if (! simple_read_overlay_table ()) + return; + + /* Now may as well update all sections, even if only one was requested. */ + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { /* obj_section matches i'th entry in ovly_table */ + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + break; /* finished with inner for loop: break out */ + } + } +} + +/* Set the output sections and output offsets for section SECTP in + ABFD. The relocation code in BFD will read these offsets, so we + need to be sure they're initialized. We map each section to itself, + with no offset; this means that SECTP->vma will be honored. */ + +static void +symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy) +{ + sectp->output_section = sectp; + sectp->output_offset = 0; +} + +/* Relocate the contents of a debug section SECTP in ABFD. The + contents are stored in BUF if it is non-NULL, or returned in a + malloc'd buffer otherwise. + + For some platforms and debug info formats, shared libraries contain + relocations against the debug sections (particularly for DWARF-2; + one affected platform is PowerPC GNU/Linux, although it depends on + the version of the linker in use). Also, ELF object files naturally + have unresolved relocations for their debug sections. We need to apply + the relocations in order to get the locations of symbols correct. */ + +bfd_byte * +symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) +{ +#ifdef CRASH_MERGE + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; +#endif + /* We're only interested in debugging sections with relocation + information. */ + if ((sectp->flags & SEC_RELOC) == 0) + return NULL; + if ((sectp->flags & SEC_DEBUGGING) == 0) + return NULL; + + /* We will handle section offsets properly elsewhere, so relocate as if + all sections begin at 0. */ + bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL); + + return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL); +} + +void +_initialize_symfile (void) +{ + struct cmd_list_element *c; + + c = add_cmd ("symbol-file", class_files, symbol_file_command, + "Load symbol table from executable file FILE.\n\ +The `file' command can also load symbol tables, as well as setting the file\n\ +to execute.", &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, + "Usage: add-symbol-file FILE ADDR [-s -s ...]\n\ +Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\ +ADDR is the starting address of the file's text.\n\ +The optional arguments are section-name section-address pairs and\n\ +should be specified if the data and bss segments are not contiguous\n\ +with the text. SECT is a section name to be loaded at SECT_ADDR.", + &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-shared-symbol-files", class_files, + add_shared_symbol_files_command, + "Load the symbols from shared objects in the dynamic linker's link map.", + &cmdlist); + c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1, + &cmdlist); + + c = add_cmd ("load", class_files, load_command, + "Dynamically load FILE into the running program, and record its symbols\n\ +for access from GDB.", &cmdlist); + set_cmd_completer (c, filename_completer); + + add_show_from_set + (add_set_cmd ("symbol-reloading", class_support, var_boolean, + (char *) &symbol_reloading, + "Set dynamic symbol table reloading multiple times in one run.", + &setlist), + &showlist); + + add_prefix_cmd ("overlay", class_support, overlay_command, + "Commands for debugging overlays.", &overlaylist, + "overlay ", 0, &cmdlist); + + add_com_alias ("ovly", "overlay", class_alias, 1); + add_com_alias ("ov", "overlay", class_alias, 1); + + add_cmd ("map-overlay", class_support, map_overlay_command, + "Assert that an overlay section is mapped.", &overlaylist); + + add_cmd ("unmap-overlay", class_support, unmap_overlay_command, + "Assert that an overlay section is unmapped.", &overlaylist); + + add_cmd ("list-overlays", class_support, list_overlays_command, + "List mappings of overlay sections.", &overlaylist); + + add_cmd ("manual", class_support, overlay_manual_command, + "Enable overlay debugging.", &overlaylist); + add_cmd ("off", class_support, overlay_off_command, + "Disable overlay debugging.", &overlaylist); + add_cmd ("auto", class_support, overlay_auto_command, + "Enable automatic overlay debugging.", &overlaylist); + add_cmd ("load-target", class_support, overlay_load_command, + "Read the overlay mapping state from the target.", &overlaylist); + + /* Filename extension to source language lookup table: */ + init_filename_language_table (); + c = add_set_cmd ("extension-language", class_files, var_string_noescape, + (char *) &ext_args, + "Set mapping between filename extension and source language.\n\ +Usage: set extension-language .foo bar", + &setlist); + set_cmd_cfunc (c, set_ext_lang_command); + + add_info ("extensions", info_ext_lang_command, + "All filename extensions associated with a source language."); + + add_show_from_set + (add_set_cmd ("download-write-size", class_obscure, + var_integer, (char *) &download_write_size, + "Set the write size used when downloading a program.\n" + "Only used when downloading a program onto a remote\n" + "target. Specify zero, or a negative value, to disable\n" + "blocked writes. The actual size of each transfer is also\n" + "limited by the size of the target packet and the memory\n" + "cache.\n", + &setlist), + &showlist); + + debug_file_directory = xstrdup (DEBUGDIR); + c = (add_set_cmd + ("debug-file-directory", class_support, var_string, + (char *) &debug_file_directory, + "Set the directory where separate debug symbols are searched for.\n" + "Separate debug symbols are first searched for in the same\n" + "directory as the binary, then in the `" DEBUG_SUBDIRECTORY + "' subdirectory,\n" + "and lastly at the path of the directory of the binary with\n" + "the global debug-file directory prepended\n", + &setlist)); + add_show_from_set (c, &showlist); + set_cmd_completer (c, filename_completer); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/symtab.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/symtab.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/symtab.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/symtab.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,4814 @@ +/* Symbol table lookup for the GNU debugger, GDB. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +/* Prototypes for local functions */ + +static void completion_list_add_name (char *, char *, int, char *, char *); + +static void rbreak_command (char *, int); + +static void types_info (char *, int); + +static void functions_info (char *, int); + +static void variables_info (char *, int); + +static void sources_info (char *, int); + +static void output_source_filename (char *, int *); + +static int find_line_common (struct linetable *, int, int *); + +/* This one is used by linespec.c */ + +char *operator_chars (char *p, char **end); + +static struct symbol *lookup_symbol_aux (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_local (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_symtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_psymtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +#if 0 +static +struct symbol *lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); +#endif + +/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ +/* Signals the presence of objects compiled by HP compilers */ +int hp_som_som_object_present = 0; + +static void fixup_section (struct general_symbol_info *, struct objfile *); + +static int file_matches (char *, char **, int); + +static void print_symbol_info (domain_enum, + struct symtab *, struct symbol *, int, char *); + +static void print_msymbol_info (struct minimal_symbol *); + +static void symtab_symbol_info (char *, domain_enum, int); + +void _initialize_symtab (void); + +/* */ + +/* The single non-language-specific builtin type */ +struct type *builtin_type_error; + +/* Block in which the most recently searched-for symbol was found. + Might be better to make this a parameter to lookup_symbol and + value_of_this. */ + +const struct block *block_found; + +/* Check for a symtab of a specific name; first in symtabs, then in + psymtabs. *If* there is no '/' in the name, a match after a '/' + in the symtab filename will also work. */ + +struct symtab * +lookup_symtab (const char *name) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + char *real_path = NULL; + char *full_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + +got_symtab: + + /* First, search for an exact match */ + + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (name, s->filename) == 0) + { + return s; + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + + if (full_path != NULL) + { + const char *fp = symtab_to_filename (s); + if (FILENAME_CMP (full_path, fp) == 0) + { + return s; + } + } + + if (real_path != NULL) + { + char *rp = gdb_realpath (symtab_to_filename (s)); + make_cleanup (xfree, rp); + if (FILENAME_CMP (real_path, rp) == 0) + { + return s; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (lbasename (s->filename), name) == 0) + return s; + } + + /* Same search rules as above apply here, but now we look thru the + psymtabs. */ + + ps = lookup_partial_symtab (name); + if (!ps) + return (NULL); + + if (ps->readin) + error ("Internal: readin %s pst for `%s' found when no symtab found.", + ps->filename, name); + + s = PSYMTAB_TO_SYMTAB (ps); + + if (s) + return s; + + /* At this point, we have located the psymtab for this file, but + the conversion to a symtab has failed. This usually happens + when we are looking up an include file. In this case, + PSYMTAB_TO_SYMTAB doesn't return a symtab, even though one has + been created. So, we need to run through the symtabs again in + order to find the file. + XXX - This is a crock, and should be fixed inside of the the + symbol parsing routines. */ + goto got_symtab; +} + +/* Lookup the partial symbol table of a source file named NAME. + *If* there is no '/' in the name, a match after a '/' + in the psymtab filename will also work. */ + +struct partial_symtab * +lookup_partial_symtab (const char *name) +{ + struct partial_symtab *pst; + struct objfile *objfile; + char *full_path = NULL; + char *real_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (name, pst->filename) == 0) + { + return (pst); + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + if (full_path != NULL) + { + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL + && FILENAME_CMP (full_path, pst->fullname) == 0) + { + return pst; + } + } + + if (real_path != NULL) + { + char *rp = NULL; + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL) + { + rp = gdb_realpath (pst->fullname); + make_cleanup (xfree, rp); + } + if (rp != NULL && FILENAME_CMP (real_path, rp) == 0) + { + return pst; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (lbasename (pst->filename), name) == 0) + return (pst); + } + + return (NULL); +} + +/* Mangle a GDB method stub type. This actually reassembles the pieces of the + full method name, which consist of the class name (from T), the unadorned + method name from METHOD_ID, and the signature for the specific overload, + specified by SIGNATURE_ID. Note that this function is g++ specific. */ + +char * +gdb_mangle_name (struct type *type, int method_id, int signature_id) +{ + int mangled_name_len; + char *mangled_name; + struct fn_field *f = TYPE_FN_FIELDLIST1 (type, method_id); + struct fn_field *method = &f[signature_id]; + char *field_name = TYPE_FN_FIELDLIST_NAME (type, method_id); + char *physname = TYPE_FN_FIELD_PHYSNAME (f, signature_id); + char *newname = type_name_no_tag (type); + + /* Does the form of physname indicate that it is the full mangled name + of a constructor (not just the args)? */ + int is_full_physname_constructor; + + int is_constructor; + int is_destructor = is_destructor_name (physname); + /* Need a new type prefix. */ + char *const_prefix = method->is_const ? "C" : ""; + char *volatile_prefix = method->is_volatile ? "V" : ""; + char buf[20]; + int len = (newname == NULL ? 0 : strlen (newname)); + + /* Nothing to do if physname already contains a fully mangled v3 abi name + or an operator name. */ + if ((physname[0] == '_' && physname[1] == 'Z') + || is_operator_name (field_name)) + return xstrdup (physname); + + is_full_physname_constructor = is_constructor_name (physname); + + is_constructor = + is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0); + + if (!is_destructor) + is_destructor = (strncmp (physname, "__dt", 4) == 0); + + if (is_destructor || is_full_physname_constructor) + { + mangled_name = (char *) xmalloc (strlen (physname) + 1); + strcpy (mangled_name, physname); + return mangled_name; + } + + if (len == 0) + { + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + } + else if (physname[0] == 't' || physname[0] == 'Q') + { + /* The physname for template and qualified methods already includes + the class name. */ + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + newname = NULL; + len = 0; + } + else + { + sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); + } + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + + strlen (buf) + len + strlen (physname) + 1); + + { + mangled_name = (char *) xmalloc (mangled_name_len); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); + } + strcat (mangled_name, buf); + /* If the class doesn't have a name, i.e. newname NULL, then we just + mangle it using 0 for the length of the class. Thus it gets mangled + as something starting with `::' rather than `classname::'. */ + if (newname != NULL) + strcat (mangled_name, newname); + + strcat (mangled_name, physname); + return (mangled_name); +} + + +/* Initialize the language dependent portion of a symbol + depending upon the language for the symbol. */ +void +symbol_init_language_specific (struct general_symbol_info *gsymbol, + enum language language) +{ + gsymbol->language = language; + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + memset (&gsymbol->language_specific, 0, + sizeof (gsymbol->language_specific)); + } +} + +/* Functions to initialize a symbol's mangled name. */ + +/* Create the hash table used for demangled names. Each hash entry is + a pair of strings; one for the mangled name and one for the demangled + name. The entry is hashed via just the mangled name. */ + +static void +create_demangled_names_hash (struct objfile *objfile) +{ + /* Choose 256 as the starting size of the hash table, somewhat arbitrarily. + The hash table code will round this up to the next prime number. + Choosing a much larger table size wastes memory, and saves only about + 1% in symbol reading. */ + + objfile->demangled_names_hash = htab_create_alloc_ex + (256, htab_hash_string, (int (*) (const void *, const void *)) streq, + NULL, objfile->md, xmcalloc, xmfree); +} + +/* Try to determine the demangled name for a symbol, based on the + language of that symbol. If the language is set to language_auto, + it will attempt to find any demangling algorithm that works and + then set the language appropriately. The returned name is allocated + by the demangler and should be xfree'd. */ + +static char * +symbol_find_demangled_name (struct general_symbol_info *gsymbol, + const char *mangled) +{ + char *demangled = NULL; + + if (gsymbol->language == language_unknown) + gsymbol->language = language_auto; + + if (gsymbol->language == language_objc + || gsymbol->language == language_auto) + { + demangled = + objc_demangle (mangled, 0); + if (demangled != NULL) + { + gsymbol->language = language_objc; + return demangled; + } + } + if (gsymbol->language == language_cplus + || gsymbol->language == language_auto) + { + demangled = + cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI); + if (demangled != NULL) + { + gsymbol->language = language_cplus; + return demangled; + } + } + if (gsymbol->language == language_java) + { + demangled = + cplus_demangle (mangled, + DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); + if (demangled != NULL) + { + gsymbol->language = language_java; + return demangled; + } + } + return NULL; +} + +/* Set both the mangled and demangled (if any) names for GSYMBOL based + on LINKAGE_NAME and LEN. The hash table corresponding to OBJFILE + is used, and the memory comes from that objfile's objfile_obstack. + LINKAGE_NAME is copied, so the pointer can be discarded after + calling this function. */ + +/* We have to be careful when dealing with Java names: when we run + into a Java minimal symbol, we don't know it's a Java symbol, so it + gets demangled as a C++ name. This is unfortunate, but there's not + much we can do about it: but when demangling partial symbols and + regular symbols, we'd better not reuse the wrong demangled name. + (See PR gdb/1039.) We solve this by putting a distinctive prefix + on Java names when storing them in the hash table. */ + +/* FIXME: carlton/2003-03-13: This is an unfortunate situation. I + don't mind the Java prefix so much: different languages have + different demangling requirements, so it's only natural that we + need to keep language data around in our demangling cache. But + it's not good that the minimal symbol has the wrong demangled name. + Unfortunately, I can't think of any easy solution to that + problem. */ + +#define JAVA_PREFIX "##JAVA$$" +#define JAVA_PREFIX_LEN 8 + +void +symbol_set_names (struct general_symbol_info *gsymbol, + const char *linkage_name, int len, struct objfile *objfile) +{ + char **slot; + /* A 0-terminated copy of the linkage name. */ + const char *linkage_name_copy; + /* A copy of the linkage name that might have a special Java prefix + added to it, for use when looking names up in the hash table. */ + const char *lookup_name; + /* The length of lookup_name. */ + int lookup_len; + + if (objfile->demangled_names_hash == NULL) + create_demangled_names_hash (objfile); + + /* The stabs reader generally provides names that are not + NUL-terminated; most of the other readers don't do this, so we + can just use the given copy, unless we're in the Java case. */ + if (gsymbol->language == language_java) + { + char *alloc_name; + lookup_len = len + JAVA_PREFIX_LEN; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN); + memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name + JAVA_PREFIX_LEN; + } + else if (linkage_name[len] != '\0') + { + char *alloc_name; + lookup_len = len; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name; + } + else + { + lookup_len = len; + lookup_name = linkage_name; + linkage_name_copy = linkage_name; + } + + slot = (char **) htab_find_slot (objfile->demangled_names_hash, + lookup_name, INSERT); + + /* If this name is not in the hash table, add it. */ + if (*slot == NULL) + { + char *demangled_name = symbol_find_demangled_name (gsymbol, + linkage_name_copy); + int demangled_len = demangled_name ? strlen (demangled_name) : 0; + + /* If there is a demangled name, place it right after the mangled name. + Otherwise, just place a second zero byte after the end of the mangled + name. */ + *slot = obstack_alloc (&objfile->objfile_obstack, + lookup_len + demangled_len + 2); + memcpy (*slot, lookup_name, lookup_len + 1); + if (demangled_name != NULL) + { + memcpy (*slot + lookup_len + 1, demangled_name, demangled_len + 1); + xfree (demangled_name); + } + else + (*slot)[lookup_len + 1] = '\0'; + } + + gsymbol->name = *slot + lookup_len - len; + if ((*slot)[lookup_len + 1] != '\0') + gsymbol->language_specific.cplus_specific.demangled_name + = &(*slot)[lookup_len + 1]; + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; +} + +/* Initialize the demangled name of GSYMBOL if possible. Any required space + to store the name is obtained from the specified obstack. The function + symbol_set_names, above, should be used instead where possible for more + efficient memory usage. */ + +void +symbol_init_demangled_name (struct general_symbol_info *gsymbol, + struct obstack *obstack) +{ + char *mangled = gsymbol->name; + char *demangled = NULL; + + demangled = symbol_find_demangled_name (gsymbol, mangled); + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + if (demangled) + { + gsymbol->language_specific.cplus_specific.demangled_name + = obsavestring (demangled, strlen (demangled), obstack); + xfree (demangled); + } + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + /* Unknown language; just clean up quietly. */ + if (demangled) + xfree (demangled); + } +} + +/* Return the source code name of a symbol. In languages where + demangling is necessary, this is the demangled name. */ + +char * +symbol_natural_name (const struct general_symbol_info *gsymbol) +{ + if ((gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + && (gsymbol->language_specific.cplus_specific.demangled_name != NULL)) + { + return gsymbol->language_specific.cplus_specific.demangled_name; + } + else + { + return gsymbol->name; + } +} + +/* Return the demangled name for a symbol based on the language for + that symbol. If no demangled name exists, return NULL. */ +char * +symbol_demangled_name (struct general_symbol_info *gsymbol) +{ + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + return gsymbol->language_specific.cplus_specific.demangled_name; + + else + return NULL; +} + +/* Initialize the structure fields to zero values. */ +void +init_sal (struct symtab_and_line *sal) +{ + sal->symtab = 0; + sal->section = 0; + sal->line = 0; + sal->pc = 0; + sal->end = 0; +} + + + +/* Find which partial symtab contains PC and SECTION. Return 0 if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ +struct partial_symtab * +find_pc_sect_psymtab (CORE_ADDR pc, asection *section) +{ + struct partial_symtab *pst; + struct objfile *objfile; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on texthigh and textlow, which do + not include the data ranges. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + ALL_PSYMTABS (objfile, pst) + { + if (pc >= pst->textlow && pc < pst->texthigh) + { + struct partial_symtab *tpst; + struct partial_symtab *best_pst = pst; + struct partial_symbol *best_psym = NULL; + + /* An objfile that has its functions reordered might have + many partial symbol tables containing the PC, but + we want the partial symbol table that contains the + function containing the PC. */ + if (!(objfile->flags & OBJF_REORDERED) && + section == 0) /* can't validate section this way */ + return (pst); + + if (msymbol == NULL) + return (pst); + + /* The code range of partial symtabs sometimes overlap, so, in + the loop below, we need to check all partial symtabs and + find the one that fits better for the given PC address. We + select the partial symtab that contains a symbol whose + address is closest to the PC address. By closest we mean + that find_pc_sect_symbol returns the symbol with address + that is closest and still less than the given PC. */ + for (tpst = pst; tpst != NULL; tpst = tpst->next) + { + if (pc >= tpst->textlow && pc < tpst->texthigh) + { + struct partial_symbol *p; + + p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && SYMBOL_VALUE_ADDRESS (p) + == SYMBOL_VALUE_ADDRESS (msymbol)) + return (tpst); + if (p != NULL) + { + /* We found a symbol in this partial symtab which + matches (or is closest to) PC, check whether it + is closer than our current BEST_PSYM. Since + this symbol address is necessarily lower or + equal to PC, the symbol closer to PC is the + symbol which address is the highest. */ + /* This way we return the psymtab which contains + such best match symbol. This can help in cases + where the symbol information/debuginfo is not + complete, like for instance on IRIX6 with gcc, + where no debug info is emitted for + statics. (See also the nodebug.exp + testcase.) */ + if (best_psym == NULL + || SYMBOL_VALUE_ADDRESS (p) + > SYMBOL_VALUE_ADDRESS (best_psym)) + { + best_psym = p; + best_pst = tpst; + } + } + + } + } + return (best_pst); + } + } + return (NULL); +} + +/* Find which partial symtab contains PC. Return 0 if none. + Backward compatibility, no section */ + +struct partial_symtab * +find_pc_psymtab (CORE_ADDR pc) +{ + return find_pc_sect_psymtab (pc, find_pc_mapped_section (pc)); +} + +/* Find which partial symbol within a psymtab matches PC and SECTION. + Return 0 if none. Check all psymtabs if PSYMTAB is 0. */ + +struct partial_symbol * +find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, + asection *section) +{ + struct partial_symbol *best = NULL, *p, **pp; + CORE_ADDR best_pc; + + if (!psymtab) + psymtab = find_pc_sect_psymtab (pc, section); + if (!psymtab) + return 0; + + /* Cope with programs that start at address 0 */ + best_pc = (psymtab->textlow != 0) ? psymtab->textlow - 1 : 0; + + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; + (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) + < psymtab->n_static_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + return best; +} + +/* Find which partial symbol within a psymtab matches PC. Return 0 if none. + Check all psymtabs if PSYMTAB is 0. Backwards compatibility, no section. */ + +struct partial_symbol * +find_pc_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc) +{ + return find_pc_sect_psymbol (psymtab, pc, find_pc_mapped_section (pc)); +} + +/* Debug symbols usually don't have section information. We need to dig that + out of the minimal symbols and stash that in the debug symbol. */ + +static void +fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile) +{ + struct minimal_symbol *msym; + msym = lookup_minimal_symbol (ginfo->name, NULL, objfile); + + if (msym) + { + ginfo->bfd_section = SYMBOL_BFD_SECTION (msym); + ginfo->section = SYMBOL_SECTION (msym); + } +} + +struct symbol * +fixup_symbol_section (struct symbol *sym, struct objfile *objfile) +{ + if (!sym) + return NULL; + + if (SYMBOL_BFD_SECTION (sym)) + return sym; + + fixup_section (&sym->ginfo, objfile); + + return sym; +} + +struct partial_symbol * +fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) +{ + if (!psym) + return NULL; + + if (SYMBOL_BFD_SECTION (psym)) + return psym; + + fixup_section (&psym->ginfo, objfile); + + return psym; +} + +/* Find the definition for a specified symbol name NAME + in domain DOMAIN, visible from lexical block BLOCK. + Returns the struct symbol pointer, or zero if no symbol is found. + If SYMTAB is non-NULL, store the symbol table in which the + symbol was found there, or NULL if not found. + C++: if IS_A_FIELD_OF_THIS is nonzero on entry, check to see if + NAME is a field of the current implied argument `this'. If so set + *IS_A_FIELD_OF_THIS to 1, otherwise set it to zero. + BLOCK_FOUND is set to the block in which NAME is found (in the case of + a field of `this', value_of_this sets BLOCK_FOUND to the proper value.) */ + +/* This function has a bunch of loops in it and it would seem to be + attractive to put in some QUIT's (though I'm not really sure + whether it can run long enough to be really important). But there + are a few calls for which it would appear to be bad news to quit + out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note + that there is C++ code below which can error(), but that probably + doesn't affect these calls since they are looking for a known + variable and thus can probably assume it will never hit the C++ + code). */ +#ifdef CRASH_MERGE +static void gdb_bait_and_switch(char *, struct symbol *); +#endif +struct symbol * +lookup_symbol (const char *name, const struct block *block, + const domain_enum domain, int *is_a_field_of_this, + struct symtab **symtab) +{ + char *demangled_name = NULL; + const char *modified_name = NULL; + const char *mangled_name = NULL; + int needtofreename = 0; + struct symbol *returnval; + + modified_name = name; + + /* If we are using C++ language, demangle the name before doing a lookup, so + we can always binary search. */ + if (current_language->la_language == language_cplus) + { + demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); + if (demangled_name) + { + mangled_name = name; + modified_name = demangled_name; + needtofreename = 1; + } + } + + if (case_sensitivity == case_sensitive_off) + { + char *copy; + int len, i; + + len = strlen (name); + copy = (char *) alloca (len + 1); + for (i= 0; i < len; i++) + copy[i] = tolower (name[i]); + copy[len] = 0; + modified_name = copy; + } + + returnval = lookup_symbol_aux (modified_name, mangled_name, block, + domain, is_a_field_of_this, symtab); + if (needtofreename) + xfree (demangled_name); + +#ifdef CRASH_MERGE + if (returnval && (domain == VAR_DOMAIN)) { + gdb_bait_and_switch((char *)modified_name, returnval); + } +#endif + + return returnval; +} + +/* Behave like lookup_symbol_aux except that NAME is the natural name + of the symbol that we're looking for and, if LINKAGE_NAME is + non-NULL, ensure that the symbol's linkage name matches as + well. */ + +static struct symbol * +lookup_symbol_aux (const char *name, const char *linkage_name, + const struct block *block, const domain_enum domain, + int *is_a_field_of_this, struct symtab **symtab) +{ + struct symbol *sym; + + /* Make sure we do something sensible with is_a_field_of_this, since + the callers that set this parameter to some non-null value will + certainly use it later and expect it to be either 0 or 1. + If we don't set it, the contents of is_a_field_of_this are + undefined. */ + if (is_a_field_of_this != NULL) + *is_a_field_of_this = 0; + + /* Search specified block and its superiors. Don't search + STATIC_BLOCK or GLOBAL_BLOCK. */ + + sym = lookup_symbol_aux_local (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + + /* If requested to do so by the caller and if appropriate for the + current language, check to see if NAME is a field of `this'. */ + + if (current_language->la_value_of_this != NULL + && is_a_field_of_this != NULL) + { + struct value *v = current_language->la_value_of_this (0); + + if (v && check_field (v, name)) + { + *is_a_field_of_this = 1; + if (symtab != NULL) + *symtab = NULL; + return NULL; + } + } + + /* Now do whatever is appropriate for the current language to look + up static and global variables. */ + + sym = current_language->la_lookup_symbol_nonlocal (name, linkage_name, + block, domain, + symtab); + if (sym != NULL) + return sym; + + /* Now search all static file-level symbols. Not strictly correct, + but more useful than an error. Do the symtabs first, then check + the psymtabs. If a psymtab indicates the existence of the + desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + if (symtab != NULL) + *symtab = NULL; + return NULL; +} + +/* Check to see if the symbol is defined in BLOCK or its superiors. + Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ + +static struct symbol * +lookup_symbol_aux_local (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + const struct block *static_block = block_static_block (block); + + /* Check if either no block is specified or it's a global block. */ + + if (static_block == NULL) + return NULL; + + while (block != static_block) + { + sym = lookup_symbol_aux_block (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + block = BLOCK_SUPERBLOCK (block); + } + + /* We've reached the static block without finding a result. */ + + return NULL; +} + +/* Look up a symbol in a block; if found, locate its symtab, fixup the + symbol, and set block_found appropriately. */ + +struct symbol * +lookup_symbol_aux_block (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile = NULL; + struct blockvector *bv; + struct block *b; + struct symtab *s = NULL; + + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + { + /* Search the list of symtabs for one which contains the + address of the start of this block. */ + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + if (BLOCK_START (b) <= BLOCK_START (block) + && BLOCK_END (b) > BLOCK_START (block)) + goto found; + } + found: + *symtab = s; + } + + return fixup_symbol_section (sym, objfile); + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the symtabs. + BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK, + depending on whether or not we want to search global symbols or + static symbols. */ + +static struct symbol * +lookup_symbol_aux_symtabs (int block_index, + const char *name, const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct symtab *s; + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the partial + symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or + STATIC_BLOCK, depending on whether or not we want to search global + symbols or static symbols. */ + +static struct symbol * +lookup_symbol_aux_psymtabs (int block_index, const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct partial_symtab *ps; + struct symtab *s; + const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin + && lookup_partial_symbol (ps, name, linkage_name, + psymtab_index, domain)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort try + looking in the statics even though the psymtab claimed + the symbol was global, or vice-versa. It's possible + that the psymtab gets it wrong in some cases. */ + + /* FIXME: carlton/2002-09-30: Should we really do that? + If that happens, isn't it likely to be a GDB error, in + which case we should fix the GDB error rather than + silently dealing with it here? So I'd vote for + removing the check for the symbol in the other + block. */ + block = BLOCKVECTOR_BLOCK (bv, + block_index == GLOBAL_BLOCK ? + STATIC_BLOCK : GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s).", + block_index == GLOBAL_BLOCK ? "global" : "static", + name, ps->filename, name, name); + } + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +#if 0 +/* Check for the possibility of the symbol being a function or a + mangled variable that is stored in one of the minimal symbol + tables. Eventually, all global symbols might be resolved in this + way. */ + +/* NOTE: carlton/2002-12-05: At one point, this function was part of + lookup_symbol_aux, and what are now 'return' statements within + lookup_symbol_aux_minsyms returned from lookup_symbol_aux, even if + sym was NULL. As far as I can tell, this was basically accidental; + it didn't happen every time that msymbol was non-NULL, but only if + some additional conditions held as well, and it caused problems + with HP-generated symbol tables. */ + +/* NOTE: carlton/2003-05-14: This function was once used as part of + lookup_symbol. It is currently unnecessary for correctness + reasons, however, and using it doesn't seem to be any faster than + using lookup_symbol_aux_psymtabs, so I'm commenting it out. */ + +static struct symbol * +lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab) +{ + struct symbol *sym; + struct blockvector *bv; + const struct block *block; + struct minimal_symbol *msymbol; + struct symtab *s; + + if (domain == VAR_DOMAIN) + { + msymbol = lookup_minimal_symbol (name, NULL, NULL); + + if (msymbol != NULL) + { + /* OK, we found a minimal symbol in spite of not finding any + symbol. There are various possible explanations for + this. One possibility is the symbol exists in code not + compiled -g. Another possibility is that the 'psymtab' + isn't doing its job. A third possibility, related to #2, + is that we were confused by name-mangling. For instance, + maybe the psymtab isn't doing its job because it only + know about demangled names, but we were given a mangled + name... */ + + /* We first use the address in the msymbol to try to locate + the appropriate symtab. Note that find_pc_sect_symtab() + has a side-effect of doing psymtab-to-symtab expansion, + for the found symtab. */ + s = find_pc_sect_symtab (SYMBOL_VALUE_ADDRESS (msymbol), + SYMBOL_BFD_SECTION (msymbol)); + if (s != NULL) + { + /* This is a function which has a symtab for its address. */ + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the + `name' argument to lookup_block_symbol. But the name + of a minimal symbol is always mangled, so that seems + to be clearly the wrong thing to pass as the + unmangled name. */ + sym = + lookup_block_symbol (block, name, linkage_name, domain); + /* We kept static functions in minimal symbol table as well as + in static scope. We want to find them in the symbol table. */ + if (!sym) + { + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, + linkage_name, domain); + } + + /* NOTE: carlton/2002-12-04: The following comment was + taken from a time when two versions of this function + were part of the body of lookup_symbol_aux: this + comment was taken from the version of the function + that was #ifdef HPUXHPPA, and the comment was right + before the 'return NULL' part of lookup_symbol_aux. + (Hence the "Fall through and return 0" comment.) + Elena did some digging into the situation for + Fortran, and she reports: + + "I asked around (thanks to Jeff Knaggs), and I think + the story for Fortran goes like this: + + "Apparently, in older Fortrans, '_' was not part of + the user namespace. g77 attached a final '_' to + procedure names as the exported symbols for linkage + (foo_) , but the symbols went in the debug info just + like 'foo'. The rationale behind this is not + completely clear, and maybe it was done to other + symbols as well, not just procedures." */ + + /* If we get here with sym == 0, the symbol was + found in the minimal symbol table + but not in the symtab. + Fall through and return 0 to use the msymbol + definition of "foo_". + (Note that outer code generally follows up a call + to this routine with a call to lookup_minimal_symbol(), + so a 0 return means we'll just flow into that other routine). + + This happens for Fortran "foo_" symbols, + which are "foo" in the symtab. + + This can also happen if "asm" is used to make a + regular symbol but not a debugging symbol, e.g. + asm(".globl _main"); + asm("_main:"); + */ + + if (symtab != NULL && sym != NULL) + *symtab = s; + return fixup_symbol_section (sym, s->objfile); + } + } + } + + return NULL; +} +#endif /* 0 */ + +/* A default version of lookup_symbol_nonlocal for use by languages + that can't think of anything better to do. This implements the C + lookup rules. */ + +struct symbol * +basic_lookup_symbol_nonlocal (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + /* NOTE: carlton/2003-05-19: The comments below were written when + this (or what turned into this) was part of lookup_symbol_aux; + I'm much less worried about these questions now, since these + decisions have turned out well, but I leave these comments here + for posterity. */ + + /* NOTE: carlton/2002-12-05: There is a question as to whether or + not it would be appropriate to search the current global block + here as well. (That's what this code used to do before the + is_a_field_of_this check was moved up.) On the one hand, it's + redundant with the lookup_symbol_aux_symtabs search that happens + next. On the other hand, if decode_line_1 is passed an argument + like filename:var, then the user presumably wants 'var' to be + searched for in filename. On the third hand, there shouldn't be + multiple global variables all of which are named 'var', and it's + not like decode_line_1 has ever restricted its search to only + global variables in a single filename. All in all, only + searching the static block here seems best: it's correct and it's + cleanest. */ + + /* NOTE: carlton/2002-12-05: There's also a possible performance + issue here: if you usually search for global symbols in the + current file, then it would be slightly better to search the + current global block before searching all the symtabs. But there + are other factors that have a much greater effect on performance + than that one, so I don't think we should worry about that for + now. */ + + sym = lookup_symbol_static (name, linkage_name, block, domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_global (name, linkage_name, domain, symtab); +} + +/* Lookup a symbol in the static block associated to BLOCK, if there + is one; do nothing if BLOCK is NULL or a global block. */ + +struct symbol * +lookup_symbol_static (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + const struct block *static_block = block_static_block (block); + + if (static_block != NULL) + return lookup_symbol_aux_block (name, linkage_name, static_block, + domain, symtab); + else + return NULL; +} + +/* Lookup a symbol in all files' global blocks (searching psymtabs if + necessary). */ + +struct symbol * +lookup_symbol_global (const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); +} + +/* Look, in partial_symtab PST, for symbol whose natural name is NAME. + If LINKAGE_NAME is non-NULL, check in addition that the symbol's + linkage name matches it. Check the global symbols if GLOBAL, the + static symbols if not */ + +struct partial_symbol * +lookup_partial_symbol (struct partial_symtab *pst, const char *name, + const char *linkage_name, int global, + domain_enum domain) +{ + struct partial_symbol *temp; + struct partial_symbol **start, **psym; + struct partial_symbol **top, **real_top, **bottom, **center; + int length = (global ? pst->n_global_syms : pst->n_static_syms); + int do_linear_search = 1; + + if (length == 0) + { + return (NULL); + } + start = (global ? + pst->objfile->global_psymbols.list + pst->globals_offset : + pst->objfile->static_psymbols.list + pst->statics_offset); + + if (global) /* This means we can use a binary search. */ + { + do_linear_search = 0; + + /* Binary search. This search is guaranteed to end with center + pointing at the earliest partial symbol whose name might be + correct. At that point *all* partial symbols with an + appropriate name will be checked against the correct + domain. */ + + bottom = start; + top = start + length - 1; + real_top = top; + while (top > bottom) + { + center = bottom + (top - bottom) / 2; + if (!(center < top)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + if (!do_linear_search + && (SYMBOL_LANGUAGE (*center) == language_java)) + { + do_linear_search = 1; + } + if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0) + { + top = center; + } + else + { + bottom = center + 1; + } + } + if (!(top == bottom)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + while (top <= real_top + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) + { + if (SYMBOL_DOMAIN (*top) == domain) + { + return (*top); + } + top++; + } + } + + /* Can't use a binary search or else we found during the binary search that + we should also do a linear search. */ + + if (do_linear_search) + { + for (psym = start; psym < start + length; psym++) + { + if (domain == SYMBOL_DOMAIN (*psym)) + { + if (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*psym, name)) + { + return (*psym); + } + } + } + } + + return (NULL); +} + +/* Look up a type named NAME in the struct_domain. The type returned + must not be opaque -- i.e., must have at least one field + defined. */ + +struct type * +lookup_transparent_type (const char *name) +{ + return current_language->la_lookup_transparent_type (name); +} + +/* The standard implementation of lookup_transparent_type. This code + was modeled on lookup_symbol -- the parts not relevant to looking + up types were just left out. In particular it's assumed here that + types are available in struct_domain and only at file-static or + global blocks. */ + +struct type * +basic_lookup_transparent_type (const char *name) +{ + struct symbol *sym; + struct symtab *s = NULL; + struct partial_symtab *ps; + struct blockvector *bv; + struct objfile *objfile; + struct block *block; + + /* Now search all the global symbols. Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a global, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, + 1, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the statics even though the psymtab + * claimed the symbol was global. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + + /* Now search the static file-level symbols. + Not strictly correct, but more useful than an error. + Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. + */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the globals even though the psymtab + * claimed the symbol was static. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + return (struct type *) 0; +} + + +/* Find the psymtab containing main(). */ +/* FIXME: What about languages without main() or specially linked + executables that have no main() ? */ + +struct partial_symtab * +find_main_psymtab (void) +{ + struct partial_symtab *pst; + struct objfile *objfile; + + ALL_PSYMTABS (objfile, pst) + { + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + { + return (pst); + } + } + return (NULL); +} + +/* Search BLOCK for symbol NAME in DOMAIN. + + Note that if NAME is the demangled form of a C++ symbol, we will fail + to find a match during the binary search of the non-encoded names, but + for now we don't worry about the slight inefficiency of looking for + a match we'll never find, since it will go pretty quick. Once the + binary search terminates, we drop through and do a straight linear + search on the symbols. Each symbol which is marked as being a ObjC/C++ + symbol (language_cplus or language_objc set) has both the encoded and + non-encoded names tested for a match. + + If LINKAGE_NAME is non-NULL, verify that any symbol we find has this + particular mangled name. +*/ + +struct symbol * +lookup_block_symbol (const struct block *block, const char *name, + const char *linkage_name, + const domain_enum domain) +{ + struct dict_iterator iter; + struct symbol *sym; + + if (!BLOCK_FUNCTION (block)) + { + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + return sym; + } + return NULL; + } + else + { + /* Note that parameter symbols do not always show up last in the + list; this loop makes sure to take anything else other than + parameter symbols first; it only uses parameter symbols as a + last resort. Note that this only takes up extra computation + time on a match. */ + + struct symbol *sym_found = NULL; + + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + { + sym_found = sym; + if (SYMBOL_CLASS (sym) != LOC_ARG && + SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && + SYMBOL_CLASS (sym) != LOC_REF_ARG && + SYMBOL_CLASS (sym) != LOC_REGPARM && + SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR && + SYMBOL_CLASS (sym) != LOC_BASEREG_ARG && + SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG) + { + break; + } + } + } + return (sym_found); /* Will be NULL if not found. */ + } +} + +/* Find the symtab associated with PC and SECTION. Look through the + psymtabs and read in another symtab if necessary. */ + +struct symtab * +find_pc_sect_symtab (CORE_ADDR pc, asection *section) +{ + struct block *b; + struct blockvector *bv; + struct symtab *s = NULL; + struct symtab *best_s = NULL; + struct partial_symtab *ps; + struct objfile *objfile; + CORE_ADDR distance = 0; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on the block's high and low code + addresses, which do not include the data ranges, and because + we call find_pc_sect_psymtab which has a similar restriction based + on the partial_symtab's texthigh and textlow. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + /* Search all symtabs for the one whose file contains our address, and which + is the smallest of all the ones containing the address. This is designed + to deal with a case like symtab a is at 0x1000-0x2000 and 0x3000-0x4000 + and symtab b is at 0x2000-0x3000. So the GLOBAL_BLOCK for a is from + 0x1000-0x4000, but for address 0x2345 we want to return symtab b. + + This happens for native ecoff format, where code from included files + gets its own symtab. The symtab for the included file should have + been read in already via the dependency mechanism. + It might be swifter to create several symtabs with the same name + like xcoff does (I'm not sure). + + It also happens for objfiles that have their functions reordered. + For these, the symtab we are looking for is not necessarily read in. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + if (BLOCK_START (b) <= pc + && BLOCK_END (b) > pc + && (distance == 0 + || BLOCK_END (b) - BLOCK_START (b) < distance)) + { + /* For an objfile that has its functions reordered, + find_pc_psymtab will find the proper partial symbol table + and we simply return its corresponding symtab. */ + /* In order to better support objfiles that contain both + stabs and coff debugging info, we continue on if a psymtab + can't be found. */ + if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs) + { + ps = find_pc_sect_psymtab (pc, section); + if (ps) + return PSYMTAB_TO_SYMTAB (ps); + } + if (section != 0) + { + struct dict_iterator iter; + struct symbol *sym = NULL; + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + fixup_symbol_section (sym, objfile); + if (section == SYMBOL_BFD_SECTION (sym)) + break; + } + if (sym == NULL) + continue; /* no symbol in this symtab matches section */ + } + distance = BLOCK_END (b) - BLOCK_START (b); + best_s = s; + } + } + + if (best_s != NULL) + return (best_s); + + s = NULL; + ps = find_pc_sect_psymtab (pc, section); + if (ps) + { + if (ps->readin) + /* Might want to error() here (in case symtab is corrupt and + will cause a core dump), but maybe we can successfully + continue, so let's not. */ + warning ("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + paddr_nz (pc)); + s = PSYMTAB_TO_SYMTAB (ps); + } + return (s); +} + +/* Find the symtab associated with PC. Look through the psymtabs and + read in another symtab if necessary. Backward compatibility, no section */ + +struct symtab * +find_pc_symtab (CORE_ADDR pc) +{ + return find_pc_sect_symtab (pc, find_pc_mapped_section (pc)); +} + + +/* Find the source file and line number for a given PC value and SECTION. + Return a structure containing a symtab pointer, a line number, + and a pc range for the entire source line. + The value's .pc field is NOT the specified pc. + NOTCURRENT nonzero means, if specified pc is on a line boundary, + use the line that ends there. Otherwise, in that case, the line + that begins there is used. */ + +/* The big complication here is that a line may start in one file, and end just + before the start of another file. This usually occurs when you #include + code in the middle of a subroutine. To properly find the end of a line's PC + range, we must search all symtabs associated with this compilation unit, and + find the one whose first PC is closer than that of the next line in this + symtab. */ + +/* If it's worth the effort, we could be using a binary search. */ + +struct symtab_and_line +find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent) +{ + struct symtab *s; + struct linetable *l; + int len; + int i; + struct linetable_entry *item; + struct symtab_and_line val; + struct blockvector *bv; + struct minimal_symbol *msymbol; + struct minimal_symbol *mfunsym; + + /* Info on best line seen so far, and where it starts, and its file. */ + + struct linetable_entry *best = NULL; + CORE_ADDR best_end = 0; + struct symtab *best_symtab = 0; + + /* Store here the first line number + of a file which contains the line at the smallest pc after PC. + If we don't find a line whose range contains PC, + we will use a line one less than this, + with a range from the start of that file to the first line's pc. */ + struct linetable_entry *alt = NULL; + struct symtab *alt_symtab = 0; + + /* Info on best line seen in this file. */ + + struct linetable_entry *prev; + + /* If this pc is not from the current frame, + it is the address of the end of a call instruction. + Quite likely that is the start of the following statement. + But what we want is the statement containing the instruction. + Fudge the pc to make sure we get that. */ + + init_sal (&val); /* initialize to zeroes */ + + /* It's tempting to assume that, if we can't find debugging info for + any function enclosing PC, that we shouldn't search for line + number info, either. However, GAS can emit line number info for + assembly files --- very helpful when debugging hand-written + assembly code. In such a case, we'd have no debug info for the + function, but we would have line info. */ + + if (notcurrent) + pc -= 1; + + /* elz: added this because this function returned the wrong + information if the pc belongs to a stub (import/export) + to call a shlib function. This stub would be anywhere between + two functions in the target, and the line info was erroneously + taken to be the one of the line before the pc. + */ + /* RT: Further explanation: + + * We have stubs (trampolines) inserted between procedures. + * + * Example: "shr1" exists in a shared library, and a "shr1" stub also + * exists in the main image. + * + * In the minimal symbol table, we have a bunch of symbols + * sorted by start address. The stubs are marked as "trampoline", + * the others appear as text. E.g.: + * + * Minimal symbol table for main image + * main: code for main (text symbol) + * shr1: stub (trampoline symbol) + * foo: code for foo (text symbol) + * ... + * Minimal symbol table for "shr1" image: + * ... + * shr1: code for shr1 (text symbol) + * ... + * + * So the code below is trying to detect if we are in the stub + * ("shr1" stub), and if so, find the real code ("shr1" trampoline), + * and if found, do the symbolization from the real-code address + * rather than the stub address. + * + * Assumptions being made about the minimal symbol table: + * 1. lookup_minimal_symbol_by_pc() will return a trampoline only + * if we're really in the trampoline. If we're beyond it (say + * we're in "foo" in the above example), it'll have a closer + * symbol (the "foo" text symbol for example) and will not + * return the trampoline. + * 2. lookup_minimal_symbol_text() will find a real text symbol + * corresponding to the trampoline, and whose address will + * be different than the trampoline address. I put in a sanity + * check for the address being the same, to avoid an + * infinite recursion. + */ + msymbol = lookup_minimal_symbol_by_pc (pc); + if (msymbol != NULL) + if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + { + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL); + if (mfunsym == NULL) + /* I eliminated this warning since it is coming out + * in the following situation: + * gdb shmain // test program with shared libraries + * (gdb) break shr1 // function in shared lib + * Warning: In stub for ... + * In the above situation, the shared lib is not loaded yet, + * so of course we can't find the real func/line info, + * but the "break" still works, and the warning is annoying. + * So I commented out the warning. RT */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) + /* Avoid infinite recursion */ + /* See above comment about why warning is commented out */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else + return find_pc_line (SYMBOL_VALUE (mfunsym), 0); + } + + + s = find_pc_sect_symtab (pc, section); + if (!s) + { + /* if no symbol information, return previous pc */ + if (notcurrent) + pc++; + val.pc = pc; + return val; + } + + bv = BLOCKVECTOR (s); + + /* Look at all the symtabs that share this blockvector. + They all have the same apriori range, that we found was right; + but they have different line tables. */ + + for (; s && BLOCKVECTOR (s) == bv; s = s->next) + { + /* Find the best line in this symtab. */ + l = LINETABLE (s); + if (!l) + continue; + len = l->nitems; + if (len <= 0) + { + /* I think len can be zero if the symtab lacks line numbers + (e.g. gcc -g1). (Either that or the LINETABLE is NULL; + I'm not sure which, and maybe it depends on the symbol + reader). */ + continue; + } + + prev = NULL; + item = l->item; /* Get first line info */ + + /* Is this file's first line closer than the first lines of other files? + If so, record this file, and its first line, as best alternate. */ + if (item->pc > pc && (!alt || item->pc < alt->pc)) + { + alt = item; + alt_symtab = s; + } + + for (i = 0; i < len; i++, item++) + { + /* Leave prev pointing to the linetable entry for the last line + that started at or before PC. */ + if (item->pc > pc) + break; + + prev = item; + } + + /* At this point, prev points at the line whose start addr is <= pc, and + item points at the next line. If we ran off the end of the linetable + (pc >= start of the last line), then prev == item. If pc < start of + the first line, prev will not be set. */ + + /* Is this file's best line closer than the best in the other files? + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ + + if (prev && prev->line && (!best || prev->pc > best->pc)) + { + best = prev; + best_symtab = s; + + /* Discard BEST_END if it's before the PC of the current BEST. */ + if (best_end <= best->pc) + best_end = 0; + } + + /* If another line (denoted by ITEM) is in the linetable and its + PC is after BEST's PC, but before the current BEST_END, then + use ITEM's PC as the new best_end. */ + if (best && i < len && item->pc > best->pc + && (best_end == 0 || best_end > item->pc)) + best_end = item->pc; + } + + if (!best_symtab) + { + if (!alt_symtab) + { /* If we didn't find any line # info, just + return zeros. */ + val.pc = pc; + } + else + { + val.symtab = alt_symtab; + val.line = alt->line - 1; + + /* Don't return line 0, that means that we didn't find the line. */ + if (val.line == 0) + ++val.line; + + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + val.end = alt->pc; + } + } + else if (best->line == 0) + { + /* If our best fit is in a range of PC's for which no line + number info is available (line number is zero) then we didn't + find any valid line information. */ + val.pc = pc; + } + else + { + val.symtab = best_symtab; + val.line = best->line; + val.pc = best->pc; + if (best_end && (!alt || best_end < alt->pc)) + val.end = best_end; + else if (alt) + val.end = alt->pc; + else + val.end = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + } + val.section = section; + return val; +} + +/* Backward compatibility (no section) */ + +struct symtab_and_line +find_pc_line (CORE_ADDR pc, int notcurrent) +{ + asection *section; + + section = find_pc_overlay (pc); + if (pc_in_unmapped_range (pc, section)) + pc = overlay_mapped_address (pc, section); + return find_pc_sect_line (pc, section, notcurrent); +} + +/* Find line number LINE in any symtab whose name is the same as + SYMTAB. + + If found, return the symtab that contains the linetable in which it was + found, set *INDEX to the index in the linetable of the best entry + found, and set *EXACT_MATCH nonzero if the value returned is an + exact match. + + If not found, return NULL. */ + +struct symtab * +find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match) +{ + int exact; + + /* BEST_INDEX and BEST_LINETABLE identify the smallest linenumber > LINE + so far seen. */ + + int best_index; + struct linetable *best_linetable; + struct symtab *best_symtab; + + /* First try looking it up in the given symtab. */ + best_linetable = LINETABLE (symtab); + best_symtab = symtab; + best_index = find_line_common (best_linetable, line, &exact); + if (best_index < 0 || !exact) + { + /* Didn't find an exact match. So we better keep looking for + another symtab with the same name. In the case of xcoff, + multiple csects for one source file (produced by IBM's FORTRAN + compiler) produce multiple symtabs (this is unavoidable + assuming csects can be at arbitrary places in memory and that + the GLOBAL_BLOCK of a symtab has a begin and end address). */ + + /* BEST is the smallest linenumber > LINE so far seen, + or 0 if none has been seen so far. + BEST_INDEX and BEST_LINETABLE identify the item for it. */ + int best; + + struct objfile *objfile; + struct symtab *s; + + if (best_index >= 0) + best = best_linetable->item[best_index].line; + else + best = 0; + + ALL_SYMTABS (objfile, s) + { + struct linetable *l; + int ind; + + if (strcmp (symtab->filename, s->filename) != 0) + continue; + l = LINETABLE (s); + ind = find_line_common (l, line, &exact); + if (ind >= 0) + { + if (exact) + { + best_index = ind; + best_linetable = l; + best_symtab = s; + goto done; + } + if (best == 0 || l->item[ind].line < best) + { + best = l->item[ind].line; + best_index = ind; + best_linetable = l; + best_symtab = s; + } + } + } + } +done: + if (best_index < 0) + return NULL; + + if (index) + *index = best_index; + if (exact_match) + *exact_match = exact; + + return best_symtab; +} + +/* Set the PC value for a given source file and line number and return true. + Returns zero for invalid line number (and sets the PC to 0). + The source file is specified with a struct symtab. */ + +int +find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc) +{ + struct linetable *l; + int ind; + + *pc = 0; + if (symtab == 0) + return 0; + + symtab = find_line_symtab (symtab, line, &ind, NULL); + if (symtab != NULL) + { + l = LINETABLE (symtab); + *pc = l->item[ind].pc; + return 1; + } + else + return 0; +} + +/* Find the range of pc values in a line. + Store the starting pc of the line into *STARTPTR + and the ending pc (start of next line) into *ENDPTR. + Returns 1 to indicate success. + Returns 0 if could not find the specified line. */ + +int +find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, + CORE_ADDR *endptr) +{ + CORE_ADDR startaddr; + struct symtab_and_line found_sal; + + startaddr = sal.pc; + if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr)) + return 0; + + /* This whole function is based on address. For example, if line 10 has + two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then + "info line *0x123" should say the line goes from 0x100 to 0x200 + and "info line *0x355" should say the line goes from 0x300 to 0x400. + This also insures that we never give a range like "starts at 0x134 + and ends at 0x12c". */ + + found_sal = find_pc_sect_line (startaddr, sal.section, 0); + if (found_sal.line != sal.line) + { + /* The specified line (sal) has zero bytes. */ + *startptr = found_sal.pc; + *endptr = found_sal.pc; + } + else + { + *startptr = found_sal.pc; + *endptr = found_sal.end; + } + return 1; +} + +/* Given a line table and a line number, return the index into the line + table for the pc of the nearest line whose number is >= the specified one. + Return -1 if none is found. The value is >= 0 if it is an index. + + Set *EXACT_MATCH nonzero if the value returned is an exact match. */ + +static int +find_line_common (struct linetable *l, int lineno, + int *exact_match) +{ + int i; + int len; + + /* BEST is the smallest linenumber > LINENO so far seen, + or 0 if none has been seen so far. + BEST_INDEX identifies the item for it. */ + + int best_index = -1; + int best = 0; + + if (lineno <= 0) + return -1; + if (l == 0) + return -1; + + len = l->nitems; + for (i = 0; i < len; i++) + { + struct linetable_entry *item = &(l->item[i]); + + if (item->line == lineno) + { + /* Return the first (lowest address) entry which matches. */ + *exact_match = 1; + return i; + } + + if (item->line > lineno && (best == 0 || item->line < best)) + { + best = item->line; + best_index = i; + } + } + + /* If we got here, we didn't get an exact match. */ + + *exact_match = 0; + return best_index; +} + +int +find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr) +{ + struct symtab_and_line sal; + sal = find_pc_line (pc, 0); + *startptr = sal.pc; + *endptr = sal.end; + return sal.symtab != 0; +} + +/* Given a function symbol SYM, find the symtab and line for the start + of the function. + If the argument FUNFIRSTLINE is nonzero, we want the first line + of real code inside the function. */ + +struct symtab_and_line +find_function_start_sal (struct symbol *sym, int funfirstline) +{ + CORE_ADDR pc; + struct symtab_and_line sal; + + pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + fixup_symbol_section (sym, NULL); + if (funfirstline) + { /* skip "first line" of function (which is actually its prologue) */ + asection *section = SYMBOL_BFD_SECTION (sym); + /* If function is in an unmapped overlay, use its unmapped LMA + address, so that SKIP_PROLOGUE has something unique to work on */ + if (section_is_overlay (section) && + !section_is_mapped (section)) + pc = overlay_unmapped_address (pc, section); + + pc += FUNCTION_START_OFFSET; + pc = SKIP_PROLOGUE (pc); + + /* For overlays, map pc back into its mapped VMA range */ + pc = overlay_mapped_address (pc, section); + } + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + + /* Check if SKIP_PROLOGUE left us in mid-line, and the next + line is still part of the same function. */ + if (sal.pc != pc + && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end + && sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym))) + { + /* First pc of next line */ + pc = sal.end; + /* Recalculate the line number (might not be N+1). */ + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + } + sal.pc = pc; + + return sal; +} + +/* If P is of the form "operator[ \t]+..." where `...' is + some legitimate operator text, return a pointer to the + beginning of the substring of the operator text. + Otherwise, return "". */ +char * +operator_chars (char *p, char **end) +{ + *end = ""; + if (strncmp (p, "operator", 8)) + return *end; + p += 8; + + /* Don't get faked out by `operator' being part of a longer + identifier. */ + if (isalpha (*p) || *p == '_' || *p == '$' || *p == '\0') + return *end; + + /* Allow some whitespace between `operator' and the operator symbol. */ + while (*p == ' ' || *p == '\t') + p++; + + /* Recognize 'operator TYPENAME'. */ + + if (isalpha (*p) || *p == '_' || *p == '$') + { + char *q = p + 1; + while (isalnum (*q) || *q == '_' || *q == '$') + q++; + *end = q; + return p; + } + + while (*p) + switch (*p) + { + case '\\': /* regexp quoting */ + if (p[1] == '*') + { + if (p[2] == '=') /* 'operator\*=' */ + *end = p + 3; + else /* 'operator\*' */ + *end = p + 2; + return p; + } + else if (p[1] == '[') + { + if (p[2] == ']') + error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + else if (p[2] == '\\' && p[3] == ']') + { + *end = p + 4; /* 'operator\[\]' */ + return p; + } + else + error ("nothing is allowed between '[' and ']'"); + } + else + { + /* Gratuitous qoute: skip it and move on. */ + p++; + continue; + } + break; + case '!': + case '=': + case '*': + case '/': + case '%': + case '^': + if (p[1] == '=') + *end = p + 2; + else + *end = p + 1; + return p; + case '<': + case '>': + case '+': + case '-': + case '&': + case '|': + if (p[0] == '-' && p[1] == '>') + { + /* Struct pointer member operator 'operator->'. */ + if (p[2] == '*') + { + *end = p + 3; /* 'operator->*' */ + return p; + } + else if (p[2] == '\\') + { + *end = p + 4; /* Hopefully 'operator->\*' */ + return p; + } + else + { + *end = p + 2; /* 'operator->' */ + return p; + } + } + if (p[1] == '=' || p[1] == p[0]) + *end = p + 2; + else + *end = p + 1; + return p; + case '~': + case ',': + *end = p + 1; + return p; + case '(': + if (p[1] != ')') + error ("`operator ()' must be specified without whitespace in `()'"); + *end = p + 2; + return p; + case '?': + if (p[1] != ':') + error ("`operator ?:' must be specified without whitespace in `?:'"); + *end = p + 2; + return p; + case '[': + if (p[1] != ']') + error ("`operator []' must be specified without whitespace in `[]'"); + *end = p + 2; + return p; + default: + error ("`operator %s' not supported", p); + break; + } + + *end = ""; + return *end; +} + + +/* If FILE is not already in the table of files, return zero; + otherwise return non-zero. Optionally add FILE to the table if ADD + is non-zero. If *FIRST is non-zero, forget the old table + contents. */ +static int +filename_seen (const char *file, int add, int *first) +{ + /* Table of files seen so far. */ + static const char **tab = NULL; + /* Allocated size of tab in elements. + Start with one 256-byte block (when using GNU malloc.c). + 24 is the malloc overhead when range checking is in effect. */ + static int tab_alloc_size = (256 - 24) / sizeof (char *); + /* Current size of tab in elements. */ + static int tab_cur_size; + const char **p; + + if (*first) + { + if (tab == NULL) + tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab)); + tab_cur_size = 0; + } + + /* Is FILE in tab? */ + for (p = tab; p < tab + tab_cur_size; p++) + if (strcmp (*p, file) == 0) + return 1; + + /* No; maybe add it to tab. */ + if (add) + { + if (tab_cur_size == tab_alloc_size) + { + tab_alloc_size *= 2; + tab = (const char **) xrealloc ((char *) tab, + tab_alloc_size * sizeof (*tab)); + } + tab[tab_cur_size++] = file; + } + + return 0; +} + +/* Slave routine for sources_info. Force line breaks at ,'s. + NAME is the name to print and *FIRST is nonzero if this is the first + name printed. Set *FIRST to zero. */ +static void +output_source_filename (char *name, int *first) +{ + /* Since a single source file can result in several partial symbol + tables, we need to avoid printing it more than once. Note: if + some of the psymtabs are read in and some are not, it gets + printed both under "Source files for which symbols have been + read" and "Source files for which symbols will be read in on + demand". I consider this a reasonable way to deal with the + situation. I'm not sure whether this can also happen for + symtabs; it doesn't hurt to check. */ + + /* Was NAME already seen? */ + if (filename_seen (name, 1, first)) + { + /* Yes; don't print it again. */ + return; + } + /* No; print it and reset *FIRST. */ + if (*first) + { + *first = 0; + } + else + { + printf_filtered (", "); + } + + wrap_here (""); + fputs_filtered (name, gdb_stdout); +} + +static void +sources_info (char *ignore, int from_tty) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first; + + if (!have_full_symbols () && !have_partial_symbols ()) + { + error ("No symbol table is loaded. Use the \"file\" command."); + } + + printf_filtered ("Source files for which symbols have been read in:\n\n"); + + first = 1; + ALL_SYMTABS (objfile, s) + { + output_source_filename (s->filename, &first); + } + printf_filtered ("\n\n"); + + printf_filtered ("Source files for which symbols will be read in on demand:\n\n"); + + first = 1; + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin) + { + output_source_filename (ps->filename, &first); + } + } + printf_filtered ("\n"); +} + +static int +file_matches (char *file, char *files[], int nfiles) +{ + int i; + + if (file != NULL && nfiles != 0) + { + for (i = 0; i < nfiles; i++) + { + if (strcmp (files[i], lbasename (file)) == 0) + return 1; + } + } + else if (nfiles == 0) + return 1; + return 0; +} + +/* Free any memory associated with a search. */ +void +free_search_symbols (struct symbol_search *symbols) +{ + struct symbol_search *p; + struct symbol_search *next; + + for (p = symbols; p != NULL; p = next) + { + next = p->next; + xfree (p); + } +} + +static void +do_free_search_symbols_cleanup (void *symbols) +{ + free_search_symbols (symbols); +} + +struct cleanup * +make_cleanup_free_search_symbols (struct symbol_search *symbols) +{ + return make_cleanup (do_free_search_symbols_cleanup, symbols); +} + +/* Helper function for sort_search_symbols and qsort. Can only + sort symbols, not minimal symbols. */ +static int +compare_search_syms (const void *sa, const void *sb) +{ + struct symbol_search **sym_a = (struct symbol_search **) sa; + struct symbol_search **sym_b = (struct symbol_search **) sb; + + return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol), + SYMBOL_PRINT_NAME ((*sym_b)->symbol)); +} + +/* Sort the ``nfound'' symbols in the list after prevtail. Leave + prevtail where it is, but update its next pointer to point to + the first of the sorted symbols. */ +static struct symbol_search * +sort_search_symbols (struct symbol_search *prevtail, int nfound) +{ + struct symbol_search **symbols, *symp, *old_next; + int i; + + symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *) + * nfound); + symp = prevtail->next; + for (i = 0; i < nfound; i++) + { + symbols[i] = symp; + symp = symp->next; + } + /* Generally NULL. */ + old_next = symp; + + qsort (symbols, nfound, sizeof (struct symbol_search *), + compare_search_syms); + + symp = prevtail; + for (i = 0; i < nfound; i++) + { + symp->next = symbols[i]; + symp = symp->next; + } + symp->next = old_next; + + xfree (symbols); + return symp; +} + +/* Search the symbol table for matches to the regular expression REGEXP, + returning the results in *MATCHES. + + Only symbols of KIND are searched: + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, + and constants (enums) + + free_search_symbols should be called when *MATCHES is no longer needed. + + The results are sorted locally; each symtab's global and static blocks are + separately alphabetized. + */ +void +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], + struct symbol_search **matches) +{ + struct symtab *s; + struct partial_symtab *ps; + struct blockvector *bv; + struct blockvector *prev_bv = 0; + struct block *b; + int i = 0; + struct dict_iterator iter; + struct symbol *sym; + struct partial_symbol **psym; + struct objfile *objfile; + struct minimal_symbol *msymbol; + char *val; + int found_misc = 0; + static enum minimal_symbol_type types[] + = + {mst_data, mst_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types2[] + = + {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = + {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = + {mst_file_bss, mst_text, mst_abs, mst_unknown}; + enum minimal_symbol_type ourtype; + enum minimal_symbol_type ourtype2; + enum minimal_symbol_type ourtype3; + enum minimal_symbol_type ourtype4; + struct symbol_search *sr; + struct symbol_search *psr; + struct symbol_search *tail; + struct cleanup *old_chain = NULL; + + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); + + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; + + sr = *matches = NULL; + tail = NULL; + + if (regexp != NULL) + { + /* Make sure spacing is right for C++ operators. + This is just a courtesy to make the matching less sensitive + to how many spaces the user leaves between 'operator' + and or . */ + char *opend; + char *opname = operator_chars (regexp, &opend); + if (*opname) + { + int fix = -1; /* -1 means ok; otherwise number of spaces needed. */ + if (isalpha (*opname) || *opname == '_' || *opname == '$') + { + /* There should 1 space between 'operator' and 'TYPENAME'. */ + if (opname[-1] != ' ' || opname[-2] == ' ') + fix = 1; + } + else + { + /* There should 0 spaces between 'operator' and 'OPERATOR'. */ + if (opname[-1] == ' ') + fix = 0; + } + /* If wrong number of spaces, fix it. */ + if (fix >= 0) + { + char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); + sprintf (tmp, "operator%.*s%s", fix, " ", opname); + regexp = tmp; + } + } + + if (0 != (val = re_comp (regexp))) + error ("Invalid regexp (%s): %s", val, regexp); + } + + /* Search through the partial symtabs *first* for all symbols + matching the regexp. That way we don't have to reproduce all of + the machinery below. */ + + ALL_PSYMTABS (objfile, ps) + { + struct partial_symbol **bound, **gbound, **sbound; + int keep_going = 1; + + if (ps->readin) + continue; + + gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms; + sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms; + bound = gbound; + + /* Go through all of the symbols stored in a partial + symtab in one loop. */ + psym = objfile->global_psymbols.list + ps->globals_offset; + while (keep_going) + { + if (psym >= bound) + { + if (bound == gbound && ps->n_static_syms != 0) + { + psym = objfile->static_psymbols.list + ps->statics_offset; + bound = sbound; + } + else + keep_going = 0; + continue; + } + else + { + QUIT; + + /* If it would match (logic taken from loop below) + load the file and go on to the next one */ + if (file_matches (ps->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && SYMBOL_CLASS (*psym) != LOC_BLOCK) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + { + PSYMTAB_TO_SYMTAB (ps); + keep_going = 0; + } + } + psym++; + } + } + + /* Here, we search through the minimal symbol tables for functions + and variables that match, and force their symbols to be read. + This is in particular necessary for demangled variable names, + which are no longer put into the partial symbol tables. + The symbol will then be found during the scan of symtabs below. + + For functions, find_pc_symtab should succeed if we have debug info + for the function, for variables we have to call lookup_symbol + to determine if the variable has debug info. + If the lookup fails, set found_misc so that we will rescan to print + any matching symbols without debug info. + */ + + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) + { + /* FIXME: carlton/2003-02-04: Given that the + semantics of lookup_symbol keeps on changing + slightly, it would be a nice idea if we had a + function lookup_symbol_minsym that found the + symbol associated to a given minimal symbol (if + any). */ + if (kind == FUNCTIONS_DOMAIN + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, + VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + found_misc = 1; + } + } + } + } + } + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + /* Often many files share a blockvector. + Scan each blockvector only once so that + we don't get every symbol many times. + It happens that the first symtab in the list + for any given blockvector is the main file. */ + if (bv != prev_bv) + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) + { + struct symbol_search *prevtail = tail; + int nfound = 0; + b = BLOCKVECTOR_BLOCK (bv, i); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + if (file_matches (s->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && SYMBOL_CLASS (sym) != LOC_BLOCK + && SYMBOL_CLASS (sym) != LOC_CONST) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->symtab = s; + psr->symbol = sym; + psr->msymbol = NULL; + psr->next = NULL; + if (tail == NULL) + sr = psr; + else + tail->next = psr; + tail = psr; + nfound ++; + } + } + if (nfound > 0) + { + if (prevtail == NULL) + { + struct symbol_search dummy; + + dummy.next = sr; + tail = sort_search_symbols (&dummy, nfound); + sr = dummy.next; + + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail = sort_search_symbols (prevtail, nfound); + } + } + prev_bv = bv; + } + + /* If there are no eyes, avoid all contact. I mean, if there are + no debug symbols, then print directly from the msymbol_vector. */ + + if (found_misc || kind != FUNCTIONS_DOMAIN) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + /* Functions: Look up by address. */ + if (kind != FUNCTIONS_DOMAIN || + (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) + { + /* Variables/Absolutes: Look up by name */ + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->msymbol = msymbol; + psr->symtab = NULL; + psr->symbol = NULL; + psr->next = NULL; + if (tail == NULL) + { + sr = psr; + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail->next = psr; + tail = psr; + } + } + } + } + } + } + + *matches = sr; + if (sr != NULL) + discard_cleanups (old_chain); +} + +/* Helper function for symtab_symbol_info, this function uses + the data returned from search_symbols() to print information + regarding the match to gdb_stdout. + */ +static void +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, + int block, char *last) +{ + if (last == NULL || strcmp (last, s->filename) != 0) + { + fputs_filtered ("\nFile ", gdb_stdout); + fputs_filtered (s->filename, gdb_stdout); + fputs_filtered (":\n", gdb_stdout); + } + + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) + printf_filtered ("static "); + + /* Typedef that is not a C++ class */ + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) + typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); + /* variable, func, or typedef-that-is-c++-class */ + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) + { + type_print (SYMBOL_TYPE (sym), + (SYMBOL_CLASS (sym) == LOC_TYPEDEF + ? "" : SYMBOL_PRINT_NAME (sym)), + gdb_stdout, 0); + + printf_filtered (";\n"); + } +} + +/* This help function for symtab_symbol_info() prints information + for non-debugging symbols to gdb_stdout. + */ +static void +print_msymbol_info (struct minimal_symbol *msymbol) +{ + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_PRINT_NAME (msymbol)); +} + +/* This is the guts of the commands "info functions", "info types", and + "info variables". It calls search_symbols to find all matches and then + print_[m]symbol_info to print out some useful information about the + matches. + */ +static void +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) +{ + static char *classnames[] + = + {"variable", "function", "type", "method"}; + struct symbol_search *symbols; + struct symbol_search *p; + struct cleanup *old_chain; + char *last_filename = NULL; + int first = 1; + + /* must make sure that if we're interrupted, symbols gets freed */ + search_symbols (regexp, kind, 0, (char **) NULL, &symbols); + old_chain = make_cleanup_free_search_symbols (symbols); + + printf_filtered (regexp + ? "All %ss matching regular expression \"%s\":\n" + : "All defined %ss:\n", + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); + + for (p = symbols; p != NULL; p = p->next) + { + QUIT; + + if (p->msymbol != NULL) + { + if (first) + { + printf_filtered ("\nNon-debugging symbols:\n"); + first = 0; + } + print_msymbol_info (p->msymbol); + } + else + { + print_symbol_info (kind, + p->symtab, + p->symbol, + p->block, + last_filename); + last_filename = p->symtab->filename; + } + } + + do_cleanups (old_chain); +} + +static void +variables_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); +} + +static void +functions_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); +} + + +static void +types_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); +} + +/* Breakpoint all functions matching regular expression. */ + +void +rbreak_command_wrapper (char *regexp, int from_tty) +{ + rbreak_command (regexp, from_tty); +} + +static void +rbreak_command (char *regexp, int from_tty) +{ + struct symbol_search *ss; + struct symbol_search *p; + struct cleanup *old_chain; + + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); + old_chain = make_cleanup_free_search_symbols (ss); + + for (p = ss; p != NULL; p = p->next) + { + if (p->msymbol == NULL) + { + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); + strcpy (string, p->symtab->filename); + strcat (string, ":'"); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); + strcat (string, "'"); + break_command (string, from_tty); + print_symbol_info (FUNCTIONS_DOMAIN, + p->symtab, + p->symbol, + p->block, + p->symtab->filename); + } + else + { + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); + printf_filtered (" %s;\n", + SYMBOL_PRINT_NAME (p->msymbol)); + } + } + + do_cleanups (old_chain); +} + + +/* Helper routine for make_symbol_completion_list. */ + +static int return_val_size; +static int return_val_index; +static char **return_val; + +#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ + completion_list_add_name \ + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) + +/* Test to see if the symbol specified by SYMNAME (which is already + demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN + characters. If so, add it to the current completion list. */ + +static void +completion_list_add_name (char *symname, char *sym_text, int sym_text_len, + char *text, char *word) +{ + int newsize; + int i; + + /* clip symbols that cannot match */ + + if (strncmp (symname, sym_text, sym_text_len) != 0) + { + return; + } + + /* We have a match for a completion, so add SYMNAME to the current list + of matches. Note that the name is moved to freshly malloc'd space. */ + + { + char *new; + if (word == sym_text) + { + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname); + } + else if (word > sym_text) + { + /* Return some portion of symname. */ + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname + (word - sym_text)); + } + else + { + /* Return some of SYM_TEXT plus symname. */ + new = xmalloc (strlen (symname) + (sym_text - word) + 5); + strncpy (new, word, sym_text - word); + new[sym_text - word] = '\0'; + strcat (new, symname); + } + + if (return_val_index + 3 > return_val_size) + { + newsize = (return_val_size *= 2) * sizeof (char *); + return_val = (char **) xrealloc ((char *) return_val, newsize); + } + return_val[return_val_index++] = new; + return_val[return_val_index] = NULL; + } +} + +/* ObjC: In case we are completing on a selector, look as the msymbol + again and feed all the selectors into the mill. */ + +static void +completion_list_objc_symbol (struct minimal_symbol *msymbol, char *sym_text, + int sym_text_len, char *text, char *word) +{ + static char *tmp = NULL; + static unsigned int tmplen = 0; + + char *method, *category, *selector; + char *tmp2 = NULL; + + method = SYMBOL_NATURAL_NAME (msymbol); + + /* Is it a method? */ + if ((method[0] != '-') && (method[0] != '+')) + return; + + if (sym_text[0] == '[') + /* Complete on shortened method method. */ + completion_list_add_name (method + 1, sym_text, sym_text_len, text, word); + + while ((strlen (method) + 1) >= tmplen) + { + if (tmplen == 0) + tmplen = 1024; + else + tmplen *= 2; + tmp = xrealloc (tmp, tmplen); + } + selector = strchr (method, ' '); + if (selector != NULL) + selector++; + + category = strchr (method, '('); + + if ((category != NULL) && (selector != NULL)) + { + memcpy (tmp, method, (category - method)); + tmp[category - method] = ' '; + memcpy (tmp + (category - method) + 1, selector, strlen (selector) + 1); + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + if (sym_text[0] == '[') + completion_list_add_name (tmp + 1, sym_text, sym_text_len, text, word); + } + + if (selector != NULL) + { + /* Complete on selector only. */ + strcpy (tmp, selector); + tmp2 = strchr (tmp, ']'); + if (tmp2 != NULL) + *tmp2 = '\0'; + + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + } +} + +/* Break the non-quoted text based on the characters which are in + symbols. FIXME: This should probably be language-specific. */ + +static char * +language_search_unquoted_string (char *text, char *p) +{ + for (; p > text; --p) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + continue; + else + { + if ((current_language->la_language == language_objc)) + { + if (p[-1] == ':') /* might be part of a method name */ + continue; + else if (p[-1] == '[' && (p[-2] == '-' || p[-2] == '+')) + p -= 2; /* beginning of a method name */ + else if (p[-1] == ' ' || p[-1] == '(' || p[-1] == ')') + { /* might be part of a method name */ + char *t = p; + + /* Seeing a ' ' or a '(' is not conclusive evidence + that we are in the middle of a method name. However, + finding "-[" or "+[" should be pretty un-ambiguous. + Unfortunately we have to find it now to decide. */ + + while (t > text) + if (isalnum (t[-1]) || t[-1] == '_' || + t[-1] == ' ' || t[-1] == ':' || + t[-1] == '(' || t[-1] == ')') + --t; + else + break; + + if (t[-1] == '[' && (t[-2] == '-' || t[-2] == '+')) + p = t - 2; /* method name detected */ + /* else we leave with p unchanged */ + } + } + break; + } + } + return p; +} + + +/* Return a NULL terminated array of all symbols (regardless of class) + which begin by matching TEXT. If the answer is no symbols, then + the return value is an array which contains only a NULL pointer. + + Problem: All of the symbols have to be copied because readline frees them. + I'm not going to worry about this; hopefully there won't be that many. */ + +char ** +make_symbol_completion_list (char *text, char *word) +{ + struct symbol *sym; + struct symtab *s; + struct partial_symtab *ps; + struct minimal_symbol *msymbol; + struct objfile *objfile; + struct block *b, *surrounding_static_block = 0; + struct dict_iterator iter; + int j; + struct partial_symbol **psym; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* It is not a quoted string. Break it based on the characters + which are in symbols. */ + while (p > text) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + --p; + else + break; + } + sym_text = p; + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 100; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Look through the partial symtabs for all symbols which begin + by matching SYM_TEXT. Add each one that you find to the list. */ + + ALL_PSYMTABS (objfile, ps) + { + /* If the psymtab's been read in we'll get it when we search + through the blockvector. */ + if (ps->readin) + continue; + + for (psym = objfile->global_psymbols.list + ps->globals_offset; + psym < (objfile->global_psymbols.list + ps->globals_offset + + ps->n_global_syms); + psym++) + { + /* If interrupted, then quit. */ + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + + for (psym = objfile->static_psymbols.list + ps->statics_offset; + psym < (objfile->static_psymbols.list + ps->statics_offset + + ps->n_static_syms); + psym++) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + } + + /* At this point scan through the misc symbol vectors and add each + symbol you find to the list. Eventually we want to ignore + anything that isn't a text symbol (everything else will be + handled by the psymtab code above). */ + + ALL_MSYMBOLS (objfile, msymbol) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text, word); + + completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text, word); + } + + /* Search upwards from currently selected frame (so that we can + complete on local vars. */ + + for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b)) + { + if (!BLOCK_SUPERBLOCK (b)) + { + surrounding_static_block = b; /* For elmin of dups */ + } + + /* Also catch fields of types defined in this places which match our + text string. Only complete on types visible from current context. */ + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + { + struct type *t = SYMBOL_TYPE (sym); + enum type_code c = TYPE_CODE (t); + + if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT) + { + for (j = TYPE_N_BASECLASSES (t); j < TYPE_NFIELDS (t); j++) + { + if (TYPE_FIELD_NAME (t, j)) + { + completion_list_add_name (TYPE_FIELD_NAME (t, j), + sym_text, sym_text_len, text, word); + } + } + } + } + } + } + + /* Go through the symtabs and check the externs and statics for + symbols which match. */ + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + /* Don't do this block twice. */ + if (b == surrounding_static_block) + continue; + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + return (return_val); +} + +/* Like make_symbol_completion_list, but returns a list of symbols + defined in a source file FILE. */ + +char ** +make_file_symbol_completion_list (char *text, char *word, char *srcfile) +{ + struct symbol *sym; + struct symtab *s; + struct block *b; + struct dict_iterator iter; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* Not a quoted string. */ + sym_text = language_search_unquoted_string (text, p); + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 10; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Find the symtab for SRCFILE (this loads it if it was not yet read + in). */ + s = lookup_symtab (srcfile); + if (s == NULL) + { + /* Maybe they typed the file with leading directories, while the + symbol tables record only its basename. */ + const char *tail = lbasename (srcfile); + + if (tail > srcfile) + s = lookup_symtab (tail); + } + + /* If we have no symtab for that file, return an empty list. */ + if (s == NULL) + return (return_val); + + /* Go through this symtab and check the externs and statics for + symbols which match. */ + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + return (return_val); +} + +/* A helper function for make_source_files_completion_list. It adds + another file name to a list of possible completions, growing the + list as necessary. */ + +static void +add_filename_to_list (const char *fname, char *text, char *word, + char ***list, int *list_used, int *list_alloced) +{ + char *new; + size_t fnlen = strlen (fname); + + if (*list_used + 1 >= *list_alloced) + { + *list_alloced *= 2; + *list = (char **) xrealloc ((char *) *list, + *list_alloced * sizeof (char *)); + } + + if (word == text) + { + /* Return exactly fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname); + } + else if (word > text) + { + /* Return some portion of fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname + (word - text)); + } + else + { + /* Return some of TEXT plus fname. */ + new = xmalloc (fnlen + (text - word) + 5); + strncpy (new, word, text - word); + new[text - word] = '\0'; + strcat (new, fname); + } + (*list)[*list_used] = new; + (*list)[++*list_used] = NULL; +} + +static int +not_interesting_fname (const char *fname) +{ + static const char *illegal_aliens[] = { + "_globals_", /* inserted by coff_symtab_read */ + NULL + }; + int i; + + for (i = 0; illegal_aliens[i]; i++) + { + if (strcmp (fname, illegal_aliens[i]) == 0) + return 1; + } + return 0; +} + +/* Return a NULL terminated array of all source files whose names + begin with matching TEXT. The file names are looked up in the + symbol tables of this program. If the answer is no matchess, then + the return value is an array which contains only a NULL pointer. */ + +char ** +make_source_files_completion_list (char *text, char *word) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first = 1; + int list_alloced = 1; + int list_used = 0; + size_t text_len = strlen (text); + char **list = (char **) xmalloc (list_alloced * sizeof (char *)); + const char *base_name; + + list[0] = NULL; + + if (!have_full_symbols () && !have_partial_symbols ()) + return list; + + ALL_SYMTABS (objfile, s) + { + if (not_interesting_fname (s->filename)) + continue; + if (!filename_seen (s->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (s->filename, text, text_len) == 0 +#else + && strncmp (s->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the current + list of matches. */ + add_filename_to_list (s->filename, text, word, + &list, &list_used, &list_alloced); + } + else + { + /* NOTE: We allow the user to type a base name when the + debug info records leading directories, but not the other + way around. This is what subroutines of breakpoint + command do when they parse file names. */ + base_name = lbasename (s->filename); + if (base_name != s->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (not_interesting_fname (ps->filename)) + continue; + if (!ps->readin) + { + if (!filename_seen (ps->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (ps->filename, text, text_len) == 0 +#else + && strncmp (ps->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the + current list of matches. */ + add_filename_to_list (ps->filename, text, word, + &list, &list_used, &list_alloced); + + } + else + { + base_name = lbasename (ps->filename); + if (base_name != ps->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + } + + return list; +} + +/* Determine if PC is in the prologue of a function. The prologue is the area + between the first instruction of a function, and the first executable line. + Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue. + + If non-zero, func_start is where we think the prologue starts, possibly + by previous examination of symbol table information. + */ + +int +in_prologue (CORE_ADDR pc, CORE_ADDR func_start) +{ + struct symtab_and_line sal; + CORE_ADDR func_addr, func_end; + + /* We have several sources of information we can consult to figure + this out. + - Compilers usually emit line number info that marks the prologue + as its own "source line". So the ending address of that "line" + is the end of the prologue. If available, this is the most + reliable method. + - The minimal symbols and partial symbols, which can usually tell + us the starting and ending addresses of a function. + - If we know the function's start address, we can call the + architecture-defined SKIP_PROLOGUE function to analyze the + instruction stream and guess where the prologue ends. + - Our `func_start' argument; if non-zero, this is the caller's + best guess as to the function's entry point. At the time of + this writing, handle_inferior_event doesn't get this right, so + it should be our last resort. */ + + /* Consult the partial symbol table, to find which function + the PC is in. */ + if (! find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + CORE_ADDR prologue_end; + + /* We don't even have minsym information, so fall back to using + func_start, if given. */ + if (! func_start) + return 1; /* We *might* be in a prologue. */ + + prologue_end = SKIP_PROLOGUE (func_start); + + return func_start <= pc && pc < prologue_end; + } + + /* If we have line number information for the function, that's + usually pretty reliable. */ + sal = find_pc_line (func_addr, 0); + + /* Now sal describes the source line at the function's entry point, + which (by convention) is the prologue. The end of that "line", + sal.end, is the end of the prologue. + + Note that, for functions whose source code is all on a single + line, the line number information doesn't always end up this way. + So we must verify that our purported end-of-prologue address is + *within* the function, not at its start or end. */ + if (sal.line == 0 + || sal.end <= func_addr + || func_end <= sal.end) + { + /* We don't have any good line number info, so use the minsym + information, together with the architecture-specific prologue + scanning code. */ + CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr); + + return func_addr <= pc && pc < prologue_end; + } + + /* We have line number info, and it looks good. */ + return func_addr <= pc && pc < sal.end; +} + +/* Given PC at the function's start address, attempt to find the + prologue end using SAL information. Return zero if the skip fails. + + A non-optimized prologue traditionally has one SAL for the function + and a second for the function body. A single line function has + them both pointing at the same line. + + An optimized prologue is similar but the prologue may contain + instructions (SALs) from the instruction body. Need to skip those + while not getting into the function body. + + The functions end point and an increasing SAL line are used as + indicators of the prologue's endpoint. + + This code is based on the function refine_prologue_limit (versions + found in both ia64 and ppc). */ + +CORE_ADDR +skip_prologue_using_sal (CORE_ADDR func_addr) +{ + struct symtab_and_line prologue_sal; + CORE_ADDR start_pc; + CORE_ADDR end_pc; + + /* Get an initial range for the function. */ + find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc); + start_pc += FUNCTION_START_OFFSET; + + prologue_sal = find_pc_line (start_pc, 0); + if (prologue_sal.line != 0) + { + while (prologue_sal.end < end_pc) + { + struct symtab_and_line sal; + + sal = find_pc_line (prologue_sal.end, 0); + if (sal.line == 0) + break; + /* Assume that a consecutive SAL for the same (or larger) + line mark the prologue -> body transition. */ + if (sal.line >= prologue_sal.line) + break; + /* The case in which compiler's optimizer/scheduler has + moved instructions into the prologue. We look ahead in + the function looking for address ranges whose + corresponding line number is less the first one that we + found for the function. This is more conservative then + refine_prologue_limit which scans a large number of SALs + looking for any in the prologue */ + prologue_sal = sal; + } + } + return prologue_sal.end; +} + +struct symtabs_and_lines +decode_line_spec (char *string, int funfirstline) +{ + struct symtabs_and_lines sals; + struct symtab_and_line cursal; + + if (string == 0) + error ("Empty line specification."); + + /* We use whatever is set as the current source line. We do not try + and get a default or it will recursively call us! */ + cursal = get_current_source_symtab_and_line (); + + sals = decode_line_1 (&string, funfirstline, + cursal.symtab, cursal.line, + (char ***) NULL, NULL); + + if (*string) + error ("Junk at end of line specification: %s", string); + return sals; +} + +/* Track MAIN */ +static char *name_of_main; + +void +set_main_name (const char *name) +{ + if (name_of_main != NULL) + { + xfree (name_of_main); + name_of_main = NULL; + } + if (name != NULL) + { + name_of_main = xstrdup (name); + } +} + +char * +main_name (void) +{ + if (name_of_main != NULL) + return name_of_main; + else + return "main"; +} + + +void +_initialize_symtab (void) +{ + add_info ("variables", variables_info, + "All global and static variable names, or those matching REGEXP."); + if (dbx_commands) + add_com ("whereis", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + + add_info ("functions", functions_info, + "All function names, or those matching REGEXP."); + + + /* FIXME: This command has at least the following problems: + 1. It prints builtin types (in a very strange and confusing fashion). + 2. It doesn't print right, e.g. with + typedef struct foo *FOO + type_print prints "FOO" when we want to make it (in this situation) + print "struct foo *". + I also think "ptype" or "whatis" is more likely to be useful (but if + there is much disagreement "info types" can be fixed). */ + add_info ("types", types_info, + "All type names, or those matching REGEXP."); + + add_info ("sources", sources_info, + "Source files in the program."); + + add_com ("rbreak", class_breakpoint, rbreak_command, + "Set a breakpoint for all functions matching REGEXP."); + + if (xdb_commands) + { + add_com ("lf", class_info, sources_info, "Source files in the program"); + add_com ("lg", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + } + + /* Initialize the one built-in type that isn't language dependent... */ + builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0, + "", (struct objfile *) NULL); +} + +#ifdef CRASH_MERGE +#include "gdb-stabs.h" +#include "version.h" +#define GDB_COMMON +#include "../../defs.h" + +static void get_member_data(struct gnu_request *, struct type *); +static void dump_enum(struct type *, struct gnu_request *); +static void eval_enum(struct type *, struct gnu_request *); +static void gdb_get_line_number(struct gnu_request *); +static void gdb_get_datatype(struct gnu_request *); +static void gdb_get_symbol_type(struct gnu_request *); +static void gdb_command_exists(struct gnu_request *); +#ifdef NEEDS_NEW_FUNCTIONALITY +static void gdb_stack_trace(struct gnu_request *); +#endif +static void gdb_debug_command(struct gnu_request *); +static void gdb_function_numargs(struct gnu_request *); +static void gdb_add_symbol_file(struct gnu_request *); +static void gdb_delete_symbol_file(struct gnu_request *); +static void gdb_patch_symbol_values(struct gnu_request *); +extern void replace_ui_file_FILE(struct ui_file *, FILE *); +extern int get_frame_offset(CORE_ADDR); + +static struct objfile *gdb_kernel_objfile = { 0 }; + +static ulong gdb_merge_flags = 0; +#define KERNEL_SYMBOLS_PATCHED (0x1) + +#undef STREQ +#define STREQ(A, B) (A && B && (strcmp(A, B) == 0)) + +/* + * All commands from above come through here. + */ +void +gdb_command_funnel(struct gnu_request *req) +{ + struct symbol *sym; + + if (req->command != GNU_VERSION) { + replace_ui_file_FILE(gdb_stdout, req->fp); + replace_ui_file_FILE(gdb_stderr, req->fp); + do_cleanups((struct cleanup *)0); + } + + switch (req->command) + { + case GNU_VERSION: + req->buf = (char *)version; + break; + + case GNU_PASS_THROUGH: + execute_command(req->buf, + req->flags & GNU_FROM_TTY_OFF ? FALSE : TRUE); + break; + + case GNU_STACK_TRACE: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * The get_current_frame() function in frame.c no longer can + * be subject of a CRASH_MERGE in which passed-in fp and pc + * value were substituted for read_fp() and read_pc() calls. + * Now there's a new unwind_to_current_frame() function and + * a new frame_info structure that are used. + */ + gdb_stack_trace(req); +#endif + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_RESOLVE_TEXT_ADDR: + sym = find_pc_function(req->addr); + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_DISASSEMBLE: + if (req->addr2) + sprintf(req->buf, "disassemble 0x%lx 0x%lx", + req->addr, req->addr2); + else + sprintf(req->buf, "disassemble 0x%lx", req->addr); + execute_command(req->buf, TRUE); + break; + + case GNU_ADD_SYMBOL_FILE: + gdb_add_symbol_file(req); + break; + + case GNU_DELETE_SYMBOL_FILE: + gdb_delete_symbol_file(req); + break; + + case GNU_GET_LINE_NUMBER: + gdb_get_line_number(req); + break; + + case GNU_GET_DATATYPE: + gdb_get_datatype(req); + break; + + case GNU_GET_SYMBOL_TYPE: + gdb_get_symbol_type(req); + break; + + case GNU_COMMAND_EXISTS: + gdb_command_exists(req); + break; + + case GNU_ALPHA_FRAME_OFFSET: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * get_frame_offset() was a CRASH_MERGE function located in + * alpha-tdep.c; going from 5.3 to 6.1 made its direct port + * impossible because of dependencies that no longer exist. + * Also changed in alpha-tdep.c, alpha_frame_chain() and + * read_next_frame_reg() no longer exist, and both of those + * contained CRASH_MERGE pieces. Until somebody gives me + * a new port of a function to calculate the size of a function + * frame, it appears that alpha back-traces may be far more + * likely to fail. + */ + req->value = get_frame_offset(req->pc); +#endif + req->value = 0; + break; + + case GNU_FUNCTION_NUMARGS: + gdb_function_numargs(req); + break; + + case GNU_DEBUG_COMMAND: + gdb_debug_command(req); + break; + + case GNU_PATCH_SYMBOL_VALUES: + gdb_patch_symbol_values(req); + break; + + default: + req->flags |= GNU_COMMAND_FAILED; + break; + } +} + +/* + * Given a PC value, return the file and line number. + */ +static void +gdb_get_line_number(struct gnu_request *req) +{ + struct symtab_and_line sal; + CORE_ADDR pc; + +#define LASTCHAR(s) (s[strlen(s)-1]) + + pc = req->addr; + + sal = find_pc_line(pc, 0); + + if (!sal.symtab) { + req->buf[0] = '\0'; + return; + } + + if (sal.symtab->filename && sal.symtab->dirname) { + if (sal.symtab->filename[0] == '/') + sprintf(req->buf, "%s: %d", + sal.symtab->filename, sal.line); + else + sprintf(req->buf, "%s%s%s: %d", + sal.symtab->dirname, + LASTCHAR(sal.symtab->dirname) == '/' ? "" : "/", sal.symtab->filename, sal.line); + } +} + + +/* + * General purpose routine for determining datatypes. + */ + +static void +gdb_get_datatype(struct gnu_request *req) +{ + register struct cleanup *old_chain = NULL; + register struct type *type; + register struct type *typedef_type; + struct expression *expr; + struct symbol *sym; + register int i; + struct field *nextfield; + struct value *val; + + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (a)\n", req->name); + + req->typecode = TYPE_CODE_UNDEF; + + /* + * lookup_symbol() will pick up struct and union names. + */ + sym = lookup_symbol(req->name, 0, STRUCT_DOMAIN, 0, + (struct symtab **) NULL); + if (sym) { + req->typecode = TYPE_CODE(sym->type); + req->length = TYPE_LENGTH(sym->type); + if (req->member) + get_member_data(req, sym->type); + + if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) { + if (req->flags & GNU_PRINT_ENUMERATORS) + dump_enum(sym->type, req); + } + + return; + } + + /* + * Otherwise parse the expression. + */ + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (b)\n", req->name); + + expr = parse_expression(req->name); + + old_chain = make_cleanup(free_current_contents, &expr); + + + switch (expr->elts[0].opcode) + { + case OP_VAR_VALUE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_VAR_VALUE\n"); + type = expr->elts[2].symbol->type; + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + req->typecode = TYPE_CODE(type); + req->value = SYMBOL_VALUE(expr->elts[2].symbol); + req->tagname = TYPE_TAG_NAME(type); + if (!req->tagname) { + val = evaluate_type(expr); + eval_enum(VALUE_TYPE(val), req); + } + } + break; + + case OP_TYPE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_TYPE\n"); + type = expr->elts[1].type; + + req->typecode = TYPE_CODE(type); + req->length = TYPE_LENGTH(type); + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + req->is_typedef = TYPE_CODE_TYPEDEF; + if ((typedef_type = check_typedef(type))) { + req->typecode = TYPE_CODE(typedef_type); + req->length = TYPE_LENGTH(typedef_type); + type = typedef_type; + } + } + + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + if (req->is_typedef) + if (req->flags & GNU_PRINT_ENUMERATORS) { + if (req->is_typedef) + fprintf_filtered(gdb_stdout, + "typedef "); + dump_enum(type, req); + } + } + + if (req->member) + get_member_data(req, type); + + break; + + default: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: %d (?)\n", + expr->elts[0].opcode); + break; + + } + + do_cleanups(old_chain); +} + +/* + * More robust enum list dump that gdb's, showing the value of each + * identifier, each on its own line. + */ +static void +dump_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, + "enum %s {\n", TYPE_TAG_NAME (type)); + else + fprintf_filtered(gdb_stdout, "enum {\n"); + + for (i = 0; i < len; i++) { + fprintf_filtered(gdb_stdout, " %s", + TYPE_FIELD_NAME (type, i)); + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + fprintf_filtered (gdb_stdout, " = %d", + TYPE_FIELD_BITPOS (type, i)); + lastval = TYPE_FIELD_BITPOS (type, i); + } else + fprintf_filtered(gdb_stdout, " = %d", lastval); + fprintf_filtered(gdb_stdout, "\n"); + lastval++; + } + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, "};\n"); + else + fprintf_filtered(gdb_stdout, "} %s;\n", req->name); +} + +/* + * Given an enum type with no tagname, determine its value. + */ +static void +eval_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + + for (i = 0; i < len; i++) { + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + lastval = TYPE_FIELD_BITPOS (type, i); + } + if (STREQ(TYPE_FIELD_NAME(type, i), req->name)) { + req->tagname = "(unknown)"; + req->value = lastval; + return; + } + lastval++; + } +} + +/* + * Walk through a struct type's list of fields looking for the desired + * member field, and when found, return its relevant data. + */ +static void +get_member_data(struct gnu_request *req, struct type *type) +{ + register short i; + struct field *nextfield; + short nfields; + struct type *typedef_type; + + req->member_offset = -1; + +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(type)->nfields; + nextfield = TYPE_MAIN_TYPE(type)->fields; +#else + nfields = type->nfields; + nextfield = type->fields; +#endif + + if (nfields == 0) { + struct type *newtype; + newtype = lookup_transparent_type(req->name); + if (newtype) { + console("get_member_data(%s.%s): switching type from %lx to %lx\n", + req->name, req->member, type, newtype); +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(newtype)->nfields; + nextfield = TYPE_MAIN_TYPE(newtype)->fields; +#else + nfields = newtype->nfields; + nextfield = newtype->fields; +#endif + } + } + + for (i = 0; i < nfields; i++) { + if (STREQ(req->member, nextfield->name)) { + req->member_offset = nextfield->loc.bitpos; + req->member_length = TYPE_LENGTH(nextfield->type); + req->member_typecode = TYPE_CODE(nextfield->type); + if ((req->member_typecode == TYPE_CODE_TYPEDEF) && + (typedef_type = check_typedef(nextfield->type))) + req->member_length = TYPE_LENGTH(typedef_type); + return; + } + nextfield++; + } +} + +#ifdef NEEDS_NEW_FUNCTIONALITY +/* + * Kick off a gdb stack trace, keeping copies of the starting frame and pc. + */ + +CORE_ADDR gdb_starting_pc; +CORE_ADDR gdb_starting_fp; + +static void +gdb_stack_trace(struct gnu_request *req) +{ + target_has_stack = TRUE; + target_has_registers = TRUE; + stop_soon_quietly = TRUE; + gdb_starting_pc = req->pc; + gdb_starting_fp = req->sp; + sprintf(req->buf, "backtrace"); + execute_command(req->buf, TRUE); +} +#endif + +/* + * Check whether a command exists. If it doesn't, the command will be + * returned indirectly via the error_hook. + */ +static void +gdb_command_exists(struct gnu_request *req) +{ + extern struct cmd_list_element *cmdlist; + register struct cmd_list_element *c; + + req->value = FALSE; + c = lookup_cmd(&req->name, cmdlist, "", 0, 1); + req->value = TRUE; +} + +static void +gdb_function_numargs(struct gnu_request *req) +{ + struct symbol *sym; + + sym = find_pc_function(req->pc); + + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) { + req->flags |= GNU_COMMAND_FAILED; + return; + } + + req->value = (ulong)TYPE_NFIELDS(sym->type); +} + +struct load_module *gdb_current_load_module = NULL; + +static void +gdb_add_symbol_file(struct gnu_request *req) +{ + register struct objfile *loaded_objfile = NULL; + register struct objfile *objfile; + register struct minimal_symbol *m; + struct load_module *lm; + struct syment *sp; + struct syment *spx; + int external, subsequent, found; + off_t offset; + ulong value, adjusted; + struct symbol *sym; + struct expression *expr; + struct cleanup *old_chain; + int i; + int allsect = 0; + char *secname; + char buf[80]; + + gdb_current_load_module = lm = (struct load_module *)req->addr; + + req->name = lm->mod_namelist; + gdb_delete_symbol_file(req); + + for (i = 0 ; i < lm->mod_sections; i++) { + if (STREQ(lm->mod_section_data[i].name, ".text") && + (lm->mod_section_data[i].flags & SEC_FOUND)) + allsect = 1; + } + + if (!allsect) { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start ? lm->mod_text_start : lm->mod_base); + if (lm->mod_data_start) { + sprintf(buf, " -s .data 0x%lx", lm->mod_data_start); + strcat(req->buf, buf); + } + if (lm->mod_bss_start) { + sprintf(buf, " -s .bss 0x%lx", lm->mod_bss_start); + strcat(req->buf, buf); + } + if (lm->mod_rodata_start) { + sprintf(buf, " -s .rodata 0x%lx", lm->mod_rodata_start); + strcat(req->buf, buf); + } + } else { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start); + for (i = 0; i < lm->mod_sections; i++) { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + strcat(req->buf, buf); + } + } + } + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, "gdb_add_symbol_file: %s\n", req->buf); + } + + execute_command(req->buf, FALSE); + + ALL_OBJFILES(objfile) { + if (same_file(objfile->name, lm->mod_namelist)) { + loaded_objfile = objfile; + break; + } + } + + if (!loaded_objfile) + req->flags |= GNU_COMMAND_FAILED; +} + +void +patch_load_module(struct objfile *objfile, struct minimal_symbol *msymbol) +{ + register int i; + struct syment *sp, *spx; + struct load_module *lm; + struct mod_section_data *msd; + struct section_offsets *section_offsets; + ulong start; + char *name; + int external; + struct obj_section *s; + extern void print_gdb_version (struct ui_file *); + + if (!gdb_kernel_objfile) { + gdb_kernel_objfile = objfile; + return; + } + + if (!(lm = gdb_current_load_module) || + (msymbol && !IN_MODULE(SYMBOL_VALUE_ADDRESS(msymbol), lm))) + return; + + if (msymbol) { + for (sp = lm->mod_load_symtable; + sp < lm->mod_load_symend; sp++) { + + if ((sp->value < lm->mod_data_start) || + !STREQ(sp->name, msymbol->ginfo.name)) + continue; + + for (external = FALSE, + spx = lm->mod_ext_symtable; + spx < lm->mod_ext_symend; + spx++) { + if (STREQ(sp->name, spx->name)) { + external = TRUE; + break; + } + } + if (external) + continue; + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, + "patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), + sp->value); + } + + console("patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), sp->value); + + SYMBOL_VALUE_ADDRESS(msymbol) = sp->value; + + break; + } + return; + } + + for (s = objfile->sections; s < objfile->sections_end; ++s) { + name = (char *)s->the_bfd_section->name; + + for (i = 0; i < lm->mod_sections; i++) { + msd = &lm->mod_section_data[i]; + if (STREQ(msd->name, name)) { + s->addr = lm->mod_base + msd->offset; + s->endaddr = s->addr + msd->size; + } + } + } + + section_offsets = objfile->section_offsets; + + if (objfile->sect_index_text != -1) + section_offsets->offsets[SECT_OFF_TEXT(objfile)] = + lm->mod_text_start; + + if (objfile->sect_index_data != -1) + section_offsets->offsets[SECT_OFF_DATA(objfile)] = + lm->mod_data_start; + + if (objfile->sect_index_bss != -1) + section_offsets->offsets[SECT_OFF_BSS(objfile)] = + lm->mod_bss_start; + + if (objfile->sect_index_rodata != -1) + section_offsets->offsets[SECT_OFF_RODATA(objfile)] = + lm->mod_rodata_start; + +#ifdef DEPRECATED_SECT_OFF_MAX + if (gdb_CRASHDEBUG(1)) { + for (i = 0; i < SECT_OFF_MAX; i++) { + if (ANOFFSET(objfile->section_offsets, i)) { + fprintf_filtered(gdb_stdout, + "section_offsets[%d]: %lx\n", i, + ANOFFSET(objfile->section_offsets, i)); + } + } + } +#endif +} + +static void +gdb_delete_symbol_file(struct gnu_request *req) +{ + register struct objfile *objfile; + + ALL_OBJFILES(objfile) { + if (STREQ(objfile->name, req->name)) { + free_objfile(objfile); + break; + } + } + + if (gdb_CRASHDEBUG(1)) + ALL_OBJFILES(objfile) + fprintf_filtered(gdb_stdout, "%s\n", objfile->name); +} + +/* + * Walk through all minimal_symbols, patching their values with the + * correct addresses. + */ +static void +gdb_patch_symbol_values(struct gnu_request *req) +{ + struct minimal_symbol *msymbol; + struct objfile *objfile; + + req->name = PATCH_KERNEL_SYMBOLS_START; + patch_kernel_symbol(req); + + ALL_MSYMBOLS (objfile, msymbol) + { + req->name = msymbol->ginfo.name; + req->addr = (ulong)(&SYMBOL_VALUE_ADDRESS(msymbol)); + if (!patch_kernel_symbol(req)) { + req->flags |= GNU_COMMAND_FAILED; + break; + } + } + + req->name = PATCH_KERNEL_SYMBOLS_STOP; + patch_kernel_symbol(req); + + clear_symtab_users(); + gdb_merge_flags |= KERNEL_SYMBOLS_PATCHED; +} + +static void +gdb_get_symbol_type(struct gnu_request *req) +{ + struct expression *expr; + struct value *val; + struct cleanup *old_chain = NULL; + struct type *type; + struct type *target_type; + + req->typecode = TYPE_CODE_UNDEF; + + expr = parse_expression (req->name); + old_chain = make_cleanup (free_current_contents, &expr); + val = evaluate_type (expr); + + type = VALUE_TYPE(val); + +#ifdef TYPE_MAIN_TYPE + req->typename = TYPE_MAIN_TYPE(type)->name; + req->typecode = TYPE_MAIN_TYPE(type)->code; + req->length = type->length; + target_type = TYPE_MAIN_TYPE(type)->target_type; +#else + req->typename = type->name; + req->typecode = type->code; + req->length = type->length; + target_type = type->target_type; +#endif + + if (target_type) { +#ifdef TYPE_MAIN_TYPE + req->target_typename = TYPE_MAIN_TYPE(target_type)->name; + req->target_typecode = TYPE_MAIN_TYPE(target_type)->code; + req->target_length = target_type->length; +#else + req->target_typename = target_type->name; + req->target_typecode = target_type->code; + req->target_length = target_type->length; +#endif + } + + if (req->member) + get_member_data(req, type); + + do_cleanups (old_chain); +} + +static void +gdb_debug_command(struct gnu_request *req) +{ + +} + +/* + * Only necessary on "patched" kernel symbol sessions, and called only by + * lookup_symbol(), pull a symbol value bait-and-switch operation by altering + * either a data symbol's address value or a text symbol's block start address. + */ +static void +gdb_bait_and_switch(char *name, struct symbol *sym) +{ + struct minimal_symbol *msym; + struct block *block; + + if ((gdb_merge_flags & KERNEL_SYMBOLS_PATCHED) && + (msym = lookup_minimal_symbol(name, NULL, gdb_kernel_objfile))) { + if (sym->aclass == LOC_BLOCK) { + block = (struct block *)SYMBOL_BLOCK_VALUE(sym); + BLOCK_START(block) = SYMBOL_VALUE_ADDRESS(msym); + } else + SYMBOL_VALUE_ADDRESS(sym) = SYMBOL_VALUE_ADDRESS(msym); + } +} + +#endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/target.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/target.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/target.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/target.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2458 @@ +/* Select target systems and architectures at runtime for GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include +#include "gdb_string.h" +#include "target.h" +#include "gdbcmd.h" +#include "symtab.h" +#include "inferior.h" +#include "bfd.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdb_wait.h" +#include "dcache.h" +#include +#include "regcache.h" +#include "gdb_assert.h" +#include "gdbcore.h" + +static void target_info (char *, int); + +static void maybe_kill_then_create_inferior (char *, char *, char **); + +static void maybe_kill_then_attach (char *, int); + +static void kill_or_be_killed (int); + +static void default_terminal_info (char *, int); + +static int default_region_size_ok_for_hw_watchpoint (int); + +static int nosymbol (char *, CORE_ADDR *); + +static void tcomplain (void); + +static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *); + +static int return_zero (void); + +static int return_one (void); + +static int return_minus_one (void); + +void target_ignore (void); + +static void target_command (char *, int); + +static struct target_ops *find_default_run_target (char *); + +static void nosupport_runtime (void); + +static LONGEST default_xfer_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, + ULONGEST offset, LONGEST len); + +/* Transfer LEN bytes between target address MEMADDR and GDB address + MYADDR. Returns 0 for success, errno code for failure (which + includes partial transfers -- if you want a more useful response to + partial transfers, try either target_read_memory_partial or + target_write_memory_partial). */ + +static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write); + +static void init_dummy_target (void); + +static void debug_to_open (char *, int); + +static void debug_to_close (int); + +static void debug_to_attach (char *, int); + +static void debug_to_detach (char *, int); + +static void debug_to_disconnect (char *, int); + +static void debug_to_resume (ptid_t, int, enum target_signal); + +static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *); + +static void debug_to_fetch_registers (int); + +static void debug_to_store_registers (int); + +static void debug_to_prepare_to_store (void); + +static int debug_to_xfer_memory (CORE_ADDR, char *, int, int, + struct mem_attrib *, struct target_ops *); + +static void debug_to_files_info (struct target_ops *); + +static int debug_to_insert_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_breakpoint (CORE_ADDR, char *); + +static int debug_to_can_use_hw_breakpoint (int, int, int); + +static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_insert_watchpoint (CORE_ADDR, int, int); + +static int debug_to_remove_watchpoint (CORE_ADDR, int, int); + +static int debug_to_stopped_by_watchpoint (void); + +static CORE_ADDR debug_to_stopped_data_address (void); + +static int debug_to_region_size_ok_for_hw_watchpoint (int); + +static void debug_to_terminal_init (void); + +static void debug_to_terminal_inferior (void); + +static void debug_to_terminal_ours_for_output (void); + +static void debug_to_terminal_save_ours (void); + +static void debug_to_terminal_ours (void); + +static void debug_to_terminal_info (char *, int); + +static void debug_to_kill (void); + +static void debug_to_load (char *, int); + +static int debug_to_lookup_symbol (char *, CORE_ADDR *); + +static void debug_to_create_inferior (char *, char *, char **); + +static void debug_to_mourn_inferior (void); + +static int debug_to_can_run (void); + +static void debug_to_notice_signals (ptid_t); + +static int debug_to_thread_alive (ptid_t); + +static void debug_to_stop (void); + +/* Pointer to array of target architecture structures; the size of the + array; the current index into the array; the allocated size of the + array. */ +struct target_ops **target_structs; +unsigned target_struct_size; +unsigned target_struct_index; +unsigned target_struct_allocsize; +#define DEFAULT_ALLOCSIZE 10 + +/* The initial current target, so that there is always a semi-valid + current target. */ + +static struct target_ops dummy_target; + +/* Top of target stack. */ + +static struct target_ops *target_stack; + +/* The target structure we are currently using to talk to a process + or file or whatever "inferior" we have. */ + +struct target_ops current_target; + +/* Command list for target. */ + +static struct cmd_list_element *targetlist = NULL; + +/* Nonzero if we are debugging an attached outside process + rather than an inferior. */ + +int attach_flag; + +/* Non-zero if we want to see trace of target level stuff. */ + +static int targetdebug = 0; + +static void setup_target_debug (void); + +DCACHE *target_dcache; + +/* The user just typed 'target' without the name of a target. */ + +static void +target_command (char *arg, int from_tty) +{ + fputs_filtered ("Argument required (target name). Try `help target'\n", + gdb_stdout); +} + +/* Add a possible target architecture to the list. */ + +void +add_target (struct target_ops *t) +{ + /* Provide default values for all "must have" methods. */ + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; + + if (!target_structs) + { + target_struct_allocsize = DEFAULT_ALLOCSIZE; + target_structs = (struct target_ops **) xmalloc + (target_struct_allocsize * sizeof (*target_structs)); + } + if (target_struct_size >= target_struct_allocsize) + { + target_struct_allocsize *= 2; + target_structs = (struct target_ops **) + xrealloc ((char *) target_structs, + target_struct_allocsize * sizeof (*target_structs)); + } + target_structs[target_struct_size++] = t; + + if (targetlist == NULL) + add_prefix_cmd ("target", class_run, target_command, + "Connect to a target machine or process.\n\ +The first argument is the type or protocol of the target machine.\n\ +Remaining arguments are interpreted by the target protocol. For more\n\ +information on the arguments for a particular protocol, type\n\ +`help target ' followed by the protocol name.", + &targetlist, "target ", 0, &cmdlist); + add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); +} + +/* Stub functions */ + +void +target_ignore (void) +{ +} + +void +target_load (char *arg, int from_tty) +{ + dcache_invalidate (target_dcache); + (*current_target.to_load) (arg, from_tty); +} + +static int +nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *t) +{ + errno = EIO; /* Can't read/write this location */ + return 0; /* No bytes handled */ +} + +static void +tcomplain (void) +{ + error ("You can't do that when your target is `%s'", + current_target.to_shortname); +} + +void +noprocess (void) +{ + error ("You can't do that without a process to debug."); +} + +static int +nosymbol (char *name, CORE_ADDR *addrp) +{ + return 1; /* Symbol does not exist in target env */ +} + +static void +nosupport_runtime (void) +{ + if (ptid_equal (inferior_ptid, null_ptid)) + noprocess (); + else + error ("No run-time support for this"); +} + + +static void +default_terminal_info (char *args, int from_tty) +{ + printf_unfiltered ("No saved terminal information.\n"); +} + +/* This is the default target_create_inferior and target_attach function. + If the current target is executing, it asks whether to kill it off. + If this function returns without calling error(), it has killed off + the target, and the operation should be attempted. */ + +static void +kill_or_be_killed (int from_tty) +{ + if (target_has_execution) + { + printf_unfiltered ("You are already running a program:\n"); + target_files_info (); + if (query ("Kill it? ")) + { + target_kill (); + if (target_has_execution) + error ("Killing the program did not help."); + return; + } + else + { + error ("Program not killed."); + } + } + tcomplain (); +} + +static void +maybe_kill_then_attach (char *args, int from_tty) +{ + kill_or_be_killed (from_tty); + target_attach (args, from_tty); +} + +static void +maybe_kill_then_create_inferior (char *exec, char *args, char **env) +{ + kill_or_be_killed (0); + target_create_inferior (exec, args, env); +} + +/* Go through the target stack from top to bottom, copying over zero + entries in current_target, then filling in still empty entries. In + effect, we are doing class inheritance through the pushed target + vectors. + + NOTE: cagney/2003-10-17: The problem with this inheritance, as it + is currently implemented, is that it discards any knowledge of + which target an inherited method originally belonged to. + Consequently, new new target methods should instead explicitly and + locally search the target stack for the target that can handle the + request. */ + +static void +update_current_target (void) +{ + struct target_ops *t; + + /* First, reset curren'ts contents. */ + memset (¤t_target, 0, sizeof (current_target)); + +#define INHERIT(FIELD, TARGET) \ + if (!current_target.FIELD) \ + current_target.FIELD = (TARGET)->FIELD + + for (t = target_stack; t; t = t->beneath) + { + INHERIT (to_shortname, t); + INHERIT (to_longname, t); + INHERIT (to_doc, t); + INHERIT (to_open, t); + INHERIT (to_close, t); + INHERIT (to_attach, t); + INHERIT (to_post_attach, t); + INHERIT (to_detach, t); + INHERIT (to_disconnect, t); + INHERIT (to_resume, t); + INHERIT (to_wait, t); + INHERIT (to_post_wait, t); + INHERIT (to_fetch_registers, t); + INHERIT (to_store_registers, t); + INHERIT (to_prepare_to_store, t); + INHERIT (to_xfer_memory, t); + INHERIT (to_files_info, t); + INHERIT (to_insert_breakpoint, t); + INHERIT (to_remove_breakpoint, t); + INHERIT (to_can_use_hw_breakpoint, t); + INHERIT (to_insert_hw_breakpoint, t); + INHERIT (to_remove_hw_breakpoint, t); + INHERIT (to_insert_watchpoint, t); + INHERIT (to_remove_watchpoint, t); + INHERIT (to_stopped_data_address, t); + INHERIT (to_stopped_by_watchpoint, t); + INHERIT (to_have_continuable_watchpoint, t); + INHERIT (to_region_size_ok_for_hw_watchpoint, t); + INHERIT (to_terminal_init, t); + INHERIT (to_terminal_inferior, t); + INHERIT (to_terminal_ours_for_output, t); + INHERIT (to_terminal_ours, t); + INHERIT (to_terminal_save_ours, t); + INHERIT (to_terminal_info, t); + INHERIT (to_kill, t); + INHERIT (to_load, t); + INHERIT (to_lookup_symbol, t); + INHERIT (to_create_inferior, t); + INHERIT (to_post_startup_inferior, t); + INHERIT (to_acknowledge_created_inferior, t); + INHERIT (to_insert_fork_catchpoint, t); + INHERIT (to_remove_fork_catchpoint, t); + INHERIT (to_insert_vfork_catchpoint, t); + INHERIT (to_remove_vfork_catchpoint, t); + INHERIT (to_follow_fork, t); + INHERIT (to_insert_exec_catchpoint, t); + INHERIT (to_remove_exec_catchpoint, t); + INHERIT (to_reported_exec_events_per_exec_call, t); + INHERIT (to_has_exited, t); + INHERIT (to_mourn_inferior, t); + INHERIT (to_can_run, t); + INHERIT (to_notice_signals, t); + INHERIT (to_thread_alive, t); + INHERIT (to_find_new_threads, t); + INHERIT (to_pid_to_str, t); + INHERIT (to_extra_thread_info, t); + INHERIT (to_stop, t); + /* Do not inherit to_xfer_partial. */ + INHERIT (to_rcmd, t); + INHERIT (to_enable_exception_callback, t); + INHERIT (to_get_current_exception_event, t); + INHERIT (to_pid_to_exec_file, t); + INHERIT (to_stratum, t); + INHERIT (to_has_all_memory, t); + INHERIT (to_has_memory, t); + INHERIT (to_has_stack, t); + INHERIT (to_has_registers, t); + INHERIT (to_has_execution, t); + INHERIT (to_has_thread_control, t); + INHERIT (to_sections, t); + INHERIT (to_sections_end, t); + INHERIT (to_can_async_p, t); + INHERIT (to_is_async_p, t); + INHERIT (to_async, t); + INHERIT (to_async_mask_value, t); + INHERIT (to_find_memory_regions, t); + INHERIT (to_make_corefile_notes, t); + INHERIT (to_get_thread_local_address, t); + INHERIT (to_magic, t); + } +#undef INHERIT + + /* Clean up a target struct so it no longer has any zero pointers in + it. Some entries are defaulted to a method that print an error, + others are hard-wired to a standard recursive default. */ + +#define de_fault(field, value) \ + if (!current_target.field) \ + current_target.field = value + + de_fault (to_open, + (void (*) (char *, int)) + tcomplain); + de_fault (to_close, + (void (*) (int)) + target_ignore); + de_fault (to_attach, + maybe_kill_then_attach); + de_fault (to_post_attach, + (void (*) (int)) + target_ignore); + de_fault (to_detach, + (void (*) (char *, int)) + target_ignore); + de_fault (to_disconnect, + (void (*) (char *, int)) + tcomplain); + de_fault (to_resume, + (void (*) (ptid_t, int, enum target_signal)) + noprocess); + de_fault (to_wait, + (ptid_t (*) (ptid_t, struct target_waitstatus *)) + noprocess); + de_fault (to_post_wait, + (void (*) (ptid_t, int)) + target_ignore); + de_fault (to_fetch_registers, + (void (*) (int)) + target_ignore); + de_fault (to_store_registers, + (void (*) (int)) + noprocess); + de_fault (to_prepare_to_store, + (void (*) (void)) + noprocess); + de_fault (to_xfer_memory, + (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) + nomemory); + de_fault (to_files_info, + (void (*) (struct target_ops *)) + target_ignore); + de_fault (to_insert_breakpoint, + memory_insert_breakpoint); + de_fault (to_remove_breakpoint, + memory_remove_breakpoint); + de_fault (to_can_use_hw_breakpoint, + (int (*) (int, int, int)) + return_zero); + de_fault (to_insert_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_remove_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_insert_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_remove_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_stopped_by_watchpoint, + (int (*) (void)) + return_zero); + de_fault (to_stopped_data_address, + (CORE_ADDR (*) (void)) + return_zero); + de_fault (to_region_size_ok_for_hw_watchpoint, + default_region_size_ok_for_hw_watchpoint); + de_fault (to_terminal_init, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_inferior, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours_for_output, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_save_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_info, + default_terminal_info); + de_fault (to_kill, + (void (*) (void)) + noprocess); + de_fault (to_load, + (void (*) (char *, int)) + tcomplain); + de_fault (to_lookup_symbol, + (int (*) (char *, CORE_ADDR *)) + nosymbol); + de_fault (to_create_inferior, + maybe_kill_then_create_inferior); + de_fault (to_post_startup_inferior, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_acknowledge_created_inferior, + (void (*) (int)) + target_ignore); + de_fault (to_insert_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_insert_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_follow_fork, + (int (*) (int)) + target_ignore); + de_fault (to_insert_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_reported_exec_events_per_exec_call, + (int (*) (void)) + return_one); + de_fault (to_has_exited, + (int (*) (int, int, int *)) + return_zero); + de_fault (to_mourn_inferior, + (void (*) (void)) + noprocess); + de_fault (to_can_run, + return_zero); + de_fault (to_notice_signals, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_thread_alive, + (int (*) (ptid_t)) + return_zero); + de_fault (to_find_new_threads, + (void (*) (void)) + target_ignore); + de_fault (to_extra_thread_info, + (char *(*) (struct thread_info *)) + return_zero); + de_fault (to_stop, + (void (*) (void)) + target_ignore); + current_target.to_xfer_partial = default_xfer_partial; + de_fault (to_rcmd, + (void (*) (char *, struct ui_file *)) + tcomplain); + de_fault (to_enable_exception_callback, + (struct symtab_and_line * (*) (enum exception_event_kind, int)) + nosupport_runtime); + de_fault (to_get_current_exception_event, + (struct exception_event_record * (*) (void)) + nosupport_runtime); + de_fault (to_pid_to_exec_file, + (char *(*) (int)) + return_zero); + de_fault (to_can_async_p, + (int (*) (void)) + return_zero); + de_fault (to_is_async_p, + (int (*) (void)) + return_zero); + de_fault (to_async, + (void (*) (void (*) (enum inferior_event_type, void*), void*)) + tcomplain); +#undef de_fault + + /* Finally, position the target-stack beneath the squashed + "current_target". That way code looking for a non-inherited + target method can quickly and simply find it. */ + current_target.beneath = target_stack; +} + +/* Push a new target type into the stack of the existing target accessors, + possibly superseding some of the existing accessors. + + Result is zero if the pushed target ended up on top of the stack, + nonzero if at least one target is on top of it. + + Rather than allow an empty stack, we always have the dummy target at + the bottom stratum, so we can call the function vectors without + checking them. */ + +int +push_target (struct target_ops *t) +{ + struct target_ops **cur; + + /* Check magic number. If wrong, it probably means someone changed + the struct definition, but not all the places that initialize one. */ + if (t->to_magic != OPS_MAGIC) + { + fprintf_unfiltered (gdb_stderr, + "Magic number of %s target struct wrong\n", + t->to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + } + + /* Find the proper stratum to install this target in. */ + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum) + break; + } + + /* If there's already targets at this stratum, remove them. */ + /* FIXME: cagney/2003-10-15: I think this should be poping all + targets to CUR, and not just those at this stratum level. */ + while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) + { + /* There's already something at this stratum level. Close it, + and un-hook it from the stack. */ + struct target_ops *tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + target_close (tmp, 0); + } + + /* We have removed all targets in our stratum, now add the new one. */ + t->beneath = (*cur); + (*cur) = t; + + update_current_target (); + + if (targetdebug) + setup_target_debug (); + + /* Not on top? */ + return (t != target_stack); +} + +/* Remove a target_ops vector from the stack, wherever it may be. + Return how many times it was removed (0 or 1). */ + +int +unpush_target (struct target_ops *t) +{ + struct target_ops **cur; + struct target_ops *tmp; + + /* Look for the specified target. Note that we assume that a target + can only occur once in the target stack. */ + + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((*cur) == t) + break; + } + + if ((*cur) == NULL) + return 0; /* Didn't find target_ops, quit now */ + + /* NOTE: cagney/2003-12-06: In '94 the close call was made + unconditional by moving it to before the above check that the + target was in the target stack (something about "Change the way + pushing and popping of targets work to support target overlays + and inheritance"). This doesn't make much sense - only open + targets should be closed. */ + target_close (t, 0); + + /* Unchain the target */ + tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + + update_current_target (); + + return 1; +} + +void +pop_target (void) +{ + target_close (¤t_target, 0); /* Let it clean up */ + if (unpush_target (target_stack) == 1) + return; + + fprintf_unfiltered (gdb_stderr, + "pop_target couldn't find target %s\n", + current_target.to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); +} + +#undef MIN +#define MIN(A, B) (((A) <= (B)) ? (A) : (B)) + +/* target_read_string -- read a null terminated string, up to LEN bytes, + from MEMADDR in target. Set *ERRNOP to the errno code, or 0 if successful. + Set *STRING to a pointer to malloc'd memory containing the data; the caller + is responsible for freeing it. Return the number of bytes successfully + read. */ + +int +target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop) +{ + int tlen, origlen, offset, i; + char buf[4]; + int errcode = 0; + char *buffer; + int buffer_allocated; + char *bufptr; + unsigned int nbytes_read = 0; + + /* Small for testing. */ + buffer_allocated = 4; + buffer = xmalloc (buffer_allocated); + bufptr = buffer; + + origlen = len; + + while (len > 0) + { + tlen = MIN (len, 4 - (memaddr & 3)); + offset = memaddr & 3; + + errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0); + if (errcode != 0) + { + /* The transfer request might have crossed the boundary to an + unallocated region of memory. Retry the transfer, requesting + a single byte. */ + tlen = 1; + offset = 0; + errcode = target_xfer_memory (memaddr, buf, 1, 0); + if (errcode != 0) + goto done; + } + + if (bufptr - buffer + tlen > buffer_allocated) + { + unsigned int bytes; + bytes = bufptr - buffer; + buffer_allocated *= 2; + buffer = xrealloc (buffer, buffer_allocated); + bufptr = buffer + bytes; + } + + for (i = 0; i < tlen; i++) + { + *bufptr++ = buf[i + offset]; + if (buf[i + offset] == '\000') + { + nbytes_read += i + 1; + goto done; + } + } + + memaddr += tlen; + len -= tlen; + nbytes_read += tlen; + } +done: + if (errnop != NULL) + *errnop = errcode; + if (string != NULL) + *string = buffer; + return nbytes_read; +} + +/* Find a section containing ADDR. */ +struct section_table * +target_section_by_addr (struct target_ops *target, CORE_ADDR addr) +{ + struct section_table *secp; + for (secp = target->to_sections; + secp < target->to_sections_end; + secp++) + { + if (addr >= secp->addr && addr < secp->endaddr) + return secp; + } + return NULL; +} + +/* Read LEN bytes of target memory at address MEMADDR, placing the results in + GDB's memory at MYADDR. Returns either 0 for success or an errno value + if any error occurs. + + If an error occurs, no guarantee is made about the contents of the data at + MYADDR. In particular, the caller should not depend upon partial reads + filling the buffer with good data. There is no way for the caller to know + how much good data might have been transfered anyway. Callers that can + deal with partial reads should call target_read_memory_partial. */ + +int +target_read_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 0); +} + +int +target_write_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 1); +} + +static int trust_readonly = 0; + +/* Move memory to or from the targets. The top target gets priority; + if it cannot handle it, it is offered to the next one down, etc. + + Result is -1 on error, or the number of bytes transfered. */ + +int +do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib) +{ + int res; + int done = 0; + struct target_ops *t; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + return 0; + + /* to_xfer_memory is not guaranteed to set errno, even when it returns + 0. */ + errno = 0; + + if (!write && trust_readonly) + { + struct section_table *secp; + /* User-settable option, "trust-readonly-sections". If true, + then memory from any SEC_READONLY bfd section may be read + directly from the bfd file. */ + secp = target_section_by_addr (¤t_target, memaddr); + if (secp != NULL + && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) + & SEC_READONLY)) + return xfer_memory (memaddr, myaddr, len, 0, attrib, ¤t_target); + } + + /* The quick case is that the top target can handle the transfer. */ + res = current_target.to_xfer_memory + (memaddr, myaddr, len, write, attrib, ¤t_target); + + /* If res <= 0 then we call it again in the loop. Ah well. */ + if (res <= 0) + { + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t); + if (res > 0) + break; /* Handled all or part of xfer */ + if (t->to_has_all_memory) + break; + } + + if (res <= 0) + return -1; + } + + return res; +} + + +/* Perform a memory transfer. Iterate until the entire region has + been transfered. + + Result is 0 or errno value. */ + +static int +target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write) +{ + int res; + int reg_len; + struct mem_region *region; + +#ifdef CRASH_MERGE + int gdb_readmem_callback(ulong, void *, int, int); + if (gdb_readmem_callback(memaddr, myaddr, len, write)) + return 0; +#endif + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + return 0; + } + + while (len > 0) + { + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write) + return EIO; + break; + + case MEM_WO: + if (!write) + return EIO; + break; + } + + while (reg_len > 0) + { + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write, + ®ion->attrib); + + if (res <= 0) + { + /* If this address is for nonexistent memory, read zeros + if reading, or do nothing if writing. Return + error. */ + if (!write) + memset (myaddr, 0, len); + if (errno == 0) + return EIO; + else + return errno; + } + + memaddr += res; + myaddr += res; + len -= res; + reg_len -= res; + } + } + + return 0; /* We managed to cover it all somehow. */ +} + + +/* Perform a partial memory transfer. + + Result is -1 on error, or the number of bytes transfered. */ + +static int +target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len, + int write_p, int *err) +{ + int res; + int reg_len; + struct mem_region *region; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + *err = 0; + return 0; + } + + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + + case MEM_WO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + } + + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write_p); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write_p, + ®ion->attrib); + + if (res <= 0) + { + if (errno != 0) + *err = errno; + else + *err = EIO; + + return -1; + } + + *err = 0; + return res; +} + +int +target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 0, err); +} + +int +target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 1, err); +} + +/* More generic transfers. */ + +static LONGEST +default_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_MEMORY + && ops->to_xfer_memory != NULL) + /* If available, fall back to the target's "to_xfer_memory" + method. */ + { + int xfered = -1; + errno = 0; + if (writebuf != NULL) + { + void *buffer = xmalloc (len); + struct cleanup *cleanup = make_cleanup (xfree, buffer); + memcpy (buffer, writebuf, len); + xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL, + ops); + do_cleanups (cleanup); + } + if (readbuf != NULL) + xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL, + ops); + if (xfered > 0) + return xfered; + else if (xfered == 0 && errno == 0) + /* "to_xfer_memory" uses 0, cross checked against ERRNO as one + indication of an error. */ + return 0; + else + return -1; + } + else if (ops->beneath != NULL) + return ops->beneath->to_xfer_partial (ops->beneath, object, annex, + readbuf, writebuf, offset, len); + else + return -1; +} + +/* Target vector read/write partial wrapper functions. + + NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial + (inbuf, outbuf)", instead of separate read/write methods, make life + easier. */ + +LONGEST +target_read_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len); +} + +LONGEST +target_write_partial (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len); +} + +/* Wrappers to perform the full transfer. */ +LONGEST +target_read (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_read_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +LONGEST +target_write (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_write_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +/* Memory transfer methods. */ + +void +get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf, + LONGEST len) +{ + if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) + != len) + memory_error (EIO, addr); +} + +ULONGEST +get_target_memory_unsigned (struct target_ops *ops, + CORE_ADDR addr, int len) +{ + char buf[sizeof (ULONGEST)]; + + gdb_assert (len <= sizeof (buf)); + get_target_memory (ops, addr, buf, len); + return extract_unsigned_integer (buf, len); +} + +static void +target_info (char *args, int from_tty) +{ + struct target_ops *t; + int has_all_mem = 0; + + if (symfile_objfile != NULL) + printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name); + +#ifdef FILES_INFO_HOOK + if (FILES_INFO_HOOK ()) + return; +#endif + + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + if ((int) (t->to_stratum) <= (int) dummy_stratum) + continue; + if (has_all_mem) + printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n"); + printf_unfiltered ("%s:\n", t->to_longname); + (t->to_files_info) (t); + has_all_mem = t->to_has_all_memory; + } +} + +/* This is to be called by the open routine before it does + anything. */ + +void +target_preopen (int from_tty) +{ + dont_repeat (); + + if (target_has_execution) + { + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) + target_kill (); + else + error ("Program not killed."); + } + + /* Calling target_kill may remove the target from the stack. But if + it doesn't (which seems like a win for UDI), remove it now. */ + + if (target_has_execution) + pop_target (); +} + +/* Detach a target after doing deferred register stores. */ + +void +target_detach (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_detach) (args, from_tty); +} + +void +target_disconnect (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_disconnect) (args, from_tty); +} + +void +target_link (char *modname, CORE_ADDR *t_reloc) +{ + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) + { + (current_target.to_lookup_symbol) (modname, t_reloc); + if (*t_reloc == 0) + error ("Unable to link to %s and get relocation in rombug", modname); + } + else + *t_reloc = (CORE_ADDR) -1; +} + +int +target_async_mask (int mask) +{ + int saved_async_masked_status = target_async_mask_value; + target_async_mask_value = mask; + return saved_async_masked_status; +} + +/* Look through the list of possible targets for a target that can + execute a run or attach command without any other data. This is + used to locate the default process stratum. + + Result is always valid (error() is called for errors). */ + +static struct target_ops * +find_default_run_target (char *do_mesg) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + if (count != 1) + error ("Don't know how to %s. Try \"help target\".", do_mesg); + + return runable; +} + +void +find_default_attach (char *args, int from_tty) +{ + struct target_ops *t; + + t = find_default_run_target ("attach"); + (t->to_attach) (args, from_tty); + return; +} + +void +find_default_create_inferior (char *exec_file, char *allargs, char **env) +{ + struct target_ops *t; + + t = find_default_run_target ("run"); + (t->to_create_inferior) (exec_file, allargs, env); + return; +} + +static int +default_region_size_ok_for_hw_watchpoint (int byte_count) +{ + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); +} + +static int +return_zero (void) +{ + return 0; +} + +static int +return_one (void) +{ + return 1; +} + +static int +return_minus_one (void) +{ + return -1; +} + +/* + * Resize the to_sections pointer. Also make sure that anyone that + * was holding on to an old value of it gets updated. + * Returns the old size. + */ + +int +target_resize_to_sections (struct target_ops *target, int num_added) +{ + struct target_ops **t; + struct section_table *old_value; + int old_count; + + old_value = target->to_sections; + + if (target->to_sections) + { + old_count = target->to_sections_end - target->to_sections; + target->to_sections = (struct section_table *) + xrealloc ((char *) target->to_sections, + (sizeof (struct section_table)) * (num_added + old_count)); + } + else + { + old_count = 0; + target->to_sections = (struct section_table *) + xmalloc ((sizeof (struct section_table)) * num_added); + } + target->to_sections_end = target->to_sections + (num_added + old_count); + + /* Check to see if anyone else was pointing to this structure. + If old_value was null, then no one was. */ + + if (old_value) + { + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_sections == old_value) + { + (*t)->to_sections = target->to_sections; + (*t)->to_sections_end = target->to_sections_end; + } + } + } + + return old_count; + +} + +/* Remove all target sections taken from ABFD. + + Scan the current target stack for targets whose section tables + refer to sections from BFD, and remove those sections. We use this + when we notice that the inferior has unloaded a shared object, for + example. */ +void +remove_target_sections (bfd *abfd) +{ + struct target_ops **t; + + for (t = target_structs; t < target_structs + target_struct_size; t++) + { + struct section_table *src, *dest; + + dest = (*t)->to_sections; + for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++) + if (src->bfd != abfd) + { + /* Keep this section. */ + if (dest < src) *dest = *src; + dest++; + } + + /* If we've dropped any sections, resize the section table. */ + if (dest < src) + target_resize_to_sections (*t, dest - src); + } +} + + + + +/* Find a single runnable target in the stack and return it. If for + some reason there is more than one, return NULL. */ + +struct target_ops * +find_run_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* Find a single core_stratum target in the list of targets and return it. + If for some reason there is more than one, return NULL. */ + +struct target_ops * +find_core_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_stratum == core_stratum) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* + * Find the next target down the stack from the specified target. + */ + +struct target_ops * +find_target_beneath (struct target_ops *t) +{ + return t->beneath; +} + + +/* The inferior process has died. Long live the inferior! */ + +void +generic_mourn_inferior (void) +{ + extern int show_breakpoint_hit_counts; + + inferior_ptid = null_ptid; + attach_flag = 0; + breakpoint_init_inferior (inf_exited); + registers_changed (); + +#ifdef CLEAR_DEFERRED_STORES + /* Delete any pending stores to the inferior... */ + CLEAR_DEFERRED_STORES; +#endif + + reopen_exec_file (); + reinit_frame_cache (); + + /* It is confusing to the user for ignore counts to stick around + from previous runs of the inferior. So clear them. */ + /* However, it is more confusing for the ignore counts to disappear when + using hit counts. So don't clear them if we're counting hits. */ + if (!show_breakpoint_hit_counts) + breakpoint_clear_ignore_counts (); + + if (detach_hook) + detach_hook (); +} + +/* Helper function for child_wait and the Lynx derivatives of child_wait. + HOSTSTATUS is the waitstatus from wait() or the equivalent; store our + translation of that in OURSTATUS. */ +void +store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus) +{ +#ifdef CHILD_SPECIAL_WAITSTATUS + /* CHILD_SPECIAL_WAITSTATUS should return nonzero and set *OURSTATUS + if it wants to deal with hoststatus. */ + if (CHILD_SPECIAL_WAITSTATUS (ourstatus, hoststatus)) + return; +#endif + + if (WIFEXITED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_EXITED; + ourstatus->value.integer = WEXITSTATUS (hoststatus); + } + else if (!WIFSTOPPED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus)); + } + else + { + ourstatus->kind = TARGET_WAITKIND_STOPPED; + ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus)); + } +} + +/* Returns zero to leave the inferior alone, one to interrupt it. */ +int (*target_activity_function) (void); +int target_activity_fd; + +/* Convert a normal process ID to a string. Returns the string in a static + buffer. */ + +char * +normal_pid_to_str (ptid_t ptid) +{ + static char buf[30]; + + sprintf (buf, "process %d", PIDGET (ptid)); + return buf; +} + +/* Error-catcher for target_find_memory_regions */ +static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) +{ + error ("No target."); + return 0; +} + +/* Error-catcher for target_make_corefile_notes */ +static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) +{ + error ("No target."); + return NULL; +} + +/* Set up the handful of non-empty slots needed by the dummy target + vector. */ + +static void +init_dummy_target (void) +{ + dummy_target.to_shortname = "None"; + dummy_target.to_longname = "None"; + dummy_target.to_doc = ""; + dummy_target.to_attach = find_default_attach; + dummy_target.to_create_inferior = find_default_create_inferior; + dummy_target.to_pid_to_str = normal_pid_to_str; + dummy_target.to_stratum = dummy_stratum; + dummy_target.to_find_memory_regions = dummy_find_memory_regions; + dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; + dummy_target.to_magic = OPS_MAGIC; +} + + +static struct target_ops debug_target; + +static void +debug_to_open (char *args, int from_tty) +{ + debug_target.to_open (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty); +} + +static void +debug_to_close (int quitting) +{ + target_close (&debug_target, quitting); + fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting); +} + +void +target_close (struct target_ops *targ, int quitting) +{ + if (targ->to_xclose != NULL) + targ->to_xclose (targ, quitting); + else if (targ->to_close != NULL) + targ->to_close (quitting); +} + +static void +debug_to_attach (char *args, int from_tty) +{ + debug_target.to_attach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty); +} + + +static void +debug_to_post_attach (int pid) +{ + debug_target.to_post_attach (pid); + + fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid); +} + +static void +debug_to_detach (char *args, int from_tty) +{ + debug_target.to_detach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty); +} + +static void +debug_to_disconnect (char *args, int from_tty) +{ + debug_target.to_disconnect (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); +} + +static void +debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal) +{ + debug_target.to_resume (ptid, step, siggnal); + + fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid), + step ? "step" : "continue", + target_signal_to_name (siggnal)); +} + +static ptid_t +debug_to_wait (ptid_t ptid, struct target_waitstatus *status) +{ + ptid_t retval; + + retval = debug_target.to_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, + "target_wait (%d, status) = %d, ", PIDGET (ptid), + PIDGET (retval)); + fprintf_unfiltered (gdb_stdlog, "status->kind = "); + switch (status->kind) + { + case TARGET_WAITKIND_EXITED: + fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n", + status->value.integer); + break; + case TARGET_WAITKIND_STOPPED: + fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_SIGNALLED: + fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_LOADED: + fprintf_unfiltered (gdb_stdlog, "loaded\n"); + break; + case TARGET_WAITKIND_FORKED: + fprintf_unfiltered (gdb_stdlog, "forked\n"); + break; + case TARGET_WAITKIND_VFORKED: + fprintf_unfiltered (gdb_stdlog, "vforked\n"); + break; + case TARGET_WAITKIND_EXECD: + fprintf_unfiltered (gdb_stdlog, "execd\n"); + break; + case TARGET_WAITKIND_SPURIOUS: + fprintf_unfiltered (gdb_stdlog, "spurious\n"); + break; + default: + fprintf_unfiltered (gdb_stdlog, "unknown???\n"); + break; + } + + return retval; +} + +static void +debug_to_post_wait (ptid_t ptid, int status) +{ + debug_target.to_post_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n", + PIDGET (ptid), status); +} + +static void +debug_print_register (const char * func, int regno) +{ + fprintf_unfiltered (gdb_stdlog, "%s ", func); + if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS + && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0') + fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno)); + else + fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + if (regno >= 0) + { + int i; + unsigned char buf[MAX_REGISTER_SIZE]; + deprecated_read_register_gen (regno, buf); + fprintf_unfiltered (gdb_stdlog, " = "); + for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++) + { + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + } + if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST)) + { + fprintf_unfiltered (gdb_stdlog, " 0x%s %s", + paddr_nz (read_register (regno)), + paddr_d (read_register (regno))); + } + } + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_fetch_registers (int regno) +{ + debug_target.to_fetch_registers (regno); + debug_print_register ("target_fetch_registers", regno); +} + +static void +debug_to_store_registers (int regno) +{ + debug_target.to_store_registers (regno); + debug_print_register ("target_store_registers", regno); + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_prepare_to_store (void) +{ + debug_target.to_prepare_to_store (); + + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); +} + +static int +debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib, + struct target_ops *target) +{ + int retval; + + retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, + attrib, target); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d", + (unsigned int) memaddr, /* possable truncate long long */ + len, write ? "write" : "read", retval); + + + + if (retval > 0) + { + int i; + + fputs_unfiltered (", bytes =", gdb_stdlog); + for (i = 0; i < retval; i++) + { + if ((((long) &(myaddr[i])) & 0xf) == 0) + fprintf_unfiltered (gdb_stdlog, "\n"); + fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + } + } + + fputc_unfiltered ('\n', gdb_stdlog); + + return retval; +} + +static void +debug_to_files_info (struct target_ops *target) +{ + debug_target.to_files_info (target); + + fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n"); +} + +static int +debug_to_insert_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty) +{ + int retval; + + retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty); + + fprintf_unfiltered (gdb_stdlog, + "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n", + (unsigned long) type, + (unsigned long) cnt, + (unsigned long) from_tty, + (unsigned long) retval); + return retval; +} + +static int +debug_to_region_size_ok_for_hw_watchpoint (int byte_count) +{ + CORE_ADDR retval; + + retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count); + + fprintf_unfiltered (gdb_stdlog, + "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n", + (unsigned long) byte_count, + (unsigned long) retval); + return retval; +} + +static int +debug_to_stopped_by_watchpoint (void) +{ + int retval; + + retval = debug_target.to_stopped_by_watchpoint (); + + fprintf_unfiltered (gdb_stdlog, + "STOPPED_BY_WATCHPOINT () = %ld\n", + (unsigned long) retval); + return retval; +} + +static CORE_ADDR +debug_to_stopped_data_address (void) +{ + CORE_ADDR retval; + + retval = debug_target.to_stopped_data_address (); + + fprintf_unfiltered (gdb_stdlog, + "target_stopped_data_address () = 0x%lx\n", + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static void +debug_to_terminal_init (void) +{ + debug_target.to_terminal_init (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n"); +} + +static void +debug_to_terminal_inferior (void) +{ + debug_target.to_terminal_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); +} + +static void +debug_to_terminal_ours_for_output (void) +{ + debug_target.to_terminal_ours_for_output (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); +} + +static void +debug_to_terminal_ours (void) +{ + debug_target.to_terminal_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n"); +} + +static void +debug_to_terminal_save_ours (void) +{ + debug_target.to_terminal_save_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n"); +} + +static void +debug_to_terminal_info (char *arg, int from_tty) +{ + debug_target.to_terminal_info (arg, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg, + from_tty); +} + +static void +debug_to_kill (void) +{ + debug_target.to_kill (); + + fprintf_unfiltered (gdb_stdlog, "target_kill ()\n"); +} + +static void +debug_to_load (char *args, int from_tty) +{ + debug_target.to_load (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty); +} + +static int +debug_to_lookup_symbol (char *name, CORE_ADDR *addrp) +{ + int retval; + + retval = debug_target.to_lookup_symbol (name, addrp); + + fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name); + + return retval; +} + +static void +debug_to_create_inferior (char *exec_file, char *args, char **env) +{ + debug_target.to_create_inferior (exec_file, args, env); + + fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n", + exec_file, args); +} + +static void +debug_to_post_startup_inferior (ptid_t ptid) +{ + debug_target.to_post_startup_inferior (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n", + PIDGET (ptid)); +} + +static void +debug_to_acknowledge_created_inferior (int pid) +{ + debug_target.to_acknowledge_created_inferior (pid); + + fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n", + pid); +} + +static int +debug_to_insert_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_insert_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_follow_fork (int follow_child) +{ + int retval = debug_target.to_follow_fork (follow_child); + + fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n", + follow_child, retval); + + return retval; +} + +static int +debug_to_insert_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_reported_exec_events_per_exec_call (void) +{ + int reported_exec_events; + + reported_exec_events = debug_target.to_reported_exec_events_per_exec_call (); + + fprintf_unfiltered (gdb_stdlog, + "target_reported_exec_events_per_exec_call () = %d\n", + reported_exec_events); + + return reported_exec_events; +} + +static int +debug_to_has_exited (int pid, int wait_status, int *exit_status) +{ + int has_exited; + + has_exited = debug_target.to_has_exited (pid, wait_status, exit_status); + + fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n", + pid, wait_status, *exit_status, has_exited); + + return has_exited; +} + +static void +debug_to_mourn_inferior (void) +{ + debug_target.to_mourn_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n"); +} + +static int +debug_to_can_run (void) +{ + int retval; + + retval = debug_target.to_can_run (); + + fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval); + + return retval; +} + +static void +debug_to_notice_signals (ptid_t ptid) +{ + debug_target.to_notice_signals (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", + PIDGET (ptid)); +} + +static int +debug_to_thread_alive (ptid_t ptid) +{ + int retval; + + retval = debug_target.to_thread_alive (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + PIDGET (ptid), retval); + + return retval; +} + +static void +debug_to_find_new_threads (void) +{ + debug_target.to_find_new_threads (); + + fputs_unfiltered ("target_find_new_threads ()\n", gdb_stdlog); +} + +static void +debug_to_stop (void) +{ + debug_target.to_stop (); + + fprintf_unfiltered (gdb_stdlog, "target_stop ()\n"); +} + +static LONGEST +debug_to_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + LONGEST retval; + + retval = debug_target.to_xfer_partial (&debug_target, object, annex, + readbuf, writebuf, offset, len); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n", + (int) object, (annex ? annex : "(null)"), + (long) readbuf, (long) writebuf, paddr_nz (offset), + paddr_d (len), paddr_d (retval)); + + return retval; +} + +static void +debug_to_rcmd (char *command, + struct ui_file *outbuf) +{ + debug_target.to_rcmd (command, outbuf); + fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); +} + +static struct symtab_and_line * +debug_to_enable_exception_callback (enum exception_event_kind kind, int enable) +{ + struct symtab_and_line *result; + result = debug_target.to_enable_exception_callback (kind, enable); + fprintf_unfiltered (gdb_stdlog, + "target get_exception_callback_sal (%d, %d)\n", + kind, enable); + return result; +} + +static struct exception_event_record * +debug_to_get_current_exception_event (void) +{ + struct exception_event_record *result; + result = debug_target.to_get_current_exception_event (); + fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n"); + return result; +} + +static char * +debug_to_pid_to_exec_file (int pid) +{ + char *exec_file; + + exec_file = debug_target.to_pid_to_exec_file (pid); + + fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n", + pid, exec_file); + + return exec_file; +} + +static void +setup_target_debug (void) +{ + memcpy (&debug_target, ¤t_target, sizeof debug_target); + + current_target.to_open = debug_to_open; + current_target.to_close = debug_to_close; + current_target.to_attach = debug_to_attach; + current_target.to_post_attach = debug_to_post_attach; + current_target.to_detach = debug_to_detach; + current_target.to_disconnect = debug_to_disconnect; + current_target.to_resume = debug_to_resume; + current_target.to_wait = debug_to_wait; + current_target.to_post_wait = debug_to_post_wait; + current_target.to_fetch_registers = debug_to_fetch_registers; + current_target.to_store_registers = debug_to_store_registers; + current_target.to_prepare_to_store = debug_to_prepare_to_store; + current_target.to_xfer_memory = debug_to_xfer_memory; + current_target.to_files_info = debug_to_files_info; + current_target.to_insert_breakpoint = debug_to_insert_breakpoint; + current_target.to_remove_breakpoint = debug_to_remove_breakpoint; + current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint; + current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint; + current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint; + current_target.to_insert_watchpoint = debug_to_insert_watchpoint; + current_target.to_remove_watchpoint = debug_to_remove_watchpoint; + current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint; + current_target.to_stopped_data_address = debug_to_stopped_data_address; + current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint; + current_target.to_terminal_init = debug_to_terminal_init; + current_target.to_terminal_inferior = debug_to_terminal_inferior; + current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output; + current_target.to_terminal_ours = debug_to_terminal_ours; + current_target.to_terminal_save_ours = debug_to_terminal_save_ours; + current_target.to_terminal_info = debug_to_terminal_info; + current_target.to_kill = debug_to_kill; + current_target.to_load = debug_to_load; + current_target.to_lookup_symbol = debug_to_lookup_symbol; + current_target.to_create_inferior = debug_to_create_inferior; + current_target.to_post_startup_inferior = debug_to_post_startup_inferior; + current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior; + current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint; + current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint; + current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint; + current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint; + current_target.to_follow_fork = debug_to_follow_fork; + current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint; + current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint; + current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call; + current_target.to_has_exited = debug_to_has_exited; + current_target.to_mourn_inferior = debug_to_mourn_inferior; + current_target.to_can_run = debug_to_can_run; + current_target.to_notice_signals = debug_to_notice_signals; + current_target.to_thread_alive = debug_to_thread_alive; + current_target.to_find_new_threads = debug_to_find_new_threads; + current_target.to_stop = debug_to_stop; + current_target.to_xfer_partial = debug_to_xfer_partial; + current_target.to_rcmd = debug_to_rcmd; + current_target.to_enable_exception_callback = debug_to_enable_exception_callback; + current_target.to_get_current_exception_event = debug_to_get_current_exception_event; + current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file; + +} + + +static char targ_desc[] = +"Names of targets and files being debugged.\n\ +Shows the entire stack of targets currently in use (including the exec-file,\n\ +core-file, and process, if any), as well as the symbol file name."; + +static void +do_monitor_command (char *cmd, + int from_tty) +{ + if ((current_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain) + || (current_target.to_rcmd == debug_to_rcmd + && (debug_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain))) + { + error ("\"monitor\" command not supported by this target.\n"); + } + target_rcmd (cmd, gdb_stdtarg); +} + +void +initialize_targets (void) +{ + init_dummy_target (); + push_target (&dummy_target); + + add_info ("target", target_info, targ_desc); + add_info ("files", target_info, targ_desc); + + add_show_from_set + (add_set_cmd ("target", class_maintenance, var_zinteger, + (char *) &targetdebug, + "Set target debugging.\n\ +When non-zero, target debugging is enabled.", &setdebuglist), + &showdebuglist); + + add_setshow_boolean_cmd ("trust-readonly-sections", class_support, + &trust_readonly, "\ +Set mode for reading from readonly sections.\n\ +When this mode is on, memory reads from readonly sections (such as .text)\n\ +will be read from the object file instead of from the target. This will\n\ +result in significant performance improvement for remote targets.", "\ +Show mode for reading from readonly sections.\n", + NULL, NULL, + &setlist, &showlist); + + add_com ("monitor", class_obscure, do_monitor_command, + "Send a command to the remote monitor (remote targets only)."); + + target_dcache = dcache_init (); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/ui-file.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/ui-file.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/ui-file.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/ui-file.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,630 @@ +/* UI_FILE - a generic STDIO like output stream. + + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Implement the ``struct ui_file'' object. */ + +#include "defs.h" +#include "ui-file.h" +#include "gdb_string.h" + +#include + +static ui_file_isatty_ftype null_file_isatty; +static ui_file_write_ftype null_file_write; +static ui_file_fputs_ftype null_file_fputs; +static ui_file_read_ftype null_file_read; +static ui_file_flush_ftype null_file_flush; +static ui_file_delete_ftype null_file_delete; +static ui_file_rewind_ftype null_file_rewind; +static ui_file_put_ftype null_file_put; + +struct ui_file + { + int *magic; + ui_file_flush_ftype *to_flush; + ui_file_write_ftype *to_write; + ui_file_fputs_ftype *to_fputs; + ui_file_read_ftype *to_read; + ui_file_delete_ftype *to_delete; + ui_file_isatty_ftype *to_isatty; + ui_file_rewind_ftype *to_rewind; + ui_file_put_ftype *to_put; + void *to_data; + }; +int ui_file_magic; + +struct ui_file * +ui_file_new (void) +{ + struct ui_file *file = xmalloc (sizeof (struct ui_file)); + file->magic = &ui_file_magic; + set_ui_file_data (file, NULL, null_file_delete); + set_ui_file_flush (file, null_file_flush); + set_ui_file_write (file, null_file_write); + set_ui_file_fputs (file, null_file_fputs); + set_ui_file_read (file, null_file_read); + set_ui_file_isatty (file, null_file_isatty); + set_ui_file_rewind (file, null_file_rewind); + set_ui_file_put (file, null_file_put); + return file; +} + +void +ui_file_delete (struct ui_file *file) +{ + file->to_delete (file); + xfree (file); +} + +static int +null_file_isatty (struct ui_file *file) +{ + return 0; +} + +static void +null_file_rewind (struct ui_file *file) +{ + return; +} + +static void +null_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + return; +} + +static void +null_file_flush (struct ui_file *file) +{ + return; +} + +static void +null_file_write (struct ui_file *file, + const char *buf, + long sizeof_buf) +{ + if (file->to_fputs == null_file_fputs) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The fputs method isn't null, slowly pass the write request + onto that. FYI, this isn't as bad as it may look - the + current (as of 1999-11-07) printf_* function calls fputc and + fputc does exactly the below. By having a write function it + is possible to clean up that code. */ + int i; + char b[2]; + b[1] = '\0'; + for (i = 0; i < sizeof_buf; i++) + { + b[0] = buf[i]; + file->to_fputs (b, file); + } + return; + } +} + +static long +null_file_read (struct ui_file *file, + char *buf, + long sizeof_buf) +{ + errno = EBADF; + return 0; +} + +static void +null_file_fputs (const char *buf, struct ui_file *file) +{ + if (file->to_write == null_file_write) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The write method was implemented, use that. */ + file->to_write (file, buf, strlen (buf)); + } +} + +static void +null_file_delete (struct ui_file *file) +{ + return; +} + +void * +ui_file_data (struct ui_file *file) +{ + if (file->magic != &ui_file_magic) + internal_error (__FILE__, __LINE__, + "ui_file_data: bad magic number"); + return file->to_data; +} + +void +gdb_flush (struct ui_file *file) +{ + file->to_flush (file); +} + +int +ui_file_isatty (struct ui_file *file) +{ + return file->to_isatty (file); +} + +void +ui_file_rewind (struct ui_file *file) +{ + file->to_rewind (file); +} + +void +ui_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + file->to_put (file, write, dest); +} + +void +ui_file_write (struct ui_file *file, + const char *buf, + long length_buf) +{ + file->to_write (file, buf, length_buf); +} + +long +ui_file_read (struct ui_file *file, char *buf, long length_buf) +{ + return file->to_read (file, buf, length_buf); +} + +void +fputs_unfiltered (const char *buf, struct ui_file *file) +{ + file->to_fputs (buf, file); +} + +void +set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush) +{ + file->to_flush = flush; +} + +void +set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty) +{ + file->to_isatty = isatty; +} + +void +set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind) +{ + file->to_rewind = rewind; +} + +void +set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put) +{ + file->to_put = put; +} + +void +set_ui_file_write (struct ui_file *file, + ui_file_write_ftype *write) +{ + file->to_write = write; +} + +void +set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read) +{ + file->to_read = read; +} + +void +set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs) +{ + file->to_fputs = fputs; +} + +void +set_ui_file_data (struct ui_file *file, void *data, + ui_file_delete_ftype *delete) +{ + file->to_data = data; + file->to_delete = delete; +} + +/* ui_file utility function for converting a ``struct ui_file'' into + a memory buffer''. */ + +struct accumulated_ui_file +{ + char *buffer; + long length; +}; + +static void +do_ui_file_xstrdup (void *context, const char *buffer, long length) +{ + struct accumulated_ui_file *acc = context; + if (acc->buffer == NULL) + acc->buffer = xmalloc (length + 1); + else + acc->buffer = xrealloc (acc->buffer, acc->length + length + 1); + memcpy (acc->buffer + acc->length, buffer, length); + acc->length += length; + acc->buffer[acc->length] = '\0'; +} + +char * +ui_file_xstrdup (struct ui_file *file, + long *length) +{ + struct accumulated_ui_file acc; + acc.buffer = NULL; + acc.length = 0; + ui_file_put (file, do_ui_file_xstrdup, &acc); + if (acc.buffer == NULL) + acc.buffer = xstrdup (""); + *length = acc.length; + return acc.buffer; +} + +/* A pure memory based ``struct ui_file'' that can be used an output + buffer. The buffers accumulated contents are available via + ui_file_put(). */ + +struct mem_file + { + int *magic; + char *buffer; + int sizeof_buffer; + int length_buffer; + }; + +static ui_file_rewind_ftype mem_file_rewind; +static ui_file_put_ftype mem_file_put; +static ui_file_write_ftype mem_file_write; +static ui_file_delete_ftype mem_file_delete; +static struct ui_file *mem_file_new (void); +static int mem_file_magic; + +static struct ui_file * +mem_file_new (void) +{ + struct mem_file *stream = XMALLOC (struct mem_file); + struct ui_file *file = ui_file_new (); + set_ui_file_data (file, stream, mem_file_delete); + set_ui_file_rewind (file, mem_file_rewind); + set_ui_file_put (file, mem_file_put); + set_ui_file_write (file, mem_file_write); + stream->magic = &mem_file_magic; + stream->buffer = NULL; + stream->sizeof_buffer = 0; + stream->length_buffer = 0; + return file; +} + +static void +mem_file_delete (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_delete: bad magic number"); + if (stream->buffer != NULL) + xfree (stream->buffer); + xfree (stream); +} + +struct ui_file * +mem_fileopen (void) +{ + return mem_file_new (); +} + +static void +mem_file_rewind (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_rewind: bad magic number"); + stream->length_buffer = 0; +} + +static void +mem_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_put: bad magic number"); + if (stream->length_buffer > 0) + write (dest, stream->buffer, stream->length_buffer); +} + +void +mem_file_write (struct ui_file *file, + const char *buffer, + long length_buffer) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_write: bad magic number"); + if (stream->buffer == NULL) + { + stream->length_buffer = length_buffer; + stream->sizeof_buffer = length_buffer; + stream->buffer = xmalloc (stream->sizeof_buffer); + memcpy (stream->buffer, buffer, length_buffer); + } + else + { + int new_length = stream->length_buffer + length_buffer; + if (new_length >= stream->sizeof_buffer) + { + stream->sizeof_buffer = new_length; + stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer); + } + memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer); + stream->length_buffer = new_length; + } +} + +/* ``struct ui_file'' implementation that maps directly onto + 's FILE. */ + +static ui_file_write_ftype stdio_file_write; +static ui_file_fputs_ftype stdio_file_fputs; +static ui_file_read_ftype stdio_file_read; +static ui_file_isatty_ftype stdio_file_isatty; +static ui_file_delete_ftype stdio_file_delete; +static struct ui_file *stdio_file_new (FILE * file, int close_p); +static ui_file_flush_ftype stdio_file_flush; + +static int stdio_file_magic; + +struct stdio_file + { + int *magic; + FILE *file; + int close_p; + }; + +static struct ui_file * +stdio_file_new (FILE *file, int close_p) +{ + struct ui_file *ui_file = ui_file_new (); + struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file)); + stdio->magic = &stdio_file_magic; + stdio->file = file; + stdio->close_p = close_p; + set_ui_file_data (ui_file, stdio, stdio_file_delete); + set_ui_file_flush (ui_file, stdio_file_flush); + set_ui_file_write (ui_file, stdio_file_write); + set_ui_file_fputs (ui_file, stdio_file_fputs); + set_ui_file_read (ui_file, stdio_file_read); + set_ui_file_isatty (ui_file, stdio_file_isatty); + return ui_file; +} + +static void +stdio_file_delete (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_delete: bad magic number"); + if (stdio->close_p) + { + fclose (stdio->file); + } + xfree (stdio); +} + +static void +stdio_file_flush (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_flush: bad magic number"); + fflush (stdio->file); +} + +static long +stdio_file_read (struct ui_file *file, char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_read: bad magic number"); + return read (fileno (stdio->file), buf, length_buf); +} + +static void +stdio_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_write: bad magic number"); + fwrite (buf, length_buf, 1, stdio->file); +} + +static void +stdio_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_fputs: bad magic number"); + fputs (linebuffer, stdio->file); +} + +static int +stdio_file_isatty (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_isatty: bad magic number"); + return (isatty (fileno (stdio->file))); +} + +/* Like fdopen(). Create a ui_file from a previously opened FILE. */ + +struct ui_file * +stdio_fileopen (FILE *file) +{ + return stdio_file_new (file, 0); +} + +struct ui_file * +gdb_fopen (char *name, char *mode) +{ + FILE *f = fopen (name, mode); + if (f == NULL) + return NULL; + return stdio_file_new (f, 1); +} + +#ifdef CRASH_MERGE +void +replace_ui_file_FILE(struct ui_file *file, FILE *fp) +{ + struct stdio_file *stdio_file; + + stdio_file = (struct stdio_file *)ui_file_data(file); + stdio_file->file = fp; +} +#endif + +/* ``struct ui_file'' implementation that maps onto two ui-file objects. */ + +static ui_file_write_ftype tee_file_write; +static ui_file_fputs_ftype tee_file_fputs; +static ui_file_isatty_ftype tee_file_isatty; +static ui_file_delete_ftype tee_file_delete; +static ui_file_flush_ftype tee_file_flush; + +static int tee_file_magic; + +struct tee_file + { + int *magic; + struct ui_file *one, *two; + int close_one, close_two; + }; + +struct ui_file * +tee_file_new (struct ui_file *one, int close_one, + struct ui_file *two, int close_two) +{ + struct ui_file *ui_file = ui_file_new (); + struct tee_file *tee = xmalloc (sizeof (struct tee_file)); + tee->magic = &tee_file_magic; + tee->one = one; + tee->two = two; + tee->close_one = close_one; + tee->close_two = close_two; + set_ui_file_data (ui_file, tee, tee_file_delete); + set_ui_file_flush (ui_file, tee_file_flush); + set_ui_file_write (ui_file, tee_file_write); + set_ui_file_fputs (ui_file, tee_file_fputs); + set_ui_file_isatty (ui_file, tee_file_isatty); + return ui_file; +} + +static void +tee_file_delete (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_delete: bad magic number"); + if (tee->close_one) + ui_file_delete (tee->one); + if (tee->close_two) + ui_file_delete (tee->two); + + xfree (tee); +} + +static void +tee_file_flush (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_flush: bad magic number"); + tee->one->to_flush (tee->one); + tee->two->to_flush (tee->two); +} + +static void +tee_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_write: bad magic number"); + ui_file_write (tee->one, buf, length_buf); + ui_file_write (tee->two, buf, length_buf); +} + +static void +tee_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_fputs: bad magic number"); + tee->one->to_fputs (linebuffer, tee->one); + tee->two->to_fputs (linebuffer, tee->two); +} + +static int +tee_file_isatty (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_isatty: bad magic number"); + return (0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/utils.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/utils.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb/utils.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb/utils.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3068 @@ +/* General utility routines for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" + +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + +#ifdef __GO32__ +#include +#endif + +/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ +#ifdef reg +#undef reg +#endif + +#include +#include "gdbcmd.h" +#include "serial.h" +#include "bfd.h" +#include "target.h" +#include "demangle.h" +#include "expression.h" +#include "language.h" +#include "charset.h" +#include "annotate.h" +#include "filenames.h" + +#include "inferior.h" /* for signed_pointer_to_address */ + +#include /* For MAXPATHLEN */ + +#ifdef HAVE_CURSES_H +#include +#endif +#ifdef HAVE_TERM_H +#include +#endif + +#include "readline/readline.h" + +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif +/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) +extern char *canonicalize_file_name (const char *); +#endif + +/* readline defines this. */ +#undef savestring + +void (*error_begin_hook) (void); + +/* Holds the last error message issued by gdb */ + +static struct ui_file *gdb_lasterr; + +/* Prototypes for local functions */ + +static void vfprintf_maybe_filtered (struct ui_file *, const char *, + va_list, int); + +static void fputs_maybe_filtered (const char *, struct ui_file *, int); + +static void do_my_cleanups (struct cleanup **, struct cleanup *); + +static void prompt_for_continue (void); + +static void set_screen_size (void); +static void set_width (void); + +/* Chain of cleanup actions established with make_cleanup, + to be executed if an error happens. */ + +static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ +static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ +static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ +static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; + +/* Pointer to what is left to do for an execution command after the + target stops. Used only in asynchronous mode, by targets that + support async execution. The finish and until commands use it. So + does the target extended-remote command. */ +struct continuation *cmd_continuation; +struct continuation *intermediate_continuation; + +/* Nonzero if we have job control. */ + +int job_control; + +/* Nonzero means a quit has been requested. */ + +int quit_flag; + +/* Nonzero means quit immediately if Control-C is typed now, rather + than waiting until QUIT is executed. Be careful in setting this; + code which executes with immediate_quit set has to be very careful + about being able to deal with being interrupted at any time. It is + almost always better to use QUIT; the only exception I can think of + is being able to quit out of a system call (using EINTR loses if + the SIGINT happens between the previous QUIT and the system call). + To immediately quit in the case in which a SIGINT happens between + the previous QUIT and setting immediate_quit (desirable anytime we + expect to block), call QUIT after setting immediate_quit. */ + +int immediate_quit; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form rather than raw. */ + +int demangle = 1; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form even in assembler language displays. If this is set, but + DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */ + +int asm_demangle = 0; + +/* Nonzero means that strings with character values >0x7F should be printed + as octal escapes. Zero means just print the value (e.g. it's an + international character, and the terminal or window can cope.) */ + +int sevenbit_strings = 0; + +/* String to be printed before error messages, if any. */ + +char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + +char *warning_pre_print = "\nwarning: "; + +int pagination_enabled = 1; + + +/* Add a new cleanup to the cleanup_chain, + and return the previous chain pointer + to be passed later to do_cleanups or discard_cleanups. + Args are FUNCTION to clean up with, and ARG to pass to it. */ + +struct cleanup * +make_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&cleanup_chain, function, arg); +} + +struct cleanup * +make_final_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&final_cleanup_chain, function, arg); +} + +struct cleanup * +make_run_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&run_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_error_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + +static void +do_freeargv (void *arg) +{ + freeargv ((char **) arg); +} + +struct cleanup * +make_cleanup_freeargv (char **arg) +{ + return make_my_cleanup (&cleanup_chain, do_freeargv, arg); +} + +static void +do_bfd_close_cleanup (void *arg) +{ + bfd_close (arg); +} + +struct cleanup * +make_cleanup_bfd_close (bfd *abfd) +{ + return make_cleanup (do_bfd_close_cleanup, abfd); +} + +static void +do_close_cleanup (void *arg) +{ + int *fd = arg; + close (*fd); + xfree (fd); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + int *saved_fd = xmalloc (sizeof (fd)); + *saved_fd = fd; + return make_cleanup (do_close_cleanup, saved_fd); +} + +static void +do_ui_file_delete (void *arg) +{ + ui_file_delete (arg); +} + +struct cleanup * +make_cleanup_ui_file_delete (struct ui_file *arg) +{ + return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg); +} + +struct cleanup * +make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function, + void *arg) +{ + struct cleanup *new + = (struct cleanup *) xmalloc (sizeof (struct cleanup)); + struct cleanup *old_chain = *pmy_chain; + + new->next = *pmy_chain; + new->function = function; + new->arg = arg; + *pmy_chain = new; + + return old_chain; +} + +/* Discard cleanups and do the actions they describe + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +do_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&cleanup_chain, old_chain); +} + +void +do_final_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +do_run_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&run_cleanup_chain, old_chain); +} + +void +do_exec_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_cleanup_chain, old_chain); +} + +void +do_exec_error_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +static void +do_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; /* Do this first incase recursion */ + (*ptr->function) (ptr->arg); + xfree (ptr); + } +} + +/* Discard cleanups, not doing the actions they describe, + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +discard_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&cleanup_chain, old_chain); +} + +void +discard_final_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +discard_exec_error_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +void +discard_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; + xfree (ptr); + } +} + +/* Set the cleanup_chain to 0, and return the old cleanup chain. */ +struct cleanup * +save_cleanups (void) +{ + return save_my_cleanups (&cleanup_chain); +} + +struct cleanup * +save_final_cleanups (void) +{ + return save_my_cleanups (&final_cleanup_chain); +} + +struct cleanup * +save_my_cleanups (struct cleanup **pmy_chain) +{ + struct cleanup *old_chain = *pmy_chain; + + *pmy_chain = 0; + return old_chain; +} + +/* Restore the cleanup chain from a previously saved chain. */ +void +restore_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&cleanup_chain, chain); +} + +void +restore_final_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&final_cleanup_chain, chain); +} + +void +restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) +{ + *pmy_chain = chain; +} + +/* This function is useful for cleanups. + Do + + foo = xmalloc (...); + old_chain = make_cleanup (free_current_contents, &foo); + + to arrange to free the object thus allocated. */ + +void +free_current_contents (void *ptr) +{ + void **location = ptr; + if (location == NULL) + internal_error (__FILE__, __LINE__, + "free_current_contents: NULL pointer"); + if (*location != NULL) + { + xfree (*location); + *location = NULL; + } +} + +/* Provide a known function that does nothing, to use as a base for + for a possibly long chain of cleanups. This is useful where we + use the cleanup chain for handling normal cleanups as well as dealing + with cleanups that need to be done as a result of a call to error(). + In such cases, we may not be certain where the first cleanup is, unless + we have a do-nothing one to always use as the base. */ + +void +null_cleanup (void *arg) +{ +} + +/* Add a continuation to the continuation list, the global list + cmd_continuation. The new continuation will be added at the front.*/ +void +add_continuation (void (*continuation_hook) (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = cmd_continuation; + cmd_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = cmd_continuation; + cmd_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_continuations (void) +{ + struct continuation *continuation_ptr; + + while (cmd_continuation) + { + continuation_ptr = cmd_continuation; + cmd_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + +/* Add a continuation to the continuation list, the global list + intermediate_continuation. The new continuation will be added at the front.*/ +void +add_intermediate_continuation (void (*continuation_hook) + (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = intermediate_continuation; + intermediate_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = intermediate_continuation; + intermediate_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + + while (intermediate_continuation) + { + continuation_ptr = intermediate_continuation; + intermediate_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + + + +/* Print a warning message. The first argument STRING is the warning + message, used as an fprintf format string, the second is the + va_list of arguments for that string. A warning is unfiltered (not + paginated) so that the user does not need to page through each + screen full of warnings when there are lots of them. */ + +void +vwarning (const char *string, va_list args) +{ + if (warning_hook) + (*warning_hook) (string, args); + else + { + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + va_end (args); + } +} + +/* Print a warning message. + The first argument STRING is the warning message, used as a fprintf string, + and the remaining args are passed as arguments to it. + The primary difference between warnings and errors is that a warning + does not force the return to command level. */ + +void +warning (const char *string, ...) +{ + va_list args; + va_start (args, string); + vwarning (string, args); + va_end (args); +} + +/* Print an error message and return to command level. + The first argument STRING is the error message, used as a fprintf string, + and the remaining args are passed as arguments to it. */ + +NORETURN void +verror (const char *string, va_list args) +{ + struct ui_file *tmp_stream = mem_fileopen (); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + error_stream (tmp_stream); +} + +NORETURN void +error (const char *string, ...) +{ + va_list args; + va_start (args, string); + verror (string, args); + va_end (args); +} + +static void +do_write (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +/* Cause a silent error to occur. Any error message is recorded + though it is not issued. */ +NORETURN void +error_silent (const char *string, ...) +{ + va_list args; + struct ui_file *tmp_stream = mem_fileopen (); + va_start (args, string); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (tmp_stream, do_write, gdb_lasterr); + va_end (args); + + throw_exception (RETURN_ERROR); +} + +/* Output an error message including any pre-print text to gdb_stderr. */ +void +error_output_message (char *pre_print, char *msg) +{ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (pre_print) + fputs_filtered (pre_print, gdb_stderr); + fputs_filtered (msg, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +} + +NORETURN void +error_stream (struct ui_file *stream) +{ + if (error_begin_hook) + error_begin_hook (); + + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (stream, do_write, gdb_lasterr); + + /* Write the message plus any error_pre_print to gdb_stderr. */ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (error_pre_print) + fputs_filtered (error_pre_print, gdb_stderr); + ui_file_put (stream, do_write, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +#ifdef CRASH_MERGE + if (error_hook) + (*error_hook)(); + else { + int console(char *, ...); + console("verror() called without error_hook\n"); + } +#endif + throw_exception (RETURN_ERROR); +} + +/* Get the last error message issued by gdb */ + +char * +error_last_message (void) +{ + long len; + return ui_file_xstrdup (gdb_lasterr, &len); +} + +/* This is to be called by main() at the very beginning */ + +void +error_init (void) +{ + gdb_lasterr = mem_fileopen (); +} + +/* Print a message reporting an internal error/warning. Ask the user + if they want to continue, dump core, or just exit. Return + something to indicate a quit. */ + +struct internal_problem +{ + const char *name; + /* FIXME: cagney/2002-08-15: There should be ``maint set/show'' + commands available for controlling these variables. */ + enum auto_boolean should_quit; + enum auto_boolean should_dump_core; +}; + +/* Report a problem, internal to GDB, to the user. Once the problem + has been reported, and assuming GDB didn't quit, the caller can + either allow execution to resume or throw an error. */ + +static void +internal_vproblem (struct internal_problem *problem, + const char *file, int line, const char *fmt, va_list ap) +{ + static int dejavu; + int quit_p; + int dump_core_p; + char *reason; + + /* Don't allow infinite error/warning recursion. */ + { + static char msg[] = "Recursive internal problem.\n"; + switch (dejavu) + { + case 0: + dejavu = 1; + break; + case 1: + dejavu = 2; + fputs_unfiltered (msg, gdb_stderr); + abort (); /* NOTE: GDB has only three calls to abort(). */ + default: + dejavu = 3; + write (STDERR_FILENO, msg, sizeof (msg)); + exit (1); + } + } + + /* Try to get the message out and at the start of a new line. */ + target_terminal_ours (); + begin_line (); + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason + (error/warning) and question become separated. Format using a + style similar to a compiler error message. Include extra detail + so that the user knows that they are living on the edge. */ + { + char *msg; + xvasprintf (&msg, fmt, ap); + xasprintf (&reason, "\ +%s:%d: %s: %s\n\ +A problem internal to GDB has been detected,\n\ +further debugging may prove unreliable.", file, line, problem->name, msg); + xfree (msg); + make_cleanup (xfree, reason); + } + + switch (problem->should_quit) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to quit GDB. When in batch mode + this lessens the likelhood of GDB going into an infinate + loop. */ + quit_p = query ("%s\nQuit this debugging session? ", reason); + break; + case AUTO_BOOLEAN_TRUE: + quit_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + quit_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + switch (problem->should_dump_core) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to dump core. This leaves a GDB + `dropping' so that it is easier to see that something went + wrong in GDB. */ + dump_core_p = query ("%s\nCreate a core file of GDB? ", reason); + break; + break; + case AUTO_BOOLEAN_TRUE: + dump_core_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + dump_core_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + if (quit_p) + { + if (dump_core_p) + abort (); /* NOTE: GDB has only three calls to abort(). */ + else + exit (1); + } + else + { + if (dump_core_p) + { + if (fork () == 0) + abort (); /* NOTE: GDB has only three calls to abort(). */ + } + } + + dejavu = 0; +} + +static struct internal_problem internal_error_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +NORETURN void +internal_verror (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_error_problem, file, line, fmt, ap); + throw_exception (RETURN_ERROR); +} + +NORETURN void +internal_error (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_verror (file, line, string, ap); + va_end (ap); +} + +static struct internal_problem internal_warning_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +void +internal_vwarning (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_warning_problem, file, line, fmt, ap); +} + +void +internal_warning (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_vwarning (file, line, string, ap); + va_end (ap); +} + +/* The strerror() function can return NULL for errno values that are + out of range. Provide a "safe" version that always returns a + printable string. */ + +char * +safe_strerror (int errnum) +{ + char *msg; + static char buf[32]; + + msg = strerror (errnum); + if (msg == NULL) + { + sprintf (buf, "(undocumented errno %d)", errnum); + msg = buf; + } + return (msg); +} + +/* Print the system error message for errno, and also mention STRING + as the file name for which the error was encountered. + Then return to command level. */ + +NORETURN void +perror_with_name (const char *string) +{ + char *err; + char *combined; + + err = safe_strerror (errno); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* I understand setting these is a matter of taste. Still, some people + may clear errno but not know about bfd_error. Doing this here is not + unreasonable. */ + bfd_set_error (bfd_error_no_error); + errno = 0; + + error ("%s.", combined); +} + +/* Print the system error message for ERRCODE, and also mention STRING + as the file name for which the error was encountered. */ + +void +print_sys_errmsg (const char *string, int errcode) +{ + char *err; + char *combined; + + err = safe_strerror (errcode); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* We want anything which was printed on stdout to come out first, before + this message. */ + gdb_flush (gdb_stdout); + fprintf_unfiltered (gdb_stderr, "%s.\n", combined); +} + +/* Control C eventually causes this to be called, at a convenient time. */ + +void +quit (void) +{ + struct serial *gdb_stdout_serial = serial_fdopen (1); + + target_terminal_ours (); + + /* We want all output to appear now, before we print "Quit". We + have 3 levels of buffering we have to flush (it's possible that + some of these should be changed to flush the lower-level ones + too): */ + + /* 1. The _filtered buffer. */ + wrap_here ((char *) 0); + + /* 2. The stdio buffer. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + + /* 3. The system-level buffer. */ + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + + annotate_error_begin (); + + /* Don't use *_filtered; we don't want to prompt the user to continue. */ + if (quit_pre_print) + fputs_unfiltered (quit_pre_print, gdb_stderr); + +#ifdef __MSDOS__ + /* No steenking SIGINT will ever be coming our way when the + program is resumed. Don't lie. */ + fprintf_unfiltered (gdb_stderr, "Quit\n"); +#else + if (job_control + /* If there is no terminal switching for this target, then we can't + possibly get screwed by the lack of job control. */ + || current_target.to_terminal_ours == NULL) + fprintf_unfiltered (gdb_stderr, "Quit\n"); + else + fprintf_unfiltered (gdb_stderr, + "Quit (expect signal SIGINT when the program is resumed)\n"); +#endif + throw_exception (RETURN_QUIT); +} + +/* Control C comes here */ +void +request_quit (int signo) +{ + quit_flag = 1; + /* Restore the signal handler. Harmless with BSD-style signals, needed + for System V-style signals. So just always do it, rather than worrying + about USG defines and stuff like that. */ + signal (signo, request_quit); + + if (immediate_quit) + quit (); +} + +/* Memory management stuff (malloc friends). */ + +static void * +mmalloc (void *md, size_t size) +{ + return malloc (size); /* NOTE: GDB's only call to malloc() */ +} + +static void * +mrealloc (void *md, void *ptr, size_t size) +{ + if (ptr == 0) /* Guard against old realloc's */ + return mmalloc (md, size); + else + return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */ +} + +static void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); /* NOTE: GDB's only call to calloc() */ +} + +static void +mfree (void *md, void *ptr) +{ + free (ptr); /* NOTE: GDB's only call to free() */ +} + +/* This used to do something interesting with USE_MMALLOC. + * It can be retired any time. -- chastain 2004-01-19. */ +void +init_malloc (void *md) +{ +} + +/* Called when a memory allocation fails, with the number of bytes of + memory requested in SIZE. */ + +NORETURN void +nomem (long size) +{ + if (size > 0) + { + internal_error (__FILE__, __LINE__, + "virtual memory exhausted: can't allocate %ld bytes.", + size); + } + else + { + internal_error (__FILE__, __LINE__, "virtual memory exhausted."); + } +} + +/* The xmmalloc() family of memory management routines. + + These are are like the mmalloc() family except that they implement + consistent semantics and guard against typical memory management + problems: if a malloc fails, an internal error is thrown; if + free(NULL) is called, it is ignored; if *alloc(0) is called, NULL + is returned. + + All these routines are implemented using the mmalloc() family. */ + +void * +xmmalloc (void *md, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmrealloc (void *md, void *ptr, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + if (ptr != NULL) + val = mrealloc (md, ptr, size); + else + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmcalloc (void *md, size_t number, size_t size) +{ + void *mem; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (number == 0 || size == 0) + { + number = 1; + size = 1; + } + + mem = mcalloc (md, number, size); + if (mem == NULL) + nomem (number * size); + + return mem; +} + +void +xmfree (void *md, void *ptr) +{ + if (ptr != NULL) + mfree (md, ptr); +} + +/* The xmalloc() (libiberty.h) family of memory management routines. + + These are like the ISO-C malloc() family except that they implement + consistent semantics and guard against typical memory management + problems. See xmmalloc() above for further information. + + All these routines are wrappers to the xmmalloc() family. */ + +/* NOTE: These are declared using PTR to ensure consistency with + "libiberty.h". xfree() is GDB local. */ + +PTR /* OK: PTR */ +xmalloc (size_t size) +{ + return xmmalloc (NULL, size); +} + +PTR /* OK: PTR */ +xrealloc (PTR ptr, size_t size) /* OK: PTR */ +{ + return xmrealloc (NULL, ptr, size); +} + +PTR /* OK: PTR */ +xcalloc (size_t number, size_t size) +{ + return xmcalloc (NULL, number, size); +} + +void +xfree (void *ptr) +{ + xmfree (NULL, ptr); +} + + +/* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + +void +xasprintf (char **ret, const char *format, ...) +{ + va_list args; + va_start (args, format); + xvasprintf (ret, format, args); + va_end (args); +} + +void +xvasprintf (char **ret, const char *format, va_list ap) +{ + int status = vasprintf (ret, format, ap); + /* NULL could be returned due to a memory allocation problem; a + badly format string; or something else. */ + if ((*ret) == NULL) + internal_error (__FILE__, __LINE__, + "vasprintf returned NULL buffer (errno %d)", errno); + /* A negative status with a non-NULL buffer shouldn't never + happen. But to be sure. */ + if (status < 0) + internal_error (__FILE__, __LINE__, + "vasprintf call failed (errno %d)", errno); +} + + +/* My replacement for the read system call. + Used like `read' but keeps going if `read' returns too soon. */ + +int +myread (int desc, char *addr, int len) +{ + int val; + int orglen = len; + + while (len > 0) + { + val = read (desc, addr, len); + if (val < 0) + return val; + if (val == 0) + return orglen - len; + len -= val; + addr += val; + } + return orglen; +} + +/* Make a copy of the string at PTR with SIZE characters + (and add a null character at the end in the copy). + Uses malloc to get the space. Returns the address of the copy. */ + +char * +savestring (const char *ptr, size_t size) +{ + char *p = (char *) xmalloc (size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +msavestring (void *md, const char *ptr, size_t size) +{ + char *p = (char *) xmmalloc (md, size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +mstrsave (void *md, const char *ptr) +{ + return (msavestring (md, ptr, strlen (ptr))); +} + +void +print_spaces (int n, struct ui_file *file) +{ + fputs_unfiltered (n_spaces (n), file); +} + +/* Print a host address. */ + +void +gdb_print_host_address (const void *addr, struct ui_file *stream) +{ + + /* We could use the %p conversion specifier to fprintf if we had any + way of knowing whether this host supports it. But the following + should work on the Alpha and on 32 bit machines. */ + + fprintf_filtered (stream, "0x%lx", (unsigned long) addr); +} + +/* Ask user a y-or-n question and return 1 iff answer is yes. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +/* VARARGS */ +int +query (const char *ctlstr, ...) +{ + va_list args; + int answer; + int ans2; + int retval; + + va_start (args, ctlstr); + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer "yes" if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return 1; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-query\n"); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(y or n) "); + + if (annotation_level > 1) + printf_filtered ("\n\032\032query\n"); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = 1; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + if (answer == 'Y') + { + retval = 1; + break; + } + if (answer == 'N') + { + retval = 0; + break; + } + printf_filtered ("Please answer y or n.\n"); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-query\n"); + return retval; +} + + +/* This function supports the nquery() and yquery() functions. + Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or default the answer to the specified default. + DEFCHAR is either 'y' or 'n' and refers to the default answer. + CTLSTR is the control string and should end in "? ". It should + not say how to answer, because we do that. + ARGS are the arguments passed along with the CTLSTR argument to + printf. */ + +static int +defaulted_query (const char *ctlstr, const char defchar, va_list args) +{ + int answer; + int ans2; + int retval; + int def_value; + char def_answer, not_def_answer; + char *y_string, *n_string; + + /* Set up according to which answer is the default. */ + if (defchar == 'y') + { + def_value = 1; + def_answer = 'Y'; + not_def_answer = 'N'; + y_string = "[y]"; + n_string = "n"; + } + else + { + def_value = 0; + def_answer = 'N'; + not_def_answer = 'Y'; + y_string = "y"; + n_string = "[n]"; + } + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer default value if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return def_value; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-%cquery\n", defchar); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(%s or %s) ", y_string, n_string); + + if (annotation_level > 1) + printf_filtered ("\n\032\032%cquery\n", defchar); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = def_value; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + /* Check answer. For the non-default, the user must specify + the non-default explicitly. */ + if (answer == not_def_answer) + { + retval = !def_value; + break; + } + /* Otherwise, for the default, the user may either specify + the required input or have it default by entering nothing. */ + if (answer == def_answer || answer == '\n' || + answer == '\r' || answer == EOF) + { + retval = def_value; + break; + } + /* Invalid entries are not defaulted and require another selection. */ + printf_filtered ("Please answer %s or %s.\n", + y_string, n_string); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-%cquery\n", defchar); + return retval; +} + + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 0 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +nquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'n', args); + va_end (args); +} + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 1 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +yquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'y', args); + va_end (args); +} + +/* Print an error message saying that we couldn't make sense of a + \^mumble sequence in a string or character constant. START and END + indicate a substring of some larger string that contains the + erroneous backslash sequence, missing the initial backslash. */ +static NORETURN int +no_control_char_error (const char *start, const char *end) +{ + int len = end - start; + char *copy = alloca (end - start + 1); + + memcpy (copy, start, len); + copy[len] = '\0'; + + error ("There is no control character `\\%s' in the `%s' character set.", + copy, target_charset ()); +} + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + should point to the character after the \. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +int +parse_escape (char **string_ptr) +{ + int target_char; + int c = *(*string_ptr)++; + if (c_parse_backslash (c, &target_char)) + return target_char; + else + switch (c) + { + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + case '^': + { + /* Remember where this escape sequence started, for reporting + errors. */ + char *sequence_start_pos = *string_ptr - 1; + + c = *(*string_ptr)++; + + if (c == '?') + { + /* XXXCHARSET: What is `delete' in the host character set? */ + c = 0177; + + if (!host_char_to_target (c, &target_char)) + error ("There is no character corresponding to `Delete' " + "in the target character set `%s'.", host_charset ()); + + return target_char; + } + else if (c == '\\') + target_char = parse_escape (string_ptr); + else + { + if (!host_char_to_target (c, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + } + + /* Now target_char is something like `c', and we want to find + its control-character equivalent. */ + if (!target_char_to_control_char (target_char, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + + return target_char; + } + + /* XXXCHARSET: we need to use isdigit and value-of-digit + methods of the host character set here. */ + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int i = c - '0'; + int count = 0; + while (++count < 3) + { + c = (**string_ptr); + if (c >= '0' && c <= '7') + { + (*string_ptr)++; + i *= 8; + i += c - '0'; + } + else + { + break; + } + } + return i; + } + default: + if (!host_char_to_target (c, &target_char)) + error + ("The escape sequence `\%c' is equivalent to plain `%c', which" + " has no equivalent\n" "in the `%s' character set.", c, c, + target_charset ()); + return target_char; + } +} + +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that this routine should only + be call for printing things which are independent of the language + of the program being debugged. */ + +static void +printchar (int c, void (*do_fputs) (const char *, struct ui_file *), + void (*do_fprintf) (struct ui_file *, const char *, ...), + struct ui_file *stream, int quoter) +{ + + c &= 0xFF; /* Avoid sign bit follies */ + + if (c < 0x20 || /* Low control chars */ + (c >= 0x7F && c < 0xA0) || /* DEL, High controls */ + (sevenbit_strings && c >= 0x80)) + { /* high order bit set */ + switch (c) + { + case '\n': + do_fputs ("\\n", stream); + break; + case '\b': + do_fputs ("\\b", stream); + break; + case '\t': + do_fputs ("\\t", stream); + break; + case '\f': + do_fputs ("\\f", stream); + break; + case '\r': + do_fputs ("\\r", stream); + break; + case '\033': + do_fputs ("\\e", stream); + break; + case '\007': + do_fputs ("\\a", stream); + break; + default: + do_fprintf (stream, "\\%.3o", (unsigned int) c); + break; + } + } + else + { + if (c == '\\' || c == quoter) + do_fputs ("\\", stream); + do_fprintf (stream, "%c", c); + } +} + +/* Print the character C on STREAM as part of the contents of a + literal string whose delimiter is QUOTER. Note that these routines + should only be call for printing things which are independent of + the language of the program being debugged. */ + +void +fputstr_filtered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter); +} + +void +fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + +void +fputstrn_unfiltered (const char *str, int n, int quoter, + struct ui_file *stream) +{ + int i; + for (i = 0; i < n; i++) + printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + + +/* Number of lines per page or UINT_MAX if paging is disabled. */ +static unsigned int lines_per_page; + +/* Number of chars per line or UINT_MAX if line folding is disabled. */ +static unsigned int chars_per_line; + +/* Current count of lines printed on this page, chars on this line. */ +static unsigned int lines_printed, chars_printed; + +/* Buffer and start column of buffered text, for doing smarter word- + wrapping. When someone calls wrap_here(), we start buffering output + that comes through fputs_filtered(). If we see a newline, we just + spit it out and forget about the wrap_here(). If we see another + wrap_here(), we spit it out and remember the newer one. If we see + the end of the line, we spit out a newline, the indent, and then + the buffered output. */ + +/* Malloc'd buffer with chars_per_line+2 bytes. Contains characters which + are waiting to be output (they have already been counted in chars_printed). + When wrap_buffer[0] is null, the buffer is empty. */ +static char *wrap_buffer; + +/* Pointer in wrap_buffer to the next character to fill. */ +static char *wrap_pointer; + +/* String to indent by if the wrap occurs. Must not be NULL if wrap_column + is non-zero. */ +static char *wrap_indent; + +/* Column number on the screen where wrap_buffer begins, or 0 if wrapping + is not in effect. */ +static int wrap_column; + + +/* Inialize the number of lines per page and chars per line. */ + +void +init_page_info (void) +{ +#if defined(TUI) + if (!tui_get_command_dimension (&chars_per_line, &lines_per_page)) +#endif + { + int rows, cols; + +#if defined(__GO32__) + rows = ScreenRows (); + cols = ScreenCols (); + lines_per_page = rows; + chars_per_line = cols; +#else + /* Make sure Readline has initialized its terminal settings. */ + rl_reset_terminal (NULL); + + /* Get the screen size from Readline. */ + rl_get_screen_size (&rows, &cols); + lines_per_page = rows; + chars_per_line = cols; + + /* Readline should have fetched the termcap entry for us. */ + if (tgetnum ("li") < 0 || getenv ("EMACS")) + { + /* The number of lines per page is not mentioned in the + terminal description. This probably means that paging is + not useful (e.g. emacs shell window), so disable paging. */ + lines_per_page = UINT_MAX; + } + + /* FIXME: Get rid of this junk. */ +#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) + SIGWINCH_HANDLER (SIGWINCH); +#endif + + /* If the output is not a terminal, don't paginate it. */ + if (!ui_file_isatty (gdb_stdout)) + lines_per_page = UINT_MAX; +#endif + } + + set_screen_size (); + set_width (); +} + +/* Set the screen size based on LINES_PER_PAGE and CHARS_PER_LINE. */ + +static void +set_screen_size (void) +{ + int rows = lines_per_page; + int cols = chars_per_line; + + if (rows <= 0) + rows = INT_MAX; + + if (cols <= 0) + rl_get_screen_size (NULL, &cols); + + /* Update Readline's idea of the terminal size. */ + rl_set_screen_size (rows, cols); +} + +/* Reinitialize WRAP_BUFFER according to the current value of + CHARS_PER_LINE. */ + +static void +set_width (void) +{ + if (chars_per_line == 0) + init_page_info (); + + if (!wrap_buffer) + { + wrap_buffer = (char *) xmalloc (chars_per_line + 2); + wrap_buffer[0] = '\0'; + } + else + wrap_buffer = (char *) xrealloc (wrap_buffer, chars_per_line + 2); + wrap_pointer = wrap_buffer; /* Start it at the beginning. */ +} + +static void +set_width_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); + set_width (); +} + +static void +set_height_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); +} + +/* Wait, so the user can read what's on the screen. Prompt the user + to continue by pressing RETURN. */ + +static void +prompt_for_continue (void) +{ + char *ignore; + char cont_prompt[120]; + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032pre-prompt-for-continue\n"); + + strcpy (cont_prompt, + "---Type to continue, or q to quit---"); + if (annotation_level > 1) + strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); + + /* We must do this *before* we call gdb_readline, else it will eventually + call us -- thinking that we're trying to print beyond the end of the + screen. */ + reinitialize_more_filter (); + + immediate_quit++; + /* On a real operating system, the user can quit with SIGINT. + But not on GO32. + + 'q' is provided on all systems so users don't have to change habits + from system to system, and because telling them what to do in + the prompt is more user-friendly than expecting them to think of + SIGINT. */ + /* Call readline, not gdb_readline, because GO32 readline handles control-C + whereas control-C to gdb_readline will cause the user to get dumped + out to DOS. */ + ignore = gdb_readline_wrapper (cont_prompt); + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032post-prompt-for-continue\n"); + + if (ignore) + { + char *p = ignore; + while (*p == ' ' || *p == '\t') + ++p; + if (p[0] == 'q') + { + if (!event_loop_p) + request_quit (SIGINT); + else + async_request_quit (0); + } + xfree (ignore); + } + immediate_quit--; + + /* Now we have to do this again, so that GDB will know that it doesn't + need to save the ---Type --- line at the top of the screen. */ + reinitialize_more_filter (); + + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ +} + +/* Reinitialize filter; ie. tell it to reset to original values. */ + +void +reinitialize_more_filter (void) +{ + lines_printed = 0; + chars_printed = 0; +} + +/* Indicate that if the next sequence of characters overflows the line, + a newline should be inserted here rather than when it hits the end. + If INDENT is non-null, it is a string to be printed to indent the + wrapped part on the next line. INDENT must remain accessible until + the next call to wrap_here() or until a newline is printed through + fputs_filtered(). + + If the line is already overfull, we immediately print a newline and + the indentation, and disable further wrapping. + + If we don't know the width of lines, but we know the page height, + we must not wrap words, but should still keep track of newlines + that were explicitly printed. + + INDENT should not contain tabs, as that will mess up the char count + on the next line. FIXME. + + This routine is guaranteed to force out any output which has been + squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be + used to force out output from the wrap_buffer. */ + +void +wrap_here (char *indent) +{ + /* This should have been allocated, but be paranoid anyway. */ + if (!wrap_buffer) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + if (wrap_buffer[0]) + { + *wrap_pointer = '\0'; + fputs_unfiltered (wrap_buffer, gdb_stdout); + } + wrap_pointer = wrap_buffer; + wrap_buffer[0] = '\0'; + if (chars_per_line == UINT_MAX) /* No line overflow checking */ + { + wrap_column = 0; + } + else if (chars_printed >= chars_per_line) + { + puts_filtered ("\n"); + if (indent != NULL) + puts_filtered (indent); + wrap_column = 0; + } + else + { + wrap_column = chars_printed; + if (indent == NULL) + wrap_indent = ""; + else + wrap_indent = indent; + } +} + +/* Print input string to gdb_stdout, filtered, with wrap, + arranging strings in columns of n chars. String can be + right or left justified in the column. Never prints + trailing spaces. String should never be longer than + width. FIXME: this could be useful for the EXAMINE + command, which currently doesn't tabulate very well */ + +void +puts_filtered_tabular (char *string, int width, int right) +{ + int spaces = 0; + int stringlen; + char *spacebuf; + + gdb_assert (chars_per_line > 0); + if (chars_per_line == UINT_MAX) + { + fputs_filtered (string, gdb_stdout); + fputs_filtered ("\n", gdb_stdout); + return; + } + + if (((chars_printed - 1) / width + 2) * width >= chars_per_line) + fputs_filtered ("\n", gdb_stdout); + + if (width >= chars_per_line) + width = chars_per_line - 1; + + stringlen = strlen (string); + + if (chars_printed > 0) + spaces = width - (chars_printed - 1) % width - 1; + if (right) + spaces += width - stringlen; + + spacebuf = alloca (spaces + 1); + spacebuf[spaces] = '\0'; + while (spaces--) + spacebuf[spaces] = ' '; + + fputs_filtered (spacebuf, gdb_stdout); + fputs_filtered (string, gdb_stdout); +} + + +/* Ensure that whatever gets printed next, using the filtered output + commands, starts at the beginning of the line. I.E. if there is + any pending output for the current line, flush it and start a new + line. Otherwise do nothing. */ + +void +begin_line (void) +{ + if (chars_printed > 0) + { + puts_filtered ("\n"); + } +} + + +/* Like fputs but if FILTER is true, pause after every screenful. + + Regardless of FILTER can wrap at points other than the final + character of a line. + + Unlike fputs, fputs_maybe_filtered does not return a value. + It is OK for LINEBUFFER to be NULL, in which case just don't print + anything. + + Note that a longjmp to top level may occur in this routine (only if + FILTER is true) (since prompt_for_continue may do so) so this + routine should not be called when cleanups are not in place. */ + +static void +fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + int filter) +{ + const char *lineptr; + + if (linebuffer == 0) + return; + + /* Don't do any filtering if it is disabled. */ + if ((stream != gdb_stdout) || !pagination_enabled + || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) + { + fputs_unfiltered (linebuffer, stream); + return; + } + + /* Go through and output each character. Show line extension + when this is necessary; prompt user for new page when this is + necessary. */ + + lineptr = linebuffer; + while (*lineptr) + { + /* Possible new page. */ + if (filter && (lines_printed >= lines_per_page - 1)) + prompt_for_continue (); + + while (*lineptr && *lineptr != '\n') + { + /* Print a single line. */ + if (*lineptr == '\t') + { + if (wrap_column) + *wrap_pointer++ = '\t'; + else + fputc_unfiltered ('\t', stream); + /* Shifting right by 3 produces the number of tab stops + we have already passed, and then adding one and + shifting left 3 advances to the next tab stop. */ + chars_printed = ((chars_printed >> 3) + 1) << 3; + lineptr++; + } + else + { + if (wrap_column) + *wrap_pointer++ = *lineptr; + else + fputc_unfiltered (*lineptr, stream); + chars_printed++; + lineptr++; + } + + if (chars_printed >= chars_per_line) + { + unsigned int save_chars = chars_printed; + + chars_printed = 0; + lines_printed++; + /* If we aren't actually wrapping, don't output newline -- + if chars_per_line is right, we probably just overflowed + anyway; if it's wrong, let us keep going. */ + if (wrap_column) + fputc_unfiltered ('\n', stream); + + /* Possible new page. */ + if (lines_printed >= lines_per_page - 1) + prompt_for_continue (); + + /* Now output indentation and wrapped string */ + if (wrap_column) + { + fputs_unfiltered (wrap_indent, stream); + *wrap_pointer = '\0'; /* Null-terminate saved stuff */ + fputs_unfiltered (wrap_buffer, stream); /* and eject it */ + /* FIXME, this strlen is what prevents wrap_indent from + containing tabs. However, if we recurse to print it + and count its chars, we risk trouble if wrap_indent is + longer than (the user settable) chars_per_line. + Note also that this can set chars_printed > chars_per_line + if we are printing a long string. */ + chars_printed = strlen (wrap_indent) + + (save_chars - wrap_column); + wrap_pointer = wrap_buffer; /* Reset buffer */ + wrap_buffer[0] = '\0'; + wrap_column = 0; /* And disable fancy wrap */ + } + } + } + + if (*lineptr == '\n') + { + chars_printed = 0; + wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */ + lines_printed++; + fputc_unfiltered ('\n', stream); + lineptr++; + } + } +} + +void +fputs_filtered (const char *linebuffer, struct ui_file *stream) +{ + fputs_maybe_filtered (linebuffer, stream, 1); +} + +int +putchar_unfiltered (int c) +{ + char buf = c; + ui_file_write (gdb_stdout, &buf, 1); + return c; +} + +/* Write character C to gdb_stdout using GDB's paging mechanism and return C. + May return nonlocally. */ + +int +putchar_filtered (int c) +{ + return fputc_filtered (c, gdb_stdout); +} + +int +fputc_unfiltered (int c, struct ui_file *stream) +{ + char buf = c; + ui_file_write (stream, &buf, 1); + return c; +} + +int +fputc_filtered (int c, struct ui_file *stream) +{ + char buf[2]; + + buf[0] = c; + buf[1] = 0; + fputs_filtered (buf, stream); + return c; +} + +/* puts_debug is like fputs_unfiltered, except it prints special + characters in printable fashion. */ + +void +puts_debug (char *prefix, char *string, char *suffix) +{ + int ch; + + /* Print prefix and suffix after each line. */ + static int new_line = 1; + static int return_p = 0; + static char *prev_prefix = ""; + static char *prev_suffix = ""; + + if (*string == '\n') + return_p = 0; + + /* If the prefix is changing, print the previous suffix, a new line, + and the new prefix. */ + if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line) + { + fputs_unfiltered (prev_suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + fputs_unfiltered (prefix, gdb_stdlog); + } + + /* Print prefix if we printed a newline during the previous call. */ + if (new_line) + { + new_line = 0; + fputs_unfiltered (prefix, gdb_stdlog); + } + + prev_prefix = prefix; + prev_suffix = suffix; + + /* Output characters in a printable format. */ + while ((ch = *string++) != '\0') + { + switch (ch) + { + default: + if (isprint (ch)) + fputc_unfiltered (ch, gdb_stdlog); + + else + fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff); + break; + + case '\\': + fputs_unfiltered ("\\\\", gdb_stdlog); + break; + case '\b': + fputs_unfiltered ("\\b", gdb_stdlog); + break; + case '\f': + fputs_unfiltered ("\\f", gdb_stdlog); + break; + case '\n': + new_line = 1; + fputs_unfiltered ("\\n", gdb_stdlog); + break; + case '\r': + fputs_unfiltered ("\\r", gdb_stdlog); + break; + case '\t': + fputs_unfiltered ("\\t", gdb_stdlog); + break; + case '\v': + fputs_unfiltered ("\\v", gdb_stdlog); + break; + } + + return_p = ch == '\r'; + } + + /* Print suffix if we printed a newline. */ + if (new_line) + { + fputs_unfiltered (suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + } +} + + +/* Print a variable number of ARGS using format FORMAT. If this + information is going to put the amount written (since the last call + to REINITIALIZE_MORE_FILTER or the last page break) over the page size, + call prompt_for_continue to get the users permision to continue. + + Unlike fprintf, this function does not return a value. + + We implement three variants, vfprintf (takes a vararg list and stream), + fprintf (takes a stream to write on), and printf (the usual). + + Note also that a longjmp to top level may occur in this routine + (since prompt_for_continue may do so) so this routine should not be + called when cleanups are not in place. */ + +static void +vfprintf_maybe_filtered (struct ui_file *stream, const char *format, + va_list args, int filter) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_maybe_filtered (linebuffer, stream, filter); + do_cleanups (old_cleanups); +} + + +void +vfprintf_filtered (struct ui_file *stream, const char *format, va_list args) +{ + vfprintf_maybe_filtered (stream, format, args, 1); +} + +void +vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_unfiltered (linebuffer, stream); + do_cleanups (old_cleanups); +} + +void +vprintf_filtered (const char *format, va_list args) +{ + vfprintf_maybe_filtered (gdb_stdout, format, args, 1); +} + +void +vprintf_unfiltered (const char *format, va_list args) +{ + vfprintf_unfiltered (gdb_stdout, format, args); +} + +void +fprintf_filtered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (stream, format, args); + va_end (args); +} + +void +fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (stream, format, args); + va_end (args); +} + +/* Like fprintf_filtered, but prints its result indented. + Called as fprintfi_filtered (spaces, stream, format, ...); */ + +void +fprintfi_filtered (int spaces, struct ui_file *stream, const char *format, + ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, stream); + + vfprintf_filtered (stream, format, args); + va_end (args); +} + + +void +printf_filtered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + + +void +printf_unfiltered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (gdb_stdout, format, args); + va_end (args); +} + +/* Like printf_filtered, but prints it's result indented. + Called as printfi_filtered (spaces, format, ...); */ + +void +printfi_filtered (int spaces, const char *format, ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, gdb_stdout); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + +/* Easy -- but watch out! + + This routine is *not* a replacement for puts()! puts() appends a newline. + This one doesn't, and had better not! */ + +void +puts_filtered (const char *string) +{ + fputs_filtered (string, gdb_stdout); +} + +void +puts_unfiltered (const char *string) +{ + fputs_unfiltered (string, gdb_stdout); +} + +/* Return a pointer to N spaces and a null. The pointer is good + until the next call to here. */ +char * +n_spaces (int n) +{ + char *t; + static char *spaces = 0; + static int max_spaces = -1; + + if (n > max_spaces) + { + if (spaces) + xfree (spaces); + spaces = (char *) xmalloc (n + 1); + for (t = spaces + n; t != spaces;) + *--t = ' '; + spaces[n] = '\0'; + max_spaces = n; + } + + return spaces + max_spaces - n; +} + +/* Print N spaces. */ +void +print_spaces_filtered (int n, struct ui_file *stream) +{ + fputs_filtered (n_spaces (n), stream); +} + +/* C++/ObjC demangler stuff. */ + +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + +void +fprintf_symbol_filtered (struct ui_file *stream, char *name, + enum language lang, int arg_mode) +{ + char *demangled; + + if (name != NULL) + { + /* If user wants to see raw output, no problem. */ + if (!demangle) + { + fputs_filtered (name, stream); + } + else + { + demangled = language_demangle (language_def (lang), name, arg_mode); + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + xfree (demangled); + } + } + } +} + +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any + differences in whitespace. Returns 0 if they match, non-zero if they + don't (slightly different than strcmp()'s range of return values). + + As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO". + This "feature" is useful when searching for matching C++ function names + (such as if the user types 'break FOO', where FOO is a mangled C++ + function). */ + +int +strcmp_iw (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0'); +} + +/* This is like strcmp except that it ignores whitespace and treats + '(' as the first non-NULL character in terms of ordering. Like + strcmp (and unlike strcmp_iw), it returns negative if STRING1 < + STRING2, 0 if STRING2 = STRING2, and positive if STRING1 > STRING2 + according to that ordering. + + If a list is sorted according to this function and if you want to + find names in the list that match some fixed NAME according to + strcmp_iw(LIST_ELT, NAME), then the place to start looking is right + where this function would put NAME. + + Here are some examples of why using strcmp to sort is a bad idea: + + Whitespace example: + + Say your partial symtab contains: "foo", "goo". Then, if + we try to do a search for "foo", strcmp will locate this + after "foo" and before "goo". Then lookup_partial_symbol + will start looking at strings beginning with "goo", and will never + see the correct match of "foo". + + Parenthesis example: + + In practice, this is less like to be an issue, but I'll give it a + shot. Let's assume that '$' is a legitimate character to occur in + symbols. (Which may well even be the case on some systems.) Then + say that the partial symbol table contains "foo$" and "foo(int)". + strcmp will put them in this order, since '$' < '('. Now, if the + user searches for "foo", then strcmp will sort "foo" before "foo$". + Then lookup_partial_symbol will notice that strcmp_iw("foo$", + "foo") is false, so it won't proceed to the actual match of + "foo(int)" with "foo". */ + +int +strcmp_iw_ordered (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + + switch (*string1) + { + /* Characters are non-equal unless they're both '\0'; we want to + make sure we get the comparison right according to our + comparison in the cases where one of them is '\0' or '('. */ + case '\0': + if (*string2 == '\0') + return 0; + else + return -1; + case '(': + if (*string2 == '\0') + return 1; + else + return -1; + default: + if (*string2 == '(') + return 1; + else + return *string1 - *string2; + } +} + +/* A simple comparison function with opposite semantics to strcmp. */ + +int +streq (const char *lhs, const char *rhs) +{ + return !strcmp (lhs, rhs); +} + + +/* + ** subset_compare() + ** Answer whether string_to_compare is a full or partial match to + ** template_string. The partial match must be in sequence starting + ** at index 0. + */ +int +subset_compare (char *string_to_compare, char *template_string) +{ + int match; + if (template_string != (char *) NULL && string_to_compare != (char *) NULL + && strlen (string_to_compare) <= strlen (template_string)) + match = + (strncmp + (template_string, string_to_compare, strlen (string_to_compare)) == 0); + else + match = 0; + return match; +} + + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_on_command (char *arg, int from_tty) +{ + pagination_enabled = 1; +} + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_off_command (char *arg, int from_tty) +{ + pagination_enabled = 0; +} + + +void +initialize_utils (void) +{ + struct cmd_list_element *c; + + c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, + "Set number of characters gdb thinks are in a line.", + &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_width_command); + + c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, + "Set number of lines gdb thinks are in a page.", &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_height_command); + + init_page_info (); + + add_show_from_set + (add_set_cmd ("demangle", class_support, var_boolean, + (char *) &demangle, + "Set demangling of encoded C++/ObjC names when displaying symbols.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("pagination", class_support, + var_boolean, (char *) &pagination_enabled, + "Set state of pagination.", &setlist), &showlist); + + if (xdb_commands) + { + add_com ("am", class_support, pagination_on_command, + "Enable pagination"); + add_com ("sm", class_support, pagination_off_command, + "Disable pagination"); + } + + add_show_from_set + (add_set_cmd ("sevenbit-strings", class_support, var_boolean, + (char *) &sevenbit_strings, + "Set printing of 8-bit characters in strings as \\nnn.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("asm-demangle", class_support, var_boolean, + (char *) &asm_demangle, + "Set demangling of C++/ObjC names in disassembly listings.", + &setprintlist), &showprintlist); +} + +/* Machine specific function to handle SIGWINCH signal. */ + +#ifdef SIGWINCH_HANDLER_BODY +SIGWINCH_HANDLER_BODY +#endif +/* print routines to handle variable size regs, etc. */ +/* temporary storage using circular buffer */ +#define NUMCELLS 16 +#define CELLSIZE 32 +static char * +get_cell (void) +{ + static char buf[NUMCELLS][CELLSIZE]; + static int cell = 0; + if (++cell >= NUMCELLS) + cell = 0; + return buf[cell]; +} + +int +strlen_paddr (void) +{ + return (TARGET_ADDR_BIT / 8 * 2); +} + +char * +paddr (CORE_ADDR addr) +{ + return phex (addr, TARGET_ADDR_BIT / 8); +} + +char * +paddr_nz (CORE_ADDR addr) +{ + return phex_nz (addr, TARGET_ADDR_BIT / 8); +} + +static void +decimal2str (char *paddr_str, char *sign, ULONGEST addr) +{ + /* steal code from valprint.c:print_decimal(). Should this worry + about the real size of addr as the above does? */ + unsigned long temp[3]; + int i = 0; + do + { + temp[i] = addr % (1000 * 1000 * 1000); + addr /= (1000 * 1000 * 1000); + i++; + } + while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); + switch (i) + { + case 1: + sprintf (paddr_str, "%s%lu", sign, temp[0]); + break; + case 2: + sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]); + break; + case 3: + sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]); + break; + default: + internal_error (__FILE__, __LINE__, + "failed internal consistency check"); + } +} + +char * +paddr_u (CORE_ADDR addr) +{ + char *paddr_str = get_cell (); + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +char * +paddr_d (LONGEST addr) +{ + char *paddr_str = get_cell (); + if (addr < 0) + decimal2str (paddr_str, "-", -addr); + else + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +/* eliminate warning from compiler on 32-bit systems */ +static int thirty_two = 32; + +char * +phex (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + str = get_cell (); + sprintf (str, "%08lx%08lx", + (unsigned long) (l >> thirty_two), + (unsigned long) (l & 0xffffffff)); + break; + case 4: + str = get_cell (); + sprintf (str, "%08lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%04x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex (l, sizeof (l)); + break; + } + return str; +} + +char * +phex_nz (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + { + unsigned long high = (unsigned long) (l >> thirty_two); + str = get_cell (); + if (high == 0) + sprintf (str, "%lx", (unsigned long) (l & 0xffffffff)); + else + sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff)); + break; + } + case 4: + str = get_cell (); + sprintf (str, "%lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex_nz (l, sizeof (l)); + break; + } + return str; +} + + +/* Convert a CORE_ADDR into a string. */ +const char * +core_addr_to_string (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex (addr, sizeof (addr))); + return str; +} + +const char * +core_addr_to_string_nz (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex_nz (addr, sizeof (addr))); + return str; +} + +/* Convert a string back into a CORE_ADDR. */ +CORE_ADDR +string_to_core_addr (const char *my_string) +{ + CORE_ADDR addr = 0; + if (my_string[0] == '0' && tolower (my_string[1]) == 'x') + { + /* Assume that it is in decimal. */ + int i; + for (i = 2; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 16); + else if (isxdigit (my_string[i])) + addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16); + else + internal_error (__FILE__, __LINE__, "invalid hex"); + } + } + else + { + /* Assume that it is in decimal. */ + int i; + for (i = 0; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 10); + else + internal_error (__FILE__, __LINE__, "invalid decimal"); + } + } + return addr; +} + +char * +gdb_realpath (const char *filename) +{ + /* Method 1: The system has a compile time upper bound on a filename + path. Use that and realpath() to canonicalize the name. This is + the most common case. Note that, if there isn't a compile time + upper bound, you want to avoid realpath() at all costs. */ +#if defined(HAVE_REALPATH) + { +# if defined (PATH_MAX) + char buf[PATH_MAX]; +# define USE_REALPATH +# elif defined (MAXPATHLEN) + char buf[MAXPATHLEN]; +# define USE_REALPATH +# endif +# if defined (USE_REALPATH) + const char *rp = realpath (filename, buf); + if (rp == NULL) + rp = filename; + return xstrdup (rp); +# endif + } +#endif /* HAVE_REALPATH */ + + /* Method 2: The host system (i.e., GNU) has the function + canonicalize_file_name() which malloc's a chunk of memory and + returns that, use that. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) + { + char *rp = canonicalize_file_name (filename); + if (rp == NULL) + return xstrdup (filename); + else + return rp; + } +#endif + + /* FIXME: cagney/2002-11-13: + + Method 2a: Use realpath() with a NULL buffer. Some systems, due + to the problems described in in method 3, have modified their + realpath() implementation so that it will allocate a buffer when + NULL is passed in. Before this can be used, though, some sort of + configure time test would need to be added. Otherwize the code + will likely core dump. */ + + /* Method 3: Now we're getting desperate! The system doesn't have a + compile time buffer size and no alternative function. Query the + OS, using pathconf(), for the buffer limit. Care is needed + though, some systems do not limit PATH_MAX (return -1 for + pathconf()) making it impossible to pass a correctly sized buffer + to realpath() (it could always overflow). On those systems, we + skip this. */ +#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA) + { + /* Find out the max path size. */ + long path_max = pathconf ("/", _PC_PATH_MAX); + if (path_max > 0) + { + /* PATH_MAX is bounded. */ + char *buf = alloca (path_max); + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); + } + } +#endif + + /* This system is a lost cause, just dup the buffer. */ + return xstrdup (filename); +} + +/* Return a copy of FILENAME, with its directory prefix canonicalized + by gdb_realpath. */ + +char * +xfullpath (const char *filename) +{ + const char *base_name = lbasename (filename); + char *dir_name; + char *real_path; + char *result; + + /* Extract the basename of filename, and return immediately + a copy of filename if it does not contain any directory prefix. */ + if (base_name == filename) + return xstrdup (filename); + + dir_name = alloca ((size_t) (base_name - filename + 2)); + /* Allocate enough space to store the dir_name + plus one extra + character sometimes needed under Windows (see below), and + then the closing \000 character */ + strncpy (dir_name, filename, base_name - filename); + dir_name[base_name - filename] = '\000'; + +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + /* We need to be careful when filename is of the form 'd:foo', which + is equivalent of d:./foo, which is totally different from d:/foo. */ + if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') + { + dir_name[2] = '.'; + dir_name[3] = '\000'; + } +#endif + + /* Canonicalize the directory prefix, and build the resulting + filename. If the dirname realpath already contains an ending + directory separator, avoid doubling it. */ + real_path = gdb_realpath (dir_name); + if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) + result = concat (real_path, base_name, NULL); + else + result = concat (real_path, SLASH_STRING, base_name, NULL); + + xfree (real_path); + return result; +} + + +/* This is the 32-bit CRC function used by the GNU separate debug + facility. An executable may contain a section named + .gnu_debuglink, which holds the name of a separate executable file + containing its debug info, and a checksum of that file's contents, + computed using this function. */ +unsigned long +gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) +{ + static const unsigned long crc32_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d + }; + unsigned char *end; + + crc = ~crc & 0xffffffff; + for (end = buf + len; buf < end; ++buf) + crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return ~crc & 0xffffffff;; +} + +ULONGEST +align_up (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v + n - 1) & -n; +} + +ULONGEST +align_down (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v & -n); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/dwarf2read.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/dwarf2read.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,8077 @@ +/* DWARF 2 debugging format support for GDB. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, + Inc. with support from Florida State University (under contract + with the Ada Joint Program Office), and Silicon Graphics, Inc. + Initial contribution by Brent Benson, Harris Computer Systems, Inc., + based on Fred Fish's (Cygnus Support) implementation of DWARF 1 + support in dwarfread.c + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "objfiles.h" +#include "elf/dwarf2.h" +#include "buildsym.h" +#include "demangle.h" +#include "expression.h" +#include "filenames.h" /* for DOSish file names */ +#include "macrotab.h" +#include "language.h" +#include "complaints.h" +#include "bcache.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" +#include "cp-support.h" + +#include +#include "gdb_string.h" +#include "gdb_assert.h" +#include + +#ifndef DWARF2_REG_TO_REGNUM +#define DWARF2_REG_TO_REGNUM(REG) (REG) +#endif + +#if 0 +/* .debug_info header for a compilation unit + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct comp_unit_header + { + unsigned int length; /* length of the .debug_info + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int abbrev_offset; /* offset into .debug_abbrev section */ + unsigned char addr_size; /* byte size of an address -- 4 */ + } +_COMP_UNIT_HEADER; +#define _ACTUAL_COMP_UNIT_HEADER_SIZE 11 +#endif + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct pubnames_header + { + unsigned int length; /* length of the .debug_pubnames + contribution */ + unsigned char version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned int info_size; /* byte size of .debug_info section + portion */ + } +_PUBNAMES_HEADER; +#define _ACTUAL_PUBNAMES_HEADER_SIZE 13 + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct aranges_header + { + unsigned int length; /* byte len of the .debug_aranges + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned char addr_size; /* byte size of an address */ + unsigned char seg_size; /* byte size of segment descriptor */ + } +_ARANGES_HEADER; +#define _ACTUAL_ARANGES_HEADER_SIZE 12 + +/* .debug_line statement program prologue + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct statement_prologue + { + unsigned int total_length; /* byte length of the statement + information */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int prologue_length; /* # bytes between prologue & + stmt program */ + unsigned char minimum_instruction_length; /* byte size of + smallest instr */ + unsigned char default_is_stmt; /* initial value of is_stmt + register */ + char line_base; + unsigned char line_range; + unsigned char opcode_base; /* number assigned to first special + opcode */ + unsigned char *standard_opcode_lengths; + } +_STATEMENT_PROLOGUE; + +/* offsets and sizes of debugging sections */ + +static unsigned int dwarf_info_size; +static unsigned int dwarf_abbrev_size; +static unsigned int dwarf_line_size; +static unsigned int dwarf_pubnames_size; +static unsigned int dwarf_aranges_size; +static unsigned int dwarf_loc_size; +static unsigned int dwarf_macinfo_size; +static unsigned int dwarf_str_size; +static unsigned int dwarf_ranges_size; +unsigned int dwarf_frame_size; +unsigned int dwarf_eh_frame_size; + +static asection *dwarf_info_section; +static asection *dwarf_abbrev_section; +static asection *dwarf_line_section; +static asection *dwarf_pubnames_section; +static asection *dwarf_aranges_section; +static asection *dwarf_loc_section; +static asection *dwarf_macinfo_section; +static asection *dwarf_str_section; +static asection *dwarf_ranges_section; +asection *dwarf_frame_section; +asection *dwarf_eh_frame_section; + +/* names of the debugging sections */ + +#define INFO_SECTION ".debug_info" +#define ABBREV_SECTION ".debug_abbrev" +#define LINE_SECTION ".debug_line" +#define PUBNAMES_SECTION ".debug_pubnames" +#define ARANGES_SECTION ".debug_aranges" +#define LOC_SECTION ".debug_loc" +#define MACINFO_SECTION ".debug_macinfo" +#define STR_SECTION ".debug_str" +#define RANGES_SECTION ".debug_ranges" +#define FRAME_SECTION ".debug_frame" +#define EH_FRAME_SECTION ".eh_frame" + +/* local data types */ + +/* We hold several abbreviation tables in memory at the same time. */ +#ifndef ABBREV_HASH_SIZE +#define ABBREV_HASH_SIZE 121 +#endif + +/* The data in a compilation unit header, after target2host + translation, looks like this. */ +struct comp_unit_head + { + unsigned long length; + short version; + unsigned int abbrev_offset; + unsigned char addr_size; + unsigned char signed_addr_p; + unsigned int offset_size; /* size of file offsets; either 4 or 8 */ + unsigned int initial_length_size; /* size of the length field; either + 4 or 12 */ + + /* Offset to the first byte of this compilation unit header in the + * .debug_info section, for resolving relative reference dies. */ + + unsigned int offset; + + /* Pointer to this compilation unit header in the .debug_info + * section */ + + char *cu_head_ptr; + + /* Pointer to the first die of this compilatio unit. This will + * be the first byte following the compilation unit header. */ + + char *first_die_ptr; + + /* Pointer to the next compilation unit header in the program. */ + + struct comp_unit_head *next; + + /* DWARF abbreviation table associated with this compilation unit */ + + struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE]; + + /* Base address of this compilation unit. */ + + CORE_ADDR base_address; + + /* Non-zero if base_address has been set. */ + + int base_known; + }; + +/* Internal state when decoding a particular compilation unit. */ +struct dwarf2_cu +{ + /* The objfile containing this compilation unit. */ + struct objfile *objfile; + + /* The header of the compilation unit. + + FIXME drow/2003-11-10: Some of the things from the comp_unit_head + should be moved to the dwarf2_cu structure; for instance the abbrevs + hash table. */ + struct comp_unit_head header; + + struct function_range *first_fn, *last_fn, *cached_fn; + + /* The language we are debugging. */ + enum language language; + const struct language_defn *language_defn; + + /* The generic symbol table building routines have separate lists for + file scope symbols and all all other scopes (local scopes). So + we need to select the right one to pass to add_symbol_to_list(). + We do it by keeping a pointer to the correct list in list_in_scope. + + FIXME: The original dwarf code just treated the file scope as the + first local scope, and all other local scopes as nested local + scopes, and worked fine. Check to see if we really need to + distinguish these in buildsym.c. */ + struct pending **list_in_scope; + + /* Maintain an array of referenced fundamental types for the current + compilation unit being read. For DWARF version 1, we have to construct + the fundamental types on the fly, since no information about the + fundamental types is supplied. Each such fundamental type is created by + calling a language dependent routine to create the type, and then a + pointer to that type is then placed in the array at the index specified + by it's FT_ value. The array has a fixed size set by the + FT_NUM_MEMBERS compile time constant, which is the number of predefined + fundamental types gdb knows how to construct. */ + struct type *ftypes[FT_NUM_MEMBERS]; /* Fundamental types */ +}; + +/* The line number information for a compilation unit (found in the + .debug_line section) begins with a "statement program header", + which contains the following information. */ +struct line_header +{ + unsigned int total_length; + unsigned short version; + unsigned int header_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + + /* standard_opcode_lengths[i] is the number of operands for the + standard opcode whose value is i. This means that + standard_opcode_lengths[0] is unused, and the last meaningful + element is standard_opcode_lengths[opcode_base - 1]. */ + unsigned char *standard_opcode_lengths; + + /* The include_directories table. NOTE! These strings are not + allocated with xmalloc; instead, they are pointers into + debug_line_buffer. If you try to free them, `free' will get + indigestion. */ + unsigned int num_include_dirs, include_dirs_size; + char **include_dirs; + + /* The file_names table. NOTE! These strings are not allocated + with xmalloc; instead, they are pointers into debug_line_buffer. + Don't try to free them directly. */ + unsigned int num_file_names, file_names_size; + struct file_entry + { + char *name; + unsigned int dir_index; + unsigned int mod_time; + unsigned int length; + } *file_names; + + /* The start and end of the statement program following this + header. These point into dwarf_line_buffer. */ + char *statement_program_start, *statement_program_end; +}; + +/* When we construct a partial symbol table entry we only + need this much information. */ +struct partial_die_info + { + enum dwarf_tag tag; + unsigned char has_children; + unsigned char is_external; + unsigned char is_declaration; + unsigned char has_type; + unsigned int offset; + unsigned int abbrev; + char *name; + int has_pc_info; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct dwarf_block *locdesc; + unsigned int language; + char *sibling; + }; + +/* This data structure holds the information of an abbrev. */ +struct abbrev_info + { + unsigned int number; /* number identifying abbrev */ + enum dwarf_tag tag; /* dwarf tag */ + int has_children; /* boolean */ + unsigned int num_attrs; /* number of attributes */ + struct attr_abbrev *attrs; /* an array of attribute descriptions */ + struct abbrev_info *next; /* next in chain */ + }; + +struct attr_abbrev + { + enum dwarf_attribute name; + enum dwarf_form form; + }; + +/* This data structure holds a complete die structure. */ +struct die_info + { + enum dwarf_tag tag; /* Tag indicating type of die */ + unsigned int abbrev; /* Abbrev number */ + unsigned int offset; /* Offset in .debug_info section */ + unsigned int num_attrs; /* Number of attributes */ + struct attribute *attrs; /* An array of attributes */ + struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ + struct die_info *child; /* Its first child, if any. */ + struct die_info *sibling; /* Its next sibling, if any. */ + struct die_info *parent; /* Its parent, if any. */ + + struct type *type; /* Cached type information */ + }; + +/* Attributes have a name and a value */ +struct attribute + { + enum dwarf_attribute name; + enum dwarf_form form; + union + { + char *str; + struct dwarf_block *blk; + unsigned long unsnd; + long int snd; + CORE_ADDR addr; + } + u; + }; + +struct function_range +{ + const char *name; + CORE_ADDR lowpc, highpc; + int seen_line; + struct function_range *next; +}; + +/* Get at parts of an attribute structure */ + +#define DW_STRING(attr) ((attr)->u.str) +#define DW_UNSND(attr) ((attr)->u.unsnd) +#define DW_BLOCK(attr) ((attr)->u.blk) +#define DW_SND(attr) ((attr)->u.snd) +#define DW_ADDR(attr) ((attr)->u.addr) + +/* Blocks are a bunch of untyped bytes. */ +struct dwarf_block + { + unsigned int size; + char *data; + }; + +#ifndef ATTR_ALLOC_CHUNK +#define ATTR_ALLOC_CHUNK 4 +#endif + +/* A hash table of die offsets for following references. */ +#ifndef REF_HASH_SIZE +#define REF_HASH_SIZE 1021 +#endif + +static struct die_info *die_ref_table[REF_HASH_SIZE]; + +/* Obstack for allocating temporary storage used during symbol reading. */ +static struct obstack dwarf2_tmp_obstack; + +/* Allocate fields for structs, unions and enums in this size. */ +#ifndef DW_FIELD_ALLOC_CHUNK +#define DW_FIELD_ALLOC_CHUNK 4 +#endif + +/* Actually data from the sections. */ +static char *dwarf_info_buffer; +static char *dwarf_abbrev_buffer; +static char *dwarf_line_buffer; +static char *dwarf_str_buffer; +static char *dwarf_macinfo_buffer; +static char *dwarf_ranges_buffer; +static char *dwarf_loc_buffer; + +/* A zeroed version of a partial die for initialization purposes. */ +static struct partial_die_info zeroed_partial_die; + +/* FIXME: decode_locdesc sets these variables to describe the location + to the caller. These ought to be a structure or something. If + none of the flags are set, the object lives at the address returned + by decode_locdesc. */ + +static int isreg; /* Object lives in register. + decode_locdesc's return value is + the register number. */ + +/* We put a pointer to this structure in the read_symtab_private field + of the psymtab. + The complete dwarf information for an objfile is kept in the + objfile_obstack, so that absolute die references can be handled. + Most of the information in this structure is related to an entire + object file and could be passed via the sym_private field of the objfile. + It is however conceivable that dwarf2 might not be the only type + of symbols read from an object file. */ + +struct dwarf2_pinfo + { + /* Pointer to start of dwarf info buffer for the objfile. */ + + char *dwarf_info_buffer; + + /* Offset in dwarf_info_buffer for this compilation unit. */ + + unsigned long dwarf_info_offset; + + /* Pointer to start of dwarf abbreviation buffer for the objfile. */ + + char *dwarf_abbrev_buffer; + + /* Size of dwarf abbreviation section for the objfile. */ + + unsigned int dwarf_abbrev_size; + + /* Pointer to start of dwarf line buffer for the objfile. */ + + char *dwarf_line_buffer; + + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + + /* Pointer to start of dwarf string buffer for the objfile. */ + + char *dwarf_str_buffer; + + /* Size of dwarf string section for the objfile. */ + + unsigned int dwarf_str_size; + + /* Pointer to start of dwarf macro buffer for the objfile. */ + + char *dwarf_macinfo_buffer; + + /* Size of dwarf macinfo section for the objfile. */ + + unsigned int dwarf_macinfo_size; + + /* Pointer to start of dwarf ranges buffer for the objfile. */ + + char *dwarf_ranges_buffer; + + /* Size of dwarf ranges buffer for the objfile. */ + + unsigned int dwarf_ranges_size; + + /* Pointer to start of dwarf locations buffer for the objfile. */ + + char *dwarf_loc_buffer; + + /* Size of dwarf locations buffer for the objfile. */ + + unsigned int dwarf_loc_size; + }; + +#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private) +#define DWARF_INFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_info_buffer) +#define DWARF_INFO_OFFSET(p) (PST_PRIVATE(p)->dwarf_info_offset) +#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) +#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) +#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) +#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) +#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) +#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer) +#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size) +#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer) +#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size) +#define DWARF_LOC_BUFFER(p) (PST_PRIVATE(p)->dwarf_loc_buffer) +#define DWARF_LOC_SIZE(p) (PST_PRIVATE(p)->dwarf_loc_size) + +/* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, + but this would require a corresponding change in unpack_field_as_long + and friends. */ +static int bits_per_byte = 8; + +/* The routines that read and process dies for a C struct or C++ class + pass lists of data member fields and lists of member function fields + in an instance of a field_info structure, as defined below. */ +struct field_info + { + /* List of data member and baseclasses fields. */ + struct nextfield + { + struct nextfield *next; + int accessibility; + int virtuality; + struct field field; + } + *fields; + + /* Number of fields. */ + int nfields; + + /* Number of baseclasses. */ + int nbaseclasses; + + /* Set if the accesibility of one of the fields is not public. */ + int non_public_fields; + + /* Member function fields array, entries are allocated in the order they + are encountered in the object file. */ + struct nextfnfield + { + struct nextfnfield *next; + struct fn_field fnfield; + } + *fnfields; + + /* Member function fieldlist array, contains name of possibly overloaded + member function, number of overloaded member functions and a pointer + to the head of the member function field chain. */ + struct fnfieldlist + { + char *name; + int length; + struct nextfnfield *head; + } + *fnfieldlists; + + /* Number of entries in the fnfieldlists array. */ + int nfnfields; + }; + +/* Various complaints about symbol reading that don't abort the process */ + +static void +dwarf2_statement_list_fits_in_line_number_section_complaint (void) +{ + complaint (&symfile_complaints, + "statement list doesn't fit in .debug_line section"); +} + +static void +dwarf2_complex_location_expr_complaint (void) +{ + complaint (&symfile_complaints, "location expression too complex"); +} + +static void +dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, + int arg3) +{ + complaint (&symfile_complaints, + "const value length mismatch for '%s', got %d, expected %d", arg1, + arg2, arg3); +} + +static void +dwarf2_macros_too_long_complaint (void) +{ + complaint (&symfile_complaints, + "macro info runs off end of `.debug_macinfo' section"); +} + +static void +dwarf2_macro_malformed_definition_complaint (const char *arg1) +{ + complaint (&symfile_complaints, + "macro debug info contains a malformed macro definition:\n`%s'", + arg1); +} + +static void +dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2) +{ + complaint (&symfile_complaints, + "invalid attribute class or form for '%s' in '%s'", arg1, arg2); +} + +/* local function prototypes */ + +static void dwarf2_locate_sections (bfd *, asection *, void *); + +#if 0 +static void dwarf2_build_psymtabs_easy (struct objfile *, int); +#endif + +static void dwarf2_build_psymtabs_hard (struct objfile *, int); + +static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *, + const char *namespace); + +static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *, + const char *namespace); + +static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace); + +static char *add_partial_namespace (struct partial_die_info *pdi, + char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_structure (struct partial_die_info *struct_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_enumeration (struct partial_die_info *enum_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *locate_pdi_sibling (struct partial_die_info *orig_pdi, + char *info_ptr, + bfd *abfd, + struct dwarf2_cu *cu); + +static void dwarf2_psymtab_to_symtab (struct partial_symtab *); + +static void psymtab_to_symtab_1 (struct partial_symtab *); + +char *dwarf2_read_section (struct objfile *, asection *); + +static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu); + +static void dwarf2_empty_abbrev_table (void *); + +static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int, + struct dwarf2_cu *); + +static char *read_partial_die (struct partial_die_info *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_full_die (struct die_info **, bfd *, char *, + struct dwarf2_cu *, int *); + +static char *read_attribute (struct attribute *, struct attr_abbrev *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_attribute_value (struct attribute *, unsigned, + bfd *, char *, struct dwarf2_cu *); + +static unsigned int read_1_byte (bfd *, char *); + +static int read_1_signed_byte (bfd *, char *); + +static unsigned int read_2_bytes (bfd *, char *); + +static unsigned int read_4_bytes (bfd *, char *); + +static unsigned long read_8_bytes (bfd *, char *); + +static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *, + int *bytes_read); + +static LONGEST read_initial_length (bfd *, char *, + struct comp_unit_head *, int *bytes_read); + +static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *, + int *bytes_read); + +static char *read_n_bytes (bfd *, char *, unsigned int); + +static char *read_string (bfd *, char *, unsigned int *); + +static char *read_indirect_string (bfd *, char *, const struct comp_unit_head *, + unsigned int *); + +static unsigned long read_unsigned_leb128 (bfd *, char *, unsigned int *); + +static long read_signed_leb128 (bfd *, char *, unsigned int *); + +static void set_cu_language (unsigned int, struct dwarf2_cu *); + +static struct attribute *dwarf2_attr (struct die_info *, unsigned int, + struct dwarf2_cu *); + +static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); + +static struct die_info *die_specification (struct die_info *die, + struct dwarf2_cu *); + +static void free_line_header (struct line_header *lh); + +static struct line_header *(dwarf_decode_line_header + (unsigned int offset, + bfd *abfd, struct dwarf2_cu *cu)); + +static void dwarf_decode_lines (struct line_header *, char *, bfd *, + struct dwarf2_cu *); + +static void dwarf2_start_subfile (char *, char *); + +static struct symbol *new_symbol (struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_const_value (struct attribute *, struct symbol *, + struct dwarf2_cu *); + +static void dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits); + +static struct type *die_type (struct die_info *, struct dwarf2_cu *); + +static struct type *die_containing_type (struct die_info *, + struct dwarf2_cu *); + +#if 0 +static struct type *type_at_offset (unsigned int, struct objfile *); +#endif + +static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *); + +static void read_type_die (struct die_info *, struct dwarf2_cu *); + +static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); + +static char *typename_concat (const char *prefix, const char *suffix); + +static void read_typedef (struct die_info *, struct dwarf2_cu *); + +static void read_base_type (struct die_info *, struct dwarf2_cu *); + +static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu); + +static void read_file_scope (struct die_info *, struct dwarf2_cu *); + +static void read_func_scope (struct die_info *, struct dwarf2_cu *); + +static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *); + +static int dwarf2_get_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *); + +static void get_scope_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *); + +static void dwarf2_add_field (struct field_info *, struct die_info *, + struct dwarf2_cu *); + +static void dwarf2_attach_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void dwarf2_add_member_fn (struct field_info *, + struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_attach_fn_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); + +static void read_common_block (struct die_info *, struct dwarf2_cu *); + +static void read_namespace (struct die_info *die, struct dwarf2_cu *); + +static const char *namespace_name (struct die_info *die, + int *is_anonymous, struct dwarf2_cu *); + +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); + +static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); + +static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *); + +static void read_array_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_ptr_to_member_type (struct die_info *, + struct dwarf2_cu *); + +static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_const_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_string_type (struct die_info *, struct dwarf2_cu *); + +static void read_subroutine_type (struct die_info *, struct dwarf2_cu *); + +static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *); + +static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static void free_die_list (struct die_info *); + +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + +static void process_die (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_linkage_name (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_name (struct die_info *die, struct dwarf2_cu *); + +static struct die_info *dwarf2_extension (struct die_info *die, + struct dwarf2_cu *); + +static char *dwarf_tag_name (unsigned int); + +static char *dwarf_attr_name (unsigned int); + +static char *dwarf_form_name (unsigned int); + +static char *dwarf_stack_op_name (unsigned int); + +static char *dwarf_bool_name (unsigned int); + +static char *dwarf_type_encoding_name (unsigned int); + +#if 0 +static char *dwarf_cfi_name (unsigned int); + +struct die_info *copy_die (struct die_info *); +#endif + +static struct die_info *sibling_die (struct die_info *); + +static void dump_die (struct die_info *); + +static void dump_die_list (struct die_info *); + +static void store_in_ref_table (unsigned int, struct die_info *); + +static void dwarf2_empty_hash_tables (void); + +static unsigned int dwarf2_get_ref_die_offset (struct attribute *, + struct dwarf2_cu *); + +static int dwarf2_get_attr_constant_value (struct attribute *, int); + +static struct die_info *follow_die_ref (unsigned int); + +static struct type *dwarf2_fundamental_type (struct objfile *, int, + struct dwarf2_cu *); + +/* memory allocation interface */ + +static void dwarf2_free_tmp_obstack (void *); + +static struct dwarf_block *dwarf_alloc_block (void); + +static struct abbrev_info *dwarf_alloc_abbrev (void); + +static struct die_info *dwarf_alloc_die (void); + +static void initialize_cu_func_list (struct dwarf2_cu *); + +static void add_to_cu_func_list (const char *, CORE_ADDR, CORE_ADDR, + struct dwarf2_cu *); + +static void dwarf_decode_macros (struct line_header *, unsigned int, + char *, bfd *, struct dwarf2_cu *); + +static int attr_form_is_block (struct attribute *); + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu); + +/* Try to locate the sections we need for DWARF 2 debugging + information and return true if we have enough to do something. */ + +int +dwarf2_has_info (bfd *abfd) +{ + dwarf_info_section = 0; + dwarf_abbrev_section = 0; + dwarf_line_section = 0; + dwarf_str_section = 0; + dwarf_macinfo_section = 0; + dwarf_frame_section = 0; + dwarf_eh_frame_section = 0; + dwarf_ranges_section = 0; + dwarf_loc_section = 0; + + bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); + return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL); +} + +/* This function is mapped across the sections and remembers the + offset and size of each of the debugging sections we are interested + in. */ + +static void +dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) +{ + if (strcmp (sectp->name, INFO_SECTION) == 0) + { + dwarf_info_size = bfd_get_section_size_before_reloc (sectp); + dwarf_info_section = sectp; + } + else if (strcmp (sectp->name, ABBREV_SECTION) == 0) + { + dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp); + dwarf_abbrev_section = sectp; + } + else if (strcmp (sectp->name, LINE_SECTION) == 0) + { + dwarf_line_size = bfd_get_section_size_before_reloc (sectp); + dwarf_line_section = sectp; + } + else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0) + { + dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp); + dwarf_pubnames_section = sectp; + } + else if (strcmp (sectp->name, ARANGES_SECTION) == 0) + { + dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_aranges_section = sectp; + } + else if (strcmp (sectp->name, LOC_SECTION) == 0) + { + dwarf_loc_size = bfd_get_section_size_before_reloc (sectp); + dwarf_loc_section = sectp; + } + else if (strcmp (sectp->name, MACINFO_SECTION) == 0) + { + dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp); + dwarf_macinfo_section = sectp; + } + else if (strcmp (sectp->name, STR_SECTION) == 0) + { + dwarf_str_size = bfd_get_section_size_before_reloc (sectp); + dwarf_str_section = sectp; + } + else if (strcmp (sectp->name, FRAME_SECTION) == 0) + { + dwarf_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_frame_section = sectp; + } + else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0) + { + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } + } + else if (strcmp (sectp->name, RANGES_SECTION) == 0) + { + dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_ranges_section = sectp; + } +} + +/* Build a partial symbol table. */ + +void +dwarf2_build_psymtabs (struct objfile *objfile, int mainline) +{ + + /* We definitely need the .debug_info and .debug_abbrev sections */ + + dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section); + dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section); + + if (dwarf_line_section) + dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section); + else + dwarf_line_buffer = NULL; + + if (dwarf_str_section) + dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section); + else + dwarf_str_buffer = NULL; + + if (dwarf_macinfo_section) + dwarf_macinfo_buffer = dwarf2_read_section (objfile, + dwarf_macinfo_section); + else + dwarf_macinfo_buffer = NULL; + + if (dwarf_ranges_section) + dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section); + else + dwarf_ranges_buffer = NULL; + + if (dwarf_loc_section) + dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section); + else + dwarf_loc_buffer = NULL; + + if (mainline + || (objfile->global_psymbols.size == 0 + && objfile->static_psymbols.size == 0)) + { + init_psymbol_list (objfile, 1024); + } + +#if 0 + if (dwarf_aranges_offset && dwarf_pubnames_offset) + { + /* Things are significantly easier if we have .debug_aranges and + .debug_pubnames sections */ + + dwarf2_build_psymtabs_easy (objfile, mainline); + } + else +#endif + /* only test this case for now */ + { + /* In this case we have to work a bit harder */ + dwarf2_build_psymtabs_hard (objfile, mainline); + } +} + +#if 0 +/* Build the partial symbol table from the information in the + .debug_pubnames and .debug_aranges sections. */ + +static void +dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + char *aranges_buffer, *pubnames_buffer; + char *aranges_ptr, *pubnames_ptr; + unsigned int entry_length, version, info_offset, info_size; + + pubnames_buffer = dwarf2_read_section (objfile, + dwarf_pubnames_section); + pubnames_ptr = pubnames_buffer; + while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size) + { + struct comp_unit_head cu_header; + int bytes_read; + + entry_length = read_initial_length (abfd, pubnames_ptr, &cu_header, + &bytes_read); + pubnames_ptr += bytes_read; + version = read_1_byte (abfd, pubnames_ptr); + pubnames_ptr += 1; + info_offset = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + info_size = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + } + + aranges_buffer = dwarf2_read_section (objfile, + dwarf_aranges_section); + +} +#endif + +/* Read in the comp unit header information from the debug_info at + info_ptr. */ + +static char * +read_comp_unit_head (struct comp_unit_head *cu_header, + char *info_ptr, bfd *abfd) +{ + int signed_addr; + int bytes_read; + cu_header->length = read_initial_length (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->version = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + cu_header->abbrev_offset = read_offset (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->addr_size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + signed_addr = bfd_get_sign_extend_vma (abfd); + if (signed_addr < 0) + internal_error (__FILE__, __LINE__, + "read_comp_unit_head: dwarf from non elf file"); + cu_header->signed_addr_p = signed_addr; + return info_ptr; +} + +/* Build the partial symbol table by doing a quick pass through the + .debug_info and .debug_abbrev sections. */ + +static void +dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) +{ + /* Instead of reading this into a big buffer, we should probably use + mmap() on architectures that support it. (FIXME) */ + bfd *abfd = objfile->obfd; + char *info_ptr, *abbrev_ptr; + char *beg_of_comp_unit; + struct partial_die_info comp_unit_die; + struct partial_symtab *pst; + struct cleanup *back_to; + CORE_ADDR lowpc, highpc, baseaddr; + + info_ptr = dwarf_info_buffer; + abbrev_ptr = dwarf_abbrev_buffer; + + /* We use dwarf2_tmp_obstack for objects that don't need to survive + the partial symbol scan, like attribute values. + + We could reduce our peak memory consumption during partial symbol + table construction by freeing stuff from this obstack more often + --- say, after processing each compilation unit, or each die --- + but it turns out that this saves almost nothing. For an + executable with 11Mb of Dwarf 2 data, I found about 64k allocated + on dwarf2_tmp_obstack. Some investigation showed: + + 1) 69% of the attributes used forms DW_FORM_addr, DW_FORM_data*, + DW_FORM_flag, DW_FORM_[su]data, and DW_FORM_ref*. These are + all fixed-length values not requiring dynamic allocation. + + 2) 30% of the attributes used the form DW_FORM_string. For + DW_FORM_string, read_attribute simply hands back a pointer to + the null-terminated string in dwarf_info_buffer, so no dynamic + allocation is needed there either. + + 3) The remaining 1% of the attributes all used DW_FORM_block1. + 75% of those were DW_AT_frame_base location lists for + functions; the rest were DW_AT_location attributes, probably + for the global variables. + + Anyway, what this all means is that the memory the dwarf2 + reader uses as temporary space reading partial symbols is about + 0.5% as much as we use for dwarf_*_buffer. That's noise. */ + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ + while (info_ptr < dwarf_info_buffer + dwarf_info_size) + { + struct dwarf2_cu cu; + beg_of_comp_unit = info_ptr; + + cu.objfile = objfile; + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + if (cu.header.version != 2) + { + error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd)); + return; + } + if (cu.header.abbrev_offset >= dwarf_abbrev_size) + { + error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]", + (long) cu.header.abbrev_offset, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size + > dwarf_info_buffer + dwarf_info_size) + { + error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]", + (long) cu.header.length, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + /* Complete the cu_header */ + cu.header.offset = beg_of_comp_unit - dwarf_info_buffer; + cu.header.first_die_ptr = info_ptr; + cu.header.cu_head_ptr = beg_of_comp_unit; + + cu.list_in_scope = &file_symbols; + + /* Read the abbrevs for this compilation unit into a table */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + /* Read the compilation unit die */ + info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr, + &cu); + + /* Set the language we're debugging */ + set_cu_language (comp_unit_die.language, &cu); + + /* Allocate a new partial symbol table structure */ + pst = start_psymtab_common (objfile, objfile->section_offsets, + comp_unit_die.name ? comp_unit_die.name : "", + comp_unit_die.lowpc, + objfile->global_psymbols.next, + objfile->static_psymbols.next); + + pst->read_symtab_private = (char *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo)); + DWARF_INFO_BUFFER (pst) = dwarf_info_buffer; + DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf_info_buffer; + DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; + DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; + DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; + DWARF_STR_BUFFER (pst) = dwarf_str_buffer; + DWARF_STR_SIZE (pst) = dwarf_str_size; + DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer; + DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size; + DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer; + DWARF_RANGES_SIZE (pst) = dwarf_ranges_size; + DWARF_LOC_BUFFER (pst) = dwarf_loc_buffer; + DWARF_LOC_SIZE (pst) = dwarf_loc_size; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Store the function that reads in the rest of the symbol table */ + pst->read_symtab = dwarf2_psymtab_to_symtab; + + /* Check if comp unit has_children. + If so, read the rest of the partial symbols from this comp unit. + If not, there's no more debug_info for this comp unit. */ + if (comp_unit_die.has_children) + { + lowpc = ((CORE_ADDR) -1); + highpc = ((CORE_ADDR) 0); + + info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc, + &cu, NULL); + + /* If we didn't find a lowpc, set it to highpc to avoid + complaints from `maint check'. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + + /* If the compilation unit didn't have an explicit address range, + then use the information extracted from its child dies. */ + if (! comp_unit_die.has_pc_info) + { + comp_unit_die.lowpc = lowpc; + comp_unit_die.highpc = highpc; + } + } + pst->textlow = comp_unit_die.lowpc + baseaddr; + pst->texthigh = comp_unit_die.highpc + baseaddr; + + pst->n_global_syms = objfile->global_psymbols.next - + (objfile->global_psymbols.list + pst->globals_offset); + pst->n_static_syms = objfile->static_psymbols.next - + (objfile->static_psymbols.list + pst->statics_offset); + sort_pst_symbols (pst); + + /* If there is already a psymtab or symtab for a file of this + name, remove it. (If there is a symtab, more drastic things + also happen.) This happens in VxWorks. */ + free_named_symtabs (pst->filename); + + info_ptr = beg_of_comp_unit + cu.header.length + + cu.header.initial_length_size; + } + do_cleanups (back_to); +} + +/* Read in all interesting dies to the end of the compilation unit or + to the end of the current namespace. NAMESPACE is NULL if we + haven't yet encountered any DW_TAG_namespace entries; otherwise, + it's the name of the current namespace. In particular, it's the + empty string if we're currently in the global namespace but have + previously encountered a DW_TAG_namespace. */ + +static char * +scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu, + const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + /* Now, march along the PDI's, descending into ones which have + interesting children but skipping the children of the other ones, + until we reach the end of the compilation unit. */ + + while (1) + { + /* This flag tells whether or not info_ptr has gotten updated + inside the loop. */ + int info_ptr_updated = 0; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + /* Anonymous namespaces have no name but have interesting + children, so we need to look at them. Ditto for anonymous + enums. */ + + if (pdi.name != NULL || pdi.tag == DW_TAG_namespace + || pdi.tag == DW_TAG_enumeration_type) + { + switch (pdi.tag) + { + case DW_TAG_subprogram: + if (pdi.has_pc_info) + { + if (pdi.lowpc < *lowpc) + { + *lowpc = pdi.lowpc; + } + if (pdi.highpc > *highpc) + { + *highpc = pdi.highpc; + } + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + } + break; + case DW_TAG_variable: + case DW_TAG_typedef: + case DW_TAG_union_type: + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_structure (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_enumeration_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_enumeration (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + /* File scope base type definitions are added to the partial + symbol table. */ + add_partial_symbol (&pdi, cu, namespace); + break; + case DW_TAG_namespace: + /* We've hit a DW_TAG_namespace entry, so we know this + file has been compiled using a compiler that + generates them; update NAMESPACE to reflect that. */ + if (namespace == NULL) + namespace = ""; + info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc, + cu, namespace); + info_ptr_updated = 1; + break; + default: + break; + } + } + + if (pdi.tag == 0) + break; + + /* If the die has a sibling, skip to the sibling, unless another + function has already updated info_ptr for us. */ + + /* NOTE: carlton/2003-06-16: This is a bit hackish, but whether + or not we want to update this depends on enough stuff (not + only pdi.tag but also whether or not pdi.name is NULL) that + this seems like the easiest way to handle the issue. */ + + if (!info_ptr_updated) + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } + + return info_ptr; +} + +static void +add_partial_symbol (struct partial_die_info *pdi, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + CORE_ADDR addr = 0; + char *actual_name = pdi->name; + const struct partial_symbol *psym = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* If we're not in the global namespace and if the namespace name + isn't encoded in a mangled actual_name, add it. */ + + if (pdi_needs_namespace (pdi->tag, namespace)) + { + actual_name = alloca (strlen (pdi->name) + 2 + strlen (namespace) + 1); + strcpy (actual_name, namespace); + strcat (actual_name, "::"); + strcat (actual_name, pdi->name); + } + + switch (pdi->tag) + { + case DW_TAG_subprogram: + if (pdi->is_external) + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->global_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + else + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_file_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->static_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_variable: + if (pdi->is_external) + { + /* Global Variable. + Don't enter into the minimal symbol tables as there is + a minimal symbol table entry from the ELF symbols already. + Enter into partial symbol table if it has a location + descriptor or a type. + If the location descriptor is missing, new_symbol will create + a LOC_UNRESOLVED symbol, the address of the variable will then + be determined from the minimal symbol table whenever the variable + is referenced. + The address for the partial symbol table entry is not + used by GDB, but it comes in handy for debugging partial symbol + table building. */ + + if (pdi->locdesc) + addr = decode_locdesc (pdi->locdesc, cu); + if (pdi->locdesc || pdi->has_type) + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->global_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + else + { + /* Static Variable. Skip symbols without location descriptors. */ + if (pdi->locdesc == NULL) + return; + addr = decode_locdesc (pdi->locdesc, cu); + /*prim_record_minimal_symbol (actual_name, addr + baseaddr, + mst_file_data, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->static_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_typedef: + case DW_TAG_base_type: + case DW_TAG_subrange_type: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + /* Skip aggregate types without children, these are external + references. */ + /* NOTE: carlton/2003-10-07: See comment in new_symbol about + static vs. global. */ + if (pdi->has_children == 0) + return; + add_psymbol_to_list (actual_name, strlen (actual_name), + STRUCT_DOMAIN, LOC_TYPEDEF, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + + if (cu->language == language_cplus) + { + /* For C++, these implicitly act as typedefs as well. */ + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + } + break; + case DW_TAG_enumerator: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_CONST, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + default: + break; + } + + /* Check to see if we should scan the name for possible namespace + info. Only do this if this is C++, if we don't have namespace + debugging info in the file, if the psym is of an appropriate type + (otherwise we'll have psym == NULL), and if we actually had a + mangled name to begin with. */ + + if (cu->language == language_cplus + && namespace == NULL + && psym != NULL + && SYMBOL_CPLUS_DEMANGLED_NAME (psym) != NULL) + cp_check_possible_namespace_symbols (SYMBOL_CPLUS_DEMANGLED_NAME (psym), + objfile); +} + +/* Determine whether a die of type TAG living in the C++ namespace + NAMESPACE needs to have the name of the namespace prepended to the + name listed in the die. */ + +static int +pdi_needs_namespace (enum dwarf_tag tag, const char *namespace) +{ + if (namespace == NULL || namespace[0] == '\0') + return 0; + + switch (tag) + { + case DW_TAG_typedef: + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + case DW_TAG_enumerator: + return 1; + default: + return 0; + } +} + +/* Read a partial die corresponding to a namespace; also, add a symbol + corresponding to that namespace to the symbol table. NAMESPACE is + the name of the enclosing namespace. */ + +static char * +add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + const char *new_name = pdi->name; + char *full_name; + + /* Calculate the full name of the namespace that we just entered. */ + + if (new_name == NULL) + new_name = "(anonymous namespace)"; + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + strcpy (full_name, namespace); + if (*namespace != '\0') + strcat (full_name, "::"); + strcat (full_name, new_name); + + /* FIXME: carlton/2003-10-07: We can't just replace this by a call + to add_partial_symbol, because we don't have a way to pass in the + full name to that function; that might be a flaw in + add_partial_symbol's interface. */ + + add_psymbol_to_list (full_name, strlen (full_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, 0, cu->language, objfile); + + /* Now scan partial symbols in that namespace. */ + + if (pdi->has_children) + info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name); + + return info_ptr; +} + +/* Read a partial die corresponding to a class or structure. */ + +static char * +add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace) +{ + bfd *abfd = cu->objfile->obfd; + char *actual_class_name = NULL; + + if (cu->language == language_cplus + && (namespace == NULL || namespace[0] == '\0') + && struct_pdi->name != NULL + && struct_pdi->has_children) + { + /* See if we can figure out if the class lives in a namespace + (or is nested within another class.) We do this by looking + for a member function; its demangled name will contain + namespace info, if there is any. */ + + /* NOTE: carlton/2003-10-07: Getting the info this way changes + what template types look like, because the demangler + frequently doesn't give the same name as the debug info. We + could fix this by only using the demangled name to get the + prefix (but see comment in read_structure_type). */ + + /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have + the appropriate debug information, so it would be nice to be + able to avoid this hack. But NAMESPACE may not be the + namespace where this class was defined: NAMESPACE reflects + where STRUCT_PDI occurs in the tree of dies, but because of + DW_AT_specification, that may not actually tell us where the + class is defined. (See the comment in read_func_scope for an + example of how this could occur.) + + Unfortunately, our current partial symtab data structures are + completely unable to deal with DW_AT_specification. So, for + now, the best thing to do is to get nesting information from + places other than the tree structure of dies if there's any + chance that a DW_AT_specification is involved. :-( */ + + char *next_child = info_ptr; + + while (1) + { + struct partial_die_info child_pdi; + + next_child = read_partial_die (&child_pdi, abfd, next_child, + cu); + if (!child_pdi.tag) + break; + if (child_pdi.tag == DW_TAG_subprogram) + { + actual_class_name = class_name_from_physname (child_pdi.name); + if (actual_class_name != NULL) + struct_pdi->name = actual_class_name; + break; + } + else + { + next_child = locate_pdi_sibling (&child_pdi, next_child, + abfd, cu); + } + } + } + + add_partial_symbol (struct_pdi, cu, namespace); + xfree (actual_class_name); + + return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu); +} + +/* Read a partial die corresponding to an enumeration type. */ + +static char * +add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + if (enum_pdi->name != NULL) + add_partial_symbol (enum_pdi, cu, namespace); + + while (1) + { + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + if (pdi.tag == 0) + break; + if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL) + complaint (&symfile_complaints, "malformed enumerator DIE ignored"); + else + add_partial_symbol (&pdi, cu, namespace); + } + + return info_ptr; +} + +/* Locate ORIG_PDI's sibling; INFO_PTR should point to the next DIE + after ORIG_PDI. */ + +static char * +locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr, + bfd *abfd, struct dwarf2_cu *cu) +{ + /* Do we know the sibling already? */ + + if (orig_pdi->sibling) + return orig_pdi->sibling; + + /* Are there any children to deal with? */ + + if (!orig_pdi->has_children) + return info_ptr; + + /* Okay, we don't know the sibling, but we have children that we + want to skip. So read children until we run into one without a + tag; return whatever follows it. */ + + while (1) + { + struct partial_die_info pdi; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + if (pdi.tag == 0) + return info_ptr; + else + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } +} + +/* Expand this partial symbol table into a full symbol table. */ + +static void +dwarf2_psymtab_to_symtab (struct partial_symtab *pst) +{ + /* FIXME: This is barely more than a stub. */ + if (pst != NULL) + { + if (pst->readin) + { + warning ("bug: psymtab for %s is already read in.", pst->filename); + } + else + { + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + gdb_flush (gdb_stdout); + } + + psymtab_to_symtab_1 (pst); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); + } + } +} + +static void +psymtab_to_symtab_1 (struct partial_symtab *pst) +{ + struct objfile *objfile = pst->objfile; + bfd *abfd = objfile->obfd; + struct dwarf2_cu cu; + struct die_info *dies; + unsigned long offset; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + char *info_ptr; + struct symtab *symtab; + struct cleanup *back_to; + struct attribute *attr; + CORE_ADDR baseaddr; + + /* Set local variables from the partial symbol table info. */ + offset = DWARF_INFO_OFFSET (pst); + dwarf_info_buffer = DWARF_INFO_BUFFER (pst); + dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); + dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); + dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); + dwarf_str_buffer = DWARF_STR_BUFFER (pst); + dwarf_str_size = DWARF_STR_SIZE (pst); + dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst); + dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst); + dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst); + dwarf_ranges_size = DWARF_RANGES_SIZE (pst); + dwarf_loc_buffer = DWARF_LOC_BUFFER (pst); + dwarf_loc_size = DWARF_LOC_SIZE (pst); + info_ptr = dwarf_info_buffer + offset; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* We're in the global namespace. */ + processing_current_prefix = ""; + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + buildsym_init (); + make_cleanup (really_free_pendings, NULL); + + cu.objfile = objfile; + + /* read in the comp_unit header */ + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + /* Read the abbrevs for this compilation unit */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + cu.header.offset = offset; + + cu.list_in_scope = &file_symbols; + + dies = read_comp_unit (info_ptr, abfd, &cu); + + make_cleanup_free_die_list (dies); + + /* Find the base address of the compilation unit for range lists and + location lists. It will normally be specified by DW_AT_low_pc. + In DWARF-3 draft 4, the base address could be overridden by + DW_AT_entry_pc. It's been removed, but GCC still uses this for + compilation units with discontinuous ranges. */ + + cu.header.base_known = 0; + cu.header.base_address = 0; + + attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + else + { + attr = dwarf2_attr (dies, DW_AT_low_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + } + + /* Do line number decoding in read_file_scope () */ + process_die (dies, &cu); + + /* Some compilers don't define a DW_AT_high_pc attribute for the + compilation unit. If the DW_AT_high_pc is missing, synthesize + it, by scanning the DIE's below the compilation unit. */ + get_scope_pc_bounds (dies, &lowpc, &highpc, &cu); + + symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + + /* Set symtab language to language from DW_AT_language. + If the compilation is from a C file generated by language preprocessors, + do not set the language if it was already deduced by start_subfile. */ + if (symtab != NULL + && !(cu.language == language_c && symtab->language != language_c)) + { + symtab->language = cu.language; + } + pst->symtab = symtab; + pst->readin = 1; + + do_cleanups (back_to); +} + +/* Process a die and its children. */ + +static void +process_die (struct die_info *die, struct dwarf2_cu *cu) +{ + switch (die->tag) + { + case DW_TAG_padding: + break; + case DW_TAG_compile_unit: + read_file_scope (die, cu); + break; + case DW_TAG_subprogram: + read_subroutine_type (die, cu); + read_func_scope (die, cu); + break; + case DW_TAG_inlined_subroutine: + /* FIXME: These are ignored for now. + They could be used to set breakpoints on all inlined instances + of a function and make GDB `next' properly over inlined functions. */ + break; + case DW_TAG_lexical_block: + case DW_TAG_try_block: + case DW_TAG_catch_block: + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); + process_structure_scope (die, cu); + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); + break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + /* END FIXME */ + + case DW_TAG_base_type: + read_base_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_common_block: + read_common_block (die, cu); + break; + case DW_TAG_common_inclusion: + break; + case DW_TAG_namespace: + processing_has_namespace_info = 1; + read_namespace (die, cu); + break; + case DW_TAG_imported_declaration: + case DW_TAG_imported_module: + /* FIXME: carlton/2002-10-16: Eventually, we should use the + information contained in these. DW_TAG_imported_declaration + dies shouldn't have children; DW_TAG_imported_module dies + shouldn't in the C++ case, but conceivably could in the + Fortran case, so we'll have to replace this gdb_assert if + Fortran compilers start generating that info. */ + processing_has_namespace_info = 1; + gdb_assert (die->child == NULL); + break; + default: + new_symbol (die, NULL, cu); + break; + } +} + +static void +initialize_cu_func_list (struct dwarf2_cu *cu) +{ + cu->first_fn = cu->last_fn = cu->cached_fn = NULL; +} + +static void +read_file_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct cleanup *back_to = make_cleanup (null_cleanup, 0); + CORE_ADDR lowpc = ((CORE_ADDR) -1); + CORE_ADDR highpc = ((CORE_ADDR) 0); + struct attribute *attr; + char *name = ""; + char *comp_dir = NULL; + struct die_info *child_die; + bfd *abfd = objfile->obfd; + struct line_header *line_header = 0; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + get_scope_pc_bounds (die, &lowpc, &highpc, cu); + + /* If we didn't find a lowpc, set it to highpc to avoid complaints + from finish_block. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + lowpc += baseaddr; + highpc += baseaddr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr) + { + name = DW_STRING (attr); + } + attr = dwarf2_attr (die, DW_AT_comp_dir, cu); + if (attr) + { + comp_dir = DW_STRING (attr); + if (comp_dir) + { + /* Irix 6.2 native cc prepends .: to the compilation + directory, get rid of it. */ + char *cp = strchr (comp_dir, ':'); + + if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/') + comp_dir = cp + 1; + } + } + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.deprecated_entry_file_lowpc = lowpc; + objfile->ei.deprecated_entry_file_highpc = highpc; + } + + attr = dwarf2_attr (die, DW_AT_language, cu); + if (attr) + { + set_cu_language (DW_UNSND (attr), cu); + } + + /* We assume that we're processing GCC output. */ + processing_gcc_compilation = 2; +#if 0 + /* FIXME:Do something here. */ + if (dip->at_producer != NULL) + { + handle_producer (dip->at_producer); + } +#endif + + /* The compilation unit may be in a different language or objfile, + zero out all remembered fundamental types. */ + memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *)); + + start_symtab (name, comp_dir, lowpc); + record_debugformat ("DWARF 2"); + + initialize_cu_func_list (cu); + + /* Process all dies in compilation unit. */ + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + /* Decode line number information if present. */ + attr = dwarf2_attr (die, DW_AT_stmt_list, cu); + if (attr) + { + unsigned int line_offset = DW_UNSND (attr); + line_header = dwarf_decode_line_header (line_offset, abfd, cu); + if (line_header) + { + make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) line_header); + dwarf_decode_lines (line_header, comp_dir, abfd, cu); + } + } + + /* Decode macro information, if present. Dwarf 2 macro information + refers to information in the line number info statement program + header, so we can only read it if we've read the header + successfully. */ + attr = dwarf2_attr (die, DW_AT_macro_info, cu); + if (attr && line_header) + { + unsigned int macro_offset = DW_UNSND (attr); + dwarf_decode_macros (line_header, macro_offset, + comp_dir, abfd, cu); + } + do_cleanups (back_to); +} + +static void +add_to_cu_func_list (const char *name, CORE_ADDR lowpc, CORE_ADDR highpc, + struct dwarf2_cu *cu) +{ + struct function_range *thisfn; + + thisfn = (struct function_range *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct function_range)); + thisfn->name = name; + thisfn->lowpc = lowpc; + thisfn->highpc = highpc; + thisfn->seen_line = 0; + thisfn->next = NULL; + + if (cu->last_fn == NULL) + cu->first_fn = thisfn; + else + cu->last_fn->next = thisfn; + + cu->last_fn = thisfn; +} + +static void +read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct die_info *child_die; + struct attribute *attr; + char *name; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + name = dwarf2_linkage_name (die, cu); + + /* Ignore functions with missing or empty names and functions with + missing or invalid low and high pc attributes. */ + if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + + if (cu->language == language_cplus) + { + struct die_info *spec_die = die_specification (die, cu); + + /* NOTE: carlton/2004-01-23: We have to be careful in the + presence of DW_AT_specification. For example, with GCC 3.4, + given the code + + namespace N { + void foo() { + // Definition of N::foo. + } + } + + then we'll have a tree of DIEs like this: + + 1: DW_TAG_compile_unit + 2: DW_TAG_namespace // N + 3: DW_TAG_subprogram // declaration of N::foo + 4: DW_TAG_subprogram // definition of N::foo + DW_AT_specification // refers to die #3 + + Thus, when processing die #4, we have to pretend that we're + in the context of its DW_AT_specification, namely the contex + of die #3. */ + + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + } + + lowpc += baseaddr; + highpc += baseaddr; + + /* Record the function range for dwarf_decode_lines. */ + add_to_cu_func_list (name, lowpc, highpc, cu); + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.entry_func_lowpc = lowpc; + objfile->ei.entry_func_highpc = highpc; + } + + new = push_context (0, lowpc); + new->name = new_symbol (die, die->type, cu); + + /* If there is a location expression for DW_AT_frame_base, record + it. */ + attr = dwarf2_attr (die, DW_AT_frame_base, cu); + if (attr) + /* FIXME: cagney/2004-01-26: The DW_AT_frame_base's location + expression is being recorded directly in the function's symbol + and not in a separate frame-base object. I guess this hack is + to avoid adding some sort of frame-base adjunct/annex to the + function's symbol :-(. The problem with doing this is that it + results in a function symbol with a location expression that + has nothing to do with the location of the function, ouch! The + relationship should be: a function's symbol has-a frame base; a + frame-base has-a location expression. */ + dwarf2_symbol_mark_computed (attr, new->name, cu); + + cu->list_in_scope = &local_symbols; + + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + new = pop_context (); + /* Make a block for the local symbols within. */ + finish_block (new->name, &local_symbols, new->old_blocks, + lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + + /* If we've finished processing a top-level function, subsequent + symbols go in the file symbol list. */ + if (outermost_context_p ()) + cu->list_in_scope = &file_symbols; + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +/* Process all the DIES contained within a lexical block scope. Start + a new scope, process the dies, and then close the scope. */ + +static void +read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Ignore blocks with missing or invalid low and high pc attributes. */ + /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges + as multiple lexical blocks? Handling children in a sane way would + be nasty. Might be easier to properly extend generic blocks to + describe ranges. */ + if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + lowpc += baseaddr; + highpc += baseaddr; + + push_context (0, lowpc); + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + new = pop_context (); + + if (local_symbols != NULL) + { + finish_block (0, &local_symbols, new->old_blocks, new->start_addr, + highpc, objfile); + } + local_symbols = new->locals; +} + +/* Get low and high pc attributes from a die. Return 1 if the attributes + are present and valid, otherwise, return 0. Return -1 if the range is + discontinuous, i.e. derived from DW_AT_ranges information. */ +static int +dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct attribute *attr; + bfd *obfd = objfile->obfd; + CORE_ADDR low = 0; + CORE_ADDR high = 0; + int ret = 0; + + attr = dwarf2_attr (die, DW_AT_high_pc, cu); + if (attr) + { + high = DW_ADDR (attr); + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + low = DW_ADDR (attr); + else + /* Found high w/o low attribute. */ + return 0; + + /* Found consecutive range of addresses. */ + ret = 1; + } + else + { + attr = dwarf2_attr (die, DW_AT_ranges, cu); + if (attr != NULL) + { + unsigned int addr_size = cu_header->addr_size; + CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1)); + /* Value of the DW_AT_ranges attribute is the offset in the + .debug_ranges section. */ + unsigned int offset = DW_UNSND (attr); + /* Base address selection entry. */ + CORE_ADDR base; + int found_base; + int dummy; + char *buffer; + CORE_ADDR marker; + int low_set; + + found_base = cu_header->base_known; + base = cu_header->base_address; + + if (offset >= dwarf_ranges_size) + { + complaint (&symfile_complaints, + "Offset %d out of bounds for DW_AT_ranges attribute", + offset); + return 0; + } + buffer = dwarf_ranges_buffer + offset; + + /* Read in the largest possible address. */ + marker = read_address (obfd, buffer, cu, &dummy); + if ((marker & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + buffer += 2 * addr_size; + offset += 2 * addr_size; + found_base = 1; + } + + low_set = 0; + + while (1) + { + CORE_ADDR range_beginning, range_end; + + range_beginning = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + range_end = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + offset += 2 * addr_size; + + /* An end of list marker is a pair of zero addresses. */ + if (range_beginning == 0 && range_end == 0) + /* Found the end of list entry. */ + break; + + /* Each base address selection entry is a pair of 2 values. + The first is the largest possible address, the second is + the base address. Check for a base address here. */ + if ((range_beginning & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + found_base = 1; + continue; + } + + if (!found_base) + { + /* We have no valid base address for the ranges + data. */ + complaint (&symfile_complaints, + "Invalid .debug_ranges data (no base address)"); + return 0; + } + + range_beginning += base; + range_end += base; + + /* FIXME: This is recording everything as a low-high + segment of consecutive addresses. We should have a + data structure for discontiguous block ranges + instead. */ + if (! low_set) + { + low = range_beginning; + high = range_end; + low_set = 1; + } + else + { + if (range_beginning < low) + low = range_beginning; + if (range_end > high) + high = range_end; + } + } + + if (! low_set) + /* If the first entry is an end-of-list marker, the range + describes an empty scope, i.e. no instructions. */ + return 0; + + ret = -1; + } + } + + if (high < low) + return 0; + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0) + return 0; + + *lowpc = low; + *highpc = high; + return ret; +} + +/* Get the low and high pc's represented by the scope DIE, and store + them in *LOWPC and *HIGHPC. If the correct values can't be + determined, set *LOWPC to -1 and *HIGHPC to 0. */ + +static void +get_scope_pc_bounds (struct die_info *die, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu) +{ + CORE_ADDR best_low = (CORE_ADDR) -1; + CORE_ADDR best_high = (CORE_ADDR) 0; + CORE_ADDR current_low, current_high; + + if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu)) + { + best_low = current_low; + best_high = current_high; + } + else + { + struct die_info *child = die->child; + + while (child && child->tag) + { + switch (child->tag) { + case DW_TAG_subprogram: + if (dwarf2_get_pc_bounds (child, ¤t_low, ¤t_high, cu)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + case DW_TAG_namespace: + /* FIXME: carlton/2004-01-16: Should we do this for + DW_TAG_class_type/DW_TAG_structure_type, too? I think + that current GCC's always emit the DIEs corresponding + to definitions of methods of classes as children of a + DW_TAG_compile_unit or DW_TAG_namespace (as opposed to + the DIEs giving the declarations, which could be + anywhere). But I don't see any reason why the + standards says that they have to be there. */ + get_scope_pc_bounds (child, ¤t_low, ¤t_high, cu); + + if (current_low != ((CORE_ADDR) -1)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + default: + /* Ignore. */ + break; + } + + child = sibling_die (child); + } + } + + *lowpc = best_low; + *highpc = best_high; +} + +/* Add an aggregate field to the field list. */ + +static void +dwarf2_add_field (struct field_info *fip, struct die_info *die, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct nextfield *new_field; + struct attribute *attr; + struct field *fp; + char *fieldname = ""; + + /* Allocate a new field list entry and link it in. */ + new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield)); + make_cleanup (xfree, new_field); + memset (new_field, 0, sizeof (struct nextfield)); + new_field->next = fip->fields; + fip->fields = new_field; + fip->nfields++; + + /* Handle accessibility and virtuality of field. + The default accessibility for members is public, the default + accessibility for inheritance is private. */ + if (die->tag != DW_TAG_inheritance) + new_field->accessibility = DW_ACCESS_public; + else + new_field->accessibility = DW_ACCESS_private; + new_field->virtuality = DW_VIRTUALITY_none; + + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + new_field->accessibility = DW_UNSND (attr); + if (new_field->accessibility != DW_ACCESS_public) + fip->non_public_fields = 1; + attr = dwarf2_attr (die, DW_AT_virtuality, cu); + if (attr) + new_field->virtuality = DW_UNSND (attr); + + fp = &new_field->field; + + if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu)) + { + /* Data member other than a C++ static data member. */ + + /* Get type of field. */ + fp->type = die_type (die, cu); + + FIELD_STATIC_KIND (*fp) = 0; + + /* Get bit size of field (zero if none). */ + attr = dwarf2_attr (die, DW_AT_bit_size, cu); + if (attr) + { + FIELD_BITSIZE (*fp) = DW_UNSND (attr); + } + else + { + FIELD_BITSIZE (*fp) = 0; + } + + /* Get bit offset of field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + { + FIELD_BITPOS (*fp) = + decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte; + } + else + FIELD_BITPOS (*fp) = 0; + attr = dwarf2_attr (die, DW_AT_bit_offset, cu); + if (attr) + { + if (BITS_BIG_ENDIAN) + { + /* For big endian bits, the DW_AT_bit_offset gives the + additional bit offset from the MSB of the containing + anonymous object to the MSB of the field. We don't + have to do anything special since we don't need to + know the size of the anonymous object. */ + FIELD_BITPOS (*fp) += DW_UNSND (attr); + } + else + { + /* For little endian bits, compute the bit offset to the + MSB of the anonymous object, subtract off the number of + bits from the MSB of the field to the MSB of the + object, and then subtract off the number of bits of + the field itself. The result is the bit offset of + the LSB of the field. */ + int anonymous_size; + int bit_offset = DW_UNSND (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + /* The size of the anonymous object containing + the bit field is explicit, so use the + indicated size (in bytes). */ + anonymous_size = DW_UNSND (attr); + } + else + { + /* The size of the anonymous object containing + the bit field must be inferred from the type + attribute of the data member containing the + bit field. */ + anonymous_size = TYPE_LENGTH (fp->type); + } + FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp); + } + } + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + fp->name = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + + /* Change accessibility for artificial fields (e.g. virtual table + pointer or virtual base class pointer) to private. */ + if (dwarf2_attr (die, DW_AT_artificial, cu)) + { + new_field->accessibility = DW_ACCESS_private; + fip->non_public_fields = 1; + } + } + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) + { + /* C++ static member. */ + + /* NOTE: carlton/2002-11-05: It should be a DW_TAG_member that + is a declaration, but all versions of G++ as of this writing + (so through at least 3.2.1) incorrectly generate + DW_TAG_variable tags. */ + + char *physname; + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get physical name. */ + physname = dwarf2_linkage_name (die, cu); + + SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname), + &objfile->objfile_obstack)); + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + } + else if (die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); + FIELD_BITSIZE (*fp) = 0; + FIELD_STATIC_KIND (*fp) = 0; + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = type_name_no_tag (fp->type); + fip->nbaseclasses++; + } +} + +/* Create the vector of fields, and attach it to the type. */ + +static void +dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + int nfields = fip->nfields; + + /* Record the field count, allocate space for the array of fields, + and create blank accessibility bitfields if necessary. */ + TYPE_NFIELDS (type) = nfields; + TYPE_FIELDS (type) = (struct field *) + TYPE_ALLOC (type, sizeof (struct field) * nfields); + memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + + if (fip->non_public_fields) + { + ALLOCATE_CPLUS_STRUCT_TYPE (type); + + TYPE_FIELD_PRIVATE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields); + + TYPE_FIELD_PROTECTED_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields); + + TYPE_FIELD_IGNORE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields); + } + + /* If the type has baseclasses, allocate and clear a bit vector for + TYPE_FIELD_VIRTUAL_BITS. */ + if (fip->nbaseclasses) + { + int num_bytes = B_BYTES (fip->nbaseclasses); + char *pointer; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + pointer = (char *) TYPE_ALLOC (type, num_bytes); + TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; + B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses); + TYPE_N_BASECLASSES (type) = fip->nbaseclasses; + } + + /* Copy the saved-up fields into the field vector. Start from the head + of the list, adding to the tail of the field array, so that they end + up in the same order in the array in which they were added to the list. */ + while (nfields-- > 0) + { + TYPE_FIELD (type, nfields) = fip->fields->field; + switch (fip->fields->accessibility) + { + case DW_ACCESS_private: + SET_TYPE_FIELD_PRIVATE (type, nfields); + break; + + case DW_ACCESS_protected: + SET_TYPE_FIELD_PROTECTED (type, nfields); + break; + + case DW_ACCESS_public: + break; + + default: + /* Unknown accessibility. Complain and treat it as public. */ + { + complaint (&symfile_complaints, "unsupported accessibility %d", + fip->fields->accessibility); + } + break; + } + if (nfields < fip->nbaseclasses) + { + switch (fip->fields->virtuality) + { + case DW_VIRTUALITY_virtual: + case DW_VIRTUALITY_pure_virtual: + SET_TYPE_FIELD_VIRTUAL (type, nfields); + break; + } + } + fip->fields = fip->fields->next; + } +} + +/* Add a member function to the proper fieldlist. */ + +static void +dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, + struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + struct fnfieldlist *flp; + int i; + struct fn_field *fnp; + char *fieldname; + char *physname; + struct nextfnfield *new_fnfield; + + /* Get name of member function. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get the mangled name. */ + physname = dwarf2_linkage_name (die, cu); + + /* Look up member function name in fieldlist. */ + for (i = 0; i < fip->nfnfields; i++) + { + if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0) + break; + } + + /* Create new list element if necessary. */ + if (i < fip->nfnfields) + flp = &fip->fnfieldlists[i]; + else + { + if ((fip->nfnfields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fip->fnfieldlists = (struct fnfieldlist *) + xrealloc (fip->fnfieldlists, + (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct fnfieldlist)); + if (fip->nfnfields == 0) + make_cleanup (free_current_contents, &fip->fnfieldlists); + } + flp = &fip->fnfieldlists[fip->nfnfields]; + flp->name = fieldname; + flp->length = 0; + flp->head = NULL; + fip->nfnfields++; + } + + /* Create a new member function field and chain it to the field list + entry. */ + new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield)); + make_cleanup (xfree, new_fnfield); + memset (new_fnfield, 0, sizeof (struct nextfnfield)); + new_fnfield->next = flp->head; + flp->head = new_fnfield; + flp->length++; + + /* Fill in the member function field info. */ + fnp = &new_fnfield->fnfield; + fnp->physname = obsavestring (physname, strlen (physname), + &objfile->objfile_obstack); + fnp->type = alloc_type (objfile); + if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC) + { + int nparams = TYPE_NFIELDS (die->type); + + /* TYPE is the domain of this method, and DIE->TYPE is the type + of the method itself (TYPE_CODE_METHOD). */ + smash_to_method_type (fnp->type, type, + TYPE_TARGET_TYPE (die->type), + TYPE_FIELDS (die->type), + TYPE_NFIELDS (die->type), + TYPE_VARARGS (die->type)); + + /* Handle static member functions. + Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We obtain this information + from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */ + if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (die->type, 0) == 0) + fnp->voffset = VOFFSET_STATIC; + } + else + complaint (&symfile_complaints, "member function type missing for '%s'", + physname); + + /* Get fcontext from DW_AT_containing_type if present. */ + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + fnp->fcontext = die_containing_type (die, cu); + + /* dwarf2 doesn't have stubbed physical names, so the setting of is_const + and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */ + + /* Get accessibility. */ + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + { + switch (DW_UNSND (attr)) + { + case DW_ACCESS_private: + fnp->is_private = 1; + break; + case DW_ACCESS_protected: + fnp->is_protected = 1; + break; + } + } + + /* Check for artificial methods. */ + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr && DW_UNSND (attr) != 0) + fnp->is_artificial = 1; + + /* Get index in virtual function table if it is a virtual member function. */ + attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2; + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location", + fieldname); + } + } +} + +/* Create the vector of member function fields, and attach it to the type. */ + +static void +dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + struct fnfieldlist *flp; + int total_length = 0; + int i; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *) + TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * fip->nfnfields); + + for (i = 0, flp = fip->fnfieldlists; i < fip->nfnfields; i++, flp++) + { + struct nextfnfield *nfp = flp->head; + struct fn_fieldlist *fn_flp = &TYPE_FN_FIELDLIST (type, i); + int k; + + TYPE_FN_FIELDLIST_NAME (type, i) = flp->name; + TYPE_FN_FIELDLIST_LENGTH (type, i) = flp->length; + fn_flp->fn_fields = (struct fn_field *) + TYPE_ALLOC (type, sizeof (struct fn_field) * flp->length); + for (k = flp->length; (k--, nfp); nfp = nfp->next) + fn_flp->fn_fields[k] = nfp->fnfield; + + total_length += flp->length; + } + + TYPE_NFN_FIELDS (type) = fip->nfnfields; + TYPE_NFN_FIELDS_TOTAL (type) = total_length; +} + +/* Called when we find the DIE that starts a structure or union scope + (definition) to process all dies that define the members of the + structure or union. + + NOTE: we need to call struct_type regardless of whether or not the + DIE has an at_name attribute, since it might be an anonymous + structure or union. This gets the type entered into our set of + user defined types. + + However, if the structure is incomplete (an opaque struct/union) + then suppress creating a symbol table entry for it since gdb only + wants to find the one with the complete definition. Note that if + it is complete, we just call new_symbol, which does it's own + checking about whether the struct/union is anonymous or not (and + suppresses creating a symbol table entry itself). */ + +static void +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + + if (die->type) + return; + + type = alloc_type (objfile); + + INIT_CPLUS_SPECIFIC (type); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + if (cu->language == language_cplus) + { + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); + processing_current_prefix = new_prefix; + } + else + { + TYPE_TAG_NAME (type) = DW_STRING (attr); + } + } + + if (die->tag == DW_TAG_structure_type) + { + TYPE_CODE (type) = TYPE_CODE_STRUCT; + } + else if (die->tag == DW_TAG_union_type) + { + TYPE_CODE (type) = TYPE_CODE_UNION; + } + else + { + /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT + in gdbtypes.h. */ + TYPE_CODE (type) = TYPE_CODE_CLASS; + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + /* We need to add the type field to the die immediately so we don't + infinitely recurse when dealing with pointers to the structure + type within the structure itself. */ + die->type = type; + + if (die->child != NULL && ! die_is_declaration (die, cu)) + { + struct field_info fi; + struct die_info *child_die; + struct cleanup *back_to = make_cleanup (null_cleanup, NULL); + + memset (&fi, 0, sizeof (struct field_info)); + + child_die = die->child; + + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable) + { + /* NOTE: carlton/2002-11-05: A C++ static data member + should be a DW_TAG_member that is a declaration, but + all versions of G++ as of this writing (so through at + least 3.2.1) incorrectly generate DW_TAG_variable + tags for them instead. */ + dwarf2_add_field (&fi, child_die, cu); + } + else if (child_die->tag == DW_TAG_subprogram) + { + /* C++ member function. */ + read_type_die (child_die, cu); + dwarf2_add_member_fn (&fi, child_die, type, cu); + } + else if (child_die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + dwarf2_add_field (&fi, child_die, cu); + } + child_die = sibling_die (child_die); + } + + /* Attach fields and member functions to the type. */ + if (fi.nfields) + dwarf2_attach_fields_to_type (&fi, type, cu); + if (fi.nfnfields) + { + dwarf2_attach_fn_fields_to_type (&fi, type, cu); + + /* Get the type which refers to the base class (possibly this + class itself) which contains the vtable pointer for the current + class from the DW_AT_containing_type attribute. */ + + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + { + struct type *t = die_containing_type (die, cu); + + TYPE_VPTR_BASETYPE (type) = t; + if (type == t) + { + static const char vptr_name[] = + {'_', 'v', 'p', 't', 'r', '\0'}; + int i; + + /* Our own class provides vtbl ptr. */ + for (i = TYPE_NFIELDS (t) - 1; + i >= TYPE_N_BASECLASSES (t); + --i) + { + char *fieldname = TYPE_FIELD_NAME (t, i); + + if ((strncmp (fieldname, vptr_name, + strlen (vptr_name) - 1) + == 0) + && is_cplus_marker (fieldname[strlen (vptr_name)])) + { + TYPE_VPTR_FIELDNO (type) = i; + break; + } + } + + /* Complain if virtual function table field not found. */ + if (i < TYPE_N_BASECLASSES (t)) + complaint (&symfile_complaints, + "virtual function table pointer not found when defining class '%s'", + TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) : + ""); + } + else + { + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); + } + } + } + + do_cleanups (back_to); + } + else + { + /* No children, must be stub. */ + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + } + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; + + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); + + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ + +static void +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + type = alloc_type (objfile); + + TYPE_CODE (type) = TYPE_CODE_ENUM; + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + const char *name = DW_STRING (attr); + + if (processing_has_namespace_info) + { + TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + processing_current_prefix[0] == '\0' + ? "" : "::", + name); + } + else + { + TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), + &objfile->objfile_obstack); + } + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + + num_fields = 0; + fields = NULL; + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag != DW_TAG_enumerator) + { + process_die (child_die, cu); + } + else + { + attr = dwarf2_attr (child_die, DW_AT_name, cu); + if (attr) + { + sym = new_symbol (child_die, die->type, cu); + if (SYMBOL_VALUE (sym) < 0) + unsigned_enum = 0; + + if ((num_fields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fields = (struct field *) + xrealloc (fields, + (num_fields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct field)); + } + + FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym); + FIELD_TYPE (fields[num_fields]) = NULL; + FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + FIELD_BITSIZE (fields[num_fields]) = 0; + FIELD_STATIC_KIND (fields[num_fields]) = 0; + + num_fields++; + } + } + + child_die = sibling_die (child_die); + } + + if (num_fields) + { + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, + sizeof (struct field) * num_fields); + xfree (fields); + } + if (unsigned_enum) + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; + } + + new_symbol (die, die->type, cu); +} + +/* Extract all information from a DW_TAG_array_type DIE and put it in + the DIE's type field. For now, this only handles one dimensional + arrays. */ + +static void +read_array_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct type *type = NULL; + struct type *element_type, *range_type, *index_type; + struct type **range_types = NULL; + struct attribute *attr; + int ndim = 0; + struct cleanup *back_to; + + /* Return if we've already decoded this type. */ + if (die->type) + { + return; + } + + element_type = die_type (die, cu); + + /* Irix 6.2 native cc creates array types without children for + arrays with unspecified length. */ + if (die->child == NULL) + { + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 0, -1); + die->type = create_array_type (NULL, element_type, range_type); + return; + } + + back_to = make_cleanup (null_cleanup, NULL); + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_subrange_type) + { + read_subrange_type (child_die, cu); + + if (child_die->type != NULL) + { + /* The range type was succesfully read. Save it for + the array type creation. */ + if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0) + { + range_types = (struct type **) + xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct type *)); + if (ndim == 0) + make_cleanup (free_current_contents, &range_types); + } + range_types[ndim++] = child_die->type; + } + } + child_die = sibling_die (child_die); + } + + /* Dwarf2 dimensions are output from left to right, create the + necessary array types in backwards order. */ + type = element_type; + while (ndim-- > 0) + type = create_array_type (NULL, type, range_types[ndim]); + + /* Understand Dwarf2 support for vector types (like they occur on + the PowerPC w/ AltiVec). Gcc just adds another attribute to the + array type. This is not part of the Dwarf2/3 standard yet, but a + custom vendor extension. The main difference between a regular + array and the vector variant is that vectors are passed by value + to functions. */ + attr = dwarf2_attr (die, DW_AT_GNU_vector, cu); + if (attr) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; + + do_cleanups (back_to); + + /* Install the type in the die. */ + die->type = type; +} + +/* First cut: install each common block member as a global variable. */ + +static void +read_common_block (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *child_die; + struct attribute *attr; + struct symbol *sym; + CORE_ADDR base = (CORE_ADDR) 0; + + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + base = decode_locdesc (DW_BLOCK (attr), cu); + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "common block member"); + } + } + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + sym = new_symbol (child_die, NULL, cu); + attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = + base + decode_locdesc (DW_BLOCK (attr), cu); + add_symbol_to_list (sym, &global_symbols); + } + child_die = sibling_die (child_die); + } + } +} + +/* Read a C++ namespace. */ + +static void +read_namespace (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + const char *name; + int is_anonymous; + struct die_info *current_die; + + name = namespace_name (die, &is_anonymous, cu); + + /* Now build the name of the current namespace. */ + + if (previous_prefix[0] == '\0') + { + processing_current_prefix = name; + } + else + { + /* We need temp_name around because processing_current_prefix + is a const char *. */ + char *temp_name = alloca (strlen (previous_prefix) + + 2 + strlen(name) + 1); + strcpy (temp_name, previous_prefix); + strcat (temp_name, "::"); + strcat (temp_name, name); + + processing_current_prefix = temp_name; + } + + /* Add a symbol associated to this if we haven't seen the namespace + before. Also, add a using directive if it's an anonymous + namespace. */ + + if (dwarf2_extension (die, cu) == NULL) + { + struct type *type; + + /* FIXME: carlton/2003-06-27: Once GDB is more const-correct, + this cast will hopefully become unnecessary. */ + type = init_type (TYPE_CODE_NAMESPACE, 0, 0, + (char *) processing_current_prefix, + objfile); + TYPE_TAG_NAME (type) = TYPE_NAME (type); + + new_symbol (die, type, cu); + die->type = type; + + if (is_anonymous) + cp_add_using_directive (processing_current_prefix, + strlen (previous_prefix), + strlen (processing_current_prefix)); + } + + if (die->child != NULL) + { + struct die_info *child_die = die->child; + + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + processing_current_prefix = previous_prefix; +} + +/* Return the name of the namespace represented by DIE. Set + *IS_ANONYMOUS to tell whether or not the namespace is an anonymous + namespace. */ + +static const char * +namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu) +{ + struct die_info *current_die; + const char *name = NULL; + + /* Loop through the extensions until we find a name. */ + + for (current_die = die; + current_die != NULL; + current_die = dwarf2_extension (die, cu)) + { + name = dwarf2_name (current_die, cu); + if (name != NULL) + break; + } + + /* Is it an anonymous namespace? */ + + *is_anonymous = (name == NULL); + if (*is_anonymous) + name = "(anonymous namespace)"; + + return name; +} + +/* Extract all information from a DW_TAG_pointer_type DIE and add to + the user defined type vector. */ + +static void +read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr_byte_size; + struct attribute *attr_address_class; + int byte_size, addr_class; + + if (die->type) + { + return; + } + + type = lookup_pointer_type (die_type (die, cu)); + + attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr_byte_size) + byte_size = DW_UNSND (attr_byte_size); + else + byte_size = cu_header->addr_size; + + attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu); + if (attr_address_class) + addr_class = DW_UNSND (attr_address_class); + else + addr_class = DW_ADDR_none; + + /* If the pointer size or address class is different than the + default, create a type variant marked as such and set the + length accordingly. */ + if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) + { + if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + { + int type_flags; + + type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); + type = make_type_with_address_space (type, type_flags); + } + else if (TYPE_LENGTH (type) != byte_size) + { + complaint (&symfile_complaints, "invalid pointer size %d", byte_size); + } + else { + /* Should we also complain about unhandled address classes? */ + } + } + + TYPE_LENGTH (type) = byte_size; + die->type = type; +} + +/* Extract all information from a DW_TAG_ptr_to_member_type DIE and add to + the user defined type vector. */ + +static void +read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct type *to_type; + struct type *domain; + + if (die->type) + { + return; + } + + type = alloc_type (objfile); + to_type = die_type (die, cu); + domain = die_containing_type (die, cu); + smash_to_member_type (type, domain, to_type); + + die->type = type; +} + +/* Extract all information from a DW_TAG_reference_type DIE and add to + the user defined type vector. */ + +static void +read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr; + + if (die->type) + { + return; + } + + type = lookup_reference_type (die_type (die, cu)); + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = cu_header->addr_size; + } + die->type = type; +} + +static void +read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); +} + +static void +read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0); +} + +/* Extract all information from a DW_TAG_string_type DIE and add to + the user defined type vector. It isn't really a user defined type, + but it behaves like one, with other DIE's using an AT_user_def_type + attribute to reference it. */ + +static void +read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type, *range_type, *index_type, *char_type; + struct attribute *attr; + unsigned int length; + + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_string_length, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + /* check for the DW_AT_byte_size attribute */ + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + length = 1; + } + } + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 1, length); + if (cu->language == language_fortran) + { + /* Need to create a unique string type for bounds + information */ + type = create_string_type (0, range_type); + } + else + { + char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu); + type = create_string_type (char_type, range_type); + } + die->type = type; +} + +/* Handle DIES due to C code like: + + struct foo + { + int (*funcp)(int a, long l); + int b; + }; + + ('funcp' generates a DW_TAG_subroutine_type DIE) + */ + +static void +read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; /* Type that this function returns */ + struct type *ftype; /* Function that returns above type */ + struct attribute *attr; + + /* Decode the type that this subroutine returns */ + if (die->type) + { + return; + } + type = die_type (die, cu); + ftype = lookup_function_type (type); + + /* All functions in C++ have prototypes. */ + attr = dwarf2_attr (die, DW_AT_prototyped, cu); + if ((attr && (DW_UNSND (attr) != 0)) + || cu->language == language_cplus) + TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED; + + if (die->child != NULL) + { + struct die_info *child_die; + int nparams = 0; + int iparams = 0; + + /* Count the number of parameters. + FIXME: GDB currently ignores vararg functions, but knows about + vararg member functions. */ + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + nparams++; + else if (child_die->tag == DW_TAG_unspecified_parameters) + TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS; + child_die = sibling_die (child_die); + } + + /* Allocate storage for parameters and fill them in. */ + TYPE_NFIELDS (ftype) = nparams; + TYPE_FIELDS (ftype) = (struct field *) + TYPE_ALLOC (ftype, nparams * sizeof (struct field)); + + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + { + /* Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We pass this information + to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL. */ + attr = dwarf2_attr (child_die, DW_AT_artificial, cu); + if (attr) + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr); + else + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; + TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu); + iparams++; + } + child_die = sibling_die (child_die); + } + } + + die->type = ftype; +} + +static void +read_typedef (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + char *name = NULL; + + if (!die->type) + { + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + name = DW_STRING (attr); + } + die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB, name, objfile); + TYPE_TARGET_TYPE (die->type) = die_type (die, cu); + } +} + +/* Find a representation of a given base type and install + it in the TYPE field of the die. */ + +static void +read_base_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + int encoding = 0, size = 0; + + /* If we've already decoded this die, this is a no-op. */ + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_encoding, cu); + if (attr) + { + encoding = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + size = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + enum type_code code = TYPE_CODE_INT; + int type_flags = 0; + + switch (encoding) + { + case DW_ATE_address: + /* Turn DW_ATE_address into a void * pointer. */ + code = TYPE_CODE_PTR; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_boolean: + code = TYPE_CODE_BOOL; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_complex_float: + code = TYPE_CODE_COMPLEX; + break; + case DW_ATE_float: + code = TYPE_CODE_FLT; + break; + case DW_ATE_signed: + case DW_ATE_signed_char: + break; + case DW_ATE_unsigned: + case DW_ATE_unsigned_char: + type_flags |= TYPE_FLAG_UNSIGNED; + break; + default: + complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'", + dwarf_type_encoding_name (encoding)); + break; + } + type = init_type (code, size, type_flags, DW_STRING (attr), objfile); + if (encoding == DW_ATE_address) + TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID, + cu); + else if (encoding == DW_ATE_complex_float) + { + if (size == 32) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu); + else if (size == 16) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + else if (size == 8) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + } + else + { + type = dwarf_base_type (encoding, size, cu); + } + die->type = type; +} + +/* Read the given DW_AT_subrange DIE. */ + +static void +read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + struct type *range_type; + struct attribute *attr; + int low = 0; + int high = -1; + + /* If we have already decoded this die, then nothing more to do. */ + if (die->type) + return; + + base_type = die_type (die, cu); + if (base_type == NULL) + { + complaint (&symfile_complaints, + "DW_AT_type missing from DW_TAG_subrange_type"); + return; + } + + if (TYPE_CODE (base_type) == TYPE_CODE_VOID) + base_type = alloc_type (NULL); + + if (cu->language == language_fortran) + { + /* FORTRAN implies a lower bound of 1, if not given. */ + low = 1; + } + + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); + if (attr) + low = dwarf2_get_attr_constant_value (attr, 0); + + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (attr) + { + if (attr->form == DW_FORM_block1) + { + /* GCC encodes arrays with unspecified or dynamic length + with a DW_FORM_block1 attribute. + FIXME: GDB does not yet know how to handle dynamic + arrays properly, treat them as arrays with unspecified + length for now. + + FIXME: jimb/2003-09-22: GDB does not really know + how to handle arrays of unspecified length + either; we just represent them as zero-length + arrays. Choose an appropriate upper bound given + the lower bound we've computed above. */ + high = low - 1; + } + else + high = dwarf2_get_attr_constant_value (attr, 1); + } + + range_type = create_range_type (NULL, base_type, low, high); + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + TYPE_NAME (range_type) = DW_STRING (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + TYPE_LENGTH (range_type) = DW_UNSND (attr); + + die->type = range_type; +} + + +/* Read a whole compilation unit into a linked list of dies. */ + +static struct die_info * +read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu) +{ + /* Reset die reference table; we are + building new ones now. */ + dwarf2_empty_hash_tables (); + + return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL); +} + +/* Read a single die and all its descendents. Set the die's sibling + field to NULL; set other fields in the die correctly, and set all + of the descendents' fields correctly. Set *NEW_INFO_PTR to the + location of the info_ptr after reading all of those dies. PARENT + is the parent of the die in question. */ + +static struct die_info * +read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *die; + char *cur_ptr; + int has_children; + + cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children); + store_in_ref_table (die->offset, die); + + if (has_children) + { + die->child = read_die_and_siblings (cur_ptr, abfd, cu, + new_info_ptr, die); + } + else + { + die->child = NULL; + *new_info_ptr = cur_ptr; + } + + die->sibling = NULL; + die->parent = parent; + return die; +} + +/* Read a die, all of its descendents, and all of its siblings; set + all of the fields of all of the dies correctly. Arguments are as + in read_die_and_children. */ + +static struct die_info * +read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *first_die, *last_sibling; + char *cur_ptr; + + cur_ptr = info_ptr; + first_die = last_sibling = NULL; + + while (1) + { + struct die_info *die + = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent); + + if (!first_die) + { + first_die = die; + } + else + { + last_sibling->sibling = die; + } + + if (die->tag == 0) + { + *new_info_ptr = cur_ptr; + return first_die; + } + else + { + last_sibling = die; + } + } +} + +/* Free a linked list of dies. */ + +static void +free_die_list (struct die_info *dies) +{ + struct die_info *die, *next; + + die = dies; + while (die) + { + if (die->child != NULL) + free_die_list (die->child); + next = die->sibling; + xfree (die->attrs); + xfree (die); + die = next; + } +} + +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + +/* Read the contents of the section at OFFSET and of size SIZE from the + object file specified by OBJFILE into the objfile_obstack and return it. */ + +char * +dwarf2_read_section (struct objfile *objfile, asection *sectp) +{ + bfd *abfd = objfile->obfd; + char *buf, *retbuf; + bfd_size_type size = bfd_get_section_size_before_reloc (sectp); + + if (size == 0) + return NULL; + + buf = (char *) obstack_alloc (&objfile->objfile_obstack, size); + retbuf + = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf); + if (retbuf != NULL) + return retbuf; + + if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 + || bfd_bread (buf, size, abfd) != size) + error ("Dwarf Error: Can't read DWARF data from '%s'", + bfd_get_filename (abfd)); + + return buf; +} + +/* In DWARF version 2, the description of the debugging information is + stored in a separate .debug_abbrev section. Before we read any + dies from a section we read in all abbreviations and install them + in a hash table. */ + +static void +dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + char *abbrev_ptr; + struct abbrev_info *cur_abbrev; + unsigned int abbrev_number, bytes_read, abbrev_name; + unsigned int abbrev_form, hash_number; + + /* Initialize dwarf2 abbrevs */ + memset (cu_header->dwarf2_abbrevs, 0, + ABBREV_HASH_SIZE*sizeof (struct abbrev_info *)); + + abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + + /* loop until we reach an abbrev number of 0 */ + while (abbrev_number) + { + cur_abbrev = dwarf_alloc_abbrev (); + + /* read in abbrev header */ + cur_abbrev->number = abbrev_number; + cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + abbrev_ptr += 1; + + /* now read in declarations */ + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + while (abbrev_name) + { + if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) + { + cur_abbrev->attrs = (struct attr_abbrev *) + xrealloc (cur_abbrev->attrs, + (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK) + * sizeof (struct attr_abbrev)); + } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; + cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + } + + hash_number = abbrev_number % ABBREV_HASH_SIZE; + cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number]; + cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev; + + /* Get next abbreviation. + Under Irix6 the abbreviations for a compilation unit are not + always properly terminated with an abbrev number of 0. + Exit loop if we encounter an abbreviation which we have + already read (which means we are about to read the abbreviations + for the next compile unit) or if the end of the abbreviation + table is reached. */ + if ((unsigned int) (abbrev_ptr - dwarf_abbrev_buffer) + >= dwarf_abbrev_size) + break; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL) + break; + } +} + +/* Empty the abbrev table for a new compilation unit. */ + +static void +dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table) +{ + int i; + struct abbrev_info *abbrev, *next; + struct abbrev_info **abbrevs; + + abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table; + + for (i = 0; i < ABBREV_HASH_SIZE; ++i) + { + next = NULL; + abbrev = abbrevs[i]; + while (abbrev) + { + next = abbrev->next; + xfree (abbrev->attrs); + xfree (abbrev); + abbrev = next; + } + abbrevs[i] = NULL; + } +} + +/* Lookup an abbrev_info structure in the abbrev hash table. */ + +static struct abbrev_info * +dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int hash_number; + struct abbrev_info *abbrev; + + hash_number = number % ABBREV_HASH_SIZE; + abbrev = cu_header->dwarf2_abbrevs[hash_number]; + + while (abbrev) + { + if (abbrev->number == number) + return abbrev; + else + abbrev = abbrev->next; + } + return NULL; +} + +/* Read a minimal amount of information into the minimal die structure. */ + +static char * +read_partial_die (struct partial_die_info *part_die, bfd *abfd, + char *info_ptr, struct dwarf2_cu *cu) +{ + unsigned int abbrev_number, bytes_read, i; + struct abbrev_info *abbrev; + struct attribute attr; + struct attribute spec_attr; + int found_spec_attr = 0; + int has_low_pc_attr = 0; + int has_high_pc_attr = 0; + + *part_die = zeroed_partial_die; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + return info_ptr; + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + bfd_get_filename (abfd)); + } + part_die->offset = info_ptr - dwarf_info_buffer; + part_die->tag = abbrev->tag; + part_die->has_children = abbrev->has_children; + part_die->abbrev = abbrev_number; + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu); + + /* Store the data if it is of an attribute we want to keep in a + partial symbol table. */ + switch (attr.name) + { + case DW_AT_name: + + /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ + if (part_die->name == NULL) + part_die->name = DW_STRING (&attr); + break; + case DW_AT_MIPS_linkage_name: + part_die->name = DW_STRING (&attr); + break; + case DW_AT_low_pc: + has_low_pc_attr = 1; + part_die->lowpc = DW_ADDR (&attr); + break; + case DW_AT_high_pc: + has_high_pc_attr = 1; + part_die->highpc = DW_ADDR (&attr); + break; + case DW_AT_location: + /* Support the .debug_loc offsets */ + if (attr_form_is_block (&attr)) + { + part_die->locdesc = DW_BLOCK (&attr); + } + else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "partial symbol information"); + } + break; + case DW_AT_language: + part_die->language = DW_UNSND (&attr); + break; + case DW_AT_external: + part_die->is_external = DW_UNSND (&attr); + break; + case DW_AT_declaration: + part_die->is_declaration = DW_UNSND (&attr); + break; + case DW_AT_type: + part_die->has_type = 1; + break; + case DW_AT_abstract_origin: + case DW_AT_specification: + found_spec_attr = 1; + spec_attr = attr; + break; + case DW_AT_sibling: + /* Ignore absolute siblings, they might point outside of + the current compile unit. */ + if (attr.form == DW_FORM_ref_addr) + complaint (&symfile_complaints, "ignoring absolute DW_AT_sibling"); + else + part_die->sibling = + dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu); + break; + default: + break; + } + } + + /* If we found a reference attribute and the die has no name, try + to find a name in the referred to die. */ + + if (found_spec_attr && part_die->name == NULL) + { + struct partial_die_info spec_die; + char *spec_ptr; + + spec_ptr = dwarf_info_buffer + + dwarf2_get_ref_die_offset (&spec_attr, cu); + read_partial_die (&spec_die, abfd, spec_ptr, cu); + if (spec_die.name) + { + part_die->name = spec_die.name; + + /* Copy DW_AT_external attribute if it is set. */ + if (spec_die.is_external) + part_die->is_external = spec_die.is_external; + } + } + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (has_low_pc_attr && has_high_pc_attr + && part_die->lowpc < part_die->highpc + && (part_die->lowpc != 0 + || (bfd_get_file_flags (abfd) & HAS_RELOC))) + part_die->has_pc_info = 1; + return info_ptr; +} + +/* Read the die from the .debug_info section buffer. Set DIEP to + point to a newly allocated die with its information, except for its + child, sibling, and parent fields. Set HAS_CHILDREN to tell + whether the die has children or not. */ + +static char * +read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu, int *has_children) +{ + unsigned int abbrev_number, bytes_read, i, offset; + struct abbrev_info *abbrev; + struct die_info *die; + + offset = info_ptr - dwarf_info_buffer; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + { + die = dwarf_alloc_die (); + die->tag = 0; + die->abbrev = abbrev_number; + die->type = NULL; + *diep = die; + *has_children = 0; + return info_ptr; + } + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: could not find abbrev number %d [in module %s]", + abbrev_number, + bfd_get_filename (abfd)); + } + die = dwarf_alloc_die (); + die->offset = offset; + die->tag = abbrev->tag; + die->abbrev = abbrev_number; + die->type = NULL; + + die->num_attrs = abbrev->num_attrs; + die->attrs = (struct attribute *) + xmalloc (die->num_attrs * sizeof (struct attribute)); + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i], + abfd, info_ptr, cu); + } + + *diep = die; + *has_children = abbrev->has_children; + return info_ptr; +} + +/* Read an attribute value described by an attribute form. */ + +static char * +read_attribute_value (struct attribute *attr, unsigned form, + bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int bytes_read; + struct dwarf_block *blk; + + attr->form = form; + switch (form) + { + case DW_FORM_addr: + case DW_FORM_ref_addr: + DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block2: + blk = dwarf_alloc_block (); + blk->size = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block4: + blk = dwarf_alloc_block (); + blk->size = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_data4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_data8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_string: + DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block: + blk = dwarf_alloc_block (); + blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block1: + blk = dwarf_alloc_block (); + blk->size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_flag: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_sdata: + DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_ref1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_ref2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_ref4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_ref8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_ref_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); + break; + default: + error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + dwarf_form_name (form), + bfd_get_filename (abfd)); + } + return info_ptr; +} + +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (struct attribute *attr, struct attr_abbrev *abbrev, + bfd *abfd, char *info_ptr, struct dwarf2_cu *cu) +{ + attr->name = abbrev->name; + return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu); +} + +/* read dwarf information from a buffer */ + +static unsigned int +read_1_byte (bfd *abfd, char *buf) +{ + return bfd_get_8 (abfd, (bfd_byte *) buf); +} + +static int +read_1_signed_byte (bfd *abfd, char *buf) +{ + return bfd_get_signed_8 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_2_bytes (bfd *abfd, char *buf) +{ + return bfd_get_16 (abfd, (bfd_byte *) buf); +} + +static int +read_2_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_16 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_4_bytes (bfd *abfd, char *buf) +{ + return bfd_get_32 (abfd, (bfd_byte *) buf); +} + +static int +read_4_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_32 (abfd, (bfd_byte *) buf); +} + +static unsigned long +read_8_bytes (bfd *abfd, char *buf) +{ + return bfd_get_64 (abfd, (bfd_byte *) buf); +} + +static CORE_ADDR +read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read) +{ + struct comp_unit_head *cu_header = &cu->header; + CORE_ADDR retval = 0; + + if (cu_header->signed_addr_p) + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_signed_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_signed_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, signed [in module %s]", + bfd_get_filename (abfd)); + } + } + else + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, unsigned [in module %s]", + bfd_get_filename (abfd)); + } + } + + *bytes_read = cu_header->addr_size; + return retval; +} + +/* Read the initial length from a section. The (draft) DWARF 3 + specification allows the initial length to take up either 4 bytes + or 12 bytes. If the first 4 bytes are 0xffffffff, then the next 8 + bytes describe the length and all offsets will be 8 bytes in length + instead of 4. + + An older, non-standard 64-bit format is also handled by this + function. The older format in question stores the initial length + as an 8-byte quantity without an escape value. Lengths greater + than 2^32 aren't very common which means that the initial 4 bytes + is almost always zero. Since a length value of zero doesn't make + sense for the 32-bit format, this initial zero can be considered to + be an escape value which indicates the presence of the older 64-bit + format. As written, the code can't detect (old format) lengths + greater than 4GB. If it becomes necessary to handle lengths somewhat + larger than 4GB, we could allow other small values (such as the + non-sensical values of 1, 2, and 3) to also be used as escape values + indicating the presence of the old format. + + The value returned via bytes_read should be used to increment + the relevant pointer after calling read_initial_length(). + + As a side effect, this function sets the fields initial_length_size + and offset_size in cu_header to the values appropriate for the + length field. (The format of the initial length field determines + the width of file offsets to be fetched later with fetch_offset().) + + [ Note: read_initial_length() and read_offset() are based on the + document entitled "DWARF Debugging Information Format", revision + 3, draft 8, dated November 19, 2001. This document was obtained + from: + + http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf + + This document is only a draft and is subject to change. (So beware.) + + Details regarding the older, non-standard 64-bit format were + determined empirically by examining 64-bit ELF files produced + by the SGI toolchain on an IRIX 6.5 machine. + + - Kevin, July 16, 2002 + ] */ + +static LONGEST +read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + + if (retval == 0xffffffff) + { + retval = bfd_get_64 (abfd, (bfd_byte *) buf + 4); + *bytes_read = 12; + if (cu_header != NULL) + { + cu_header->initial_length_size = 12; + cu_header->offset_size = 8; + } + } + else if (retval == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats such as that used + by IRIX. */ + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + if (cu_header != NULL) + { + cu_header->initial_length_size = 8; + cu_header->offset_size = 8; + } + } + else + { + *bytes_read = 4; + if (cu_header != NULL) + { + cu_header->initial_length_size = 4; + cu_header->offset_size = 4; + } + } + + return retval; +} + +/* Read an offset from the data stream. The size of the offset is + given by cu_header->offset_size. */ + +static LONGEST +read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + switch (cu_header->offset_size) + { + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + *bytes_read = 4; + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + break; + default: + internal_error (__FILE__, __LINE__, + "read_offset: bad switch [in module %s]", + bfd_get_filename (abfd)); + } + + return retval; +} + +static char * +read_n_bytes (bfd *abfd, char *buf, unsigned int size) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the buffer, otherwise we have to copy the data to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + return buf; +} + +static char * +read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the string, otherwise we have to copy the string to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + if (*buf == '\0') + { + *bytes_read_ptr = 1; + return NULL; + } + *bytes_read_ptr = strlen (buf) + 1; + return buf; +} + +static char * +read_indirect_string (bfd *abfd, char *buf, + const struct comp_unit_head *cu_header, + unsigned int *bytes_read_ptr) +{ + LONGEST str_offset = read_offset (abfd, buf, cu_header, + (int *) bytes_read_ptr); + + if (dwarf_str_buffer == NULL) + { + error ("DW_FORM_strp used without .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + if (str_offset >= dwarf_str_size) + { + error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + gdb_assert (HOST_CHAR_BIT == 8); + if (dwarf_str_buffer[str_offset] == '\0') + return NULL; + return dwarf_str_buffer + str_offset; +} + +static unsigned long +read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + unsigned long result; + unsigned int num_read; + int i, shift; + unsigned char byte; + + result = 0; + shift = 0; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((unsigned long)(byte & 127) << shift); + if ((byte & 128) == 0) + { + break; + } + shift += 7; + } + *bytes_read_ptr = num_read; + return result; +} + +static long +read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + long result; + int i, shift, size, num_read; + unsigned char byte; + + result = 0; + shift = 0; + size = 32; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((long)(byte & 127) << shift); + shift += 7; + if ((byte & 128) == 0) + { + break; + } + } + if ((shift < size) && (byte & 0x40)) + { + result |= -(1 << shift); + } + *bytes_read_ptr = num_read; + return result; +} + +static void +set_cu_language (unsigned int lang, struct dwarf2_cu *cu) +{ + switch (lang) + { + case DW_LANG_C89: + case DW_LANG_C: + cu->language = language_c; + break; + case DW_LANG_C_plus_plus: + cu->language = language_cplus; + break; + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + cu->language = language_fortran; + break; + case DW_LANG_Mips_Assembler: + cu->language = language_asm; + break; + case DW_LANG_Java: + cu->language = language_java; + break; + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + default: + cu->language = language_minimal; + break; + } + cu->language_defn = language_def (cu->language); +} + +/* Return the named attribute or NULL if not there. */ + +static struct attribute * +dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) +{ + unsigned int i; + struct attribute *spec = NULL; + + for (i = 0; i < die->num_attrs; ++i) + { + if (die->attrs[i].name == name) + { + return &die->attrs[i]; + } + if (die->attrs[i].name == DW_AT_specification + || die->attrs[i].name == DW_AT_abstract_origin) + spec = &die->attrs[i]; + } + if (spec) + { + struct die_info *ref_die = + follow_die_ref (dwarf2_get_ref_die_offset (spec, cu)); + + if (ref_die) + return dwarf2_attr (ref_die, name, cu); + } + + return NULL; +} + +static int +die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) +{ + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); +} + +/* Return the die giving the specification for DIE, if there is + one. */ + +static struct die_info * +die_specification (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu); + + if (spec_attr == NULL) + return NULL; + else + return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu)); +} + +/* Free the line_header structure *LH, and any arrays and strings it + refers to. */ +static void +free_line_header (struct line_header *lh) +{ + if (lh->standard_opcode_lengths) + xfree (lh->standard_opcode_lengths); + + /* Remember that all the lh->file_names[i].name pointers are + pointers into debug_line_buffer, and don't need to be freed. */ + if (lh->file_names) + xfree (lh->file_names); + + /* Similarly for the include directory names. */ + if (lh->include_dirs) + xfree (lh->include_dirs); + + xfree (lh); +} + + +/* Add an entry to LH's include directory table. */ +static void +add_include_dir (struct line_header *lh, char *include_dir) +{ + /* Grow the array if necessary. */ + if (lh->include_dirs_size == 0) + { + lh->include_dirs_size = 1; /* for testing */ + lh->include_dirs = xmalloc (lh->include_dirs_size + * sizeof (*lh->include_dirs)); + } + else if (lh->num_include_dirs >= lh->include_dirs_size) + { + lh->include_dirs_size *= 2; + lh->include_dirs = xrealloc (lh->include_dirs, + (lh->include_dirs_size + * sizeof (*lh->include_dirs))); + } + + lh->include_dirs[lh->num_include_dirs++] = include_dir; +} + + +/* Add an entry to LH's file name table. */ +static void +add_file_name (struct line_header *lh, + char *name, + unsigned int dir_index, + unsigned int mod_time, + unsigned int length) +{ + struct file_entry *fe; + + /* Grow the array if necessary. */ + if (lh->file_names_size == 0) + { + lh->file_names_size = 1; /* for testing */ + lh->file_names = xmalloc (lh->file_names_size + * sizeof (*lh->file_names)); + } + else if (lh->num_file_names >= lh->file_names_size) + { + lh->file_names_size *= 2; + lh->file_names = xrealloc (lh->file_names, + (lh->file_names_size + * sizeof (*lh->file_names))); + } + + fe = &lh->file_names[lh->num_file_names++]; + fe->name = name; + fe->dir_index = dir_index; + fe->mod_time = mod_time; + fe->length = length; +} + + +/* Read the statement program header starting at OFFSET in + dwarf_line_buffer, according to the endianness of ABFD. Return a + pointer to a struct line_header, allocated using xmalloc. + + NOTE: the strings in the include directory and file name tables of + the returned object point into debug_line_buffer, and must not be + freed. */ +static struct line_header * +dwarf_decode_line_header (unsigned int offset, bfd *abfd, + struct dwarf2_cu *cu) +{ + struct cleanup *back_to; + struct line_header *lh; + char *line_ptr; + int bytes_read; + int i; + char *cur_dir, *cur_file; + + if (dwarf_line_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_line section"); + return 0; + } + + /* Make sure that at least there's room for the total_length field. That + could be 12 bytes long, but we're just going to fudge that. */ + if (offset + 4 >= dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + + lh = xmalloc (sizeof (*lh)); + memset (lh, 0, sizeof (*lh)); + back_to = make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) lh); + + line_ptr = dwarf_line_buffer + offset; + + /* read in the header */ + lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read); + line_ptr += bytes_read; + if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + lh->statement_program_end = line_ptr + lh->total_length; + lh->version = read_2_bytes (abfd, line_ptr); + line_ptr += 2; + lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read); + line_ptr += bytes_read; + lh->minimum_instruction_length = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->default_is_stmt = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_base = read_1_signed_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_range = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->opcode_base = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->standard_opcode_lengths + = (unsigned char *) xmalloc (lh->opcode_base * sizeof (unsigned char)); + + lh->standard_opcode_lengths[0] = 1; /* This should never be used anyway. */ + for (i = 1; i < lh->opcode_base; ++i) + { + lh->standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + line_ptr += 1; + } + + /* Read directory table */ + while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + line_ptr += bytes_read; + add_include_dir (lh, cur_dir); + } + line_ptr += bytes_read; + + /* Read file name table */ + while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + unsigned int dir_index, mod_time, length; + + line_ptr += bytes_read; + dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + line_ptr += bytes_read; + lh->statement_program_start = line_ptr; + + if (line_ptr > dwarf_line_buffer + dwarf_line_size) + complaint (&symfile_complaints, + "line number info header doesn't fit in `.debug_line' section"); + + discard_cleanups (back_to); + return lh; +} + +/* This function exists to work around a bug in certain compilers + (particularly GCC 2.95), in which the first line number marker of a + function does not show up until after the prologue, right before + the second line number marker. This function shifts ADDRESS down + to the beginning of the function if necessary, and is called on + addresses passed to record_line. */ + +static CORE_ADDR +check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu) +{ + struct function_range *fn; + + /* Find the function_range containing address. */ + if (!cu->first_fn) + return address; + + if (!cu->cached_fn) + cu->cached_fn = cu->first_fn; + + fn = cu->cached_fn; + while (fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + fn = cu->first_fn; + while (fn && fn != cu->cached_fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + return address; + + found: + if (fn->seen_line) + return address; + if (address != fn->lowpc) + complaint (&symfile_complaints, + "misplaced first line number at 0x%lx for '%s'", + (unsigned long) address, fn->name); + fn->seen_line = 1; + return fn->lowpc; +} + +/* Decode the line number information for the compilation unit whose + line number info is at OFFSET in the .debug_line section. + The compilation directory of the file is passed in COMP_DIR. */ + +static void +dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *line_ptr; + char *line_end; + unsigned int bytes_read; + unsigned char op_code, extended_op, adj_opcode; + CORE_ADDR baseaddr; + struct objfile *objfile = cu->objfile; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + line_ptr = lh->statement_program_start; + line_end = lh->statement_program_end; + + /* Read the statement sequences until there's nothing left. */ + while (line_ptr < line_end) + { + /* state machine registers */ + CORE_ADDR address = 0; + unsigned int file = 1; + unsigned int line = 1; + unsigned int column = 0; + int is_stmt = lh->default_is_stmt; + int basic_block = 0; + int end_sequence = 0; + + /* Start a subfile for the current file of the state machine. */ + if (lh->num_file_names >= file) + { + /* lh->include_dirs and lh->file_names are 0-based, but the + directory and file name numbers in the statement program + are 1-based. */ + struct file_entry *fe = &lh->file_names[file - 1]; + char *dir; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + + /* Decode the table. */ + while (!end_sequence) + { + op_code = read_1_byte (abfd, line_ptr); + line_ptr += 1; + + if (op_code >= lh->opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh->opcode_base; + address += (adj_opcode / lh->line_range) + * lh->minimum_instruction_length; + line += lh->line_base + (adj_opcode % lh->line_range); + /* append row to matrix using current values */ + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 1; + } + else switch (op_code) + { + case DW_LNS_extended_op: + line_ptr += 1; /* ignore length */ + extended_op = read_1_byte (abfd, line_ptr); + line_ptr += 1; + switch (extended_op) + { + case DW_LNE_end_sequence: + end_sequence = 1; + record_line (current_subfile, 0, address); + break; + case DW_LNE_set_address: + address = read_address (abfd, line_ptr, cu, &bytes_read); + line_ptr += bytes_read; + address += baseaddr; + break; + case DW_LNE_define_file: + { + char *cur_file; + unsigned int dir_index, mod_time, length; + + cur_file = read_string (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + dir_index = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + break; + default: + complaint (&symfile_complaints, + "mangled .debug_line section"); + return; + } + break; + case DW_LNS_copy: + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 0; + break; + case DW_LNS_advance_pc: + address += lh->minimum_instruction_length + * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_advance_line: + line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_set_file: + { + /* lh->include_dirs and lh->file_names are 0-based, + but the directory and file name numbers in the + statement program are 1-based. */ + struct file_entry *fe; + char *dir; + file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + fe = &lh->file_names[file - 1]; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + break; + case DW_LNS_set_column: + column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_negate_stmt: + is_stmt = (!is_stmt); + break; + case DW_LNS_set_basic_block: + basic_block = 1; + break; + /* Add to the address register of the state machine the + address increment value corresponding to special opcode + 255. Ie, this value is scaled by the minimum instruction + length since special opcode 255 would have scaled the + the increment. */ + case DW_LNS_const_add_pc: + address += (lh->minimum_instruction_length + * ((255 - lh->opcode_base) / lh->line_range)); + break; + case DW_LNS_fixed_advance_pc: + address += read_2_bytes (abfd, line_ptr); + line_ptr += 2; + break; + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh->standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } + } + } + } +} + +/* Start a subfile for DWARF. FILENAME is the name of the file and + DIRNAME the name of the source directory which contains FILENAME + or NULL if not known. + This routine tries to keep line numbers from identical absolute and + relative file names in a common subfile. + + Using the `list' example from the GDB testsuite, which resides in + /srcdir and compiling it with Irix6.2 cc in /compdir using a filename + of /srcdir/list0.c yields the following debugging information for list0.c: + + DW_AT_name: /srcdir/list0.c + DW_AT_comp_dir: /compdir + files.files[0].name: list0.h + files.files[0].dir: /srcdir + files.files[1].name: list0.c + files.files[1].dir: /srcdir + + The line number information for list0.c has to end up in a single + subfile, so that `break /srcdir/list0.c:1' works as expected. */ + +static void +dwarf2_start_subfile (char *filename, char *dirname) +{ + /* If the filename isn't absolute, try to match an existing subfile + with the full pathname. */ + + if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) + { + struct subfile *subfile; + char *fullname = concat (dirname, "/", filename, NULL); + + for (subfile = subfiles; subfile; subfile = subfile->next) + { + if (FILENAME_CMP (subfile->name, fullname) == 0) + { + current_subfile = subfile; + xfree (fullname); + return; + } + } + xfree (fullname); + } + start_subfile (filename, dirname); +} + +static void +var_decode_location (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + + /* NOTE drow/2003-01-30: There used to be a comment and some special + code here to turn a symbol with DW_AT_external and a + SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was + necessary for platforms (maybe Alpha, certainly PowerPC GNU/Linux + with some versions of binutils) where shared libraries could have + relocations against symbols in their debug information - the + minimal symbol would have the right address, but the debug info + would not. It's no longer necessary, because we will explicitly + apply relocations when we read in the debug information now. */ + + /* A DW_AT_location attribute with no contents indicates that a + variable has been optimized away. */ + if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0) + { + SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; + return; + } + + /* Handle one degenerate form of location expression specially, to + preserve GDB's previous behavior when section offsets are + specified. If this is just a DW_OP_addr then mark this symbol + as LOC_STATIC. */ + + if (attr_form_is_block (attr) + && DW_BLOCK (attr)->size == 1 + cu_header->addr_size + && DW_BLOCK (attr)->data[0] == DW_OP_addr) + { + int dummy; + + SYMBOL_VALUE_ADDRESS (sym) = + read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy); + fixup_symbol_section (sym, objfile); + SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, + SYMBOL_SECTION (sym)); + SYMBOL_CLASS (sym) = LOC_STATIC; + return; + } + + /* NOTE drow/2002-01-30: It might be worthwhile to have a static + expression evaluator, and use LOC_COMPUTED only when necessary + (i.e. when the value of a register or memory location is + referenced, or a thread-local block, etc.). Then again, it might + not be worthwhile. I'm assuming that it isn't unless performance + or memory numbers show me otherwise. */ + + dwarf2_symbol_mark_computed (attr, sym, cu); + SYMBOL_CLASS (sym) = LOC_COMPUTED; +} + +/* Given a pointer to a DWARF information entry, figure out if we need + to make a symbol table entry for it, and if so, create a new entry + and return a pointer to it. + If TYPE is NULL, determine symbol type from the die, otherwise + used the passed type. */ + +static struct symbol * +new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct symbol *sym = NULL; + char *name; + struct attribute *attr = NULL; + struct attribute *attr2 = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + + if (name) + { + sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + OBJSTAT (objfile, n_syms++); + memset (sym, 0, sizeof (struct symbol)); + + /* Cache this symbol's name and the name's demangled form (if any). */ + SYMBOL_LANGUAGE (sym) = cu->language; + SYMBOL_SET_NAMES (sym, name, strlen (name), objfile); + + /* Default assumptions. + Use the passed type or decode it from the die. */ + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_CLASS (sym) = LOC_STATIC; + if (type != NULL) + SYMBOL_TYPE (sym) = type; + else + SYMBOL_TYPE (sym) = die_type (die, cu); + attr = dwarf2_attr (die, DW_AT_decl_line, cu); + if (attr) + { + SYMBOL_LINE (sym) = DW_UNSND (attr); + } + switch (die->tag) + { + case DW_TAG_label: + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = DW_ADDR (attr) + baseaddr; + } + SYMBOL_CLASS (sym) = LOC_LABEL; + break; + case DW_TAG_subprogram: + /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by + finish_block. */ + SYMBOL_CLASS (sym) = LOC_BLOCK; + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + { + add_symbol_to_list (sym, &global_symbols); + } + else + { + add_symbol_to_list (sym, cu->list_in_scope); + } + break; + case DW_TAG_variable: + /* Compilation with minimal debug info may result in variables + with missing type entries. Change the misleading `void' type + to something sensible. */ + if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID) + SYMBOL_TYPE (sym) = init_type (TYPE_CODE_INT, + TARGET_INT_BIT / HOST_CHAR_BIT, 0, + "", + objfile); + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + break; + } + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + } + else + { + /* We do not know the address of this symbol. + If it is an external symbol and we have type information + for it, enter the symbol as a LOC_UNRESOLVED symbol. + The address of the variable will then be determined from + the minimal symbol table whenever the variable is + referenced. */ + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0) + && dwarf2_attr (die, DW_AT_type, cu) != NULL) + { + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; + add_symbol_to_list (sym, &global_symbols); + } + } + break; + case DW_TAG_formal_parameter: + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_unspecified_parameters: + /* From varargs functions; gdb doesn't seem to have any + interest in this information, so just ignore it for now. + (FIXME?) */ + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; + + /* Make sure that the symbol includes appropriate enclosing + classes/namespaces in its name. These are calculated in + read_structure_type, and the correct name is saved in + the type. */ + + if (cu->language == language_cplus) + { + struct type *type = SYMBOL_TYPE (sym); + + if (TYPE_TAG_NAME (type) != NULL) + { + /* FIXME: carlton/2003-11-10: Should this use + SYMBOL_SET_NAMES instead? (The same problem also + arises a further down in the function.) */ + SYMBOL_LINKAGE_NAME (sym) + = obsavestring (TYPE_TAG_NAME (type), + strlen (TYPE_TAG_NAME (type)), + &objfile->objfile_obstack); + } + } + + { + /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't + really ever be static objects: otherwise, if you try + to, say, break of a class's method and you're in a file + which doesn't mention that class, it won't work unless + the check for all static symbols in lookup_symbol_aux + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + + /* The semantics of C++ state that "struct foo { ... }" also + defines a typedef for "foo". Synthesize a typedef symbol so + that "ptype foo" works as expected. */ + if (cu->language == language_cplus) + { + struct symbol *typedef_sym = (struct symbol *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + *typedef_sym = *sym; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; + if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + TYPE_NAME (SYMBOL_TYPE (sym)) = + obsavestring (SYMBOL_NATURAL_NAME (sym), + strlen (SYMBOL_NATURAL_NAME (sym)), + &objfile->objfile_obstack); + add_symbol_to_list (typedef_sym, list_to_add); + } + } + break; + case DW_TAG_typedef: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_enumerator: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + { + /* NOTE: carlton/2003-11-10: See comment above in the + DW_TAG_class_type, etc. block. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + } + break; + case DW_TAG_namespace: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + add_symbol_to_list (sym, &global_symbols); + break; + default: + /* Not a tag we recognize. Hopefully we aren't processing + trash data, but since we must specifically ignore things + we don't recognize, there is nothing else we should do at + this point. */ + complaint (&symfile_complaints, "unsupported tag: '%s'", + dwarf_tag_name (die->tag)); + break; + } + } + return (sym); +} + +/* Copy constant value from an attribute to a symbol. */ + +static void +dwarf2_const_value (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct dwarf_block *blk; + + switch (attr->form) + { + case DW_FORM_addr: + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + cu_header->addr_size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); + /* NOTE: cagney/2003-05-09: In-lined store_address call with + it's body - store_unsigned_integer. */ + store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, + DW_ADDR (attr)); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + blk = DW_BLOCK (attr); + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + blk->size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, blk->size); + memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + + /* The DW_AT_const_value attributes are supposed to carry the + symbol's value "represented as it would be on the target + architecture." By the time we get here, it's already been + converted to host endianness, so we just need to sign- or + zero-extend it as appropriate. */ + case DW_FORM_data1: + dwarf2_const_value_data (attr, sym, 8); + break; + case DW_FORM_data2: + dwarf2_const_value_data (attr, sym, 16); + break; + case DW_FORM_data4: + dwarf2_const_value_data (attr, sym, 32); + break; + case DW_FORM_data8: + dwarf2_const_value_data (attr, sym, 64); + break; + + case DW_FORM_sdata: + SYMBOL_VALUE (sym) = DW_SND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + case DW_FORM_udata: + SYMBOL_VALUE (sym) = DW_UNSND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + default: + complaint (&symfile_complaints, + "unsupported const value attribute form: '%s'", + dwarf_form_name (attr->form)); + SYMBOL_VALUE (sym) = 0; + SYMBOL_CLASS (sym) = LOC_CONST; + break; + } +} + + +/* Given an attr with a DW_FORM_dataN value in host byte order, sign- + or zero-extend it as appropriate for the symbol's type. */ +static void +dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits) +{ + LONGEST l = DW_UNSND (attr); + + if (bits < sizeof (l) * 8) + { + if (TYPE_UNSIGNED (SYMBOL_TYPE (sym))) + l &= ((LONGEST) 1 << bits) - 1; + else + l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits); + } + + SYMBOL_VALUE (sym) = l; + SYMBOL_CLASS (sym) = LOC_CONST; +} + + +/* Return the type of the die in question using its DW_AT_type attribute. */ + +static struct type * +die_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *type_attr; + struct die_info *type_die; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_type, cu); + if (!type_attr) + { + /* A missing DW_AT_type represents a void type. */ + return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu); + } + else + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", + ref, cu->objfile->name); + return NULL; + } + } + type = tag_type_to_type (type_die, cu); + if (!type) + { + dump_die (type_die); + error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +/* Return the containing type of the die in question using its + DW_AT_containing_type attribute. */ + +static struct type * +die_containing_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type = NULL; + struct attribute *type_attr; + struct die_info *type_die = NULL; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_containing_type, cu); + if (type_attr) + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref, + cu->objfile->name); + return NULL; + } + type = tag_type_to_type (type_die, cu); + } + if (!type) + { + if (type_die) + dump_die (type_die); + error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +#if 0 +static struct type * +type_at_offset (unsigned int offset, struct dwarf2_cu *cu) +{ + struct die_info *die; + struct type *type; + + die = follow_die_ref (offset); + if (!die) + { + error ("Dwarf Error: Cannot find type referent at offset %d.", offset); + return NULL; + } + type = tag_type_to_type (die, cu); + return type; +} +#endif + +static struct type * +tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) +{ + if (die->type) + { + return die->type; + } + else + { + read_type_die (die, cu); + if (!die->type) + { + dump_die (die); + error ("Dwarf Error: Cannot find type of die [in module %s]", + cu->objfile->name); + } + return die->type; + } +} + +static void +read_type_die (struct die_info *die, struct dwarf2_cu *cu) +{ + char *prefix = determine_prefix (die, cu); + const char *old_prefix = processing_current_prefix; + struct cleanup *back_to = make_cleanup (xfree, prefix); + processing_current_prefix = prefix; + + switch (die->tag) + { + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +#ifdef CRASH_MERGE + process_structure_scope (die, cu); +#endif + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); +#ifdef CRASH_MERGE + process_enumeration_scope (die, cu); +#endif + break; + case DW_TAG_subprogram: + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_const_type: + read_tag_const_type (die, cu); + break; + case DW_TAG_volatile_type: + read_tag_volatile_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + case DW_TAG_typedef: + read_typedef (die, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + break; + case DW_TAG_base_type: + read_base_type (die, cu); +#ifdef CRASH_MERGE + new_symbol (die, die->type, cu); +#endif + break; + default: + complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'", + dwarf_tag_name (die->tag)); + break; + } + + processing_current_prefix = old_prefix; + do_cleanups (back_to); +} + +/* Return the name of the namespace/class that DIE is defined within, + or "" if we can't tell. The caller should xfree the result. */ + +/* NOTE: carlton/2004-01-23: See read_func_scope (and the comment + therein) for an example of how to use this function to deal with + DW_AT_specification. */ + +static char * +determine_prefix (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *parent; + + if (cu->language != language_cplus) + return NULL; + + parent = die->parent; + + if (parent == NULL) + { + return xstrdup (""); + } + else + { + switch (parent->tag) { + case DW_TAG_namespace: + { + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } + } + default: + return determine_prefix (parent, cu); + } + } +} + +/* Return a newly-allocated string formed by concatenating PREFIX, + "::", and SUFFIX, except that if PREFIX is NULL or the empty + string, just return a copy of SUFFIX. */ + +static char * +typename_concat (const char *prefix, const char *suffix) +{ + if (prefix == NULL || prefix[0] == '\0') + return xstrdup (suffix); + else + { + char *retval = xmalloc (strlen (prefix) + 2 + strlen (suffix) + 1); + + strcpy (retval, prefix); + strcat (retval, "::"); + strcat (retval, suffix); + + return retval; + } +} + +static struct type * +dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + + /* FIXME - this should not produce a new (struct type *) + every time. It should cache base types. */ + struct type *type; + switch (encoding) + { + case DW_ATE_address: + type = dwarf2_fundamental_type (objfile, FT_VOID, cu); + return type; + case DW_ATE_boolean: + type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu); + return type; + case DW_ATE_complex_float: + if (size == 16) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu); + } + return type; + case DW_ATE_float: + if (size == 8) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + return type; + case DW_ATE_signed: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_signed_char: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + return type; + case DW_ATE_unsigned: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_unsigned_char: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + return type; + default: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + return type; + } +} + +#if 0 +struct die_info * +copy_die (struct die_info *old_die) +{ + struct die_info *new_die; + int i, num_attrs; + + new_die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (new_die, 0, sizeof (struct die_info)); + + new_die->tag = old_die->tag; + new_die->has_children = old_die->has_children; + new_die->abbrev = old_die->abbrev; + new_die->offset = old_die->offset; + new_die->type = NULL; + + num_attrs = old_die->num_attrs; + new_die->num_attrs = num_attrs; + new_die->attrs = (struct attribute *) + xmalloc (num_attrs * sizeof (struct attribute)); + + for (i = 0; i < old_die->num_attrs; ++i) + { + new_die->attrs[i].name = old_die->attrs[i].name; + new_die->attrs[i].form = old_die->attrs[i].form; + new_die->attrs[i].u.addr = old_die->attrs[i].u.addr; + } + + new_die->next = NULL; + return new_die; +} +#endif + +/* Return sibling of die, NULL if no sibling. */ + +static struct die_info * +sibling_die (struct die_info *die) +{ + return die->sibling; +} + +/* Get linkage name of a die, return NULL if not found. */ + +static char * +dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Get name of a die, return NULL if not found. */ + +static char * +dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Return the die that this die in an extension of, or NULL if there + is none. */ + +static struct die_info * +dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + struct die_info *extension_die; + unsigned int ref; + + attr = dwarf2_attr (die, DW_AT_extension, cu); + if (attr == NULL) + return NULL; + + ref = dwarf2_get_ref_die_offset (attr, cu); + extension_die = follow_die_ref (ref); + if (!extension_die) + { + error ("Dwarf Error: Cannot find referent at offset %d.", ref); + } + + return extension_die; +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (unsigned tag) +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_dwarf_procedure: + return "DW_TAG_dwarf_procedure"; + case DW_TAG_restrict_type: + return "DW_TAG_restrict_type"; + case DW_TAG_interface_type: + return "DW_TAG_interface_type"; + case DW_TAG_namespace: + return "DW_TAG_namespace"; + case DW_TAG_imported_module: + return "DW_TAG_imported_module"; + case DW_TAG_unspecified_type: + return "DW_TAG_unspecified_type"; + case DW_TAG_partial_unit: + return "DW_TAG_partial_unit"; + case DW_TAG_imported_unit: + return "DW_TAG_imported_unit"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (unsigned attr) +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + case DW_AT_allocated: + return "DW_AT_allocated"; + case DW_AT_associated: + return "DW_AT_associated"; + case DW_AT_data_location: + return "DW_AT_data_location"; + case DW_AT_stride: + return "DW_AT_stride"; + case DW_AT_entry_pc: + return "DW_AT_entry_pc"; + case DW_AT_use_UTF8: + return "DW_AT_use_UTF8"; + case DW_AT_extension: + return "DW_AT_extension"; + case DW_AT_ranges: + return "DW_AT_ranges"; + case DW_AT_trampoline: + return "DW_AT_trampoline"; + case DW_AT_call_column: + return "DW_AT_call_column"; + case DW_AT_call_file: + return "DW_AT_call_file"; + case DW_AT_call_line: + return "DW_AT_call_line"; +#ifdef MIPS + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; +#endif + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + default: + return "DW_AT_"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (unsigned form) +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (unsigned op) +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + /* DWARF 3 extensions. */ + case DW_OP_push_object_address: + return "DW_OP_push_object_address"; + case DW_OP_call2: + return "DW_OP_call2"; + case DW_OP_call4: + return "DW_OP_call4"; + case DW_OP_call_ref: + return "DW_OP_call_ref"; + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + return "DW_OP_GNU_push_tls_address"; + default: + return "OP_"; + } +} + +static char * +dwarf_bool_name (unsigned mybool) +{ + if (mybool) + return "TRUE"; + else + return "FALSE"; +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (unsigned enc) +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + case DW_ATE_imaginary_float: + return "DW_ATE_imaginary_float"; + default: + return "DW_ATE_"; + } +} + +/* Convert a DWARF call frame info operation to its string name. */ + +#if 0 +static char * +dwarf_cfi_name (unsigned cfi_opc) +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ + case DW_CFA_def_cfa_expression: + return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + case DW_CFA_GNU_negative_offset_extended: + return "DW_CFA_GNU_negative_offset_extended"; + + default: + return "DW_CFA_"; + } +} +#endif + +static void +dump_die (struct die_info *die) +{ + unsigned int i; + + fprintf_unfiltered (gdb_stderr, "Die: %s (abbrev = %d, offset = %d)\n", + dwarf_tag_name (die->tag), die->abbrev, die->offset); + fprintf_unfiltered (gdb_stderr, "\thas children: %s\n", + dwarf_bool_name (die->child != NULL)); + + fprintf_unfiltered (gdb_stderr, "\tattributes:\n"); + for (i = 0; i < die->num_attrs; ++i) + { + fprintf_unfiltered (gdb_stderr, "\t\t%s (%s) ", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); + switch (die->attrs[i].form) + { + case DW_FORM_ref_addr: + case DW_FORM_addr: + fprintf_unfiltered (gdb_stderr, "address: "); + print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr); + break; + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_block1: + fprintf_unfiltered (gdb_stderr, "block: size %d", DW_BLOCK (&die->attrs[i])->size); + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_udata: + case DW_FORM_sdata: + fprintf_unfiltered (gdb_stderr, "constant: %ld", DW_UNSND (&die->attrs[i])); + break; + case DW_FORM_string: + case DW_FORM_strp: + fprintf_unfiltered (gdb_stderr, "string: \"%s\"", + DW_STRING (&die->attrs[i]) + ? DW_STRING (&die->attrs[i]) : ""); + break; + case DW_FORM_flag: + if (DW_UNSND (&die->attrs[i])) + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + else + fprintf_unfiltered (gdb_stderr, "flag: FALSE"); + break; + case DW_FORM_indirect: + /* the reader will have reduced the indirect form to + the "base form" so this form should not occur */ + fprintf_unfiltered (gdb_stderr, "unexpected attribute form: DW_FORM_indirect"); + break; + default: + fprintf_unfiltered (gdb_stderr, "unsupported attribute form: %d.", + die->attrs[i].form); + } + fprintf_unfiltered (gdb_stderr, "\n"); + } +} + +static void +dump_die_list (struct die_info *die) +{ + while (die) + { + dump_die (die); + if (die->child != NULL) + dump_die_list (die->child); + if (die->sibling != NULL) + dump_die_list (die->sibling); + } +} + +static void +store_in_ref_table (unsigned int offset, struct die_info *die) +{ + int h; + struct die_info *old; + + h = (offset % REF_HASH_SIZE); + old = die_ref_table[h]; + die->next_ref = old; + die_ref_table[h] = die; +} + + +static void +dwarf2_empty_hash_tables (void) +{ + memset (die_ref_table, 0, sizeof (die_ref_table)); +} + +static unsigned int +dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu) +{ + unsigned int result = 0; + + switch (attr->form) + { + case DW_FORM_ref_addr: + result = DW_ADDR (attr); + break; + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_ref8: + case DW_FORM_ref_udata: + result = cu->header.offset + DW_UNSND (attr); + break; + default: + complaint (&symfile_complaints, + "unsupported die ref attribute form: '%s'", + dwarf_form_name (attr->form)); + } + return result; +} + +/* Return the constant value held by the given attribute. Return -1 + if the value held by the attribute is not constant. */ + +static int +dwarf2_get_attr_constant_value (struct attribute *attr, int default_value) +{ + if (attr->form == DW_FORM_sdata) + return DW_SND (attr); + else if (attr->form == DW_FORM_udata + || attr->form == DW_FORM_data1 + || attr->form == DW_FORM_data2 + || attr->form == DW_FORM_data4 + || attr->form == DW_FORM_data8) + return DW_UNSND (attr); + else + { + complaint (&symfile_complaints, "Attribute value is not a constant (%s)", + dwarf_form_name (attr->form)); + return default_value; + } +} + +static struct die_info * +follow_die_ref (unsigned int offset) +{ + struct die_info *die; + int h; + + h = (offset % REF_HASH_SIZE); + die = die_ref_table[h]; + while (die) + { + if (die->offset == offset) + { + return die; + } + die = die->next_ref; + } + return NULL; +} + +static struct type * +dwarf2_fundamental_type (struct objfile *objfile, int typeid, + struct dwarf2_cu *cu) +{ + if (typeid < 0 || typeid >= FT_NUM_MEMBERS) + { + error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + typeid, objfile->name); + } + + /* Look for this particular type in the fundamental type vector. If + one is not found, create and install one appropriate for the + current language and the current target machine. */ + + if (cu->ftypes[typeid] == NULL) + { + cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid); + } + + return (cu->ftypes[typeid]); +} + +/* Decode simple location descriptions. + Given a pointer to a dwarf block that defines a location, compute + the location and return the value. + + NOTE drow/2003-11-18: This function is called in two situations + now: for the address of static or global variables (partial symbols + only) and for offsets into structures which are expected to be + (more or less) constant. The partial symbol case should go away, + and only the constant case should remain. That will let this + function complain more accurately. A few special modes are allowed + without complaint for global variables (for instance, global + register values and thread-local values). + + A location description containing no operations indicates that the + object is optimized out. The return value is 0 for that case. + FIXME drow/2003-11-16: No callers check for this case any more; soon all + callers will only want a very basic result and this can become a + complaint. + + When the result is a register number, the global isreg flag is set, + otherwise it is cleared. + + Note that stack[0] is unused except as a default error return. + Note that stack overflow is not yet handled. */ + +static CORE_ADDR +decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + int i; + int size = blk->size; + char *data = blk->data; + CORE_ADDR stack[64]; + int stacki; + unsigned int bytes_read, unsnd; + unsigned char op; + + i = 0; + stacki = 0; + stack[stacki] = 0; + isreg = 0; + + while (i < size) + { + op = data[i++]; + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + stack[++stacki] = op - DW_OP_lit0; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + isreg = 1; + stack[++stacki] = op - DW_OP_reg0; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_regx: + isreg = 1; + unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + stack[++stacki] = unsnd; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_addr: + stack[++stacki] = read_address (objfile->obfd, &data[i], + cu, &bytes_read); + i += bytes_read; + break; + + case DW_OP_const1u: + stack[++stacki] = read_1_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const1s: + stack[++stacki] = read_1_signed_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const2u: + stack[++stacki] = read_2_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const2s: + stack[++stacki] = read_2_signed_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const4u: + stack[++stacki] = read_4_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_const4s: + stack[++stacki] = read_4_signed_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_constu: + stack[++stacki] = read_unsigned_leb128 (NULL, (data + i), + &bytes_read); + i += bytes_read; + break; + + case DW_OP_consts: + stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_dup: + stack[stacki + 1] = stack[stacki]; + stacki++; + break; + + case DW_OP_plus: + stack[stacki - 1] += stack[stacki]; + stacki--; + break; + + case DW_OP_plus_uconst: + stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_minus: + stack[stacki - 1] -= stack[stacki]; + stacki--; + break; + + case DW_OP_deref: + /* If we're not the last op, then we definitely can't encode + this using GDB's address_class enum. This is valid for partial + global symbols, although the variable's address will be bogus + in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_GNU_push_tls_address: + /* The top of the stack has the offset from the beginning + of the thread control block at which the variable is located. */ + /* Nothing should follow this operator, so the top of stack would + be returned. */ + /* This is valid for partial global symbols, but the variable's + address will be bogus in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + default: + complaint (&symfile_complaints, "unsupported stack op: '%s'", + dwarf_stack_op_name (op)); + return (stack[stacki]); + } + } + return (stack[stacki]); +} + +/* memory allocation interface */ + +static void +dwarf2_free_tmp_obstack (void *ignore) +{ + obstack_free (&dwarf2_tmp_obstack, NULL); +} + +static struct dwarf_block * +dwarf_alloc_block (void) +{ + struct dwarf_block *blk; + + blk = (struct dwarf_block *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct dwarf_block)); + return (blk); +} + +static struct abbrev_info * +dwarf_alloc_abbrev (void) +{ + struct abbrev_info *abbrev; + + abbrev = (struct abbrev_info *) xmalloc (sizeof (struct abbrev_info)); + memset (abbrev, 0, sizeof (struct abbrev_info)); + return (abbrev); +} + +static struct die_info * +dwarf_alloc_die (void) +{ + struct die_info *die; + + die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (die, 0, sizeof (struct die_info)); + return (die); +} + + +/* Macro support. */ + + +/* Return the full name of file number I in *LH's file name table. + Use COMP_DIR as the name of the current directory of the + compilation. The result is allocated using xmalloc; the caller is + responsible for freeing it. */ +static char * +file_full_name (int file, struct line_header *lh, const char *comp_dir) +{ + struct file_entry *fe = &lh->file_names[file - 1]; + + if (IS_ABSOLUTE_PATH (fe->name)) + return xstrdup (fe->name); + else + { + const char *dir; + int dir_len; + char *full_name; + + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + + if (dir) + { + dir_len = strlen (dir); + full_name = xmalloc (dir_len + 1 + strlen (fe->name) + 1); + strcpy (full_name, dir); + full_name[dir_len] = '/'; + strcpy (full_name + dir_len + 1, fe->name); + return full_name; + } + else + return xstrdup (fe->name); + } +} + + +static struct macro_source_file * +macro_start_file (int file, int line, + struct macro_source_file *current_file, + const char *comp_dir, + struct line_header *lh, struct objfile *objfile) +{ + /* The full name of this source file. */ + char *full_name = file_full_name (file, lh, comp_dir); + + /* We don't create a macro table for this compilation unit + at all until we actually get a filename. */ + if (! pending_macros) + pending_macros = new_macro_table (&objfile->objfile_obstack, + objfile->macro_cache); + + if (! current_file) + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + else + current_file = macro_include (current_file, line, full_name); + + xfree (full_name); + + return current_file; +} + + +/* Copy the LEN characters at BUF to a xmalloc'ed block of memory, + followed by a null byte. */ +static char * +copy_string (const char *buf, int len) +{ + char *s = xmalloc (len + 1); + memcpy (s, buf, len); + s[len] = '\0'; + + return s; +} + + +static const char * +consume_improper_spaces (const char *p, const char *body) +{ + if (*p == ' ') + { + complaint (&symfile_complaints, + "macro definition contains spaces in formal argument list:\n`%s'", + body); + + while (*p == ' ') + p++; + } + + return p; +} + + +static void +parse_macro_definition (struct macro_source_file *file, int line, + const char *body) +{ + const char *p; + + /* The body string takes one of two forms. For object-like macro + definitions, it should be: + + " " + + For function-like macro definitions, it should be: + + "() " + or + "(" ( "," ) * ") " + + Spaces may appear only where explicitly indicated, and in the + . + + The Dwarf 2 spec says that an object-like macro's name is always + followed by a space, but versions of GCC around March 2002 omit + the space when the macro's definition is the empty string. + + The Dwarf 2 spec says that there should be no spaces between the + formal arguments in a function-like macro's formal argument list, + but versions of GCC around March 2002 include spaces after the + commas. */ + + + /* Find the extent of the macro name. The macro name is terminated + by either a space or null character (for an object-like macro) or + an opening paren (for a function-like macro). */ + for (p = body; *p; p++) + if (*p == ' ' || *p == '(') + break; + + if (*p == ' ' || *p == '\0') + { + /* It's an object-like macro. */ + int name_len = p - body; + char *name = copy_string (body, name_len); + const char *replacement; + + if (*p == ' ') + replacement = body + name_len + 1; + else + { + dwarf2_macro_malformed_definition_complaint (body); + replacement = body + name_len; + } + + macro_define_object (file, line, name, replacement); + + xfree (name); + } + else if (*p == '(') + { + /* It's a function-like macro. */ + char *name = copy_string (body, p - body); + int argc = 0; + int argv_size = 1; + char **argv = xmalloc (argv_size * sizeof (*argv)); + + p++; + + p = consume_improper_spaces (p, body); + + /* Parse the formal argument list. */ + while (*p && *p != ')') + { + /* Find the extent of the current argument name. */ + const char *arg_start = p; + + while (*p && *p != ',' && *p != ')' && *p != ' ') + p++; + + if (! *p || p == arg_start) + dwarf2_macro_malformed_definition_complaint (body); + else + { + /* Make sure argv has room for the new argument. */ + if (argc >= argv_size) + { + argv_size *= 2; + argv = xrealloc (argv, argv_size * sizeof (*argv)); + } + + argv[argc++] = copy_string (arg_start, p - arg_start); + } + + p = consume_improper_spaces (p, body); + + /* Consume the comma, if present. */ + if (*p == ',') + { + p++; + + p = consume_improper_spaces (p, body); + } + } + + if (*p == ')') + { + p++; + + if (*p == ' ') + /* Perfectly formed definition, no complaints. */ + macro_define_function (file, line, name, + argc, (const char **) argv, + p + 1); + else if (*p == '\0') + { + /* Complain, but do define it. */ + dwarf2_macro_malformed_definition_complaint (body); + macro_define_function (file, line, name, + argc, (const char **) argv, + p); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + + xfree (name); + { + int i; + + for (i = 0; i < argc; i++) + xfree (argv[i]); + } + xfree (argv); + } + else + dwarf2_macro_malformed_definition_complaint (body); +} + + +static void +dwarf_decode_macros (struct line_header *lh, unsigned int offset, + char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *mac_ptr, *mac_end; + struct macro_source_file *current_file = 0; + + if (dwarf_macinfo_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_macinfo section"); + return; + } + + mac_ptr = dwarf_macinfo_buffer + offset; + mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size; + + for (;;) + { + enum dwarf_macinfo_record_type macinfo_type; + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + macinfo_type = read_1_byte (abfd, mac_ptr); + mac_ptr++; + + switch (macinfo_type) + { + /* A zero macinfo type indicates the end of the macro + information. */ + case 0: + return; + + case DW_MACINFO_define: + case DW_MACINFO_undef: + { + int bytes_read; + int line; + char *body; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + body = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + if (! current_file) + complaint (&symfile_complaints, + "debug info gives macro %s outside of any file: %s", + macinfo_type == + DW_MACINFO_define ? "definition" : macinfo_type == + DW_MACINFO_undef ? "undefinition" : + "something-or-other", body); + else + { + if (macinfo_type == DW_MACINFO_define) + parse_macro_definition (current_file, line, body); + else if (macinfo_type == DW_MACINFO_undef) + macro_undef (current_file, line, body); + } + } + break; + + case DW_MACINFO_start_file: + { + int bytes_read; + int line, file; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + current_file = macro_start_file (file, line, + current_file, comp_dir, + lh, cu->objfile); + } + break; + + case DW_MACINFO_end_file: + if (! current_file) + complaint (&symfile_complaints, + "macro debug info has an unmatched `close_file' directive"); + else + { + current_file = current_file->included_by; + if (! current_file) + { + enum dwarf_macinfo_record_type next_type; + + /* GCC circa March 2002 doesn't produce the zero + type byte marking the end of the compilation + unit. Complain if it's not there, but exit no + matter what. */ + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + /* We don't increment mac_ptr here, so this is just + a look-ahead. */ + next_type = read_1_byte (abfd, mac_ptr); + if (next_type != 0) + complaint (&symfile_complaints, + "no terminating 0-type entry for macros in `.debug_macinfo' section"); + + return; + } + } + break; + + case DW_MACINFO_vendor_ext: + { + int bytes_read; + int constant; + char *string; + + constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + string = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + /* We don't recognize any vendor extensions. */ + } + break; + } + } +} + +/* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ +static int +attr_form_is_block (struct attribute *attr) +{ + return (attr == NULL ? 0 : + attr->form == DW_FORM_block1 + || attr->form == DW_FORM_block2 + || attr->form == DW_FORM_block4 + || attr->form == DW_FORM_block); +} + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + struct dwarf2_loclist_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_loclist_baton)); + baton->objfile = cu->objfile; + + /* We don't know how long the location list is, but make sure we + don't run off the edge of the section. */ + baton->size = dwarf_loc_size - DW_UNSND (attr); + baton->data = dwarf_loc_buffer + DW_UNSND (attr); + baton->base_address = cu->header.base_address; + if (cu->header.base_known == 0) + complaint (&symfile_complaints, + "Location list used without specifying the CU base address."); + + SYMBOL_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } + else + { + struct dwarf2_locexpr_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_locexpr_baton)); + baton->objfile = cu->objfile; + + if (attr_form_is_block (attr)) + { + /* Note that we're just copying the block's data pointer + here, not the actual data. We're still pointing into the + dwarf_info_buffer for SYM's objfile; right now we never + release that buffer, but when we do clean up properly + this may need to change. */ + baton->size = DW_BLOCK (attr)->size; + baton->data = DW_BLOCK (attr)->data; + } + else + { + dwarf2_invalid_attrib_class_complaint ("location description", + SYMBOL_NATURAL_NAME (sym)); + baton->size = 0; + baton->data = NULL; + } + + SYMBOL_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/elfread.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/elfread.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/elfread.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/elfread.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,754 @@ +/* Read ELF (Executable and Linking Format) object files for GDB. + + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Written by Fred Fish at Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "gdb_string.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "symtab.h" +#include "symfile.h" +#include "objfiles.h" +#include "buildsym.h" +#include "stabsread.h" +#include "gdb-stabs.h" +#include "complaints.h" +#include "demangle.h" + +extern void _initialize_elfread (void); + +/* The struct elfinfo is available only during ELF symbol table and + psymtab reading. It is destroyed at the completion of psymtab-reading. + It's local to elf_symfile_read. */ + +struct elfinfo + { + file_ptr dboffset; /* Offset to dwarf debug section */ + unsigned int dbsize; /* Size of dwarf debug section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ + unsigned int lnsize; /* Size of dwarf line number section */ + asection *stabsect; /* Section pointer for .stab section */ + asection *stabindexsect; /* Section pointer for .stab.index section */ + asection *mdebugsect; /* Section pointer for .mdebug section */ + }; + +static void free_elfinfo (void *); + +/* We are called once per section from elf_symfile_read. We + need to examine each section we are passed, check to see + if it is something we are interested in processing, and + if so, stash away some access information for the section. + + For now we recognize the dwarf debug information sections and + line number sections from matching their section names. The + ELF definition is no real help here since it has no direct + knowledge of DWARF (by design, so any debugging format can be + used). + + We also recognize the ".stab" sections used by the Sun compilers + released with Solaris 2. + + FIXME: The section names should not be hardwired strings (what + should they be? I don't think most object file formats have enough + section flags to specify what kind of debug section it is + -kingdon). */ + +static void +elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) +{ + struct elfinfo *ei; + + ei = (struct elfinfo *) eip; + if (strcmp (sectp->name, ".debug") == 0) + { + ei->dboffset = sectp->filepos; + ei->dbsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".line") == 0) + { + ei->lnoffset = sectp->filepos; + ei->lnsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".stab") == 0) + { + ei->stabsect = sectp; + } + else if (strcmp (sectp->name, ".stab.index") == 0) + { + ei->stabindexsect = sectp; + } + else if (strcmp (sectp->name, ".mdebug") == 0) + { + ei->mdebugsect = sectp; + } +} + +static struct minimal_symbol * +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) +{ + if (ms_type == mst_text || ms_type == mst_file_text) + address = SMASH_TEXT_ADDRESS (address); + + return prim_record_minimal_symbol_and_info + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); +} + +/* + + LOCAL FUNCTION + + elf_symtab_read -- read the symbol table of an ELF file + + SYNOPSIS + + void elf_symtab_read (struct objfile *objfile, int dynamic) + + DESCRIPTION + + Given an objfile and a flag that specifies whether or not the objfile + is for an executable or not (may be shared library for example), add + all the global function and data symbols to the minimal symbol table. + + In stabs-in-ELF, as implemented by Sun, there are some local symbols + defined in the ELF symbol table, which can be used to locate + the beginnings of sections from each ".o" file that was linked to + form the executable objfile. We gather any such info and record it + in data structures hung off the objfile's private data. + + */ + +static void +elf_symtab_read (struct objfile *objfile, int dynamic) +{ + long storage_needed; + asymbol *sym; + asymbol **symbol_table; + long number_of_symbols; + long i; + struct cleanup *back_to; + CORE_ADDR symaddr; + CORE_ADDR offset; + enum minimal_symbol_type ms_type; + /* If sectinfo is nonNULL, it contains section info that should end up + filed in the objfile. */ + struct stab_section_info *sectinfo = NULL; + /* If filesym is nonzero, it points to a file symbol, but we haven't + seen any section info for it yet. */ + asymbol *filesym = 0; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + /* Name of filesym, as saved on the objfile_obstack. */ + char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); +#endif + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + int stripped = (bfd_get_symcount (objfile->obfd) == 0); + + if (dynamic) + { + storage_needed = bfd_get_dynamic_symtab_upper_bound (objfile->obfd); + + /* Nothing to be done if there is no dynamic symtab. */ + if (storage_needed < 0) + return; + } + else + { + storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); + if (storage_needed < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + } + if (storage_needed > 0) + { + symbol_table = (asymbol **) xmalloc (storage_needed); + back_to = make_cleanup (xfree, symbol_table); + if (dynamic) + number_of_symbols = bfd_canonicalize_dynamic_symtab (objfile->obfd, + symbol_table); + else + number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); + if (number_of_symbols < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + + for (i = 0; i < number_of_symbols; i++) + { + sym = symbol_table[i]; + if (sym->name == NULL || *sym->name == '\0') + { + /* Skip names that don't exist (shouldn't happen), or names + that are null strings (may happen). */ + continue; + } + + offset = ANOFFSET (objfile->section_offsets, sym->section->index); + if (dynamic + && sym->section == &bfd_und_section + && (sym->flags & BSF_FUNCTION)) + { + struct minimal_symbol *msym; + + /* Symbol is a reference to a function defined in + a shared library. + If its value is non zero then it is usually the address + of the corresponding entry in the procedure linkage table, + plus the desired section offset. + If its value is zero then the dynamic linker has to resolve + the symbol. We are unable to find any meaningful address + for this symbol in the executable file, so we skip it. */ + symaddr = sym->value; + if (symaddr == 0) + continue; + symaddr += offset; + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + mst_solib_trampoline, sym->section, objfile); +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + continue; + } + + /* If it is a nonstripped executable, do not enter dynamic + symbols, as the dynamic symbol table is usually a subset + of the main symbol table. */ + if (dynamic && !stripped) + continue; + if (sym->flags & BSF_FILE) + { + /* STT_FILE debugging symbol that helps stabs-in-elf debugging. + Chain any old one onto the objfile; remember new sym. */ + if (sectinfo != NULL) + { + sectinfo->next = dbx->stab_section_info; + dbx->stab_section_info = sectinfo; + sectinfo = NULL; + } + filesym = sym; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + filesymname = + obsavestring ((char *) filesym->name, strlen (filesym->name), + &objfile->objfile_obstack); +#endif + } + else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) + { + struct minimal_symbol *msym; + + /* Select global/local/weak symbols. Note that bfd puts abs + symbols in their own section, so all symbols we are + interested in will have a section. */ + /* Bfd symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate all non-absolute symbols by the section offset. */ + if (sym->section != &bfd_abs_section) + { + symaddr += offset; + } + /* For non-absolute symbols, use the type of the section + they are relative to, to intuit text/data. Bfd provides + no way of figuring this out for absolute symbols. */ + if (sym->section == &bfd_abs_section) + { + /* This is a hack to get the minimal symbol type + right for Irix 5, which has absolute addresses + with special section indices for dynamic symbols. */ + unsigned short shndx = + ((elf_symbol_type *) sym)->internal_elf_sym.st_shndx; + + switch (shndx) + { + case SHN_MIPS_TEXT: + ms_type = mst_text; + break; + case SHN_MIPS_DATA: + ms_type = mst_data; + break; + case SHN_MIPS_ACOMMON: + ms_type = mst_bss; + break; + default: + ms_type = mst_abs; + } + + /* If it is an Irix dynamic symbol, skip section name + symbols, relocate all others by section offset. */ + if (ms_type != mst_abs) + { + if (sym->name[0] == '.') + continue; + symaddr += offset; + } + } + else if (sym->section->flags & SEC_CODE) + { + if (sym->flags & BSF_GLOBAL) + { + ms_type = mst_text; + } + else if ((sym->name[0] == '.' && sym->name[1] == 'L') + || ((sym->flags & BSF_LOCAL) + && sym->name[0] == '$' + && sym->name[1] == 'L')) + /* Looks like a compiler-generated label. Skip + it. The assembler should be skipping these (to + keep executables small), but apparently with + gcc on the (deleted) delta m88k SVR4, it loses. + So to have us check too should be harmless (but + I encourage people to fix this in the assembler + instead of adding checks here). */ + continue; + else + { + ms_type = mst_file_text; + } + } + else if (sym->section->flags & SEC_ALLOC) + { + if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) + { + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_data; + } + else + { + ms_type = mst_bss; + } + } + else if (sym->flags & BSF_LOCAL) + { + /* Named Local variable in a Data section. + Check its name for stabs-in-elf. */ + int special_local_sect; + if (strcmp ("Bbss.bss", sym->name) == 0) + special_local_sect = SECT_OFF_BSS (objfile); + else if (strcmp ("Ddata.data", sym->name) == 0) + special_local_sect = SECT_OFF_DATA (objfile); + else if (strcmp ("Drodata.rodata", sym->name) == 0) + special_local_sect = SECT_OFF_RODATA (objfile); + else + special_local_sect = -1; + if (special_local_sect >= 0) + { + /* Found a special local symbol. Allocate a + sectinfo, if needed, and fill it in. */ + if (sectinfo == NULL) + { + int max_index; + size_t size; + + max_index + = max (SECT_OFF_BSS (objfile), + max (SECT_OFF_DATA (objfile), + SECT_OFF_RODATA (objfile))); + + /* max_index is the largest index we'll + use into this array, so we must + allocate max_index+1 elements for it. + However, 'struct stab_section_info' + already includes one element, so we + need to allocate max_index aadditional + elements. */ + size = (sizeof (struct stab_section_info) + + (sizeof (CORE_ADDR) + * max_index)); + sectinfo = (struct stab_section_info *) + xmmalloc (objfile->md, size); + memset (sectinfo, 0, size); + sectinfo->num_sections = max_index; + if (filesym == NULL) + { + complaint (&symfile_complaints, + "elf/stab section information %s without a preceding file symbol", + sym->name); + } + else + { + sectinfo->filename = + (char *) filesym->name; + } + } + if (sectinfo->sections[special_local_sect] != 0) + complaint (&symfile_complaints, + "duplicated elf/stab section information for %s", + sectinfo->filename); + /* BFD symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate non-absolute symbols by the + section offset. */ + if (sym->section != &bfd_abs_section) + symaddr += offset; + sectinfo->sections[special_local_sect] = symaddr; + /* The special local symbols don't go in the + minimal symbol table, so ignore this one. */ + continue; + } + /* Not a special stabs-in-elf symbol, do regular + symbol processing. */ + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_file_data; + } + else + { + ms_type = mst_file_bss; + } + } + else + { + ms_type = mst_unknown; + } + } + else + { + /* FIXME: Solaris2 shared libraries include lots of + odd "absolute" and "undefined" symbols, that play + hob with actions like finding what function the PC + is in. Ignore them if they aren't text, data, or bss. */ + /* ms_type = mst_unknown; */ + continue; /* Skip this symbol. */ + } + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, + struct minimal_symbol *); + patch_load_module(objfile, msym); + } +#endif +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + } + } + do_cleanups (back_to); + } +} + +/* Scan and build partial symbols for a symbol file. + We have been initialized by a call to elf_symfile_init, which + currently does nothing. + + SECTION_OFFSETS is a set of offsets to apply to relocate the symbols + in each section. We simplify it down to a single offset for all + symbols. FIXME. + + MAINLINE is true if we are reading the main symbol + table (as opposed to a shared lib or dynamically loaded file). + + This function only does the minimum work necessary for letting the + user "name" things symbolically; it does not read the entire symtab. + Instead, it reads the external and static symbols and puts them in partial + symbol tables. When more extensive information is requested of a + file, the corresponding partial symbol table is mutated into a full + fledged symbol table by going back and reading the symbols + for real. + + We look for sections with specific names, to tell us what debug + format to look for: FIXME!!! + + dwarf_build_psymtabs() builds psymtabs for DWARF symbols; + elfstab_build_psymtabs() handles STABS symbols; + mdebug_build_psymtabs() handles ECOFF debugging information. + + Note that ELF files have a "minimal" symbol table, which looks a lot + like a COFF symbol table, but has only the minimal information necessary + for linking. We process this also, and use the information to + build gdb's minimal symbol table. This gives us some minimal debugging + capability even for files compiled without -g. */ + +static void +elf_symfile_read (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + struct elfinfo ei; + struct cleanup *back_to; + CORE_ADDR offset; + + init_minimal_symbol_collection (); + back_to = make_cleanup_discard_minimal_symbols (); + + memset ((char *) &ei, 0, sizeof (ei)); + + /* Allocate struct to keep track of the symfile */ + objfile->sym_stab_info = (struct dbx_symfile_info *) + xmmalloc (objfile->md, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + make_cleanup (free_elfinfo, (void *) objfile); + + /* Process the normal ELF symbol table first. This may write some + chain of info into the dbx_symfile_info in objfile->sym_stab_info, + which can later be used by elfstab_offset_sections. */ + + elf_symtab_read (objfile, 0); + + /* Add the dynamic symbols. */ + + elf_symtab_read (objfile, 1); + + /* Install any minimal symbols that have been collected as the current + minimal symbols for this objfile. The debug readers below this point + should not generate new minimal symbols; if they do it's their + responsibility to install them. "mdebug" appears to be the only one + which will do this. */ + + install_minimal_symbols (objfile); + do_cleanups (back_to); + + /* Now process debugging information, which is contained in + special ELF sections. */ + + /* If we are reinitializing, or if we have never loaded syms yet, + set table to empty. MAINLINE is cleared so that *_read_psymtab + functions do not all also re-initialize the psymbol table. */ + if (mainline) + { + init_psymbol_list (objfile, 0); + mainline = 0; + } + + /* We first have to find them... */ + bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei); + + /* ELF debugging information is inserted into the psymtab in the + order of least informative first - most informative last. Since + the psymtab table is searched `most recent insertion first' this + increases the probability that more detailed debug information + for a section is found. + + For instance, an object file might contain both .mdebug (XCOFF) + and .debug_info (DWARF2) sections then .mdebug is inserted first + (searched last) and DWARF2 is inserted last (searched first). If + we don't do this then the XCOFF info is found first - for code in + an included file XCOFF info is useless. */ + + if (ei.mdebugsect) + { + const struct ecoff_debug_swap *swap; + + /* .mdebug section, presumably holding ECOFF debugging + information. */ + swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; + if (swap) + elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect); + } + if (ei.stabsect) + { + asection *str_sect; + + /* Stab sections have an associated string table that looks like + a separate section. */ + str_sect = bfd_get_section_by_name (abfd, ".stabstr"); + + /* FIXME should probably warn about a stab section without a stabstr. */ + if (str_sect) + elfstab_build_psymtabs (objfile, + mainline, + ei.stabsect, + str_sect->filepos, + bfd_section_size (abfd, str_sect)); + } + if (dwarf2_has_info (abfd)) + { + /* DWARF 2 sections */ + dwarf2_build_psymtabs (objfile, mainline); + } + else if (ei.dboffset && ei.lnoffset) + { + /* DWARF sections */ + dwarf_build_psymtabs (objfile, + mainline, + ei.dboffset, ei.dbsize, + ei.lnoffset, ei.lnsize); + } + + /* FIXME: kettenis/20030504: This still needs to be integrated with + dwarf2read.c in a better way. */ + dwarf2_build_frame_info (objfile); +} + +/* This cleans up the objfile's sym_stab_info pointer, and the chain of + stab_section_info's, that might be dangling from it. */ + +static void +free_elfinfo (void *objp) +{ + struct objfile *objfile = (struct objfile *) objp; + struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct stab_section_info *ssi, *nssi; + + ssi = dbxinfo->stab_section_info; + while (ssi) + { + nssi = ssi->next; + xmfree (objfile->md, ssi); + ssi = nssi; + } + + dbxinfo->stab_section_info = 0; /* Just say No mo info about this. */ +} + + +/* Initialize anything that needs initializing when a completely new symbol + file is specified (not just adding some symbols from another file, e.g. a + shared library). + + We reinitialize buildsym, since we may be reading stabs from an ELF file. */ + +static void +elf_new_init (struct objfile *ignore) +{ + stabsread_new_init (); + buildsym_new_init (); +} + +/* Perform any local cleanups required when we are done with a particular + objfile. I.E, we are in the process of discarding all symbol information + for an objfile, freeing up all memory held for it, and unlinking the + objfile struct from the global list of known objfiles. */ + +static void +elf_symfile_finish (struct objfile *objfile) +{ + if (objfile->sym_stab_info != NULL) + { + xmfree (objfile->md, objfile->sym_stab_info); + } +} + +/* ELF specific initialization routine for reading symbols. + + It is passed a pointer to a struct sym_fns which contains, among other + things, the BFD for the file whose symbols are being read, and a slot for + a pointer to "private data" which we can fill with goodies. + + For now at least, we have nothing in particular to do, so this function is + just a stub. */ + +static void +elf_symfile_init (struct objfile *objfile) +{ + /* ELF objects may be reordered, so set OBJF_REORDERED. If we + find this causes a significant slowdown in gdb then we could + set it in the debug symbol readers only when necessary. */ + objfile->flags |= OBJF_REORDERED; +} + +/* When handling an ELF file that contains Sun STABS debug info, + some of the debug info is relative to the particular chunk of the + section that was generated in its individual .o file. E.g. + offsets to static variables are relative to the start of the data + segment *for that module before linking*. This information is + painfully squirreled away in the ELF symbol table as local symbols + with wierd names. Go get 'em when needed. */ + +void +elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +{ + char *filename = pst->filename; + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct stab_section_info *maybe = dbx->stab_section_info; + struct stab_section_info *questionable = 0; + int i; + char *p; + + /* The ELF symbol info doesn't include path names, so strip the path + (if any) from the psymtab filename. */ + while (0 != (p = strchr (filename, '/'))) + filename = p + 1; + + /* FIXME: This linear search could speed up significantly + if it was chained in the right order to match how we search it, + and if we unchained when we found a match. */ + for (; maybe; maybe = maybe->next) + { + if (filename[0] == maybe->filename[0] + && strcmp (filename, maybe->filename) == 0) + { + /* We found a match. But there might be several source files + (from different directories) with the same name. */ + if (0 == maybe->found) + break; + questionable = maybe; /* Might use it later. */ + } + } + + if (maybe == 0 && questionable != 0) + { + complaint (&symfile_complaints, + "elf/stab section information questionable for %s", filename); + maybe = questionable; + } + + if (maybe) + { + /* Found it! Allocate a new psymtab struct, and fill it in. */ + maybe->found++; + pst->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + for (i = 0; i < maybe->num_sections; i++) + (pst->section_offsets)->offsets[i] = maybe->sections[i]; + return; + } + + /* We were unable to find any offsets for this file. Complain. */ + if (dbx->stab_section_info) /* If there *is* any info, */ + complaint (&symfile_complaints, + "elf/stab section information missing for %s", filename); +} + +/* Register that we are able to handle ELF object file formats. */ + +static struct sym_fns elf_sym_fns = +{ + bfd_target_elf_flavour, + elf_new_init, /* sym_new_init: init anything gbl to entire symtab */ + elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */ + elf_symfile_read, /* sym_read: read a symbol file into symtab */ + elf_symfile_finish, /* sym_finish: finished with file, cleanup */ + default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */ + NULL /* next: pointer to next struct sym_fns */ +}; + +void +_initialize_elfread (void) +{ + add_symtab_fns (&elf_sym_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/main.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/main.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,924 @@ +/* Top level stuff for GDB, the GNU debugger. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "top.h" +#include "target.h" +#include "inferior.h" +#include "symfile.h" +#include "gdbcore.h" + +#include "getopt.h" + +#include +#include "gdb_stat.h" +#include + +#include "gdb_string.h" +#include "event-loop.h" +#include "ui-out.h" + +#include "interps.h" +#include "main.h" + +/* If nonzero, display time usage both at startup and for each command. */ + +int display_time; + +/* If nonzero, display space usage both at startup and for each command. */ + +int display_space; + +/* Whether this is the async version or not. The async version is + invoked on the command line with the -nw --async options. In this + version, the usual command_loop is substituted by and event loop which + processes UI events asynchronously. */ +int event_loop_p = 1; + +/* The selected interpreter. This will be used as a set command + variable, so it should always be malloc'ed - since + do_setshow_command will free it. */ +char *interpreter_p; + +/* Whether xdb commands will be handled */ +int xdb_commands = 0; + +/* Whether dbx commands will be handled */ +int dbx_commands = 0; + +/* System root path, used to find libraries etc. */ +char *gdb_sysroot = 0; + +struct ui_file *gdb_stdout; +struct ui_file *gdb_stderr; +struct ui_file *gdb_stdlog; +struct ui_file *gdb_stdin; +/* target IO streams */ +struct ui_file *gdb_stdtargin; +struct ui_file *gdb_stdtarg; +struct ui_file *gdb_stdtargerr; + +/* Whether to enable writing into executable and core files */ +extern int write_files; + +static void print_gdb_help (struct ui_file *); + +/* These two are used to set the external editor commands when gdb is farming + out files to be edited by another program. */ + +extern char *external_editor_command; + +/* Call command_loop. If it happens to return, pass that through as a + non-zero return status. */ + +static int +captured_command_loop (void *data) +{ + current_interp_command_loop (); + /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton + would clean things up (restoring the cleanup chain) to the state + they were just prior to the call. Technically, this means that + the do_cleanups() below is redundant. Unfortunately, many FUNCs + are not that well behaved. do_cleanups should either be replaced + with a do_cleanups call (to cover the problem) or an assertion + check to detect bad FUNCs code. */ + do_cleanups (ALL_CLEANUPS); + /* If the command_loop returned, normally (rather than threw an + error) we try to quit. If the quit is aborted, catch_errors() + which called this catch the signal and restart the command + loop. */ + quit_command (NULL, instream == stdin); + return 1; +} + +static int +captured_main (void *data) +{ + struct captured_main_args *context = data; + int argc = context->argc; + char **argv = context->argv; + int count; + static int quiet = 0; + static int batch = 0; + static int set_args = 0; + + /* Pointers to various arguments from command line. */ + char *symarg = NULL; + char *execarg = NULL; + char *corearg = NULL; + char *cdarg = NULL; + char *ttyarg = NULL; + + /* These are static so that we can take their address in an initializer. */ + static int print_help; + static int print_version; + + /* Pointers to all arguments of --command option. */ + char **cmdarg; + /* Allocated size of cmdarg. */ + int cmdsize; + /* Number of elements of cmdarg used. */ + int ncmd; + + /* Indices of all arguments of --directory option. */ + char **dirarg; + /* Allocated size. */ + int dirsize; + /* Number of elements used. */ + int ndir; + + struct stat homebuf, cwdbuf; + char *homedir, *homeinit; + + int i; + + long time_at_startup = get_run_time (); + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* This needs to happen before the first use of malloc. */ + init_malloc (NULL); + +#ifdef HAVE_SBRK + lim_at_start = (char *) sbrk (0); +#endif + +#if defined (ALIGN_STACK_ON_STARTUP) + i = (int) &count & 0x3; + if (i != 0) + alloca (4 - i); +#endif + + cmdsize = 1; + cmdarg = (char **) xmalloc (cmdsize * sizeof (*cmdarg)); + ncmd = 0; + dirsize = 1; + dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg)); + ndir = 0; + + quit_flag = 0; + line = (char *) xmalloc (linesize); + line[0] = '\0'; /* Terminate saved (now empty) cmd line */ + instream = stdin; + + getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); + current_directory = gdb_dirbuf; + + gdb_stdout = stdio_fileopen (stdout); + gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ + gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdin = stdio_fileopen (stdin); + gdb_stdtargerr = gdb_stderr; /* for moment */ + gdb_stdtargin = gdb_stdin; /* for moment */ + + /* initialize error() */ + error_init (); + + /* Set the sysroot path. */ +#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE + gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT); + if (gdb_sysroot) + { + struct stat s; + int res = 0; + + if (stat (gdb_sysroot, &s) == 0) + if (S_ISDIR (s.st_mode)) + res = 1; + + if (res == 0) + { + xfree (gdb_sysroot); + gdb_sysroot = TARGET_SYSTEM_ROOT; + } + } + else + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else +#if defined (TARGET_SYSTEM_ROOT) + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else + gdb_sysroot = ""; +#endif +#endif + + /* There will always be an interpreter. Either the one passed into + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); + + /* Parse arguments and options. */ + { + int c; + /* When var field is 0, use flag field to record the equivalent + short option (or arbitrary numbers starting at 10 for those + with no equivalent). */ + enum { + OPT_SE = 10, + OPT_CD, + OPT_ANNOTATE, + OPT_STATISTICS, + OPT_TUI, + OPT_NOWINDOWS, + OPT_WINDOWS + }; + static struct option long_options[] = + { + {"async", no_argument, &event_loop_p, 1}, + {"noasync", no_argument, &event_loop_p, 0}, +#if defined(TUI) + {"tui", no_argument, 0, OPT_TUI}, +#endif + {"xdb", no_argument, &xdb_commands, 1}, + {"dbx", no_argument, &dbx_commands, 1}, + {"readnow", no_argument, &readnow_symbol_files, 1}, + {"r", no_argument, &readnow_symbol_files, 1}, + {"quiet", no_argument, &quiet, 1}, + {"q", no_argument, &quiet, 1}, + {"silent", no_argument, &quiet, 1}, + {"nx", no_argument, &inhibit_gdbinit, 1}, + {"n", no_argument, &inhibit_gdbinit, 1}, + {"batch", no_argument, &batch, 1}, + {"epoch", no_argument, &epoch_interface, 1}, + + /* This is a synonym for "--annotate=1". --annotate is now preferred, + but keep this here for a long time because people will be running + emacses which use --fullname. */ + {"fullname", no_argument, 0, 'f'}, + {"f", no_argument, 0, 'f'}, + + {"annotate", required_argument, 0, OPT_ANNOTATE}, + {"help", no_argument, &print_help, 1}, + {"se", required_argument, 0, OPT_SE}, + {"symbols", required_argument, 0, 's'}, + {"s", required_argument, 0, 's'}, + {"exec", required_argument, 0, 'e'}, + {"e", required_argument, 0, 'e'}, + {"core", required_argument, 0, 'c'}, + {"c", required_argument, 0, 'c'}, + {"pid", required_argument, 0, 'p'}, + {"p", required_argument, 0, 'p'}, + {"command", required_argument, 0, 'x'}, + {"version", no_argument, &print_version, 1}, + {"x", required_argument, 0, 'x'}, +#ifdef GDBTK + {"tclcommand", required_argument, 0, 'z'}, + {"enable-external-editor", no_argument, 0, 'y'}, + {"editor-command", required_argument, 0, 'w'}, +#endif + {"ui", required_argument, 0, 'i'}, + {"interpreter", required_argument, 0, 'i'}, + {"i", required_argument, 0, 'i'}, + {"directory", required_argument, 0, 'd'}, + {"d", required_argument, 0, 'd'}, + {"cd", required_argument, 0, OPT_CD}, + {"tty", required_argument, 0, 't'}, + {"baud", required_argument, 0, 'b'}, + {"b", required_argument, 0, 'b'}, + {"nw", no_argument, NULL, OPT_NOWINDOWS}, + {"nowindows", no_argument, NULL, OPT_NOWINDOWS}, + {"w", no_argument, NULL, OPT_WINDOWS}, + {"windows", no_argument, NULL, OPT_WINDOWS}, + {"statistics", no_argument, 0, OPT_STATISTICS}, + {"write", no_argument, &write_files, 1}, + {"args", no_argument, &set_args, 1}, + {0, no_argument, 0, 0} + }; + + while (1) + { + int option_index; + + c = getopt_long_only (argc, argv, "", + long_options, &option_index); + if (c == EOF || set_args) + break; + + /* Long option that takes an argument. */ + if (c == 0 && long_options[option_index].flag == 0) + c = long_options[option_index].val; + + switch (c) + { + case 0: + /* Long option that just sets a flag. */ + break; + case OPT_SE: + symarg = optarg; + execarg = optarg; + break; + case OPT_CD: + cdarg = optarg; + break; + case OPT_ANNOTATE: + /* FIXME: what if the syntax is wrong (e.g. not digits)? */ + annotation_level = atoi (optarg); + break; + case OPT_STATISTICS: + /* Enable the display of both time and space usage. */ + display_time = 1; + display_space = 1; + break; + case OPT_TUI: + /* --tui is equivalent to -i=tui. */ + xfree (interpreter_p); + interpreter_p = xstrdup ("tui"); + break; + case OPT_WINDOWS: + /* FIXME: cagney/2003-03-01: Not sure if this option is + actually useful, and if it is, what it should do. */ + use_windows = 1; + break; + case OPT_NOWINDOWS: + /* -nw is equivalent to -i=console. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_CONSOLE); + use_windows = 0; + break; + case 'f': + annotation_level = 1; +/* We have probably been invoked from emacs. Disable window interface. */ + use_windows = 0; + break; + case 's': + symarg = optarg; + break; + case 'e': + execarg = optarg; + break; + case 'c': + corearg = optarg; + break; + case 'p': + /* "corearg" is shared by "--core" and "--pid" */ + corearg = optarg; + break; + case 'x': + cmdarg[ncmd++] = optarg; + if (ncmd >= cmdsize) + { + cmdsize *= 2; + cmdarg = (char **) xrealloc ((char *) cmdarg, + cmdsize * sizeof (*cmdarg)); + } + break; +#ifdef GDBTK + case 'z': + { +extern int gdbtk_test (char *); + if (!gdbtk_test (optarg)) + { + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), + argv[0], optarg); + exit (1); + } + break; + } + case 'y': + /* Backwards compatibility only. */ + break; + case 'w': + { + external_editor_command = xstrdup (optarg); + break; + } +#endif /* GDBTK */ + case 'i': + xfree (interpreter_p); + interpreter_p = xstrdup (optarg); + break; + case 'd': + dirarg[ndir++] = optarg; + if (ndir >= dirsize) + { + dirsize *= 2; + dirarg = (char **) xrealloc ((char *) dirarg, + dirsize * sizeof (*dirarg)); + } + break; + case 't': + ttyarg = optarg; + break; + case 'q': + quiet = 1; + break; + case 'b': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set baud rate to `%s'.\n"), optarg); + else + baud_rate = i; + } + break; + case 'l': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set timeout limit to `%s'.\n"), optarg); + else + remote_timeout = i; + } + break; + + case '?': + fprintf_unfiltered (gdb_stderr, + _("Use `%s --help' for a complete list of options.\n"), + argv[0]); + exit (1); + } + } + + /* If --help or --version, disable window interface. */ + if (print_help || print_version) + { + use_windows = 0; + } + + if (set_args) + { + /* The remaining options are the command-line options for the + inferior. The first one is the sym/exec file, and the rest + are arguments. */ + if (optind >= argc) + { + fprintf_unfiltered (gdb_stderr, + _("%s: `--args' specified but no program specified\n"), + argv[0]); + exit (1); + } + symarg = argv[optind]; + execarg = argv[optind]; + ++optind; + set_inferior_args_vector (argc - optind, &argv[optind]); + } + else + { + /* OK, that's all the options. The other arguments are filenames. */ + count = 0; + for (; optind < argc; optind++) + switch (++count) + { + case 1: + symarg = argv[optind]; + execarg = argv[optind]; + break; + case 2: + /* The documentation says this can be a "ProcID" as well. + We will try it as both a corefile and a pid. */ + corearg = argv[optind]; + break; + case 3: + fprintf_unfiltered (gdb_stderr, + _("Excess command line arguments ignored. (%s%s)\n"), + argv[optind], (optind == argc - 1) ? "" : " ..."); + break; + } + } + if (batch) + quiet = 1; + } + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ + gdb_init (argv[0]); + + /* Do these (and anything which might call wrap_here or *_filtered) + after initialize_all_files() but before the interpreter has been + installed. Otherwize the help/version messages will be eaten by + the interpreter's output handler. */ + + if (print_version) + { + print_gdb_version (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + + if (print_help) + { + print_gdb_help (gdb_stdout); + fputs_unfiltered ("\n", gdb_stdout); + exit (0); + } + + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message before the interpreter is installed. That way + it isn't encapsulated in MI output. */ + if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + + /* Install the default UI. All the interpreters should have had a + look at things by now. Initialize the default interpreter. */ + + { + /* Find it. */ + struct interp *interp = interp_lookup (interpreter_p); + if (interp == NULL) + error ("Interpreter `%s' unrecognized", interpreter_p); + /* Install it. */ + if (!interp_set (interp)) + { + fprintf_unfiltered (gdb_stderr, + "Interpreter `%s' failed to initialize.\n", + interpreter_p); + exit (1); + } + } +#ifdef CRASH_MERGE +{ + extern void update_gdb_hooks(void); + update_gdb_hooks(); +} +#endif + + /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message after the interpreter is installed when it is + any sane interpreter. */ + if (!quiet && !current_interp_named_p (INTERP_MI1)) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + error_pre_print = "\n\n"; + quit_pre_print = error_pre_print; + + /* We may get more than one warning, don't double space all of them... */ + warning_pre_print = _("\nwarning: "); + + /* Read and execute $HOME/.gdbinit file, if it exists. This is done + *before* all the command line arguments are processed; it sets + global parameters, which are independent of what file you are + debugging or what directory you are in. */ + homedir = getenv ("HOME"); + if (homedir) + { + homeinit = (char *) alloca (strlen (homedir) + + strlen (gdbinit) + 10); + strcpy (homeinit, homedir); + strcat (homeinit, "/"); + strcat (homeinit, gdbinit); + + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only + need them if homedir is set. Make sure that they are + zero in case one of them fails (this guarantees that they + won't match if either exists). */ + + memset (&homebuf, 0, sizeof (struct stat)); + memset (&cwdbuf, 0, sizeof (struct stat)); + + stat (homeinit, &homebuf); + stat (gdbinit, &cwdbuf); /* We'll only need this if + homedir was set. */ + } + + /* Now perform all the actions indicated by the arguments. */ + if (cdarg != NULL) + { + catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ndir; i++) + catch_command_errors (directory_command, dirarg[i], 0, RETURN_MASK_ALL); + xfree (dirarg); + + if (execarg != NULL + && symarg != NULL + && strcmp (execarg, symarg) == 0) + { + /* The exec file and the symbol-file are the same. If we can't + open it, better only print one error message. + catch_command_errors returns non-zero on success! */ + if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL)) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + else + { + if (execarg != NULL) + catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL); + if (symarg != NULL) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + + /* After the symbol file has been read, print a newline to get us + beyond the copyright line... But errors should still set off + the error message with a (single) blank line. */ + if (!quiet) + printf_filtered ("\n"); + error_pre_print = "\n"; + quit_pre_print = error_pre_print; + warning_pre_print = _("\nwarning: "); + + if (corearg != NULL) + { + /* corearg may be either a corefile or a pid. + If its first character is a digit, try attach first + and then corefile. Otherwise try corefile first. */ + + if (isdigit (corearg[0])) + { + if (catch_command_errors (attach_command, corearg, + !batch, RETURN_MASK_ALL) == 0) + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + else /* Can't be a pid, better be a corefile. */ + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + + if (ttyarg != NULL) + catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL); + + /* Error messages should no longer be distinguished with extra output. */ + error_pre_print = NULL; + quit_pre_print = NULL; + warning_pre_print = _("warning: "); + + /* Read the .gdbinit file in the current directory, *if* it isn't + the same as the $HOME/.gdbinit file (it should exist, also). */ + + if (!homedir + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) + { +#if 0 + /* NOTE: cagney/1999-11-03: SET_TOP_LEVEL() was a macro that + expanded into a call to setjmp(). */ + if (!SET_TOP_LEVEL ()) /* NB: This is #if 0'd out */ + { + /* NOTE: I am commenting this out, because it is not clear + where this feature is used. It is very old and + undocumented. ezannoni: 1999-05-04 */ +#if 0 + if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0') + read_command_file (stdin); + else +#endif + source_command (cmdarg[i], !batch); + do_cleanups (ALL_CLEANUPS); + } +#endif + catch_command_errors (source_command, cmdarg[i], !batch, RETURN_MASK_ALL); + } + xfree (cmdarg); + + /* Read in the old history after all the command files have been read. */ + init_history (); + + if (batch) + { + /* We have hit the end of the batch file. */ + exit (0); + } + + /* Do any host- or target-specific hacks. This is used for i960 targets + to force the user to set a nindy target and spec its parameters. */ + +#ifdef BEFORE_MAIN_LOOP_HOOK + BEFORE_MAIN_LOOP_HOOK; +#endif + + /* Show time and/or space usage. */ + + if (display_time) + { + long init_time = get_run_time () - time_at_startup; + + printf_unfiltered (_("Startup time: %ld.%06ld\n"), + init_time / 1000000, init_time % 1000000); + } + + if (display_space) + { +#ifdef HAVE_SBRK + extern char **environ; + char *lim = (char *) sbrk (0); + + printf_unfiltered (_("Startup size: data size %ld\n"), + (long) (lim - (char *) &environ)); +#endif + } + +#if 0 + /* FIXME: cagney/1999-11-06: The original main loop was like: */ + while (1) + { + if (!SET_TOP_LEVEL ()) + { + do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ + /* GUIs generally have their own command loop, mainloop, or whatever. + This is a good place to gain control because many error + conditions will end up here via longjmp(). */ + if (command_loop_hook) + command_loop_hook (); + else + command_loop (); + quit_command ((char *) 0, instream == stdin); + } + } + /* NOTE: If the command_loop() returned normally, the loop would + attempt to exit by calling the function quit_command(). That + function would either call exit() or throw an error returning + control to SET_TOP_LEVEL. */ + /* NOTE: The function do_cleanups() was called once each time round + the loop. The usefulness of the call isn't clear. If an error + was thrown, everything would have already been cleaned up. If + command_loop() returned normally and quit_command() was called, + either exit() or error() (again cleaning up) would be called. */ +#endif + /* NOTE: cagney/1999-11-07: There is probably no reason for not + moving this loop and the code found in captured_command_loop() + into the command_loop() proper. The main thing holding back that + change - SET_TOP_LEVEL() - has been eliminated. */ + while (1) + { + catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); +#ifdef CRASH_MERGE + { + int console(char *, ...); + console("\n"); + } +#endif + } + /* No exit -- exit is through quit_command. */ +} + +int +gdb_main (struct captured_main_args *args) +{ + use_windows = args->use_windows; +#ifdef CRASH_MERGE + event_loop_p = 0; +#endif + catch_errors (captured_main, args, "", RETURN_MASK_ALL); + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; +} + +#ifdef CRASH_MERGE +/* + * NOTE: adapted from gdb.c, which is no longer built in; changed name of + * original main() to gdb_main_entry() for use as crash entry point + */ +int +gdb_main_entry (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; + return gdb_main (&args); +} +#endif + +/* Don't use *_filtered for printing help. We don't want to prompt + for continue no matter how small the screen or how much we're going + to print. */ + +static void +print_gdb_help (struct ui_file *stream) +{ + fputs_unfiltered (_("\ +This is the GNU debugger. Usage:\n\n\ + gdb [options] [executable-file [core-file or process-id]]\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ +Options:\n\n\ +"), stream); + fputs_unfiltered (_("\ + --args Arguments after executable-file are passed to inferior\n\ +"), stream); + fputs_unfiltered (_("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +"), stream); + fputs_unfiltered (_("\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + --batch Exit after processing options.\n\ + --cd=DIR Change current directory to DIR.\n\ + --command=FILE Execute GDB commands from FILE.\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --pid=PID Attach to running process PID.\n\ +"), stream); + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --directory=DIR Search for source files in DIR.\n\ + --epoch Output information used by epoch emacs-GDB interface.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --fullname Output information used by emacs-GDB interface.\n\ + --help Print this message.\n\ +"), stream); + fputs_unfiltered (_("\ + --interpreter=INTERP\n\ + Select a specific interpreter / user interface\n\ +"), stream); + fputs_unfiltered (_("\ + --mapped Use mapped symbol files if supported on this system.\n\ + --nw Do not use a window interface.\n\ + --nx Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file.\n\ + --quiet Do not print version number on startup.\n\ + --readnow Fully read symbol files on first access.\n\ +"), stream); + fputs_unfiltered (_("\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --tty=TTY Use TTY for input/output by the program being debugged.\n\ +"), stream); +#if defined(TUI) + fputs_unfiltered (_("\ + --tui Use a terminal user interface.\n\ +"), stream); +#endif + fputs_unfiltered (_("\ + --version Print version information and then exit.\n\ + -w Use a window interface.\n\ + --write Set writing into executable and core files.\n\ + --xdb XDB compatibility mode.\n\ +"), stream); + fputs_unfiltered (_("\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n\ +Report bugs to \"bug-gdb@gnu.org\".\ +"), stream); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2882 @@ +# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +# 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, +# Inc. +# Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. +# Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + +# This file is part of GDB. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +bindir = @bindir@ +libdir = @libdir@ +tooldir = $(libdir)/$(target_alias) + +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 +infodir = @infodir@ +htmldir = $(prefix)/html +includedir = @includedir@ + +# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT. +top_builddir = . + +SHELL = @SHELL@ +EXEEXT = @EXEEXT@ + +AWK = @AWK@ +LN_S = @LN_S@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DESTDIR = + +AR = @AR@ +AR_FLAGS = qv +RANLIB = @RANLIB@ +DLLTOOL = @DLLTOOL@ +WINDRES = @WINDRES@ +MIG = @MIG@ + +# If you are compiling with GCC, make sure that either 1) You have the +# fixed include files where GCC can reach them, or 2) You use the +# -traditional flag. Otherwise the ioctl calls in inflow.c +# will be incorrectly compiled. The "fixincludes" script in the gcc +# distribution will fix your include files up. +CC=@CC@ + +# Directory containing source files. +srcdir = @srcdir@ +VPATH = @srcdir@ + +YACC=@YACC@ + +# This is used to rebuild ada-lex.c from ada-lex.l. If the program is +# not defined, but ada-lex.c is present, compilation will continue, +# possibly with a warning. +FLEX = flex + +YLWRAP = $(srcdir)/../ylwrap + +# where to find makeinfo, preferably one designed for texinfo-2 +MAKEINFO=makeinfo + +MAKEHTML = texi2html + +MAKEHTMLFLAGS = -glossary -menu -split_chapter + +# Set this up with gcc if you have gnu ld and the loader will print out +# line numbers for undefined references. +#CC_LD=gcc -static +CC_LD=$(CC) + +# Where is our "include" directory? Typically $(srcdir)/../include. +# This is essentially the header file directory for the library +# routines in libiberty. +INCLUDE_DIR = $(srcdir)/../include +INCLUDE_CFLAGS = -I$(INCLUDE_DIR) + +# Where is the "-liberty" library? Typically in ../libiberty. +LIBIBERTY = ../libiberty/libiberty.a + +# Where is the BFD library? Typically in ../bfd. +BFD_DIR = ../bfd +BFD = $(BFD_DIR)/libbfd.a +BFD_SRC = $(srcdir)/$(BFD_DIR) +BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + +# Where is the READLINE library? Typically in ../readline. +READLINE_DIR = ../readline +READLINE = $(READLINE_DIR)/libreadline.a +READLINE_SRC = $(srcdir)/$(READLINE_DIR) +READLINE_CFLAGS = -I$(READLINE_SRC)/.. + +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ +GDB_WARN_CFLAGS = $(WARN_CFLAGS) +GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) + +# Where is the INTL library? Typically in ../intl. +INTL_DIR = ../intl +INTL = @INTLLIBS@ +INTL_DEPS = @INTLDEPS@ +INTL_SRC = $(srcdir)/$(INTL_DIR) +INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC) + +# Where is the ICONV library? This can be empty if libc has iconv. +LIBICONV = @LIBICONV@ + +# Did the user give us a --with-sysroot option? +TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + +# +# CLI sub directory definitons +# +SUBDIR_CLI_OBS = \ + cli-dump.o \ + cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ + cli-interp.o +SUBDIR_CLI_SRCS = \ + cli/cli-dump.c \ + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ + cli/cli-interp.c \ + cli/cli-utils.c +SUBDIR_CLI_DEPS = +SUBDIR_CLI_LDFLAGS= +SUBDIR_CLI_CFLAGS= + +# +# MI sub directory definitons +# +SUBDIR_MI_OBS = \ + mi-out.o mi-console.o \ + mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ + mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o \ + mi-interp.o \ + mi-main.o mi-parse.o mi-getopt.o +SUBDIR_MI_SRCS = \ + mi/mi-out.c mi/mi-console.c \ + mi/mi-cmds.c mi/mi-cmd-env.c \ + mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ + mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \ + mi/mi-interp.c \ + mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c +SUBDIR_MI_DEPS = +SUBDIR_MI_LDFLAGS= +SUBDIR_MI_CFLAGS= \ + -DMI_OUT=1 + +# +# TUI sub directory definitions +# + +# Name of the TUI program +TUI=gdbtui + +SUBDIR_TUI_OBS = \ + tui-command.o \ + tui-data.o \ + tui-disasm.o \ + tui-file.o tui.o \ + tui-hooks.o \ + tui-interp.o \ + tui-io.o \ + tui-layout.o \ + tui-out.o \ + tui-regs.o \ + tui-source.o \ + tui-stack.o \ + tui-win.o \ + tui-windata.o \ + tui-wingeneral.o \ + tui-winsource.o +SUBDIR_TUI_SRCS = \ + tui/tui-command.c \ + tui/tui-data.c \ + tui/tui-disasm.c \ + tui/tui-file.c \ + tui/tui-hooks.c \ + tui/tui-interp.c \ + tui/tui-io.c \ + tui/tui-layout.c \ + tui/tui-out.c \ + tui/tui-regs.c \ + tui/tui-source.c \ + tui/tui-stack.c \ + tui/tui-win.c \ + tui/tui-windata.c \ + tui/tui-wingeneral.c \ + tui/tui-winsource.c \ + tui/tui.c +SUBDIR_TUI_DEPS = +SUBDIR_TUI_LDFLAGS= +SUBDIR_TUI_CFLAGS= \ + -DTUI=1 + + +# Opcodes currently live in one of two places. Either they are in the +# opcode library, typically ../opcodes, or they are in a header file +# in INCLUDE_DIR. +# Where is the "-lopcodes" library, with (some of) the opcode tables and +# disassemblers? +OPCODES_DIR = ../opcodes +OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) +OPCODES = $(OPCODES_DIR)/libopcodes.a +# Where are the other opcode tables which only have header file +# versions? +OP_INCLUDE = $(INCLUDE_DIR)/opcode +OPCODES_CFLAGS = -I$(OP_INCLUDE) + +# The simulator is usually nonexistent; targets that include one +# should set this to list all the .o or .a files to be linked in. +SIM = + +WIN32LIBS = @WIN32LIBS@ + +# Where is the TCL library? Typically in ../tcl. +LIB_INSTALL_DIR = $(libdir) +# This variable is needed when doing dynamic linking. +LIB_RUNTIME_DIR = $(libdir) +TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ +TCL_CFLAGS = @TCLHDIR@ +GDBTKLIBS = @GDBTKLIBS@ +# Extra flags that the GDBTK files need: +GDBTK_CFLAGS = @GDBTK_CFLAGS@ + +# Where is the TK library? Typically in ../tk. +TK = @TK_BUILD_LIB_SPEC@ +TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@ + +# Where is Itcl? Typically in ../itcl/itcl. +ITCL_CFLAGS = @ITCLHDIR@ +ITCL = @ITCLLIB@ + +# Where is Itk? Typically in ../itcl/itk. +ITK_CFLAGS = @ITKHDIR@ +ITK = @ITKLIB@ + +X11_CFLAGS = @TK_XINCLUDES@ +X11_LDFLAGS = +X11_LIBS = + +WIN32LDAPP = @WIN32LDAPP@ + +LIBGUI = @LIBGUI@ +GUI_CFLAGS_X = @GUI_CFLAGS_X@ +IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) + +# The version of gdbtk we're building. This should be kept +# in sync with GDBTK_VERSION and friends in gdbtk.h. +GDBTK_VERSION = 1.0 +GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) + +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + +SUBDIR_GDBTK_OBS = \ + gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \ + gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o +SUBDIR_GDBTK_SRCS = \ + gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \ + gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \ + gdbtk/generic/gdbtk-interp.c \ + gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \ + gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \ + gdbtk/generic/gdbtk-main.c +SUBDIR_GDBTK_DEPS = \ + $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS) +SUBDIR_GDBTK_LDFLAGS= +SUBDIR_GDBTK_CFLAGS= -DGDBTK + +CONFIG_OBS= @CONFIG_OBS@ +CONFIG_SRCS= @CONFIG_SRCS@ +CONFIG_DEPS= @CONFIG_DEPS@ +CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ +ENABLE_CFLAGS= @ENABLE_CFLAGS@ +# CONFIG_ALL= @CONFIG_ALL@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_INSTALL = @CONFIG_INSTALL@ +CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ + +# -I. for config files. +# -I$(srcdir) for gdb internal headers. +# -I$(srcdir)/config for more generic config files. + +# It is also possible that you will need to add -I/usr/include/sys if +# your system doesn't have fcntl.h in /usr/include (which is where it +# should be according to Posix). +DEFS = -DCRASH_MERGE @DEFS@ +GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS) + +# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS +# from the config directory. +GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS) + +PROFILE_CFLAGS = @PROFILE_CFLAGS@ + +# CFLAGS is specifically reserved for setting from the command line +# when running make. I.E. "make CFLAGS=-Wmissing-prototypes". +CFLAGS = @CFLAGS@ + +# Need to pass this to testsuite for "make check". Probably should be +# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in +# so "make check" has the same result no matter where it is run. +CXXFLAGS = -g -O + +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_WARN_CFLAGS = \ + $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) $(ENABLE_CFLAGS) \ + $(GDB_WARN_CFLAGS) +INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) + +# LDFLAGS is specifically reserved for setting from the command line +# when running make. +LDFLAGS = @LDFLAGS@ + +# Profiling options need to go here to work. +# I think it's perfectly reasonable for a user to set -pg in CFLAGS +# and have it work; that's why CFLAGS is here. +# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. +INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) + +# If your system is missing alloca(), or, more likely, it's there but +# it doesn't work, then refer to libiberty. + +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# LIBIBERTY appears twice on purpose. +# If you have the Cygnus libraries installed, +# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' +INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + -lintl -liberty +CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + $(LIBICONV) \ + $(LIBIBERTY) $(WIN32LIBS) +CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) + +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) + +DIST=gdb + +LINT=/usr/5bin/lint +LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) + +RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \ + echo $${rootsrc}/../dejagnu/runtest ; else echo runtest; \ + fi` + +RUNTESTFLAGS= + +# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX +# interface to the serial port. Hopefully if get ported to OS/2, VMS, +# etc., then there will be (as part of the C library or perhaps as +# part of libiberty) a POSIX interface. But at least for now the +# host-dependent makefile fragment might need to use something else +# besides ser-unix.o +SER_HARDWIRE = @SER_HARDWIRE@ + +# The `remote' debugging target is supported for most architectures, +# but not all (e.g. 960) +REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o + +# This is remote-sim.o if a simulator is to be linked in. +SIM_OBS = + +# Host and target-dependent makefile fragments come in here. +@host_makefile_frag@ +@target_makefile_frag@ +# End of host and target-dependent makefile fragments + +# Possibly ignore the simulator. If the simulator is being ignored, +# these expand into SIM= and SIM_OBJ=, overriding the entries from +# target_makefile_frag +# +@IGNORE_SIM@ +@IGNORE_SIM_OBS@ + +FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "mandir=$(mandir)" \ + "datadir=$(datadir)" \ + "includedir=$(includedir)" \ + "against=$(against)" \ + "DESTDIR=$(DESTDIR)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "CXX=$(CXX)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "DLLTOOL=$(DLLTOOL)" \ + "LDFLAGS=$(LDFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# Flags that we pass when building the testsuite. + +# empty for native, $(target_alias)/ for cross +target_subdir = @target_subdir@ + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +# The use of $$(x_FOR_TARGET) reduces the command line length by not +# duplicating the lengthy definition. +TARGET_FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "against=$(against)" \ + 'CC=$$(CC_FOR_TARGET)' \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + 'CXX=$$(CXX_FOR_TARGET)' \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# All source files that go into linking GDB. +# Links made at configuration time should not be specified here, since +# SFILES is used in building the distribution archive. + +SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ + ax-general.c ax-gdb.c \ + bcache.c \ + bfd-target.c \ + block.c blockframe.c breakpoint.c buildsym.c \ + c-exp.y c-lang.c c-typeprint.c c-valprint.c \ + charset.c cli-out.c coffread.c coff-pe-read.c \ + complaints.c completer.c corefile.c \ + cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ + dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \ + dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \ + elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ + f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ + frame-base.c \ + frame-unwind.c \ + gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ + hpacc-abi.c \ + inf-loop.c \ + infcall.c \ + infcmd.c inflow.c infrun.c \ + interps.c \ + jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ + kod.c kod-cisco.c \ + language.c linespec.c \ + m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \ + macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \ + mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \ + nlmread.c \ + objc-exp.y objc-lang.c \ + objfiles.c osabi.c observer.c \ + p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \ + regcache.c reggroups.c remote.c remote-fileio.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + serial.c ser-unix.c source.c \ + stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \ + target.c thread.c top.c tracepoint.c \ + trad-frame.c \ + typeprint.c \ + ui-out.c utils.c ui-file.h ui-file.c \ + user-regs.c \ + valarith.c valops.c valprint.c values.c varobj.c \ + wrapper.c + +LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c + +# "system" headers. Using these in dependencies is a rather personal +# choice. (-rich, summer 1993) +# (Why would we not want to depend on them? If one of these changes in a +# non-binary-compatible way, it is a real pain to remake the right stuff +# without these dependencies -kingdon, 13 Mar 1994) +aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h +aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h +getopt_h = $(INCLUDE_DIR)/getopt.h +floatformat_h = $(INCLUDE_DIR)/floatformat.h +bfd_h = $(BFD_DIR)/bfd.h +callback_h = $(INCLUDE_DIR)/gdb/callback.h +coff_sym_h = $(INCLUDE_DIR)/coff/sym.h +coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h +coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h +coff_internal_h = $(INCLUDE_DIR)/coff/internal.h +dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h) +elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h +elf_sh_h = $(INCLUDE_DIR)/elf/sh.h +elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) +elf_bfd_h = $(BFD_SRC)/elf-bfd.h +libaout_h = $(BFD_SRC)/libaout.h +libbfd_h = $(BFD_SRC)/libbfd.h +remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h +demangle_h = $(INCLUDE_DIR)/demangle.h +obstack_h = $(INCLUDE_DIR)/obstack.h +opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h +readline_h = $(READLINE_SRC)/readline.h +readline_tilde_h = $(READLINE_SRC)/tilde.h +readline_history_h = $(READLINE_SRC)/history.h +frv_desc_h = $(OPCODES_SRC)/frv-desc.h +sh_opc_h = $(OPCODES_SRC)/sh-opc.h +gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h +gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h +gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h +gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h +splay_tree_h = $(INCLUDE_DIR)/splay-tree.h + +# +# $BUILD/ headers +# + +config_h = config.h +exc_request_U_h = exc_request_U.h +exc_request_S_h = exc_request_S.h +msg_reply_S_h = msg_reply_S.h +msg_U_h = msg_U.h +notify_S_h = notify_S.h +process_reply_S_h = process_reply_S.h + +# +# config/ headers +# + +xm_h = @xm_h@ +tm_h = @tm_h@ +nm_h = @nm_h@ + +# +# gdb/ headers +# + +ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) +alphabsd_tdep_h = alphabsd-tdep.h +alpha_tdep_h = alpha-tdep.h +amd64_linux_tdep_h = amd64-linux-tdep.h +amd64_nat_h = amd64-nat.h +amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) +annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) +arch_utils_h = arch-utils.h +arm_tdep_h = arm-tdep.h +auxv_h = auxv.h +ax_gdb_h = ax-gdb.h +ax_h = ax.h $(doublest_h) +bcache_h = bcache.h +bfd_target_h = bfd-target.h +block_h = block.h +breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) +buildsym_h = buildsym.h +call_cmds_h = call-cmds.h +charset_h = charset.h +c_lang_h = c-lang.h $(value_h) $(macroexp_h) +cli_out_h = cli-out.h +coff_pe_read_h = coff-pe-read.h +coff_solib_h = coff-solib.h +command_h = command.h +complaints_h = complaints.h +completer_h = completer.h +cp_abi_h = cp-abi.h +cp_support_h = cp-support.h $(symtab_h) +dcache_h = dcache.h +defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) +dictionary_h = dictionary.h +disasm_h = disasm.h +doublest_h = doublest.h $(floatformat_h) +dummy_frame_h = dummy-frame.h +dwarf2expr_h = dwarf2expr.h +dwarf2_frame_h = dwarf2-frame.h +dwarf2loc_h = dwarf2loc.h +environ_h = environ.h +event_loop_h = event-loop.h +event_top_h = event-top.h +exec_h = exec.h $(target_h) +expression_h = expression.h $(symtab_h) $(doublest_h) +f_lang_h = f-lang.h +frame_base_h = frame-base.h +frame_h = frame.h +frame_unwind_h = frame-unwind.h $(frame_h) +gdbarch_h = gdbarch.h +gdb_assert_h = gdb_assert.h +gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) +gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h +gdb_dirent_h = gdb_dirent.h +gdb_events_h = gdb-events.h +gdb_h = gdb.h +gdb_locale_h = gdb_locale.h +gdb_obstack_h = gdb_obstack.h $(obstack_h) +gdb_proc_service_h = gdb_proc_service.h $(gregset_h) +gdb_regex_h = gdb_regex.h $(xregex_h) +gdb_stabs_h = gdb-stabs.h +gdb_stat_h = gdb_stat.h +gdb_string_h = gdb_string.h +gdb_thread_db_h = gdb_thread_db.h +gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) +gdbtypes_h = gdbtypes.h +gdb_vfork_h = gdb_vfork.h +gdb_wait_h = gdb_wait.h +glibc_tdep_h = glibc-tdep.h +gnu_nat_h = gnu-nat.h +gregset_h = gregset.h +hppa_tdep_h = hppa-tdep.h +i386_linux_tdep_h = i386-linux-tdep.h +i386_tdep_h = i386-tdep.h +i387_tdep_h = i387-tdep.h +ia64_tdep_h = ia64-tdep.h +infcall_h = infcall.h +inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h) +inf_loop_h = inf-loop.h +inflow_h = inflow.h $(terminal_h) +infttrace_h = infttrace.h +interps_h = interps.h +jv_lang_h = jv-lang.h +kod_h = kod.h +language_h = language.h +libunwind_frame_h = libunwind-frame.h $(libunwind_h) +linespec_h = linespec.h +linux_nat_h = linux-nat.h +m2_lang_h = m2-lang.h +m68k_tdep_h = m68k-tdep.h +macroexp_h = macroexp.h +macroscope_h = macroscope.h $(macrotab_h) $(symtab_h) +macrotab_h = macrotab.h +main_h = main.h +memattr_h = memattr.h +minimon_h = minimon.h +mipsnbsd_tdep_h = mipsnbsd-tdep.h +mips_tdep_h = mips-tdep.h +monitor_h = monitor.h +nbsd_tdep_h = nbsd-tdep.h +ns32k_tdep_h = ns32k-tdep.h +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +objc_lang_h = objc-lang.h +objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) +observer_h = observer.h +ocd_h = ocd.h +osabi_h = osabi.h +pa64solib_h = pa64solib.h +parser_defs_h = parser-defs.h $(doublest_h) +p_lang_h = p-lang.h +ppcnbsd_tdep_h = ppcnbsd-tdep.h +ppc_tdep_h = ppc-tdep.h +proc_utils_h = proc-utils.h +regcache_h = regcache.h +reggroups_h = reggroups.h +regset_h = regset.h +remote_fileio_h = remote-fileio.h +remote_h = remote.h +remote_utils_h = remote-utils.h $(target_h) +s390_tdep_h = s390-tdep.h +scm_lang_h = scm-lang.h $(scm_tags_h) +scm_tags_h = scm-tags.h +sentinel_frame_h = sentinel-frame.h +serial_h = serial.h +ser_unix_h = ser-unix.h +shnbsd_tdep_h = shnbsd-tdep.h +sh_tdep_h = sh-tdep.h +sim_regno_h = sim-regno.h +solib_h = solib.h +solib_svr4_h = solib-svr4.h +solist_h = solist.h +somsolib_h = somsolib.h +source_h = source.h +sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) +sparc_nat_h = sparc-nat.h +sparc_tdep_h = sparc-tdep.h +srec_h = srec.h +stabsread_h = stabsread.h +stack_h = stack.h +symfile_h = symfile.h +symtab_h = symtab.h +target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) +terminal_h = terminal.h +top_h = top.h +tracepoint_h = tracepoint.h +trad_frame_h = trad-frame.h +typeprint_h = typeprint.h +ui_file_h = ui-file.h +ui_out_h = ui-out.h +user_regs_h = user-regs.h +valprint_h = valprint.h +value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) +varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) +vax_tdep_h = vax-tdep.h +version_h = version.h +wince_stub_h = wince-stub.h +wrapper_h = wrapper.h $(gdb_h) +xcoffsolib_h = xcoffsolib.h +xmodem_h = xmodem.h + +# +# gdb/cli/ headers +# + +cli_cmds_h = $(srcdir)/cli/cli-cmds.h +cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h) +cli_dump_h = $(srcdir)/cli/cli-dump.h +cli_script_h = $(srcdir)/cli/cli-script.h +cli_setshow_h = $(srcdir)/cli/cli-setshow.h +cli_utils_h = $(srcdir)/cli/cli-utils.h + +# +# gdb/mi/ headers +# + +mi_cmds_h = $(srcdir)/mi/mi-cmds.h +mi_console_h = $(srcdir)/mi/mi-console.h +mi_getopt_h = $(srcdir)/mi/mi-getopt.h +mi_main_h = $(srcdir)/mi/mi-main.h +mi_out_h = $(srcdir)/mi/mi-out.h +mi_parse_h = $(srcdir)/mi/mi-parse.h + +# +# gdb/tui/ headers +# + +tui_command_h = $(srcdir)/tui/tui-command.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) +tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) +tui_file_h = $(srcdir)/tui/tui-file.h +tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h +tui_io_h = $(srcdir)/tui/tui-io.h +tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) +tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) +tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h) +tui_stack_h = $(srcdir)/tui/tui-stack.h +tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h) +tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h +tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h) +tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) + +# Header files that need to have srcdir added. Note that in the cases +# where we use a macro like $(gdbcmd_h), things are carefully arranged +# so that each .h file is listed exactly once (M-x tags-search works +# wrong if TAGS has files twice). Because this is tricky to get +# right, it is probably easiest just to list .h files here directly. + +HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + environ.h $(gdbcmd_h) gdb.h gdbcore.h \ + gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ + objfiles.h parser-defs.h serial.h solib.h \ + symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \ + macrotab.h macroexp.h macroscope.h \ + c-lang.h f-lang.h \ + jv-lang.h \ + m2-lang.h p-lang.h \ + complaints.h valprint.h \ + vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \ + vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \ + dcache.h remote-utils.h top.h somsolib.h + +# Header files that already have srcdir in them, or which are in objdir. + +HFILES_WITH_SRCDIR = ../bfd/bfd.h + + +# GDB "info" files, which should be included in their entirety +INFOFILES = gdb.info* + +REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar + +# {X,T,NAT}DEPFILES are something of a pain in that it's hard to +# default their values the way we do for SER_HARDWIRE; in the future +# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other +# variables analogous to SER_HARDWIRE which get defaulted in this +# Makefile.in + +DEPFILES = $(TDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \ + $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS) + +SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) +# Don't include YYFILES (*.c) because we already include *.y in SFILES, +# and it's more useful to see it in the .y file. +TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ + $(SUBDIR_CLI_SRCS) +TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) + +COMMON_OBS = $(DEPFILES) $(YYOBJ) \ + version.o \ + annotate.o \ + auxv.o \ + bfd-target.o \ + blockframe.o breakpoint.o findvar.o regcache.o \ + charset.o disasm.o dummy-frame.o \ + source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ + block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \ + infcall.o \ + infcmd.o infrun.o \ + expprint.o environ.o stack.o thread.o \ + interps.o \ + main.o \ + macrotab.o macrocmd.o macroexp.o macroscope.o \ + event-loop.o event-top.o inf-loop.o completer.o \ + gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \ + memattr.o mem-break.o target.o parse.o language.o buildsym.o \ + std-regs.o \ + signals.o \ + kod.o kod-cisco.o \ + gdb-events.o \ + exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \ + dbxread.o coffread.o coff-pe-read.o elfread.o \ + dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + dwarf2expr.o dwarf2loc.o dwarf2-frame.o \ + c-lang.o f-lang.o objc-lang.o \ + ui-out.o cli-out.o \ + varobj.o wrapper.o \ + jv-lang.o jv-valprint.o jv-typeprint.o \ + m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ + scm-exp.o scm-lang.o scm-valprint.o \ + sentinel-frame.o \ + complaints.o typeprint.o \ + c-typeprint.o f-typeprint.o m2-typeprint.o \ + c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \ + nlmread.o serial.o mdebugread.o top.o utils.o \ + ui-file.o \ + user-regs.o \ + frame.o frame-unwind.o doublest.o \ + frame-base.o \ + gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ + cp-namespace.o \ + reggroups.o \ + trad-frame.o + +TSOBS = inflow.o + +SUBDIRS = build_no_subdirs + +# For now, shortcut the "configure GDB for fewer languages" stuff. +YYFILES = c-exp.c \ + objc-exp.c \ + ada-exp.c \ + jv-exp.c \ + f-exp.c m2-exp.c p-exp.c +YYOBJ = c-exp.o \ + objc-exp.o \ + jv-exp.o \ + f-exp.o m2-exp.o p-exp.o + +# Things which need to be built when making a distribution. + +DISTSTUFF = $(YYFILES) + +# Prevent Sun make from putting in the machine type. Setting +# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. +.c.o: + $(CC) -c $(INTERNAL_CFLAGS) $< + +all: gdb$(EXEEXT) $(CONFIG_ALL) + @$(MAKE) -s $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) + +installcheck: + +# The check target can not use subdir_do, because subdir_do does not +# use TARGET_FLAGS_TO_PASS. +check: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ + else true; fi + +info dvi install-info clean-info html install-html: force + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do + +gdb.z:gdb.1 + nroff -man $(srcdir)/gdb.1 | col -b > gdb.t + pack gdb.t ; rm -f gdb.t + mv gdb.t.z gdb.z + +# Traditionally "install" depends on "all". But it may be useful +# not to; for example, if the user has made some trivial change to a +# source file and doesn't care about rebuilding or just wants to save the +# time it takes for make to check that all is up to date. +# install-only is intended to address that need. +install: all install-only +install-only: $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + + +uninstall: force $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (top.o -> _initialize_top, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +# FIXME: There is a problem with this approach - init.c may force +# unnecessary files to be linked in. + +# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that +# the first call is to _initialize_gdbtypes (implemented by explicitly +# putting that function's name first in the init.l-tmp file). This is +# a hack to ensure that all the architecture dependant global +# builtin_type_* variables are initialized before anything else +# (per-architecture code is called in the same order that it is +# registered). The ``correct fix'' is to have all the builtin types +# made part of the architecture and initialize them on-demand (using +# gdbarch_data) just like everything else. The catch is that other +# modules still take the address of these builtin types forcing them +# to be variables, sigh! + +# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is +# anchored on the first column and excludes the ``/'' character so +# that it doesn't add the $(srcdir) prefix to any file that already +# has an absolute path. It turns out that $(DEC)'s True64 make +# automatically adds the $(srcdir) prefixes when it encounters files +# in sub-directories such as cli/ and mi/. + +# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates +# duplicates. Files in the gdb/ directory can end up appearing in +# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file). + +INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) +init.c: $(INIT_FILES) + @echo Making init.c + @rm -f init.c-tmp init.l-tmp + @touch init.c-tmp + @echo gdbtypes > init.l-tmp + @-echo $(INIT_FILES) | \ + tr ' ' '\012' | \ + sed \ + -e '/^gdbtypes.[co]$$/d' \ + -e '/^init.[co]$$/d' \ + -e '/xdr_ld.[co]$$/d' \ + -e '/xdr_ptrace.[co]$$/d' \ + -e '/xdr_rdb.[co]$$/d' \ + -e '/udr.[co]$$/d' \ + -e '/udip2soc.[co]$$/d' \ + -e '/udi2go32.[co]$$/d' \ + -e '/version.[co]$$/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \ + -e 's/\.[co]$$/.c/' \ + -e 's,signals\.c,signals/signals\.c,' \ + -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ + while read f; do \ + sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ + done | \ + while read f; do \ + case " $$fs " in \ + *" $$f "* ) ;; \ + * ) echo $$f ; fs="$$fs $$f";; \ + esac; \ + done >> init.l-tmp + @echo '/* Do not modify this file. */' >>init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp + @echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp + @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' >init.c-tmp + @echo 'void' >>init.c-tmp + @echo 'initialize_all_files (void)' >>init.c-tmp + @echo '{' >>init.c-tmp + @sed -e 's/\(.*\)/ _initialize_\1 ();/' >init.c-tmp + @echo '}' >>init.c-tmp + @rm init.l-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c + +init.o: init.c $(defs_h) $(call_cmds_h) + +# Removing the old gdb first works better if it is running, at least on SunOS. +gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + @(cd ../..; make --no-print-directory GDB_FLAGS=-DGDB_6_1 library) + @rm -f gdb$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o `cat mergeobj` libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) `cat mergelibs` + +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +nlm: force + rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do + +# Create a library of the gdb object files and build GDB by linking +# against that. +# +# init.o is very important. It pulls in the rest of GDB. +LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o +libgdb.a: $(LIBGDB_OBS) + -rm -f libgdb.a + $(AR) q libgdb.a $(LIBGDB_OBS) + $(RANLIB) libgdb.a + +# A Mach 3.0 program to force gdb back to command level + +stop-gdb: stop-gdb.o + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + stop-gdb.o $(CLIBS) $(LOADLIBES) + +# This is useful when debugging GDB, because some Unix's don't let you run GDB +# on itself without copying the executable. So "make gdb1" will make +# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". +# Removing gdb1 before the copy is the right thing if gdb1 is open +# in another process. +gdb1$(EXEEXT): gdb$(EXEEXT) + rm -f gdb1$(EXEEXT) + cp gdb$(EXEEXT) gdb1$(EXEEXT) + +# FIXME. These are not generated by "make depend" because they only are there +# for some machines. +# But these rules don't do what we want; we want to hack the foo.o: tm.h +# dependency to do the right thing. +tm-sun3.h tm-altos.h: tm-m68k.h +tm-sun2.h tm-3b1.h: tm-m68k.h +xm-vaxult.h: xm-vax.h +xm-vaxbsd.h: xm-vax.h + +# Put the proper machine-specific files first, so M-. on a machine +# specific routine gets the one for the correct machine. (FIXME: those +# files go in twice; we should be removing them from the main list). + +# TAGS depends on all the files that go into it so you can rebuild TAGS +# with `make TAGS' and not have to say `rm TAGS' first. + +TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) + @echo Making TAGS + @etags $(srcdir)/$(TM_FILE) \ + $(srcdir)/$(XM_FILE) \ + $(srcdir)/$(NAT_FILE) \ + `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ + echo $(srcdir)/$$i ; \ + done ; for i in $(TAGFILES_WITH_SRCDIR); do \ + echo $$i ; \ + done) | sed -e 's/\.o$$/\.c/'` \ + `find $(srcdir)/config -name '*.h' -print` + +tags: TAGS + +clean mostlyclean: $(CONFIG_CLEAN) + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do + rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp + rm -f init.c version.c + rm -f gdb$(EXEEXT) core make.log + rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) + +# This used to depend on c-exp.c m2-exp.c TAGS +# I believe this is wrong; the makefile standards for distclean just +# describe removing files; the only sort of "re-create a distribution" +# functionality described is if the distributed files are unmodified. +# NB: While GDBSERVER might be configured on native systems, it isn't +# always included in SUBDIRS. Remove the gdbserver files explictly. +distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do + rm -f gdbserver/config.status gdbserver/config.log + rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h + rm -f gdbserver/Makefile gdbserver/config.cache + rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit + rm -f y.output yacc.acts yacc.tmp y.tab.h + rm -f config.log config.cache + rm -f Makefile + +maintainer-clean: local-maintainer-clean do-maintainer-clean distclean +realclean: maintainer-clean + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f c-exp.c \ + ada-lex.c ada-exp.c \ + objc-exp.c \ + jv-exp.tab \ + f-exp.c m2-exp.c p-exp.c + rm -f TAGS $(INFOFILES) + rm -f $(YYFILES) + rm -f nm.h tm.h xm.h config.status + +do-maintainer-clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \ + subdir_do + +diststuff: $(DISTSTUFF) + cd doc; $(MAKE) $(MFLAGS) diststuff + +subdir_do: force + @for i in $(DODIRS); do \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + +Makefile: Makefile.in config.status @frags@ + $(SHELL) config.status + +config.h: stamp-h ; @true +stamp-h: config.in config.status + CONFIG_HEADERS=config.h:config.in $(SHELL) config.status + +config.status: configure configure.tgt configure.host + $(SHELL) config.status --recheck + +force: + +# Documentation! +# GDB QUICK REFERENCE (TeX dvi file, CM fonts) +doc/refcard.dvi: + cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) + +# GDB QUICK REFERENCE (PostScript output, common PS fonts) +doc/refcard.ps: + cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) + +# GDB MANUAL: TeX dvi file +doc/gdb.dvi: + cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) + +# GDB MANUAL: info file +doc/gdb.info: + cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) + +# Make copying.c from COPYING +$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \ + $(srcdir)/COPYING $(srcdir)/copying.awk + awk -f $(srcdir)/copying.awk \ + < $(srcdir)/COPYING > $(srcdir)/copying.tmp + mv $(srcdir)/copying.tmp $(srcdir)/copying.c + +version.c: Makefile version.in + @rm -f version.c-tmp version.c + @echo '#include "version.h"' >> version.c-tmp + @echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp + @echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp + @echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp + @mv version.c-tmp version.c +version.o: version.c $(version_h) + + +lint: $(LINTFILES) + $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ + `echo $(DEPFILES) | sed 's/\.o /\.c /g'` + +gdb.cxref: $(SFILES) + cxref -I. $(SFILES) >gdb.cxref + +force_update: + +# GNU Make has an annoying habit of putting *all* the Makefile variables +# into the environment, unless you include this target as a circumvention. +# Rumor is that this will be fixed (and this target can be removed) +# in GNU Make 4.0. +.NOEXPORT: + +# GNU Make 3.63 has a different problem: it keeps tacking command line +# overrides onto the definition of $(MAKE). This variable setting +# will remove them. +MAKEOVERRIDES= + +ALLDEPFILES = \ + aix-thread.c \ + alpha-nat.c alphabsd-nat.c \ + alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \ + alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \ + amd64-nat.c amd64-tdep.c \ + amd64bsd-nat.c amdfbsd-nat.c amd64fbsd-tdep.c \ + amd64nbsd-nat.c amd64nbsd-tdep.c \ + amd64obsd-nat.c amd64obsd-tdep.c \ + amd64-linux-nat.c amd64-linux-tdep.c \ + arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \ + armnbsd-nat.c armnbsd-tdep.c \ + avr-tdep.c \ + coff-solib.c \ + core-regset.c core-aout.c corelow.c \ + dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \ + glibc-tdep.c \ + go32-nat.c h8300-tdep.c \ + hppa-tdep.c hppa-hpux-tdep.c \ + hppah-nat.c hpread.c \ + i386-tdep.c i386v-nat.c i386-linux-nat.c \ + i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \ + i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \ + i387-tdep.c \ + i386-linux-tdep.c i386-nat.c \ + i386gnu-nat.c i386gnu-tdep.c \ + ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ + libunwind-frame.c \ + lynx-nat.c m3-nat.c \ + m68hc11-tdep.c \ + m68k-tdep.c \ + mcore-tdep.c \ + mips-linux-nat.c mips-linux-tdep.c \ + mips-nat.c \ + mips-irix-tdep.c \ + mips-tdep.c mipsm3-nat.c mipsv4-nat.c \ + mipsnbsd-nat.c mipsnbsd-tdep.c \ + nbsd-tdep.c \ + ns32k-tdep.c solib-osf.c \ + somread.c somsolib.c $(HPREAD_SOURCE) \ + ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \ + ppcnbsd-nat.o ppcnbsd-tdep.o \ + procfs.c \ + remote-e7000.c \ + remote-hms.c remote-m32r-sdi.c remote-mips.c \ + remote-rdp.c remote-sim.c \ + remote-st.c remote-utils.c dcache.c \ + remote-vx.c \ + rs6000-nat.c rs6000-tdep.c \ + s390-tdep.c s390-nat.c \ + ser-go32.c ser-pipe.c ser-tcp.c \ + sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ + solib.c solib-irix.c solib-svr4.c solib-sunos.c \ + sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \ + sparc-tdep.c sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-linux-nat.c \ + sparc64-linux-tdep.c sparc64-nat.c sparc64-sol2-tdep.c \ + sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ + sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ + sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + sun3-nat.c \ + symm-tdep.c symm-nat.c \ + vax-tdep.c \ + vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ + win32-nat.c \ + xcoffread.c xcoffsolib.c \ + xstormy16-tdep.c + +# Some files need explict build rules (due to -Werror problems) or due +# to sub-directory fun 'n' games. + +# Provide explicit rule/dependency - works for more makes. +copying.o: $(srcdir)/copying.c + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c + +hpux-thread.o: $(srcdir)/hpux-thread.c + $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \ + -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \ + $(srcdir)/hpux-thread.c + +# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. +main.o: main.c + $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \ + -DBINDIR=\"$(bindir)\" $(srcdir)/main.c + +# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral +# errors. It turns out that that is the least of monitor.c's +# problems. The function print_vsprintf appears to be using +# va_arg(long) to extract CORE_ADDR parameters - something that +# definitly will not work. "monitor.c" needs to be rewritten so that +# it doesn't use format strings and instead uses callbacks. +monitor.o: $(srcdir)/monitor.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/monitor.c + +# FIXME: cagney/2003-08-10: Do not try to build "printcmd.c" with +# -Wformat-nonliteral. It needs to be overhauled so that it doesn't +# pass user input strings as the format parameter to host printf +# function calls. +printcmd.o: $(srcdir)/printcmd.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/printcmd.c + +# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't +# match output format strings. +procfs.o: $(srcdir)/procfs.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c + +# FIXME: Thread-db.o gets warnings because the definitions of the register +# sets are different from kernel to kernel. +thread-db.o: $(srcdir)/thread-db.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \ + $(srcdir)/thread-db.c + +v850ice.o: $(srcdir)/v850ice.c + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) \ + $(srcdir)/v850ice.c + +# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with +# -Wformat-nonliteral. It relies on local_hex_format et.al. and +# that's a mess. It needs a serious overhaul. +valprint.o: $(srcdir)/valprint.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c + +# +# YACC/LEX dependencies +# +# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't +# exist in srcdir, then compiled in objdir to LANG-exp.o. If we +# said LANG-exp.c rather than ./c-exp.c some makes would +# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus +# decls for malloc/realloc/free which conflict with everything else. +# Strictly speaking c-exp.c should therefore depend on +# Makefile.in, but that was a pretty big annoyance. + +.SUFFIXES: .y .l +.y.c: + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $@.tmp -- $(YFLAGS) + -sed -e '/extern.*malloc/d' \ + -e '/extern.*realloc/d' \ + -e '/extern.*free/d' \ + -e '/include.*malloc.h/d' \ + -e 's/malloc/xmalloc/g' \ + -e 's/realloc/xrealloc/g' \ + -e '/^#line.*y.tab.c/d' \ + < $@.tmp > $@.new + -rm $@.tmp + mv $@.new ./$*.c +.l.c: + @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ + echo $(FLEX) -Isit $< ">" $@; \ + $(FLEX) -Isit $< > $@; \ + elif [ ! -f $@ -a ! -f $< ]; then \ + echo "ada-lex.c missing and flex not available."; \ + false; \ + elif [ ! -f $@ ]; then \ + echo "Warning: $*.c older than $*.l and flex not available."; \ + fi + +.PRECIOUS: ada-exp.c ada-lex.c +.PRECIOUS: c-exp.c +.PRECIOUS: f-exp.c +.PRECIOUS: jv-exp.c +.PRECIOUS: m2-exp.c +.PRECIOUS: objc-exp.c +.PRECIOUS: p-exp.c + +# +# gdb/ dependencies +# + +abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \ + $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(frame_h) $(block_h) $(ada_lex_c) +ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \ + $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \ + $(infcall_h) $(dictionary_h) +ada-lex.o: ada-lex.c +ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \ + $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \ + $(gregset_h) $(ada_lang_h) +ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ + $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ + $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) +ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \ + $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) +aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ + $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \ + $(ppc_tdep_h) +alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h) +alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) +alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(alpha_tdep_h) +alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \ + $(osabi_h) $(alpha_tdep_h) +alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ + $(block_h) $(gdb_assert_h) $(alpha_tdep_h) +alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) +alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) $(nbsd_tdep_h) +alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h) +alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \ + $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \ + $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \ + $(elf_bfd_h) $(alpha_tdep_h) +amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(solib_svr4_h) +amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) +amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ + $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) +amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ + $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \ + $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(i387_tdep_h) +annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ + $(gdbtypes_h) $(breakpoint_h) +arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ + $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ + $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \ + $(floatformat_h) +arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) +arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \ + $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \ + $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \ + $(glibc_tdep_h) +armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \ + $(regcache_h) $(gdbcore_h) +armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \ + $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \ + $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \ + $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) +auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \ + $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \ + $(elf_common_h) +avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_string_h) $(dis_asm_h) +ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \ + $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \ + $(regcache_h) +ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h) +bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \ + $(gdb_assert_h) +bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \ + $(gdb_assert_h) $(gdb_string_h) +block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \ + $(gdb_obstack_h) $(cp_support_h) +blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \ + $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \ + $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \ + $(command_h) $(gdbcmd_h) $(block_h) +breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \ + $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ + $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \ + $(gdb_events_h) +buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ + $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \ + $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) +c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) +charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \ + $(gdb_string_h) +c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \ + $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \ + $(demangle_h) $(cp_support_h) +cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \ + $(gdb_assert_h) +coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \ + $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h) +coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \ + $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \ + $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \ + $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \ + $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h) +coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) +complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \ + $(command_h) $(gdbcmd_h) +completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \ + $(readline_h) $(completer_h) +copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h) +core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_dirent_h) $(gdb_stat_h) +corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ + $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ + $(dis_asm_h) $(gdb_stat_h) $(completer_h) +corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ + $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ + $(exec_h) $(readline_h) $(gdb_assert_h) +core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) +cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ + $(ui_out_h) $(gdb_string_h) +cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \ + $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \ + $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h) +cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \ + $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \ + $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \ + $(gdbtypes_h) +cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h) +cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \ + $(cp_abi_h) $(valprint_h) +cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \ + $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \ + $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \ + $(gdb_string_h) $(dis_asm_h) +c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \ + $(gdb_string_h) +c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(c_lang_h) $(cp_abi_h) $(target_h) +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ + $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ + $(disasm_h) $(trad_frame_h) $(gdb_assert_h) +dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ + $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ + $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ + $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \ + $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) +dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ + $(gdbcore_h) $(target_h) +delta68-nat.o: delta68-nat.c $(defs_h) +demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ + $(gdb_string_h) +dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(buildsym_h) $(gdb_assert_h) $(dictionary_h) +dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h) +disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \ + $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h) +doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h) +dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) +dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \ + $(gdb_string_h) +dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \ + $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \ + $(command_h) $(gdbcmd_h) +dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \ + $(mips_tdep_h) +dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ + $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) +dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \ + $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) +dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \ + $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \ + $(dwarf2loc_h) $(gdb_string_h) +dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \ + $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \ + $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \ + $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) +dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \ + $(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \ + $(language_h) $(complaints_h) $(gdb_string_h) +elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \ + $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) +environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h) +eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ + $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ + $(parser_defs_h) +event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ + $(gdb_string_h) +event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ + $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ + $(gdbcmd_h) $(readline_h) $(readline_history_h) +exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ + $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ + $(xcoffsolib_h) +expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ + $(gdb_string_h) $(block_h) +fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(gdb_string_h) $(elf_bfd_h) $(gregset_h) +f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \ + $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \ + $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \ + $(user_regs_h) $(block_h) +f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \ + $(valprint_h) $(value_h) +fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ + $(terminal_h) $(gdbthread_h) $(command_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ + $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ + $(command_h) $(gdbcmd_h) +frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdb_assert_h) $(dummy_frame_h) +frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) +f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(f_lang_h) $(gdb_string_h) +f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h) +gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \ + $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \ + $(gdb_assert_h) +gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ + $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) +gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) +gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \ + $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \ + $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) +glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(glibc_tdep_h) +gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \ + $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \ + $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \ + $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) +gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) +gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \ + $(demangle_h) $(gdb_assert_h) $(gdb_string_h) +go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ + $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ + $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ + $(gdb_string_h) +h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ + $(gdb_assert_h) $(dis_asm_h) +hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ + $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) +hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(gdb_wait_h) $(regcache_h) $(gdb_string_h) +hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(osabi_h) $(gdb_string_h) $(frame_h) +hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \ + $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \ + $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \ + $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \ + $(hppa_tdep_h) +hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ + $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ + $(somsolib_h) $(gdb_assert_h) $(gdb_string_h) +hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) +i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) +i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h) +i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \ + $(i386_tdep_h) +i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) +i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \ + $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \ + $(i387_tdep_h) $(gregset_h) +i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h) +i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \ + $(gdbcore_h) $(gregset_h) $(regcache_h) +i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \ + $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \ + $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) +i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(gdb_proc_service_h) +i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ + $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(glibc_tdep_h) +i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) +i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) +i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ + $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ + $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) +i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \ + $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(i386_tdep_h) +i386-stub.o: i386-stub.c +i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \ + $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \ + $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \ + $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) +i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(gregset_h) +i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \ + $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(i386_tdep_h) +i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \ + $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) +ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stat_h) +ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h) +ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) +ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \ + $(arch_utils_h) $(gdbcore_h) $(regcache_h) +ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ + $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ + $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \ + $(libunwind_frame_h) $(libunwind_ia64_h) +infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ + $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ + $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) +infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \ + $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \ + $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \ + $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ + $(gdb_assert_h) +inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ + $(event_top_h) $(inf_loop_h) $(remote_h) +inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ + $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ + $(inflow_h) +infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ + $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) +infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ + $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ + $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ + $(observer_h) $(language_h) $(gdb_assert_h) +inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) +infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \ + $(gdbcore_h) +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ + $(gdb_events_h) $(gdb_assert_h) $(top_h) +irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h) +jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \ + $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) +jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \ + $(c_lang_h) $(cp_abi_h) +jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ + $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) +kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \ + $(kod_h) +kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h) +language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ + $(parser_defs_h) $(jv_lang_h) $(demangle_h) +libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ + $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \ + $(gdb_string_h) $(libunwind_frame_h) $(complaints_h) +linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ + $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \ + $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \ + $(objc_lang_h) $(linespec_h) +lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ + $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \ + $(linux_nat_h) +linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \ + $(linux_nat_h) +linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \ + $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ + $(cli_decode_h) $(gdb_string_h) $(linux_nat_h) +lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \ + $(valprint_h) +m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h) +m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(m2_lang_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ + $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) +m32r-stub.o: m32r-stub.c $(syscall_h) +m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \ + $(dis_asm_h) $(gdb_assert_h) +m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ + $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \ + $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h) +m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ + $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \ + $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(gregset_h) +m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ + $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ + $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ + $(m68k_tdep_h) +m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) +m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) +m68k-stub.o: m68k-stub.c +m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \ + $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \ + $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \ + $(gregset_h) +macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \ + $(command_h) $(gdbcmd_h) +macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \ + $(macroexp_h) $(gdb_assert_h) +macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \ + $(target_h) $(frame_h) $(inferior_h) $(complaints_h) +macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ + $(bcache_h) $(complaints_h) +main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ + $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ + $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) +maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ + $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) +mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(gdb_string_h) $(regcache_h) $(serial_h) +mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ + $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ + $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) +mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ + $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ + $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) \ + $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \ + $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h) +memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \ + $(target_h) $(value_h) $(language_h) $(gdb_string_h) +mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \ + $(target_h) +minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) +mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) +mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) +mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ + $(gdb_assert_h) $(frame_h) +mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(mipsnbsd_tdep_h) +mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ + $(solib_svr4_h) +mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ + $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ + $(elf_common_h) $(elf_mips_h) +mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ + $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) +mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gregset_h) +mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \ + $(objfiles_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \ + $(dis_asm_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ + $(gdb_regex_h) $(srec_h) $(regcache_h) +nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) +nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) +ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ + $(gdb_string_h) +ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ + $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ + $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ + $(nto_tdep_h) $(command_h) $(regcache_h) +nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ + $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ + $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) +objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ + $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \ + $(block_h) +objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ + $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ + $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ + $(gdb_assert_h) +objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \ + $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \ + $(breakpoint_h) $(block_h) $(dictionary_h) +observer.o: observer.c $(defs_h) $(observer_h) +ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ + $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) +osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ + $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) +parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ + $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ + $(doublest_h) $(gdb_assert_h) $(block_h) +p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \ + $(valprint_h) $(value_h) +ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \ + $(regcache_h) +ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \ + $(ppc_tdep_h) +ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ + $(ppc_tdep_h) +ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) +ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ + $(ppc_tdep_h) $(target_h) $(objfiles_h) +printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ + $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ + $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) +proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ + $(proc_utils_h) +proc-events.o: proc-events.c $(defs_h) +proc-flags.o: proc-flags.c $(defs_h) +procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \ + $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \ + $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) $(gregset_h) +proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gregset_h) +proc-why.o: proc-why.c $(defs_h) $(proc_utils_h) +p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h) +p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \ + $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) +regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \ + $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \ + $(gdb_string_h) $(gdbcmd_h) +reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ + $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) +remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ + $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ + $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ + $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ + $(gdbcore_h) $(remote_fileio_h) +remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ + $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ + $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) +remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ + $(remote_fileio_h) +remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) +remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) +remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \ + $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h) +remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) +remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(regcache_h) $(serial_h) +remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ + $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \ + $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) +remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(serial_h) $(regcache_h) +remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \ + $(regcache_h) +remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \ + $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \ + $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \ + $(vx_share_dbgRpcLib_h) +remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \ + $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \ + $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \ + $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \ + $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \ + $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \ + $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(regcache_h) $(gdb_string_h) \ + $(sparc_tdep_h) $(vx_share_ptrace_h) $(vx_share_regPacket_h) +rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) +rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ + $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) +rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ + $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ + $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ + $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ + $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ + $(gdb_assert_h) $(dis_asm_h) +s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ + $(s390_tdep_h) +s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \ + $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ + $(solib_svr4_h) $(s390_tdep_h) +scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) +scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h) +scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \ + $(scm_lang_h) $(valprint_h) $(gdbcore_h) +sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \ + $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h) +ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h) +ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h) +serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h) +ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \ + $(gdb_string_h) +ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h) +ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \ + $(gdb_string_h) $(event_loop_h) +sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \ + $(sh_tdep_h) +sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(objfiles_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \ + $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \ + $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ + $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +sh-stub.o: sh-stub.c +sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \ + $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \ + $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ + $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \ + $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ + $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) +solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ + $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ + $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) +solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ + $(bcache_h) $(regcache_h) +solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \ + $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \ + $(bfd_target_h) $(exec_h) +sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \ + $(symfile_h) $(gdb_string_h) $(gregset_h) +somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ + $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) +source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ + $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ + $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ + $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \ + $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) +sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ + $(solib_svr4_h) $(sparc64_tdep_h) +sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) +sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \ + $(sparc_nat_h) +sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h) +sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \ + $(sparc_tdep_h) $(sparc64_tdep_h) +sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc_tdep_h) +sparc-stub.o: sparc-stub.c +sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ + $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \ + $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ + $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ + $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \ + $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) +stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ + $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ + $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) +standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(gdb_wait_h) +std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ + $(value_h) $(gdb_string_h) +stop-gdb.o: stop-gdb.c $(defs_h) +sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \ + $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ + $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ + $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ + $(gdb_string_h) $(gdb_stat_h) +symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ + $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ + $(dictionary_h) $(gdb_string_h) +symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ + $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ + $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ + $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) +target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ + $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) +thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ + $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) +thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \ + $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) +top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ + $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ + $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ + $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ + $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ + $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) +tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ + $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ + $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \ + $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \ + $(readline_history_h) +trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ + $(regcache_h) +typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ + $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ + $(gdb_string_h) +ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) +ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(ui_out_h) $(gdb_assert_h) +user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ + $(gdb_string_h) $(gdb_assert_h) $(frame_h) +utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ + $(filenames_h) $(inferior_h) $(readline_h) +uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ + $(regcache_h) $(gregset_h) +v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ + $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) +v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) +valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ + $(doublest_h) $(infcall_h) +valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \ + $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \ + $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \ + $(cp_support_h) +valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \ + $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) +values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \ + $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \ + $(gdb_assert_h) $(regcache_h) $(block_h) +varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ + $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) +vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \ + $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h) +win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ + $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ + $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ + $(regcache_h) $(mips_tdep_h) +wince-stub.o: wince-stub.c $(wince_stub_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ + $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ + $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \ + $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h) +xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \ + $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h) +xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h) +xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \ + $(dis_asm_h) + +# +# gdb/cli/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \ + $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \ + $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ + $(tui_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c +cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ + $(cli_decode_h) $(tui_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c +cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ + $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ + $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c +cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ + $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ + $(cli_script_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c +cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \ + $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \ + $(cli_setshow_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c +cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c + +# +# GDBTK sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +all-gdbtk: insight$(EXEEXT) + +install-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ + $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/help \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ + cd $(srcdir)/gdbtk/library ; \ + for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \ + do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ + done ; + +uninstall-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + rm -rf $(DESTDIR)$(GDBTK_LIBRARY) + +clean-gdbtk: + rm -f insight$(EXEEXT) + +# Removing the old gdb first works better if it is running, at least on SunOS. +insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \ + $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico + $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o + +gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) $(top_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(ITK_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" + +gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(breakpoint_h) $(tracepoint_h) \ + $(symfile_h) $(symtab_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \ + $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(dis_asm_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \ + $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \ + $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \ + $(srcdir)/gdbtk/generic/gdbtk.h + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \ + $(srcdir)/gdbtk/generic/gdbtk-interp.c + +gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(frame_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \ + $(block_h) $(dictionary_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-varobj.c + +gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(frame_h) $(value_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.c + +# +# gdb/mi/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ + $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c +mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ + $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c +mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \ + $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \ + $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \ + $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c +mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \ + $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c +mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c +mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ + $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \ + $(stack_h) $(dictionary_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c +mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c +mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c +mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ + $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c +mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ + $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ + $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ + $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_h) $(frame_h) $(mi_main_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c +mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c +mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c +mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \ + $(symtab_h) $(ui_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c + +# +# rdi-share sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +rdi-share/libangsd.a: force + @dir=rdi-share; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ + else \ + true; \ + fi + +# +# gdb/signals/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c + +# +# gdb/tui/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ + $(source_h) $(gdb_curses_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c +tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c +tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c +tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c +tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ + $(tui_io_h) $(tui_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c +tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ + $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ + $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ + $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c +tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ + $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ + $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c +tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ + $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c +tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ + $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ + $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ + $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c +tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ + $(gdb_string_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c +tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c +tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ + $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c +tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ + $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c +tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ + $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ + $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c +tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c +tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c +tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ + $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ + $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c + +# +# vx-share sub-directory +# + +xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ld.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c + +xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ptrace.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c + +xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_rdb.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c + +### end of the gdb Makefile.in. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1116 @@ +/* Target-dependent code for GDB, the GNU debugger. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "symtab.h" +#include "target.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "symfile.h" +#include "objfiles.h" +#include "regcache.h" +#include "value.h" +#include "osabi.h" + +#include "solib-svr4.h" +#include "ppc-tdep.h" + +/* The following instructions are used in the signal trampoline code + on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and + 0x7777 but now uses the sigreturn syscalls. We check for both. */ +#define INSTR_LI_R0_0x6666 0x38006666 +#define INSTR_LI_R0_0x7777 0x38007777 +#define INSTR_LI_R0_NR_sigreturn 0x38000077 +#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC + +#define INSTR_SC 0x44000002 + +/* Since the *-tdep.c files are platform independent (i.e, they may be + used to build cross platform debuggers), we can't include system + headers. Therefore, details concerning the sigcontext structure + must be painstakingly rerecorded. What's worse, if these details + ever change in the header files, they'll have to be changed here + as well. */ + +/* __SIGNAL_FRAMESIZE from */ +#define PPC_LINUX_SIGNAL_FRAMESIZE 64 + +/* From , offsetof(struct sigcontext_struct, regs) == 0x1c */ +#define PPC_LINUX_REGS_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x1c) + +/* From , + offsetof(struct sigcontext_struct, handler) == 0x14 */ +#define PPC_LINUX_HANDLER_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x14) + +/* From , values for PT_NIP, PT_R1, and PT_LNK */ +#define PPC_LINUX_PT_R0 0 +#define PPC_LINUX_PT_R1 1 +#define PPC_LINUX_PT_R2 2 +#define PPC_LINUX_PT_R3 3 +#define PPC_LINUX_PT_R4 4 +#define PPC_LINUX_PT_R5 5 +#define PPC_LINUX_PT_R6 6 +#define PPC_LINUX_PT_R7 7 +#define PPC_LINUX_PT_R8 8 +#define PPC_LINUX_PT_R9 9 +#define PPC_LINUX_PT_R10 10 +#define PPC_LINUX_PT_R11 11 +#define PPC_LINUX_PT_R12 12 +#define PPC_LINUX_PT_R13 13 +#define PPC_LINUX_PT_R14 14 +#define PPC_LINUX_PT_R15 15 +#define PPC_LINUX_PT_R16 16 +#define PPC_LINUX_PT_R17 17 +#define PPC_LINUX_PT_R18 18 +#define PPC_LINUX_PT_R19 19 +#define PPC_LINUX_PT_R20 20 +#define PPC_LINUX_PT_R21 21 +#define PPC_LINUX_PT_R22 22 +#define PPC_LINUX_PT_R23 23 +#define PPC_LINUX_PT_R24 24 +#define PPC_LINUX_PT_R25 25 +#define PPC_LINUX_PT_R26 26 +#define PPC_LINUX_PT_R27 27 +#define PPC_LINUX_PT_R28 28 +#define PPC_LINUX_PT_R29 29 +#define PPC_LINUX_PT_R30 30 +#define PPC_LINUX_PT_R31 31 +#define PPC_LINUX_PT_NIP 32 +#define PPC_LINUX_PT_MSR 33 +#define PPC_LINUX_PT_CTR 35 +#define PPC_LINUX_PT_LNK 36 +#define PPC_LINUX_PT_XER 37 +#define PPC_LINUX_PT_CCR 38 +#define PPC_LINUX_PT_MQ 39 +#define PPC_LINUX_PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ +#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31) +#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1) + +static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); + +/* Determine if pc is in a signal trampoline... + + Ha! That's not what this does at all. wait_for_inferior in + infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a + signal trampoline just after delivery of a signal. But on + GNU/Linux, signal trampolines are used for the return path only. + The kernel sets things up so that the signal handler is called + directly. + + If we use in_sigtramp2() in place of in_sigtramp() (see below) + we'll (often) end up with stop_pc in the trampoline and prev_pc in + the (now exited) handler. The code there will cause a temporary + breakpoint to be set on prev_pc which is not very likely to get hit + again. + + If this is confusing, think of it this way... the code in + wait_for_inferior() needs to be able to detect entry into a signal + trampoline just after a signal is delivered, not after the handler + has been run. + + So, we define in_sigtramp() below to return 1 if the following is + true: + + 1) The previous frame is a real signal trampoline. + + - and - + + 2) pc is at the first or second instruction of the corresponding + handler. + + Why the second instruction? It seems that wait_for_inferior() + never sees the first instruction when single stepping. When a + signal is delivered while stepping, the next instruction that + would've been stepped over isn't, instead a signal is delivered and + the first instruction of the handler is stepped over instead. That + puts us on the second instruction. (I added the test for the + first instruction long after the fact, just in case the observed + behavior is ever fixed.) + + PC_IN_SIGTRAMP is called from blockframe.c as well in order to set + the frame's type (if a SIGTRAMP_FRAME). Because of our strange + definition of in_sigtramp below, we can't rely on the frame's type + getting set correctly from within blockframe.c. This is why we + take pains to set it in init_extra_frame_info(). + + NOTE: cagney/2002-11-10: I suspect the real problem here is that + the get_prev_frame() only initializes the frame's type after the + call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this + code shouldn't be working its way around a bug :-(. */ + +int +ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) +{ + CORE_ADDR lr; + CORE_ADDR sp; + CORE_ADDR tramp_sp; + char buf[4]; + CORE_ADDR handler; + + lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); + if (!ppc_linux_at_sigtramp_return_path (lr)) + return 0; + + sp = read_register (SP_REGNUM); + + if (target_read_memory (sp, buf, sizeof (buf)) != 0) + return 0; + + tramp_sp = extract_unsigned_integer (buf, 4); + + if (target_read_memory (tramp_sp + PPC_LINUX_HANDLER_PTR_OFFSET, buf, + sizeof (buf)) != 0) + return 0; + + handler = extract_unsigned_integer (buf, 4); + + return (pc == handler || pc == handler + 4); +} + +static int +insn_is_sigreturn (unsigned long pcinsn) +{ + switch(pcinsn) + { + case INSTR_LI_R0_0x6666: + case INSTR_LI_R0_0x7777: + case INSTR_LI_R0_NR_sigreturn: + case INSTR_LI_R0_NR_rt_sigreturn: + return 1; + default: + return 0; + } +} + +/* + * The signal handler trampoline is on the stack and consists of exactly + * two instructions. The easiest and most accurate way of determining + * whether the pc is in one of these trampolines is by inspecting the + * instructions. It'd be faster though if we could find a way to do this + * via some simple address comparisons. + */ +static int +ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) +{ + char buf[12]; + unsigned long pcinsn; + if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) + return 0; + + /* extract the instruction at the pc */ + pcinsn = extract_unsigned_integer (buf + 4, 4); + + return ( + (insn_is_sigreturn (pcinsn) + && extract_unsigned_integer (buf + 8, 4) == INSTR_SC) + || + (pcinsn == INSTR_SC + && insn_is_sigreturn (extract_unsigned_integer (buf, 4)))); +} + +static CORE_ADDR +ppc_linux_skip_trampoline_code (CORE_ADDR pc) +{ + char buf[4]; + struct obj_section *sect; + struct objfile *objfile; + unsigned long insn; + CORE_ADDR plt_start = 0; + CORE_ADDR symtab = 0; + CORE_ADDR strtab = 0; + int num_slots = -1; + int reloc_index = -1; + CORE_ADDR plt_table; + CORE_ADDR reloc; + CORE_ADDR sym; + long symidx; + char symname[1024]; + struct minimal_symbol *msymbol; + + /* Find the section pc is in; return if not in .plt */ + sect = find_pc_section (pc); + if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0) + return 0; + + objfile = sect->objfile; + + /* Pick up the instruction at pc. It had better be of the + form + li r11, IDX + + where IDX is an index into the plt_table. */ + + if (target_read_memory (pc, buf, 4) != 0) + return 0; + insn = extract_unsigned_integer (buf, 4); + + if ((insn & 0xffff0000) != 0x39600000 /* li r11, VAL */ ) + return 0; + + reloc_index = (insn << 16) >> 16; + + /* Find the objfile that pc is in and obtain the information + necessary for finding the symbol name. */ + for (sect = objfile->sections; sect < objfile->sections_end; ++sect) + { + const char *secname = sect->the_bfd_section->name; + if (strcmp (secname, ".plt") == 0) + plt_start = sect->addr; + else if (strcmp (secname, ".rela.plt") == 0) + num_slots = ((int) sect->endaddr - (int) sect->addr) / 12; + else if (strcmp (secname, ".dynsym") == 0) + symtab = sect->addr; + else if (strcmp (secname, ".dynstr") == 0) + strtab = sect->addr; + } + + /* Make sure we have all the information we need. */ + if (plt_start == 0 || num_slots == -1 || symtab == 0 || strtab == 0) + return 0; + + /* Compute the value of the plt table */ + plt_table = plt_start + 72 + 8 * num_slots; + + /* Get address of the relocation entry (Elf32_Rela) */ + if (target_read_memory (plt_table + reloc_index, buf, 4) != 0) + return 0; + reloc = extract_unsigned_integer (buf, 4); + + sect = find_pc_section (reloc); + if (!sect) + return 0; + + if (strcmp (sect->the_bfd_section->name, ".text") == 0) + return reloc; + + /* Now get the r_info field which is the relocation type and symbol + index. */ + if (target_read_memory (reloc + 4, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Shift out the relocation type leaving just the symbol index */ + /* symidx = ELF32_R_SYM(symidx); */ + symidx = symidx >> 8; + + /* compute the address of the symbol */ + sym = symtab + symidx * 4; + + /* Fetch the string table index */ + if (target_read_memory (sym, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Fetch the string; we don't know how long it is. Is it possible + that the following will fail because we're trying to fetch too + much? */ + if (target_read_memory (strtab + symidx, symname, sizeof (symname)) != 0) + return 0; + + /* This might not work right if we have multiple symbols with the + same name; the only way to really get it right is to perform + the same sort of lookup as the dynamic linker. */ + msymbol = lookup_minimal_symbol_text (symname, NULL); + if (!msymbol) + return 0; + + return SYMBOL_VALUE_ADDRESS (msymbol); +} + +/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The + signal handler details are different, so we'll handle those here + and call the rs6000 version to do the rest. */ +CORE_ADDR +ppc_linux_frame_saved_pc (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return the NIP in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); + } + else if (get_next_frame (fi) + && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (get_next_frame (fi)) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return LNK in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); + } + else + return rs6000_frame_saved_pc (fi); +} + +void +ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) +{ + rs6000_init_extra_frame_info (fromleaf, fi); + + if (get_next_frame (fi) != 0) + { + /* We're called from get_prev_frame_info; check to see if + this is a signal frame by looking to see if the pc points + at trampoline code */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + deprecated_set_frame_type (fi, SIGTRAMP_FRAME); + else + /* FIXME: cagney/2002-11-10: Is this double bogus? What + happens if the frame has previously been marked as a dummy? */ + deprecated_set_frame_type (fi, NORMAL_FRAME); + } +} + +int +ppc_linux_frameless_function_invocation (struct frame_info *fi) +{ + /* We'll find the wrong thing if we let + rs6000_frameless_function_invocation () search for a signal trampoline */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + return 0; + else + return rs6000_frameless_function_invocation (fi); +} + +void +ppc_linux_frame_init_saved_regs (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr; + int i; + if (deprecated_get_frame_saved_regs (fi)) + return; + + frame_saved_regs_zalloc (fi); + + regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MSR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CCR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_LNK; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CTR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = + regs_addr + 4 * PPC_LINUX_PT_XER; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MQ; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = + regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; + } + else + rs6000_frame_init_saved_regs (fi); +} + +CORE_ADDR +ppc_linux_frame_chain (struct frame_info *thisframe) +{ + /* Kernel properly constructs the frame chain for the handler */ + if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) + return read_memory_integer (get_frame_base (thisframe), 4); + else + return rs6000_frame_chain (thisframe); +} + +/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint + in much the same fashion as memory_remove_breakpoint in mem-break.c, + but is careful not to write back the previous contents if the code + in question has changed in between inserting the breakpoint and + removing it. + + Here is the problem that we're trying to solve... + + Once upon a time, before introducing this function to remove + breakpoints from the inferior, setting a breakpoint on a shared + library function prior to running the program would not work + properly. In order to understand the problem, it is first + necessary to understand a little bit about dynamic linking on + this platform. + + A call to a shared library function is accomplished via a bl + (branch-and-link) instruction whose branch target is an entry + in the procedure linkage table (PLT). The PLT in the object + file is uninitialized. To gdb, prior to running the program, the + entries in the PLT are all zeros. + + Once the program starts running, the shared libraries are loaded + and the procedure linkage table is initialized, but the entries in + the table are not (necessarily) resolved. Once a function is + actually called, the code in the PLT is hit and the function is + resolved. In order to better illustrate this, an example is in + order; the following example is from the gdb testsuite. + + We start the program shmain. + + [kev@arroyo testsuite]$ ../gdb gdb.base/shmain + [...] + + We place two breakpoints, one on shr1 and the other on main. + + (gdb) b shr1 + Breakpoint 1 at 0x100409d4 + (gdb) b main + Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44. + + Examine the instruction (and the immediatly following instruction) + upon which the breakpoint was placed. Note that the PLT entry + for shr1 contains zeros. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : .long 0x0 + 0x100409d8 : .long 0x0 + + Now run 'til main. + + (gdb) r + Starting program: gdb.base/shmain + Breakpoint 1 at 0xffaf790: file gdb.base/shr1.c, line 19. + + Breakpoint 2, main () + at gdb.base/shmain.c:44 + 44 g = 1; + + Examine the PLT again. Note that the loading of the shared + library has initialized the PLT to code which loads a constant + (which I think is an index into the GOT) into r11 and then + branchs a short distance to the code which actually does the + resolving. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : li r11,4 + 0x100409d8 : b 0x10040984 + (gdb) c + Continuing. + + Breakpoint 1, shr1 (x=1) + at gdb.base/shr1.c:19 + 19 l = 1; + + Now we've hit the breakpoint at shr1. (The breakpoint was + reset from the PLT entry to the actual shr1 function after the + shared library was loaded.) Note that the PLT entry has been + resolved to contain a branch that takes us directly to shr1. + (The real one, not the PLT entry.) + + (gdb) x/2i 0x100409d4 + 0x100409d4 : b 0xffaf76c + 0x100409d8 : b 0x10040984 + + The thing to note here is that the PLT entry for shr1 has been + changed twice. + + Now the problem should be obvious. GDB places a breakpoint (a + trap instruction) on the zero value of the PLT entry for shr1. + Later on, after the shared library had been loaded and the PLT + initialized, GDB gets a signal indicating this fact and attempts + (as it always does when it stops) to remove all the breakpoints. + + The breakpoint removal was causing the former contents (a zero + word) to be written back to the now initialized PLT entry thus + destroying a portion of the initialization that had occurred only a + short time ago. When execution continued, the zero word would be + executed as an instruction an an illegal instruction trap was + generated instead. (0 is not a legal instruction.) + + The fix for this problem was fairly straightforward. The function + memory_remove_breakpoint from mem-break.c was copied to this file, + modified slightly, and renamed to ppc_linux_memory_remove_breakpoint. + In tm-linux.h, MEMORY_REMOVE_BREAKPOINT is defined to call this new + function. + + The differences between ppc_linux_memory_remove_breakpoint () and + memory_remove_breakpoint () are minor. All that the former does + that the latter does not is check to make sure that the breakpoint + location actually contains a breakpoint (trap instruction) prior + to attempting to write back the old contents. If it does contain + a trap instruction, we allow the old contents to be written back. + Otherwise, we silently do nothing. + + The big question is whether memory_remove_breakpoint () should be + changed to have the same functionality. The downside is that more + traffic is generated for remote targets since we'll have an extra + fetch of a memory word each time a breakpoint is removed. + + For the time being, we'll leave this self-modifying-code-friendly + version in ppc-linux-tdep.c, but it ought to be migrated somewhere + else in the event that some other platform has similar needs with + regard to removing breakpoints in some potentially self modifying + code. */ +int +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +{ + const unsigned char *bp; + int val; + int bplen; + char old_contents[BREAKPOINT_MAX]; + + /* Determine appropriate breakpoint contents and size for this address. */ + bp = BREAKPOINT_FROM_PC (&addr, &bplen); + if (bp == NULL) + error ("Software breakpoints not implemented for this target."); + + val = target_read_memory (addr, old_contents, bplen); + + /* If our breakpoint is no longer at the address, this means that the + program modified the code on us, so it is wrong to put back the + old value */ + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) + val = target_write_memory (addr, contents_cache, bplen); + + return val; +} + +/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather + than the 32 bit SYSV R4 ABI structure return convention - all + structures, no matter their size, are put in memory. Vectors, + which were added later, do get returned in a register though. */ + +static enum return_value_convention +ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, + struct regcache *regcache, void *readbuf, + const void *writebuf) +{ + if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT + || TYPE_CODE (valtype) == TYPE_CODE_UNION) + && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8) + && TYPE_VECTOR (valtype))) + return RETURN_VALUE_STRUCT_CONVENTION; + else + return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf, + writebuf); +} + +/* Fetch (and possibly build) an appropriate link_map_offsets + structure for GNU/Linux PPC targets using the struct offsets + defined in link.h (but without actual reference to that file). + + This makes it possible to access GNU/Linux PPC shared libraries + from a GDB that was not built on an GNU/Linux PPC host (for cross + debugging). */ + +struct link_map_offsets * +ppc_linux_svr4_fetch_link_map_offsets (void) +{ + static struct link_map_offsets lmo; + static struct link_map_offsets *lmp = NULL; + + if (lmp == NULL) + { + lmp = &lmo; + + lmo.r_debug_size = 8; /* The actual size is 20 bytes, but + this is all we need. */ + lmo.r_map_offset = 4; + lmo.r_map_size = 4; + + lmo.link_map_size = 20; /* The actual size is 560 bytes, but + this is all we need. */ + lmo.l_addr_offset = 0; + lmo.l_addr_size = 4; + + lmo.l_name_offset = 4; + lmo.l_name_size = 4; + + lmo.l_next_offset = 12; + lmo.l_next_size = 4; + + lmo.l_prev_offset = 16; + lmo.l_prev_size = 4; + } + + return lmp; +} + + +/* Macros for matching instructions. Note that, since all the + operands are masked off before they're or-ed into the instruction, + you can use -1 to make masks. */ + +#define insn_d(opcd, rts, ra, d) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xffff)) + +#define insn_ds(opcd, rts, ra, d, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xfffc) \ + | ((xo) & 0x3)) + +#define insn_xfx(opcd, rts, spr, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((spr) & 0x1f) << 16) \ + | (((spr) & 0x3e0) << 6) \ + | (((xo) & 0x3ff) << 1)) + +/* Read a PPC instruction from memory. PPC instructions are always + big-endian, no matter what endianness the program is running in, so + we can't use read_memory_integer or one of its friends here. */ +static unsigned int +read_insn (CORE_ADDR pc) +{ + unsigned char buf[4]; + + read_memory (pc, buf, 4); + return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; +} + + +/* An instruction to match. */ +struct insn_pattern +{ + unsigned int mask; /* mask the insn with this... */ + unsigned int data; /* ...and see if it matches this. */ + int optional; /* If non-zero, this insn may be absent. */ +}; + +/* Return non-zero if the instructions at PC match the series + described in PATTERN, or zero otherwise. PATTERN is an array of + 'struct insn_pattern' objects, terminated by an entry whose mask is + zero. + + When the match is successful, fill INSN[i] with what PATTERN[i] + matched. If PATTERN[i] is optional, and the instruction wasn't + present, set INSN[i] to 0 (which is not a valid PPC instruction). + INSN should have as many elements as PATTERN. Note that, if + PATTERN contains optional instructions which aren't present in + memory, then INSN will have holes, so INSN[i] isn't necessarily the + i'th instruction in memory. */ +static int +insns_match_pattern (CORE_ADDR pc, + struct insn_pattern *pattern, + unsigned int *insn) +{ + int i; + + for (i = 0; pattern[i].mask; i++) + { + insn[i] = read_insn (pc); + if ((insn[i] & pattern[i].mask) == pattern[i].data) + pc += 4; + else if (pattern[i].optional) + insn[i] = 0; + else + return 0; + } + + return 1; +} + + +/* Return the 'd' field of the d-form instruction INSN, properly + sign-extended. */ +static CORE_ADDR +insn_d_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000); +} + + +/* Return the 'ds' field of the ds-form instruction INSN, with the two + zero bits concatenated at the right, and properly + sign-extended. */ +static CORE_ADDR +insn_ds_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000); +} + + +/* If DESC is the address of a 64-bit PowerPC GNU/Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + +/* Pattern for the standard linkage function. These are built by + build_plt_stub in elf64-ppc.c, whose GLINK argument is always + zero. */ +static struct insn_pattern ppc64_standard_linkage[] = + { + /* addis r12, r2, */ + { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 }, + + /* std r2, 40(r1) */ + { -1, insn_ds (62, 2, 1, 40, 0), 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* ld r2, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* mtctr r11 */ + { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), + 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* bctr */ + { -1, 0x4e800420, 0 }, + + { 0, 0, 0 } + }; +#define PPC64_STANDARD_LINKAGE_LEN \ + (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0])) + + +/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB + calls a "solib trampoline". */ +static int +ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name) +{ + /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain. + + It's not specifically solib call trampolines that are the issue. + Any call from one function to another function that uses a + different TOC requires a trampoline, to save the caller's TOC + pointer and then load the callee's TOC. An executable or shared + library may have more than one TOC, so even intra-object calls + may require a trampoline. Since executable and shared libraries + will all have their own distinct TOCs, every inter-object call is + also an inter-TOC call, and requires a trampoline --- so "solib + call trampolines" are just a special case. + + The 64-bit PowerPC GNU/Linux ABI calls these call trampolines + "linkage functions". Since they need to be near the functions + that call them, they all appear in .text, not in any special + section. The .plt section just contains an array of function + descriptors, from which the linkage functions load the callee's + entry point, TOC value, and environment pointer. So + in_plt_section is useless. The linkage functions don't have any + special linker symbols to name them, either. + + The only way I can see to recognize them is to actually look at + their code. They're generated by ppc_build_one_stub and some + other functions in bfd/elf64-ppc.c, so that should show us all + the instruction sequences we need to recognize. */ + unsigned int insn[PPC64_STANDARD_LINKAGE_LEN]; + + return insns_match_pattern (pc, ppc64_standard_linkage, insn); +} + + +/* When the dynamic linker is doing lazy symbol resolution, the first + call to a function in another object will go like this: + + - The user's function calls the linkage function: + + 100007c4: 4b ff fc d5 bl 10000498 + 100007c8: e8 41 00 28 ld r2,40(r1) + + - The linkage function loads the entry point (and other stuff) from + the function descriptor in the PLT, and jumps to it: + + 10000498: 3d 82 00 00 addis r12,r2,0 + 1000049c: f8 41 00 28 std r2,40(r1) + 100004a0: e9 6c 80 98 ld r11,-32616(r12) + 100004a4: e8 4c 80 a0 ld r2,-32608(r12) + 100004a8: 7d 69 03 a6 mtctr r11 + 100004ac: e9 6c 80 a8 ld r11,-32600(r12) + 100004b0: 4e 80 04 20 bctr + + - But since this is the first time that PLT entry has been used, it + sends control to its glink entry. That loads the number of the + PLT entry and jumps to the common glink0 code: + + 10000c98: 38 00 00 00 li r0,0 + 10000c9c: 4b ff ff dc b 10000c78 + + - The common glink0 code then transfers control to the dynamic + linker's fixup code: + + 10000c78: e8 41 00 28 ld r2,40(r1) + 10000c7c: 3d 82 00 00 addis r12,r2,0 + 10000c80: e9 6c 80 80 ld r11,-32640(r12) + 10000c84: e8 4c 80 88 ld r2,-32632(r12) + 10000c88: 7d 69 03 a6 mtctr r11 + 10000c8c: e9 6c 80 90 ld r11,-32624(r12) + 10000c90: 4e 80 04 20 bctr + + Eventually, this code will figure out how to skip all of this, + including the dynamic linker. At the moment, we just get through + the linkage function. */ + +/* If the current thread is about to execute a series of instructions + at PC matching the ppc64_standard_linkage pattern, and INSN is the result + from that pattern match, return the code address to which the + standard linkage function will send them. (This doesn't deal with + dynamic linker lazy symbol resolution stubs.) */ +static CORE_ADDR +ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + /* The address of the function descriptor this linkage function + references. */ + CORE_ADDR desc + = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2) + + (insn_d_field (insn[0]) << 16) + + insn_ds_field (insn[2])); + + /* The first word of the descriptor is the entry point. Return that. */ + return ppc64_desc_entry_point (desc); +} + + +/* Given that we've begun executing a call trampoline at PC, return + the entry point of the function the trampoline will go to. */ +static CORE_ADDR +ppc64_skip_trampoline_code (CORE_ADDR pc) +{ + unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN]; + + if (insns_match_pattern (pc, ppc64_standard_linkage, + ppc64_standard_linkage_insn)) + return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn); + else + return 0; +} + + +/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64 + GNU/Linux. + + Usually a function pointer's representation is simply the address + of the function. On GNU/Linux on the 64-bit PowerPC however, a + function pointer is represented by a pointer to a TOC entry. This + TOC entry contains three words, the first word is the address of + the function, the second word is the TOC pointer (r2), and the + third word is the static chain value. Throughout GDB it is + currently assumed that a function pointer contains the address of + the function, which is not easy to fix. In addition, the + conversion of a function address to a function pointer would + require allocation of a TOC entry in the inferior's memory space, + with all its drawbacks. To be able to call C++ virtual methods in + the inferior (which are called via function pointers), + find_function_addr uses this function to get the function address + from a function pointer. */ + +/* If ADDR points at what is clearly a function descriptor, transform + it into the address of the corresponding function. Be + conservative, otherwize GDB will do the transformation on any + random addresses such as occures when there is no symbol table. */ + +static CORE_ADDR +ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + struct section_table *s = target_section_by_addr (targ, addr); + + /* Check if ADDR points to a function descriptor. */ + if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) + return get_target_memory_unsigned (targ, addr, 8); + + return addr; +} + +#ifdef CRASH_MERGE +enum { + PPC_ELF_NGREG = 48, + PPC_ELF_NFPREG = 33, + PPC_ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (PPC_ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (PPC_ELF_NFPREG * 8) +}; +#else +enum { + ELF_NGREG = 48, + ELF_NFPREG = 33, + ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) +}; +#endif + +void +ppc_linux_supply_gregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (regi, buf + 4 * regi); + + supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); + supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); + supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); + supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); + supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); + if (tdep->ppc_mq_regnum != -1) + supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); + supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); +} + +void +ppc_linux_supply_fpregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (FP0_REGNUM + regi, buf + 8 * regi); + + /* The FPSCR is stored in the low order word of the last doubleword in the + fpregset. */ + supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); +} + +/* + Use a local version of this function to get the correct types for regsets. +*/ + +static void +fetch_core_registers (char *core_reg_sect, + unsigned core_reg_size, + int which, + CORE_ADDR reg_addr) +{ + if (which == 0) + { + if (core_reg_size == ELF_GREGSET_SIZE) + ppc_linux_supply_gregset (core_reg_sect); + else + warning ("wrong size gregset struct in core file"); + } + else if (which == 2) + { + if (core_reg_size == ELF_FPREGSET_SIZE) + ppc_linux_supply_fpregset (core_reg_sect); + else + warning ("wrong size fpregset struct in core file"); + } +} + +/* Register that we are able to handle ELF file formats using standard + procfs "regset" structures. */ + +static struct core_fns ppc_linux_regset_core_fns = +{ + bfd_target_elf_flavour, /* core_flavour */ + default_check_format, /* check_format */ + default_core_sniffer, /* core_sniffer */ + fetch_core_registers, /* core_read_registers */ + NULL /* next */ +}; + +static void +ppc_linux_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if (tdep->wordsize == 4) + { + /* Until November 2001, gcc did not comply with the 32 bit SysV + R4 ABI requirement that structures less than or equal to 8 + bytes should be returned in registers. Instead GCC was using + the the AIX/PowerOpen ABI - everything returned in memory + (well ignoring vectors that is). When this was corrected, it + wasn't fixed for GNU/Linux native platform. Use the + PowerOpen struct convention. */ + set_gdbarch_return_value (gdbarch, ppc_linux_return_value); + + /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding + *_push_arguments(). The same remarks hold for the methods below. */ + set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); + set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); + set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); + + set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, + ppc_linux_frame_init_saved_regs); + set_gdbarch_deprecated_init_extra_frame_info (gdbarch, + ppc_linux_init_extra_frame_info); + + set_gdbarch_memory_remove_breakpoint (gdbarch, + ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, + ppc_linux_skip_trampoline_code); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); + } + + if (tdep->wordsize == 8) + { + /* Handle PPC64 GNU/Linux function pointers (which are really + function descriptors). */ + set_gdbarch_convert_from_func_ptr_addr + (gdbarch, ppc64_linux_convert_from_func_ptr_addr); + + set_gdbarch_in_solib_call_trampoline + (gdbarch, ppc64_in_solib_call_trampoline); + set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); + + /* PPC64 malloc's entry-point is called ".malloc". */ + set_gdbarch_name_of_malloc (gdbarch, ".malloc"); + } +} + +void +_initialize_ppc_linux_tdep (void) +{ + /* Register for all sub-familes of the POWER/PowerPC: 32-bit and + 64-bit PowerPC, and the older rs6k. */ + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, + ppc_linux_init_abi); + add_core_fns (&ppc_linux_regset_core_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symfile.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symfile.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symfile.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symfile.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3644 @@ +/* Generic symbol file reading for the GNU debugger, GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support, using pieces from other GDB modules. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfdlink.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "source.h" +#include "gdbcmd.h" +#include "breakpoint.h" +#include "language.h" +#include "complaints.h" +#include "demangle.h" +#include "inferior.h" /* for write_pc */ +#include "filenames.h" /* for DOSish file names */ +#include "gdb-stabs.h" +#include "gdb_obstack.h" +#include "completer.h" +#include "bcache.h" +#include "hashtab.h" +#include "readline/readline.h" +#include "gdb_assert.h" +#include "block.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifdef HPUXHPPA + +/* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + +extern int hp_som_som_object_present; +extern int hp_cxx_exception_support_initialized; +#define RESET_HP_UX_GLOBALS() do {\ + hp_som_som_object_present = 0; /* indicates HP-compiled code */ \ + hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \ + } while (0) +#endif + +int (*ui_load_progress_hook) (const char *section, unsigned long num); +void (*show_load_progress) (const char *section, + unsigned long section_sent, + unsigned long section_size, + unsigned long total_sent, + unsigned long total_size); +void (*pre_add_symbol_hook) (char *); +void (*post_add_symbol_hook) (void); +void (*target_new_objfile_hook) (struct objfile *); + +static void clear_symtab_users_cleanup (void *ignore); + +/* Global variables owned by this file */ +int readnow_symbol_files; /* Read full symbols immediately */ + +/* External variables and functions referenced. */ + +extern void report_transfer_performance (unsigned long, time_t, time_t); + +/* Functions this file defines */ + +#if 0 +static int simple_read_overlay_region_table (void); +static void simple_free_overlay_region_table (void); +#endif + +static void set_initial_language (void); + +static void load_command (char *, int); + +static void symbol_file_add_main_1 (char *args, int from_tty, int flags); + +static void add_symbol_file_command (char *, int); + +static void add_shared_symbol_files_command (char *, int); + +static void reread_separate_symbols (struct objfile *objfile); + +static void cashier_psymtab (struct partial_symtab *); + +bfd *symfile_bfd_open (char *); + +int get_section_index (struct objfile *, char *); + +static void find_sym_fns (struct objfile *); + +static void decrement_reading_symtab (void *); + +static void overlay_invalidate_all (void); + +static int overlay_is_mapped (struct obj_section *); + +void list_overlays_command (char *, int); + +void map_overlay_command (char *, int); + +void unmap_overlay_command (char *, int); + +static void overlay_auto_command (char *, int); + +static void overlay_manual_command (char *, int); + +static void overlay_off_command (char *, int); + +static void overlay_load_command (char *, int); + +static void overlay_command (char *, int); + +static void simple_free_overlay_table (void); + +static void read_target_long_array (CORE_ADDR, unsigned int *, int); + +static int simple_read_overlay_table (void); + +static int simple_overlay_update_1 (struct obj_section *); + +static void add_filename_language (char *ext, enum language lang); + +static void set_ext_lang_command (char *args, int from_tty); + +static void info_ext_lang_command (char *args, int from_tty); + +static char *find_separate_debug_file (struct objfile *objfile); + +static void init_filename_language_table (void); + +void _initialize_symfile (void); + +/* List of all available sym_fns. On gdb startup, each object file reader + calls add_symtab_fns() to register information on each format it is + prepared to read. */ + +static struct sym_fns *symtab_fns = NULL; + +/* Flag for whether user will be reloading symbols multiple times. + Defaults to ON for VxWorks, otherwise OFF. */ + +#ifdef SYMBOL_RELOADING_DEFAULT +int symbol_reloading = SYMBOL_RELOADING_DEFAULT; +#else +int symbol_reloading = 0; +#endif + +/* If non-zero, shared library symbols will be added automatically + when the inferior is created, new libraries are loaded, or when + attaching to the inferior. This is almost always what users will + want to have happen; but for very large programs, the startup time + will be excessive, and so if this is a problem, the user can clear + this flag and then add the shared library symbols as needed. Note + that there is a potential for confusion, since if the shared + library symbols are not loaded, commands like "info fun" will *not* + report all the functions that are actually present. */ + +int auto_solib_add = 1; + +/* For systems that support it, a threshold size in megabytes. If + automatically adding a new library's symbol table to those already + known to the debugger would cause the total shared library symbol + size to exceed this threshhold, then the shlib's symbols are not + added. The threshold is ignored if the user explicitly asks for a + shlib to be added, such as when using the "sharedlibrary" + command. */ + +int auto_solib_limit; + + +/* This compares two partial symbols by names, using strcmp_iw_ordered + for the comparison. */ + +static int +compare_psymbols (const void *s1p, const void *s2p) +{ + struct partial_symbol *const *s1 = s1p; + struct partial_symbol *const *s2 = s2p; + + return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1), + SYMBOL_NATURAL_NAME (*s2)); +} + +void +sort_pst_symbols (struct partial_symtab *pst) +{ + /* Sort the global list; don't sort the static list */ + + qsort (pst->objfile->global_psymbols.list + pst->globals_offset, + pst->n_global_syms, sizeof (struct partial_symbol *), + compare_psymbols); +} + +/* Make a null terminated copy of the string at PTR with SIZE characters in + the obstack pointed to by OBSTACKP . Returns the address of the copy. + Note that the string at PTR does not have to be null terminated, I.E. it + may be part of a larger string and we are only saving a substring. */ + +char * +obsavestring (const char *ptr, int size, struct obstack *obstackp) +{ + char *p = (char *) obstack_alloc (obstackp, size + 1); + /* Open-coded memcpy--saves function call time. These strings are usually + short. FIXME: Is this really still true with a compiler that can + inline memcpy? */ + { + const char *p1 = ptr; + char *p2 = p; + const char *end = ptr + size; + while (p1 != end) + *p2++ = *p1++; + } + p[size] = 0; + return p; +} + +/* Concatenate strings S1, S2 and S3; return the new string. Space is found + in the obstack pointed to by OBSTACKP. */ + +char * +obconcat (struct obstack *obstackp, const char *s1, const char *s2, + const char *s3) +{ + int len = strlen (s1) + strlen (s2) + strlen (s3) + 1; + char *val = (char *) obstack_alloc (obstackp, len); + strcpy (val, s1); + strcat (val, s2); + strcat (val, s3); + return val; +} + +/* True if we are nested inside psymtab_to_symtab. */ + +int currently_reading_symtab = 0; + +static void +decrement_reading_symtab (void *dummy) +{ + currently_reading_symtab--; +} + +/* Get the symbol table that corresponds to a partial_symtab. + This is fast after the first time you do it. In fact, there + is an even faster macro PSYMTAB_TO_SYMTAB that does the fast + case inline. */ + +struct symtab * +psymtab_to_symtab (struct partial_symtab *pst) +{ + /* If it's been looked up before, return it. */ + if (pst->symtab) + return pst->symtab; + + /* If it has not yet been read in, read it. */ + if (!pst->readin) + { + struct cleanup *back_to = make_cleanup (decrement_reading_symtab, NULL); + currently_reading_symtab++; + (*pst->read_symtab) (pst); + do_cleanups (back_to); + } + + return pst->symtab; +} + +/* Remember the lowest-addressed loadable section we've seen. + This function is called via bfd_map_over_sections. + + In case of equal vmas, the section with the largest size becomes the + lowest-addressed loadable section. + + If the vmas and sizes are equal, the last section is considered the + lowest-addressed loadable section. */ + +void +find_lowest_section (bfd *abfd, asection *sect, void *obj) +{ + asection **lowest = (asection **) obj; + + if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD)) + return; + if (!*lowest) + *lowest = sect; /* First loadable section */ + else if (bfd_section_vma (abfd, *lowest) > bfd_section_vma (abfd, sect)) + *lowest = sect; /* A lower loadable section */ + else if (bfd_section_vma (abfd, *lowest) == bfd_section_vma (abfd, sect) + && (bfd_section_size (abfd, (*lowest)) + <= bfd_section_size (abfd, sect))) + *lowest = sect; +} + +/* Create a new section_addr_info, with room for NUM_SECTIONS. */ + +struct section_addr_info * +alloc_section_addr_info (size_t num_sections) +{ + struct section_addr_info *sap; + size_t size; + + size = (sizeof (struct section_addr_info) + + sizeof (struct other_sections) * (num_sections - 1)); + sap = (struct section_addr_info *) xmalloc (size); + memset (sap, 0, size); + sap->num_sections = num_sections; + + return sap; +} + +/* Build (allocate and populate) a section_addr_info struct from + an existing section table. */ + +extern struct section_addr_info * +build_section_addr_info_from_section_table (const struct section_table *start, + const struct section_table *end) +{ + struct section_addr_info *sap; + const struct section_table *stp; + int oidx; + + sap = alloc_section_addr_info (end - start); + + for (stp = start, oidx = 0; stp != end; stp++) + { + if (bfd_get_section_flags (stp->bfd, + stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD) + && oidx < end - start) + { + sap->other[oidx].addr = stp->addr; + sap->other[oidx].name + = xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section)); + sap->other[oidx].sectindex = stp->the_bfd_section->index; + oidx++; + } + } + + return sap; +} + + +/* Free all memory allocated by build_section_addr_info_from_section_table. */ + +extern void +free_section_addr_info (struct section_addr_info *sap) +{ + int idx; + + for (idx = 0; idx < sap->num_sections; idx++) + if (sap->other[idx].name) + xfree (sap->other[idx].name); + xfree (sap); +} + + +/* Initialize OBJFILE's sect_index_* members. */ +static void +init_objfile_sect_indices (struct objfile *objfile) +{ + asection *sect; + int i; + + sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (sect) + objfile->sect_index_text = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".data"); + if (sect) + objfile->sect_index_data = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".bss"); + if (sect) + objfile->sect_index_bss = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".rodata"); + if (sect) + objfile->sect_index_rodata = sect->index; + + /* This is where things get really weird... We MUST have valid + indices for the various sect_index_* members or gdb will abort. + So if for example, there is no ".text" section, we have to + accomodate that. Except when explicitly adding symbol files at + some address, section_offsets contains nothing but zeros, so it + doesn't matter which slot in section_offsets the individual + sect_index_* members index into. So if they are all zero, it is + safe to just point all the currently uninitialized indices to the + first slot. */ + + for (i = 0; i < objfile->num_sections; i++) + { + if (ANOFFSET (objfile->section_offsets, i) != 0) + { + break; + } + } + if (i == objfile->num_sections) + { + if (objfile->sect_index_text == -1) + objfile->sect_index_text = 0; + if (objfile->sect_index_data == -1) + objfile->sect_index_data = 0; + if (objfile->sect_index_bss == -1) + objfile->sect_index_bss = 0; + if (objfile->sect_index_rodata == -1) + objfile->sect_index_rodata = 0; + } +} + + +/* Parse the user's idea of an offset for dynamic linking, into our idea + of how to represent it for fast symbol reading. This is the default + version of the sym_fns.sym_offsets function for symbol readers that + don't need to do anything special. It allocates a section_offsets table + for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */ + +void +default_symfile_offsets (struct objfile *objfile, + struct section_addr_info *addrs) +{ + int i; + + objfile->num_sections = bfd_count_sections (objfile->obfd); + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + memset (objfile->section_offsets, 0, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + + /* Now calculate offsets for section that were specified by the + caller. */ + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + struct other_sections *osp ; + + osp = &addrs->other[i] ; + if (osp->addr == 0) + continue; + + /* Record all sections in offsets */ + /* The section_offsets in the objfile are here filled in using + the BFD index. */ + (objfile->section_offsets)->offsets[osp->sectindex] = osp->addr; + } + + /* Remember the bfd indexes for the .text, .data, .bss and + .rodata sections. */ + init_objfile_sect_indices (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + OBJFILE is where the symbols are to be read from. + + ADDRS is the list of section load addresses. If the user has given + an 'add-symbol-file' command, then this is the list of offsets and + addresses he or she provided as arguments to the command; or, if + we're handling a shared library, these are the actual addresses the + sections are loaded at, according to the inferior's dynamic linker + (as gleaned by GDB's shared library code). We convert each address + into an offset from the section VMA's as it appears in the object + file, and then call the file's sym_offsets function to convert this + into a format-specific offset table --- a `struct section_offsets'. + If ADDRS is non-zero, OFFSETS must be zero. + + OFFSETS is a table of section offsets already in the right + format-specific representation. NUM_OFFSETS is the number of + elements present in OFFSETS->offsets. If OFFSETS is non-zero, we + assume this is the proper table the call to sym_offsets described + above would produce. Instead of calling sym_offsets, we just dump + it right into objfile->section_offsets. (When we're re-reading + symbols from an objfile, we don't have the original load address + list any more; all we have is the section offset table.) If + OFFSETS is non-zero, ADDRS must be zero. + + MAINLINE is nonzero if this is the main symbol file, or zero if + it's an extra symbol file such as dynamically loaded code. + + VERBO is nonzero if the caller has printed a verbose message about + the symbol reading (and complaints can be more terse about it). */ + +void +syms_from_objfile (struct objfile *objfile, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, + int verbo) +{ + struct section_addr_info *local_addr = NULL; + struct cleanup *old_chain; + + gdb_assert (! (addrs && offsets)); + + init_entry_point_info (objfile); + find_sym_fns (objfile); + + if (objfile->sf == NULL) + return; /* No symbols. */ + + /* Make sure that partially constructed symbol tables will be cleaned up + if an error occurs during symbol reading. */ + old_chain = make_cleanup_free_objfile (objfile); + + /* If ADDRS and OFFSETS are both NULL, put together a dummy address + list. We now establish the convention that an addr of zero means + no load address was specified. */ + if (! addrs && ! offsets) + { + local_addr + = alloc_section_addr_info (bfd_count_sections (objfile->obfd)); + make_cleanup (xfree, local_addr); + addrs = local_addr; + } + + /* Now either addrs or offsets is non-zero. */ + + if (mainline) + { + /* We will modify the main symbol table, make sure that all its users + will be cleaned up if an error occurs during symbol reading. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Since no error yet, throw away the old symbol table. */ + + if (symfile_objfile != NULL) + { + free_objfile (symfile_objfile); + symfile_objfile = NULL; + } + + /* Currently we keep symbols from the add-symbol-file command. + If the user wants to get rid of them, they should do "symbol-file" + without arguments first. Not sure this is the best behavior + (PR 2207). */ + + (*objfile->sf->sym_new_init) (objfile); + } + + /* Convert addr into an offset rather than an absolute address. + We find the lowest address of a loaded segment in the objfile, + and assume that is where that got loaded. + + We no longer warn if the lowest section is not a text segment (as + happens for the PA64 port. */ + if (!mainline && addrs && addrs->other[0].name) + { + asection *lower_sect; + asection *sect; + CORE_ADDR lower_offset; + int i; + + /* Find lowest loadable section to be used as starting point for + continguous sections. FIXME!! won't work without call to find + .text first, but this assumes text is lowest section. */ + lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (lower_sect == NULL) + bfd_map_over_sections (objfile->obfd, find_lowest_section, + &lower_sect); + if (lower_sect == NULL) + warning ("no loadable sections found in added symbol-file %s", + objfile->name); + else + if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) + warning ("Lowest section in %s is %s at %s", + objfile->name, + bfd_section_name (objfile->obfd, lower_sect), + paddr (bfd_section_vma (objfile->obfd, lower_sect))); + if (lower_sect != NULL) + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); + else + lower_offset = 0; + + /* Calculate offsets for the loadable sections. + FIXME! Sections must be in order of increasing loadable section + so that contiguous sections can use the lower-offset!!! + + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to + the offset of the highest loadable section lower than it + (the loadable section directly below it in memory). + this_offset = lower_offset = lower_addr - lower_orig_addr */ + + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + if (addrs->other[i].addr != 0) + { + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); + if (sect) + { + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); + lower_offset = addrs->other[i].addr; + /* This is the index used by BFD. */ + addrs->other[i].sectindex = sect->index ; + } + else + { + warning ("section %s not found in %s", + addrs->other[i].name, + objfile->name); + addrs->other[i].addr = 0; + } + } + else + addrs->other[i].addr = lower_offset; + } + } + + /* Initialize symbol reading routines for this objfile, allow complaints to + appear for this new file, and record how verbose to be, then do the + initial symbol reading for this file. */ + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, verbo); + + if (addrs) + (*objfile->sf->sym_offsets) (objfile, addrs); + else + { + size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets); + + /* Just copy in the offset table directly as given to us. */ + objfile->num_sections = num_offsets; + objfile->section_offsets + = ((struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, size)); + memcpy (objfile->section_offsets, offsets, size); + + init_objfile_sect_indices (objfile); + } + +#ifndef DEPRECATED_IBM6000_TARGET + /* This is a SVR4/SunOS specific hack, I think. In any event, it + screws RS/6000. sym_offsets should be doing this sort of thing, + because it knows the mapping between bfd sections and + section_offsets. */ + /* This is a hack. As far as I can tell, section offsets are not + target dependent. They are all set to addr with a couple of + exceptions. The exceptions are sysvr4 shared libraries, whose + offsets are kept in solib structures anyway and rs6000 xcoff + which handles shared libraries in a completely unique way. + + Section offsets are built similarly, except that they are built + by adding addr in all cases because there is no clear mapping + from section_offsets into actual sections. Note that solib.c + has a different algorithm for finding section offsets. + + These should probably all be collapsed into some target + independent form of shared library support. FIXME. */ + + if (addrs) + { + struct obj_section *s; + + /* Map section offsets in "addr" back to the object's + sections by comparing the section names with bfd's + section names. Then adjust the section address by + the offset. */ /* for gdb/13815 */ + + ALL_OBJFILE_OSECTIONS (objfile, s) + { + CORE_ADDR s_addr = 0; + int i; + + for (i = 0; + !s_addr && i < addrs->num_sections && addrs->other[i].name; + i++) + if (strcmp (bfd_section_name (s->objfile->obfd, + s->the_bfd_section), + addrs->other[i].name) == 0) + s_addr = addrs->other[i].addr; /* end added for gdb/13815 */ + + s->addr -= s->offset; + s->addr += s_addr; + s->endaddr -= s->offset; + s->endaddr += s_addr; + s->offset += s_addr; + } + } + +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, struct minimal_symbol *); + patch_load_module(objfile, NULL); + } +#endif +#endif /* not DEPRECATED_IBM6000_TARGET */ + + (*objfile->sf->sym_read) (objfile, mainline); + + /* Don't allow char * to have a typename (else would get caddr_t). + Ditto void *. FIXME: Check whether this is now done by all the + symbol readers themselves (many of them now do), and if so remove + it from here. */ + + TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0; + TYPE_NAME (lookup_pointer_type (builtin_type_void)) = 0; + + /* Mark the objfile has having had initial symbol read attempted. Note + that this does not mean we found any symbols... */ + + objfile->flags |= OBJF_SYMS; + + /* Discard cleanups as symbol reading was successful. */ + + discard_cleanups (old_chain); +} + +/* Perform required actions after either reading in the initial + symbols for a new objfile, or mapping in the symbols from a reusable + objfile. */ + +void +new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) +{ + + /* If this is the main symbol file we have to clean up all users of the + old main symbol file. Otherwise it is sufficient to fixup all the + breakpoints that may have been redefined by this symbol file. */ + if (mainline) + { + /* OK, make it the "real" symbol file. */ + symfile_objfile = objfile; + + clear_symtab_users (); + } + else + { + breakpoint_re_set (); + } + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, verbo); +} + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + NAME is the file name (which will be tilde-expanded and made + absolute herein) (but we don't free or modify NAME itself). + + FROM_TTY says how verbose to be. + + MAINLINE specifies whether this is the main symbol file, or whether + it's an extra symbol file such as dynamically loaded code. + + ADDRS, OFFSETS, and NUM_OFFSETS are as described for + syms_from_objfile, above. ADDRS is ignored when MAINLINE is + non-zero. + + Upon success, returns a pointer to the objfile that was added. + Upon failure, jumps back to command level (never returns). */ +static struct objfile * +symbol_file_add_with_addrs_or_offsets (char *name, int from_tty, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, int flags) +{ + struct objfile *objfile; + struct partial_symtab *psymtab; + char *debugfile; + bfd *abfd; + struct section_addr_info *orig_addrs; + struct cleanup *my_cleanups; + + /* Open a bfd for the file, and give user a chance to burp if we'd be + interactively wiping out any existing symbols. */ + + abfd = symfile_bfd_open (name); + + if ((have_full_symbols () || have_partial_symbols ()) + && mainline + && from_tty + && !query ("Load new symbol table from \"%s\"? ", name)) + error ("Not confirmed."); + + objfile = allocate_objfile (abfd, flags); + + orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); + my_cleanups = make_cleanup (xfree, orig_addrs); + if (addrs) + { + int i; + orig_addrs->num_sections = addrs->num_sections; + for (i = 0; i < addrs->num_sections; i++) + orig_addrs->other[i] = addrs->other[i]; + } + + /* We either created a new mapped symbol table, mapped an existing + symbol table file which has not had initial symbol reading + performed, or need to read an unmapped symbol table. */ + if (from_tty || info_verbose) + { + if (pre_add_symbol_hook) + pre_add_symbol_hook (name); + else + { + printf_unfiltered ("Reading symbols from %s...", name); + wrap_here (""); + gdb_flush (gdb_stdout); + } + } + syms_from_objfile (objfile, addrs, offsets, num_offsets, + mainline, from_tty); + + /* We now have at least a partial symbol table. Check to see if the + user requested that all symbols be read on initial access via either + the gdb startup command line or on a per symbol file basis. Expand + all partial symbol tables for this objfile if so. */ + + if ((flags & OBJF_READNOW) || readnow_symbol_files) + { + if (from_tty || info_verbose) + { + printf_unfiltered ("expanding to full symbols..."); + wrap_here (""); + gdb_flush (gdb_stdout); + } + + for (psymtab = objfile->psymtabs; + psymtab != NULL; + psymtab = psymtab->next) + { + psymtab_to_symtab (psymtab); + } + } + + debugfile = find_separate_debug_file (objfile); + if (debugfile) + { + if (addrs != NULL) + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags); + } + else + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, NULL, 0, flags); + } + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + + /* Put the separate debug object before the normal one, this is so that + usage of the ALL_OBJFILES_SAFE macro will stay safe. */ + put_objfile_before (objfile->separate_debug_objfile, objfile); + + xfree (debugfile); + } + + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)..."); + wrap_here (""); + } + + if (from_tty || info_verbose) + { + if (post_add_symbol_hook) + post_add_symbol_hook (); + else + { + printf_unfiltered ("done.\n"); + } + } + + /* We print some messages regardless of whether 'from_tty || + info_verbose' is true, so make sure they go out at the right + time. */ + gdb_flush (gdb_stdout); + + do_cleanups (my_cleanups); + + if (objfile->sf == NULL) + return objfile; /* No symbols. */ + + new_symfile_objfile (objfile, mainline, from_tty); + + if (target_new_objfile_hook) + target_new_objfile_hook (objfile); + + return (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. See symbol_file_add_with_addrs_or_offsets's comments + for details. */ +struct objfile * +symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs, + int mainline, int flags) +{ + return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0, + mainline, flags); +} + + +/* Call symbol_file_add() with default values and update whatever is + affected by the loading of a new main(). + Used when the file is supplied in the gdb command line + and by some targets with special loading requirements. + The auxiliary function, symbol_file_add_main_1(), has the flags + argument for the switches that can only be specified in the symbol_file + command itself. */ + +void +symbol_file_add_main (char *args, int from_tty) +{ + symbol_file_add_main_1 (args, from_tty, 0); +} + +static void +symbol_file_add_main_1 (char *args, int from_tty, int flags) +{ + symbol_file_add (args, from_tty, NULL, 1, flags); + +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + + /* Getting new symbols may change our opinion about + what is frameless. */ + reinit_frame_cache (); + + set_initial_language (); +} + +void +symbol_file_clear (int from_tty) +{ + if ((have_full_symbols () || have_partial_symbols ()) + && from_tty + && !query ("Discard symbol table from `%s'? ", + symfile_objfile->name)) + error ("Not confirmed."); + free_all_objfiles (); + + /* solib descriptors may have handles to objfiles. Since their + storage has just been released, we'd better wipe the solib + descriptors as well. + */ +#if defined(SOLIB_RESTART) + SOLIB_RESTART (); +#endif + + symfile_objfile = NULL; + if (from_tty) + printf_unfiltered ("No symbol file now.\n"); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif +} + +static char * +get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) +{ + asection *sect; + bfd_size_type debuglink_size; + unsigned long crc32; + char *contents; + int crc_offset; + unsigned char *p; + + sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); + + if (sect == NULL) + return NULL; + + debuglink_size = bfd_section_size (objfile->obfd, sect); + + contents = xmalloc (debuglink_size); + bfd_get_section_contents (objfile->obfd, sect, contents, + (file_ptr)0, (bfd_size_type)debuglink_size); + + /* Crc value is stored after the filename, aligned up to 4 bytes. */ + crc_offset = strlen (contents) + 1; + crc_offset = (crc_offset + 3) & ~3; + + crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); + + *crc32_out = crc32; + return contents; +} + +static int +separate_debug_file_exists (const char *name, unsigned long crc) +{ + unsigned long file_crc = 0; + int fd; + char buffer[8*1024]; + int count; + + fd = open (name, O_RDONLY | O_BINARY); + if (fd < 0) + return 0; + + while ((count = read (fd, buffer, sizeof (buffer))) > 0) + file_crc = gnu_debuglink_crc32 (file_crc, buffer, count); + + close (fd); + + return crc == file_crc; +} + +static char *debug_file_directory = NULL; + +#if ! defined (DEBUG_SUBDIRECTORY) +#define DEBUG_SUBDIRECTORY ".debug" +#endif + +static char * +find_separate_debug_file (struct objfile *objfile) +{ + asection *sect; + char *basename; + char *dir; + char *debugfile; + char *name_copy; + bfd_size_type debuglink_size; + unsigned long crc32; + int i; + + basename = get_debug_link_info (objfile, &crc32); + + if (basename == NULL) + return NULL; + + dir = xstrdup (objfile->name); + + /* Strip off the final filename part, leaving the directory name, + followed by a slash. Objfile names should always be absolute and + tilde-expanded, so there should always be a slash in there + somewhere. */ + for (i = strlen(dir) - 1; i >= 0; i--) + { + if (IS_DIR_SEPARATOR (dir[i])) + break; + } + gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i])); + dir[i+1] = '\0'; + + debugfile = alloca (strlen (debug_file_directory) + 1 + + strlen (dir) + + strlen (DEBUG_SUBDIRECTORY) + + strlen ("/") + + strlen (basename) + + 1); + + /* First try in the same directory as the original file. */ + strcpy (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */ + strcpy (debugfile, dir); + strcat (debugfile, DEBUG_SUBDIRECTORY); + strcat (debugfile, "/"); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the global debugfile directory. */ + strcpy (debugfile, debug_file_directory); + strcat (debugfile, "/"); + strcat (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + xfree (basename); + xfree (dir); +#ifdef CRASH_MERGE +{ + extern char *check_specified_debug_file(); + name_copy = check_specified_debug_file(); + return (name_copy ? xstrdup (name_copy) : NULL); +} +#else + return NULL; +#endif +} + + +/* This is the symbol-file command. Read the file, analyze its + symbols, and add a struct symtab to a symtab list. The syntax of + the command is rather bizarre--(1) buildargv implements various + quoting conventions which are undocumented and have little or + nothing in common with the way things are quoted (or not quoted) + elsewhere in GDB, (2) options are used, which are not generally + used in GDB (perhaps "set mapped on", "set readnow on" would be + better), (3) the order of options matters, which is contrary to GNU + conventions (because it is confusing and inconvenient). */ +/* Note: ezannoni 2000-04-17. This function used to have support for + rombug (see remote-os9k.c). It consisted of a call to target_link() + (target.c) to get the address of the text segment from the target, + and pass that to symbol_file_add(). This is no longer supported. */ + +void +symbol_file_command (char *args, int from_tty) +{ + char **argv; + char *name = NULL; + struct cleanup *cleanups; + int flags = OBJF_USERLOADED; + + dont_repeat (); + + if (args == NULL) + { + symbol_file_clear (from_tty); + } + else + { + if ((argv = buildargv (args)) == NULL) + { + nomem (0); + } + cleanups = make_cleanup_freeargv (argv); + while (*argv != NULL) + { + if (strcmp (*argv, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (**argv == '-') + error ("unknown option `%s'", *argv); + else + { + name = *argv; + + symbol_file_add_main_1 (name, from_tty, flags); + } + argv++; + } + + if (name == NULL) + { + error ("no symbol file name was specified"); + } + do_cleanups (cleanups); + } +} + +/* Set the initial language. + + A better solution would be to record the language in the psymtab when reading + partial symbols, and then use it (if known) to set the language. This would + be a win for formats that encode the language in an easily discoverable place, + such as DWARF. For stabs, we can jump through hoops looking for specially + named symbols or try to intuit the language from the specific type of stabs + we find, but we can't do that until later when we read in full symbols. + FIXME. */ + +static void +set_initial_language (void) +{ + struct partial_symtab *pst; + enum language lang = language_unknown; + + pst = find_main_psymtab (); + if (pst != NULL) + { + if (pst->filename != NULL) + { + lang = deduce_language_from_filename (pst->filename); + } + if (lang == language_unknown) + { + /* Make C the default language */ + lang = language_c; + } + set_language (lang); + expected_language = current_language; /* Don't warn the user */ + } +} + +/* Open file specified by NAME and hand it off to BFD for preliminary + analysis. Result is a newly initialized bfd *, which includes a newly + malloc'd` copy of NAME (tilde-expanded and made absolute). + In case of trouble, error() is called. */ + +bfd * +symfile_bfd_open (char *name) +{ + bfd *sym_bfd; + int desc; + char *absolute_name; + + + + name = tilde_expand (name); /* Returns 1st new malloc'd copy */ + + /* Look down path for it, allocate 2nd new malloc'd copy. */ + desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); +#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) + if (desc < 0) + { + char *exename = alloca (strlen (name) + 5); + strcat (strcpy (exename, name), ".exe"); + desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, + 0, &absolute_name); + } +#endif + if (desc < 0) + { + make_cleanup (xfree, name); + perror_with_name (name); + } + xfree (name); /* Free 1st new malloc'd copy */ + name = absolute_name; /* Keep 2nd malloc'd copy in bfd */ + /* It'll be freed in free_objfile(). */ + + sym_bfd = bfd_fdopenr (name, gnutarget, desc); + if (!sym_bfd) + { + close (desc); + make_cleanup (xfree, name); + error ("\"%s\": can't open to read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + bfd_set_cacheable (sym_bfd, 1); + + if (!bfd_check_format (sym_bfd, bfd_object)) + { + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + bfd_close (sym_bfd); /* This also closes desc */ + make_cleanup (xfree, name); + error ("\"%s\": can't read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + return (sym_bfd); +} + +/* Return the section index for the given section name. Return -1 if + the section was not found. */ +int +get_section_index (struct objfile *objfile, char *section_name) +{ + asection *sect = bfd_get_section_by_name (objfile->obfd, section_name); + if (sect) + return sect->index; + else + return -1; +} + +/* Link a new symtab_fns into the global symtab_fns list. Called on gdb + startup by the _initialize routine in each object file format reader, + to register information about each format the the reader is prepared + to handle. */ + +void +add_symtab_fns (struct sym_fns *sf) +{ + sf->next = symtab_fns; + symtab_fns = sf; +} + + +/* Initialize to read symbols from the symbol file sym_bfd. It either + returns or calls error(). The result is an initialized struct sym_fns + in the objfile structure, that contains cached information about the + symbol file. */ + +static void +find_sym_fns (struct objfile *objfile) +{ + struct sym_fns *sf; + enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd); + char *our_target = bfd_get_target (objfile->obfd); + + if (our_flavour == bfd_target_srec_flavour + || our_flavour == bfd_target_ihex_flavour + || our_flavour == bfd_target_tekhex_flavour) + return; /* No symbols. */ + + for (sf = symtab_fns; sf != NULL; sf = sf->next) + { + if (our_flavour == sf->sym_flavour) + { + objfile->sf = sf; + return; + } + } + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (objfile->obfd)); +} + +/* This function runs the load command of our current target. */ + +static void +load_command (char *arg, int from_tty) +{ + if (arg == NULL) + arg = get_exec_file (1); + target_load (arg, from_tty); + + /* After re-loading the executable, we don't really know which + overlays are mapped any more. */ + overlay_cache_invalid = 1; +} + +/* This version of "load" should be usable for any target. Currently + it is just used for remote targets, not inftarg.c or core files, + on the theory that only in that case is it useful. + + Avoiding xmodem and the like seems like a win (a) because we don't have + to worry about finding it, and (b) On VMS, fork() is very slow and so + we don't want to run a subprocess. On the other hand, I'm not sure how + performance compares. */ + +static int download_write_size = 512; +static int validate_download = 0; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +add_section_size_callback (bfd *abfd, asection *asec, void *data) +{ + bfd_size_type *sum = data; + + *sum += bfd_get_section_size_before_reloc (asec); +} + +/* Opaque data for load_section_callback. */ +struct load_section_data { + unsigned long load_offset; + unsigned long write_count; + unsigned long data_count; + bfd_size_type total_size; +}; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +load_section_callback (bfd *abfd, asection *asec, void *data) +{ + struct load_section_data *args = data; + + if (bfd_get_section_flags (abfd, asec) & SEC_LOAD) + { + bfd_size_type size = bfd_get_section_size_before_reloc (asec); + if (size > 0) + { + char *buffer; + struct cleanup *old_chain; + CORE_ADDR lma = bfd_section_lma (abfd, asec) + args->load_offset; + bfd_size_type block_size; + int err; + const char *sect_name = bfd_get_section_name (abfd, asec); + bfd_size_type sent; + + if (download_write_size > 0 && size > download_write_size) + block_size = download_write_size; + else + block_size = size; + + buffer = xmalloc (size); + old_chain = make_cleanup (xfree, buffer); + + /* Is this really necessary? I guess it gives the user something + to look at during a long download. */ + ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n", + sect_name, paddr_nz (size), paddr_nz (lma)); + + bfd_get_section_contents (abfd, asec, buffer, 0, size); + + sent = 0; + do + { + int len; + bfd_size_type this_transfer = size - sent; + + if (this_transfer >= block_size) + this_transfer = block_size; + len = target_write_memory_partial (lma, buffer, + this_transfer, &err); + if (err) + break; + if (validate_download) + { + /* Broken memories and broken monitors manifest + themselves here when bring new computers to + life. This doubles already slow downloads. */ + /* NOTE: cagney/1999-10-18: A more efficient + implementation might add a verify_memory() + method to the target vector and then use + that. remote.c could implement that method + using the ``qCRC'' packet. */ + char *check = xmalloc (len); + struct cleanup *verify_cleanups = + make_cleanup (xfree, check); + + if (target_read_memory (lma, check, len) != 0) + error ("Download verify read failed at 0x%s", + paddr (lma)); + if (memcmp (buffer, check, len) != 0) + error ("Download verify compare failed at 0x%s", + paddr (lma)); + do_cleanups (verify_cleanups); + } + args->data_count += len; + lma += len; + buffer += len; + args->write_count += 1; + sent += len; + if (quit_flag + || (ui_load_progress_hook != NULL + && ui_load_progress_hook (sect_name, sent))) + error ("Canceled the download"); + + if (show_load_progress != NULL) + show_load_progress (sect_name, sent, size, + args->data_count, args->total_size); + } + while (sent < size); + + if (err != 0) + error ("Memory access error while loading section %s.", sect_name); + + do_cleanups (old_chain); + } + } +} + +void +generic_load (char *args, int from_tty) +{ + asection *s; + bfd *loadfile_bfd; + time_t start_time, end_time; /* Start and end times of download */ + char *filename; + struct cleanup *old_cleanups; + char *offptr; + struct load_section_data cbdata; + CORE_ADDR entry; + + cbdata.load_offset = 0; /* Offset to add to vma for each section. */ + cbdata.write_count = 0; /* Number of writes needed. */ + cbdata.data_count = 0; /* Number of bytes written to target memory. */ + cbdata.total_size = 0; /* Total size of all bfd sectors. */ + + /* Parse the input argument - the user can specify a load offset as + a second argument. */ + filename = xmalloc (strlen (args) + 1); + old_cleanups = make_cleanup (xfree, filename); + strcpy (filename, args); + offptr = strchr (filename, ' '); + if (offptr != NULL) + { + char *endptr; + + cbdata.load_offset = strtoul (offptr, &endptr, 0); + if (offptr == endptr) + error ("Invalid download offset:%s\n", offptr); + *offptr = '\0'; + } + else + cbdata.load_offset = 0; + + /* Open the file for loading. */ + loadfile_bfd = bfd_openr (filename, gnutarget); + if (loadfile_bfd == NULL) + { + perror_with_name (filename); + return; + } + + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + make_cleanup_bfd_close (loadfile_bfd); + + if (!bfd_check_format (loadfile_bfd, bfd_object)) + { + error ("\"%s\" is not an object file: %s", filename, + bfd_errmsg (bfd_get_error ())); + } + + bfd_map_over_sections (loadfile_bfd, add_section_size_callback, + (void *) &cbdata.total_size); + + start_time = time (NULL); + + bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata); + + end_time = time (NULL); + + entry = bfd_get_start_address (loadfile_bfd); + ui_out_text (uiout, "Start address "); + ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry)); + ui_out_text (uiout, ", load size "); + ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count); + ui_out_text (uiout, "\n"); + /* We were doing this in remote-mips.c, I suspect it is right + for other targets too. */ + write_pc (entry); + + /* FIXME: are we supposed to call symbol_file_add or not? According + to a comment from remote-mips.c (where a call to symbol_file_add + was commented out), making the call confuses GDB if more than one + file is loaded in. Some targets do (e.g., remote-vx.c) but + others don't (or didn't - perhaphs they have all been deleted). */ + + print_transfer_performance (gdb_stdout, cbdata.data_count, + cbdata.write_count, end_time - start_time); + + do_cleanups (old_cleanups); +} + +/* Report how fast the transfer went. */ + +/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being + replaced by print_transfer_performance (with a very different + function signature). */ + +void +report_transfer_performance (unsigned long data_count, time_t start_time, + time_t end_time) +{ + print_transfer_performance (gdb_stdout, data_count, + end_time - start_time, 0); +} + +void +print_transfer_performance (struct ui_file *stream, + unsigned long data_count, + unsigned long write_count, + unsigned long time_count) +{ + ui_out_text (uiout, "Transfer rate: "); + if (time_count > 0) + { + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (data_count * 8) / time_count); + ui_out_text (uiout, " bits/sec"); + } + else + { + ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); + ui_out_text (uiout, " bits in <1 sec"); + } + if (write_count > 0) + { + ui_out_text (uiout, ", "); + ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); + ui_out_text (uiout, " bytes/write"); + } + ui_out_text (uiout, ".\n"); +} + +/* This function allows the addition of incrementally linked object files. + It does not modify any state in the target, only in the debugger. */ +/* Note: ezannoni 2000-04-13 This function/command used to have a + special case syntax for the rombug target (Rombug is the boot + monitor for Microware's OS-9 / OS-9000, see remote-os9k.c). In the + rombug case, the user doesn't need to supply a text address, + instead a call to target_link() (in target.c) would supply the + value to use. We are now discontinuing this type of ad hoc syntax. */ + +static void +add_symbol_file_command (char *args, int from_tty) +{ + char *filename = NULL; + int flags = OBJF_USERLOADED; + char *arg; + int expecting_option = 0; + int section_index = 0; + int argcnt = 0; + int sec_num = 0; + int i; + int expecting_sec_name = 0; + int expecting_sec_addr = 0; + + struct sect_opt + { + char *name; + char *value; + }; + + struct section_addr_info *section_addrs; + struct sect_opt *sect_opts = NULL; + size_t num_sect_opts = 0; + struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL); + + num_sect_opts = 16; + sect_opts = (struct sect_opt *) xmalloc (num_sect_opts + * sizeof (struct sect_opt)); + + dont_repeat (); + + if (args == NULL) + error ("add-symbol-file takes a file name and an address"); + + /* Make a copy of the string that we can safely write into. */ + args = xstrdup (args); + + while (*args != '\000') + { + /* Any leading spaces? */ + while (isspace (*args)) + args++; + + /* Point arg to the beginning of the argument. */ + arg = args; + + /* Move args pointer over the argument. */ + while ((*args != '\000') && !isspace (*args)) + args++; + + /* If there are more arguments, terminate arg and + proceed past it. */ + if (*args != '\000') + *args++ = '\000'; + + /* Now process the argument. */ + if (argcnt == 0) + { + /* The first argument is the file name. */ + filename = tilde_expand (arg); + make_cleanup (xfree, filename); + } + else + if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) + { + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + error ("USAGE: add-symbol-file [-mapped] [-readnow] [-s ]*"); + } + } + argcnt++; + } + + /* Print the prompt for the query below. And save the arguments into + a sect_addr_info structure to be passed around to other + functions. We have to split this up into separate print + statements because local_hex_string returns a local static + string. */ + + printf_unfiltered ("add symbol table from file \"%s\" at\n", filename); + section_addrs = alloc_section_addr_info (section_index); + make_cleanup (xfree, section_addrs); + for (i = 0; i < section_index; i++) + { + CORE_ADDR addr; + char *val = sect_opts[i].value; + char *sec = sect_opts[i].name; + + addr = parse_and_eval_address (val); + + /* Here we store the section offsets in the order they were + entered on the command line. */ + section_addrs->other[sec_num].name = sec; + section_addrs->other[sec_num].addr = addr; + printf_unfiltered ("\t%s_addr = %s\n", + sec, + local_hex_string ((unsigned long)addr)); + sec_num++; + + /* The object's sections are initialized when a + call is made to build_objfile_section_table (objfile). + This happens in reread_symbols. + At this point, we don't know what file type this is, + so we can't determine what section names are valid. */ + } + +#ifndef CRASH_MERGE + if (from_tty && (!query ("%s", ""))) + error ("Not confirmed."); +#endif + + symbol_file_add (filename, from_tty, section_addrs, 0, flags); + + /* Getting new symbols may change our opinion about what is + frameless. */ + reinit_frame_cache (); + do_cleanups (my_cleanups); +} + +static void +add_shared_symbol_files_command (char *args, int from_tty) +{ +#ifdef ADD_SHARED_SYMBOL_FILES + ADD_SHARED_SYMBOL_FILES (args, from_tty); +#else + error ("This command is not available in this configuration of GDB."); +#endif +} + +/* Re-read symbols if a symbol-file has changed. */ +void +reread_symbols (void) +{ + struct objfile *objfile; + long new_modtime; + int reread_one = 0; + struct stat new_statbuf; + int res; + + /* With the addition of shared libraries, this should be modified, + the load time should be saved in the partial symbol tables, since + different tables may come from different source files. FIXME. + This routine should then walk down each partial symbol table + and see if the symbol table that it originates from has been changed */ + + for (objfile = object_files; objfile; objfile = objfile->next) + { + if (objfile->obfd) + { +#ifdef DEPRECATED_IBM6000_TARGET + /* If this object is from a shared library, then you should + stat on the library name, not member name. */ + + if (objfile->obfd->my_archive) + res = stat (objfile->obfd->my_archive->filename, &new_statbuf); + else +#endif + res = stat (objfile->name, &new_statbuf); + if (res != 0) + { + /* FIXME, should use print_sys_errmsg but it's not filtered. */ + printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n", + objfile->name); + continue; + } + new_modtime = new_statbuf.st_mtime; + if (new_modtime != objfile->mtime) + { + struct cleanup *old_cleanups; + struct section_offsets *offsets; + int num_offsets; + char *obfd_filename; + + printf_unfiltered ("`%s' has changed; re-reading symbols.\n", + objfile->name); + + /* There are various functions like symbol_file_add, + symfile_bfd_open, syms_from_objfile, etc., which might + appear to do what we want. But they have various other + effects which we *don't* want. So we just do stuff + ourselves. We don't worry about mapped files (for one thing, + any mapped file will be out of date). */ + + /* If we get an error, blow away this objfile (not sure if + that is the correct response for things like shared + libraries). */ + old_cleanups = make_cleanup_free_objfile (objfile); + /* We need to do this whenever any symbols go away. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Clean up any state BFD has sitting around. We don't need + to close the descriptor but BFD lacks a way of closing the + BFD without closing the descriptor. */ + obfd_filename = bfd_get_filename (objfile->obfd); + if (!bfd_close (objfile->obfd)) + error ("Can't close BFD for %s: %s", objfile->name, + bfd_errmsg (bfd_get_error ())); + objfile->obfd = bfd_openr (obfd_filename, gnutarget); + if (objfile->obfd == NULL) + error ("Can't open %s to read symbols.", objfile->name); + /* bfd_openr sets cacheable to true, which is what we want. */ + if (!bfd_check_format (objfile->obfd, bfd_object)) + error ("Can't read symbols from %s: %s.", objfile->name, + bfd_errmsg (bfd_get_error ())); + + /* Save the offsets, we will nuke them with the rest of the + objfile_obstack. */ + num_offsets = objfile->num_sections; + offsets = ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets))); + memcpy (offsets, objfile->section_offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + + /* Nuke all the state that we will re-read. Much of the following + code which sets things to NULL really is necessary to tell + other parts of GDB that there is nothing currently there. */ + + /* FIXME: Do we have to free a whole linked list, or is this + enough? */ + if (objfile->global_psymbols.list) + xmfree (objfile->md, objfile->global_psymbols.list); + memset (&objfile->global_psymbols, 0, + sizeof (objfile->global_psymbols)); + if (objfile->static_psymbols.list) + xmfree (objfile->md, objfile->static_psymbols.list); + memset (&objfile->static_psymbols, 0, + sizeof (objfile->static_psymbols)); + + /* Free the obstacks for non-reusable objfiles */ + bcache_xfree (objfile->psymbol_cache); + objfile->psymbol_cache = bcache_xmalloc (); + bcache_xfree (objfile->macro_cache); + objfile->macro_cache = bcache_xmalloc (); + if (objfile->demangled_names_hash != NULL) + { + htab_delete (objfile->demangled_names_hash); + objfile->demangled_names_hash = NULL; + } + obstack_free (&objfile->objfile_obstack, 0); + objfile->sections = NULL; + objfile->symtabs = NULL; + objfile->psymtabs = NULL; + objfile->free_psymtabs = NULL; + objfile->cp_namespace_symtab = NULL; + objfile->msymbols = NULL; + objfile->sym_private = NULL; + objfile->minimal_symbol_count = 0; + memset (&objfile->msymbol_hash, 0, + sizeof (objfile->msymbol_hash)); + memset (&objfile->msymbol_demangled_hash, 0, + sizeof (objfile->msymbol_demangled_hash)); + objfile->fundamental_types = NULL; + clear_objfile_data (objfile); + if (objfile->sf != NULL) + { + (*objfile->sf->sym_finish) (objfile); + } + + /* We never make this a mapped file. */ + objfile->md = NULL; + objfile->psymbol_cache = bcache_xmalloc (); + objfile->macro_cache = bcache_xmalloc (); + /* obstack_init also initializes the obstack so it is + empty. We could use obstack_specify_allocation but + gdb_obstack.h specifies the alloc/dealloc + functions. */ + obstack_init (&objfile->objfile_obstack); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile->name, bfd_errmsg (bfd_get_error ())); + } + terminate_minimal_symbol_table (objfile); + + /* We use the same section offsets as from last time. I'm not + sure whether that is always correct for shared libraries. */ + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + memcpy (objfile->section_offsets, offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + objfile->num_sections = num_offsets; + + /* What the hell is sym_new_init for, anyway? The concept of + distinguishing between the main file and additional files + in this way seems rather dubious. */ + if (objfile == symfile_objfile) + { + (*objfile->sf->sym_new_init) (objfile); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + } + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, 1); + /* The "mainline" parameter is a hideous hack; I think leaving it + zero is OK since dbxread.c also does what it needs to do if + objfile->global_psymbols.size is 0. */ + (*objfile->sf->sym_read) (objfile, 0); + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)\n"); + wrap_here (""); + } + objfile->flags |= OBJF_SYMS; + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, 1); + + /* Getting new symbols may change our opinion about what is + frameless. */ + + reinit_frame_cache (); + + /* Discard cleanups as symbol reading was successful. */ + discard_cleanups (old_cleanups); + + /* If the mtime has changed between the time we set new_modtime + and now, we *want* this to be out of date, so don't call stat + again now. */ + objfile->mtime = new_modtime; + reread_one = 1; + reread_separate_symbols (objfile); + } + } + } + + if (reread_one) + clear_symtab_users (); +} + + +/* Handle separate debug info for OBJFILE, which has just been + re-read: + - If we had separate debug info before, but now we don't, get rid + of the separated objfile. + - If we didn't have separated debug info before, but now we do, + read in the new separated debug info file. + - If the debug link points to a different file, toss the old one + and read the new one. + This function does *not* handle the case where objfile is still + using the same separate debug info file, but that file's timestamp + has changed. That case should be handled by the loop in + reread_symbols already. */ +static void +reread_separate_symbols (struct objfile *objfile) +{ + char *debug_file; + unsigned long crc32; + + /* Does the updated objfile's debug info live in a + separate file? */ + debug_file = find_separate_debug_file (objfile); + + if (objfile->separate_debug_objfile) + { + /* There are two cases where we need to get rid of + the old separated debug info objfile: + - if the new primary objfile doesn't have + separated debug info, or + - if the new primary objfile has separate debug + info, but it's under a different filename. + + If the old and new objfiles both have separate + debug info, under the same filename, then we're + okay --- if the separated file's contents have + changed, we will have caught that when we + visited it in this function's outermost + loop. */ + if (! debug_file + || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0) + free_objfile (objfile->separate_debug_objfile); + } + + /* If the new objfile has separate debug info, and we + haven't loaded it already, do so now. */ + if (debug_file + && ! objfile->separate_debug_objfile) + { + /* Use the same section offset table as objfile itself. + Preserve the flags from objfile that make sense. */ + objfile->separate_debug_objfile + = (symbol_file_add_with_addrs_or_offsets + (debug_file, + info_verbose, /* from_tty: Don't override the default. */ + 0, /* No addr table. */ + objfile->section_offsets, objfile->num_sections, + 0, /* Not mainline. See comments about this above. */ + objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW + | OBJF_USERLOADED))); + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + } +} + + + + + +typedef struct +{ + char *ext; + enum language lang; +} +filename_language; + +static filename_language *filename_language_table; +static int fl_table_size, fl_table_next; + +static void +add_filename_language (char *ext, enum language lang) +{ + if (fl_table_next >= fl_table_size) + { + fl_table_size += 10; + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); + } + + filename_language_table[fl_table_next].ext = xstrdup (ext); + filename_language_table[fl_table_next].lang = lang; + fl_table_next++; +} + +static char *ext_args; + +static void +set_ext_lang_command (char *args, int from_tty) +{ + int i; + char *cp = ext_args; + enum language lang; + + /* First arg is filename extension, starting with '.' */ + if (*cp != '.') + error ("'%s': Filename extension must begin with '.'", ext_args); + + /* Find end of first arg. */ + while (*cp && !isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Null-terminate first arg */ + *cp++ = '\0'; + + /* Find beginning of second arg, which should be a source language. */ + while (*cp && isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Lookup the language from among those we know. */ + lang = language_enum (cp); + + /* Now lookup the filename extension: do we already know it? */ + for (i = 0; i < fl_table_next; i++) + if (0 == strcmp (ext_args, filename_language_table[i].ext)) + break; + + if (i >= fl_table_next) + { + /* new file extension */ + add_filename_language (ext_args, lang); + } + else + { + /* redefining a previously known filename extension */ + + /* if (from_tty) */ + /* query ("Really make files of type %s '%s'?", */ + /* ext_args, language_str (lang)); */ + + xfree (filename_language_table[i].ext); + filename_language_table[i].ext = xstrdup (ext_args); + filename_language_table[i].lang = lang; + } +} + +static void +info_ext_lang_command (char *args, int from_tty) +{ + int i; + + printf_filtered ("Filename extensions and the languages they represent:"); + printf_filtered ("\n\n"); + for (i = 0; i < fl_table_next; i++) + printf_filtered ("\t%s\t- %s\n", + filename_language_table[i].ext, + language_str (filename_language_table[i].lang)); +} + +static void +init_filename_language_table (void) +{ + if (fl_table_size == 0) /* protect against repetition */ + { + fl_table_size = 20; + fl_table_next = 0; + filename_language_table = + xmalloc (fl_table_size * sizeof (*filename_language_table)); + add_filename_language (".c", language_c); + add_filename_language (".C", language_cplus); + add_filename_language (".cc", language_cplus); + add_filename_language (".cp", language_cplus); + add_filename_language (".cpp", language_cplus); + add_filename_language (".cxx", language_cplus); + add_filename_language (".c++", language_cplus); + add_filename_language (".java", language_java); + add_filename_language (".class", language_java); + add_filename_language (".m", language_objc); + add_filename_language (".f", language_fortran); + add_filename_language (".F", language_fortran); + add_filename_language (".s", language_asm); + add_filename_language (".S", language_asm); + add_filename_language (".pas", language_pascal); + add_filename_language (".p", language_pascal); + add_filename_language (".pp", language_pascal); + } +} + +enum language +deduce_language_from_filename (char *filename) +{ + int i; + char *cp; + + if (filename != NULL) + if ((cp = strrchr (filename, '.')) != NULL) + for (i = 0; i < fl_table_next; i++) + if (strcmp (cp, filename_language_table[i].ext) == 0) + return filename_language_table[i].lang; + + return language_unknown; +} + +/* allocate_symtab: + + Allocate and partly initialize a new symbol table. Return a pointer + to it. error() if no space. + + Caller must set these fields: + LINETABLE(symtab) + symtab->blockvector + symtab->dirname + symtab->free_code + symtab->free_ptr + possibly free_named_symtabs (symtab->filename); + */ + +struct symtab * +allocate_symtab (char *filename, struct objfile *objfile) +{ + struct symtab *symtab; + + symtab = (struct symtab *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct symtab)); + memset (symtab, 0, sizeof (*symtab)); + symtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + symtab->fullname = NULL; + symtab->language = deduce_language_from_filename (filename); + symtab->debugformat = obsavestring ("unknown", 7, + &objfile->objfile_obstack); + + /* Hook it to the objfile it comes from */ + + symtab->objfile = objfile; + symtab->next = objfile->symtabs; + objfile->symtabs = symtab; + + /* FIXME: This should go away. It is only defined for the Z8000, + and the Z8000 definition of this macro doesn't have anything to + do with the now-nonexistent EXTRA_SYMTAB_INFO macro, it's just + here for convenience. */ +#ifdef INIT_EXTRA_SYMTAB_INFO + INIT_EXTRA_SYMTAB_INFO (symtab); +#endif + + return (symtab); +} + +struct partial_symtab * +allocate_psymtab (char *filename, struct objfile *objfile) +{ + struct partial_symtab *psymtab; + + if (objfile->free_psymtabs) + { + psymtab = objfile->free_psymtabs; + objfile->free_psymtabs = psymtab->next; + } + else + psymtab = (struct partial_symtab *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct partial_symtab)); + + memset (psymtab, 0, sizeof (struct partial_symtab)); + psymtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + psymtab->symtab = NULL; + + /* Prepend it to the psymtab list for the objfile it belongs to. + Psymtabs are searched in most recent inserted -> least recent + inserted order. */ + + psymtab->objfile = objfile; + psymtab->next = objfile->psymtabs; + objfile->psymtabs = psymtab; +#if 0 + { + struct partial_symtab **prev_pst; + psymtab->objfile = objfile; + psymtab->next = NULL; + prev_pst = &(objfile->psymtabs); + while ((*prev_pst) != NULL) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = psymtab; + } +#endif + + return (psymtab); +} + +void +discard_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab **prev_pst; + + /* From dbxread.c: + Empty psymtabs happen as a result of header files which don't + have any symbols in them. There can be a lot of them. But this + check is wrong, in that a psymtab with N_SLINE entries but + nothing else is not empty, but we don't realize that. Fixing + that without slowing things down might be tricky. */ + + /* First, snip it out of the psymtab chain */ + + prev_pst = &(pst->objfile->psymtabs); + while ((*prev_pst) != pst) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = pst->next; + + /* Next, put it on a free list for recycling */ + + pst->next = pst->objfile->free_psymtabs; + pst->objfile->free_psymtabs = pst; +} + + +/* Reset all data structures in gdb which may contain references to symbol + table data. */ + +void +clear_symtab_users (void) +{ + /* Someday, we should do better than this, by only blowing away + the things that really need to be blown. */ + clear_value_history (); + clear_displays (); + clear_internalvars (); + breakpoint_re_set (); + set_default_breakpoint (0, 0, 0, 0); + clear_current_source_symtab_and_line (); + clear_pc_function_cache (); + if (target_new_objfile_hook) + target_new_objfile_hook (NULL); +} + +static void +clear_symtab_users_cleanup (void *ignore) +{ + clear_symtab_users (); +} + +/* clear_symtab_users_once: + + This function is run after symbol reading, or from a cleanup. + If an old symbol table was obsoleted, the old symbol table + has been blown away, but the other GDB data structures that may + reference it have not yet been cleared or re-directed. (The old + symtab was zapped, and the cleanup queued, in free_named_symtab() + below.) + + This function can be queued N times as a cleanup, or called + directly; it will do all the work the first time, and then will be a + no-op until the next time it is queued. This works by bumping a + counter at queueing time. Much later when the cleanup is run, or at + the end of symbol processing (in case the cleanup is discarded), if + the queued count is greater than the "done-count", we do the work + and set the done-count to the queued count. If the queued count is + less than or equal to the done-count, we just ignore the call. This + is needed because reading a single .o file will often replace many + symtabs (one per .h file, for example), and we don't want to reset + the breakpoints N times in the user's face. + + The reason we both queue a cleanup, and call it directly after symbol + reading, is because the cleanup protects us in case of errors, but is + discarded if symbol reading is successful. */ + +#if 0 +/* FIXME: As free_named_symtabs is currently a big noop this function + is no longer needed. */ +static void clear_symtab_users_once (void); + +static int clear_symtab_users_queued; +static int clear_symtab_users_done; + +static void +clear_symtab_users_once (void) +{ + /* Enforce once-per-`do_cleanups'-semantics */ + if (clear_symtab_users_queued <= clear_symtab_users_done) + return; + clear_symtab_users_done = clear_symtab_users_queued; + + clear_symtab_users (); +} +#endif + +/* Delete the specified psymtab, and any others that reference it. */ + +static void +cashier_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab *ps, *pprev = NULL; + int i; + + /* Find its previous psymtab in the chain */ + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + if (ps == pst) + break; + pprev = ps; + } + + if (ps) + { + /* Unhook it from the chain. */ + if (ps == pst->objfile->psymtabs) + pst->objfile->psymtabs = ps->next; + else + pprev->next = ps->next; + + /* FIXME, we can't conveniently deallocate the entries in the + partial_symbol lists (global_psymbols/static_psymbols) that + this psymtab points to. These just take up space until all + the psymtabs are reclaimed. Ditto the dependencies list and + filename, which are all in the objfile_obstack. */ + + /* We need to cashier any psymtab that has this one as a dependency... */ + again: + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + for (i = 0; i < ps->number_of_dependencies; i++) + { + if (ps->dependencies[i] == pst) + { + cashier_psymtab (ps); + goto again; /* Must restart, chain has been munged. */ + } + } + } + } +} + +/* If a symtab or psymtab for filename NAME is found, free it along + with any dependent breakpoints, displays, etc. + Used when loading new versions of object modules with the "add-file" + command. This is only called on the top-level symtab or psymtab's name; + it is not called for subsidiary files such as .h files. + + Return value is 1 if we blew away the environment, 0 if not. + FIXME. The return value appears to never be used. + + FIXME. I think this is not the best way to do this. We should + work on being gentler to the environment while still cleaning up + all stray pointers into the freed symtab. */ + +int +free_named_symtabs (char *name) +{ +#if 0 + /* FIXME: With the new method of each objfile having it's own + psymtab list, this function needs serious rethinking. In particular, + why was it ever necessary to toss psymtabs with specific compilation + unit filenames, as opposed to all psymtabs from a particular symbol + file? -- fnf + Well, the answer is that some systems permit reloading of particular + compilation units. We want to blow away any old info about these + compilation units, regardless of which objfiles they arrived in. --gnu. */ + + struct symtab *s; + struct symtab *prev; + struct partial_symtab *ps; + struct blockvector *bv; + int blewit = 0; + + /* We only wack things if the symbol-reload switch is set. */ + if (!symbol_reloading) + return 0; + + /* Some symbol formats have trouble providing file names... */ + if (name == 0 || *name == '\0') + return 0; + + /* Look for a psymtab with the specified name. */ + +again2: + for (ps = partial_symtab_list; ps; ps = ps->next) + { + if (strcmp (name, ps->filename) == 0) + { + cashier_psymtab (ps); /* Blow it away...and its little dog, too. */ + goto again2; /* Must restart, chain has been munged */ + } + } + + /* Look for a symtab with the specified name. */ + + for (s = symtab_list; s; s = s->next) + { + if (strcmp (name, s->filename) == 0) + break; + prev = s; + } + + if (s) + { + if (s == symtab_list) + symtab_list = s->next; + else + prev->next = s->next; + + /* For now, queue a delete for all breakpoints, displays, etc., whether + or not they depend on the symtab being freed. This should be + changed so that only those data structures affected are deleted. */ + + /* But don't delete anything if the symtab is empty. + This test is necessary due to a bug in "dbxread.c" that + causes empty symtabs to be created for N_SO symbols that + contain the pathname of the object file. (This problem + has been fixed in GDB 3.9x). */ + + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) + { + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); + clear_symtab_users_queued++; + make_cleanup (clear_symtab_users_once, 0); + blewit = 1; + } + else + { + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); + } + + free_symtab (s); + } + else + { + /* It is still possible that some breakpoints will be affected + even though no symtab was found, since the file might have + been compiled without debugging, and hence not be associated + with a symtab. In order to handle this correctly, we would need + to keep a list of text address ranges for undebuggable files. + For now, we do nothing, since this is a fairly obscure case. */ + ; + } + + /* FIXME, what about the minimal symbol table? */ + return blewit; +#else + return (0); +#endif +} + +/* Allocate and partially fill a partial symtab. It will be + completely filled at the end of the symbol list. + + FILENAME is the name of the symbol-file we are reading from. */ + +struct partial_symtab * +start_psymtab_common (struct objfile *objfile, + struct section_offsets *section_offsets, char *filename, + CORE_ADDR textlow, struct partial_symbol **global_syms, + struct partial_symbol **static_syms) +{ + struct partial_symtab *psymtab; + + psymtab = allocate_psymtab (filename, objfile); + psymtab->section_offsets = section_offsets; + psymtab->textlow = textlow; + psymtab->texthigh = psymtab->textlow; /* default */ + psymtab->globals_offset = global_syms - objfile->global_psymbols.list; + psymtab->statics_offset = static_syms - objfile->static_psymbols.list; + return (psymtab); +} + +/* Add a symbol with a long value to a psymtab. + Since one arg is a struct, we pass in a ptr and deref it (sigh). + Return the partial symbol that has been added. */ + +/* NOTE: carlton/2003-09-11: The reason why we return the partial + symbol is so that callers can get access to the symbol's demangled + name, which they don't have any cheap way to determine otherwise. + (Currenly, dwarf2read.c is the only file who uses that information, + though it's possible that other readers might in the future.) + Elena wasn't thrilled about that, and I don't blame her, but we + couldn't come up with a better way to get that information. If + it's needed in other situations, we could consider breaking up + SYMBOL_SET_NAMES to provide access to the demangled name lookup + cache. */ + +const struct partial_symbol * +add_psymbol_to_list (char *name, int namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + + SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); + + return psym; +} + +/* Add a symbol with a long value to a psymtab. This differs from + * add_psymbol_to_list above in taking both a mangled and a demangled + * name. */ + +void +add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, + int dem_namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, + struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1, + objfile->psymbol_cache); + + buf = alloca (dem_namelength + 1); + memcpy (buf, dem_name, dem_namelength); + buf[dem_namelength] = '\0'; + + switch (language) + { + case language_c: + case language_cplus: + SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) = + deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache); + break; + /* FIXME What should be done for the default case? Ignoring for now. */ + } + + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); +} + +/* Initialize storage for partial symbols. */ + +void +init_psymbol_list (struct objfile *objfile, int total_symbols) +{ + /* Free any previously allocated psymbol lists. */ + + if (objfile->global_psymbols.list) + { + xmfree (objfile->md, objfile->global_psymbols.list); + } + if (objfile->static_psymbols.list) + { + xmfree (objfile->md, objfile->static_psymbols.list); + } + + /* Current best guess is that approximately a twentieth + of the total symbols (in a debugging file) are global or static + oriented symbols */ + + objfile->global_psymbols.size = total_symbols / 10; + objfile->static_psymbols.size = total_symbols / 10; + + if (objfile->global_psymbols.size > 0) + { + objfile->global_psymbols.next = + objfile->global_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->global_psymbols.size + * sizeof (struct partial_symbol *))); + } + if (objfile->static_psymbols.size > 0) + { + objfile->static_psymbols.next = + objfile->static_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->static_psymbols.size + * sizeof (struct partial_symbol *))); + } +} + +/* OVERLAYS: + The following code implements an abstraction for debugging overlay sections. + + The target model is as follows: + 1) The gnu linker will permit multiple sections to be mapped into the + same VMA, each with its own unique LMA (or load address). + 2) It is assumed that some runtime mechanism exists for mapping the + sections, one by one, from the load address into the VMA address. + 3) This code provides a mechanism for gdb to keep track of which + sections should be considered to be mapped from the VMA to the LMA. + This information is used for symbol lookup, and memory read/write. + For instance, if a section has been mapped then its contents + should be read from the VMA, otherwise from the LMA. + + Two levels of debugger support for overlays are available. One is + "manual", in which the debugger relies on the user to tell it which + overlays are currently mapped. This level of support is + implemented entirely in the core debugger, and the information about + whether a section is mapped is kept in the objfile->obj_section table. + + The second level of support is "automatic", and is only available if + the target-specific code provides functionality to read the target's + overlay mapping table, and translate its contents for the debugger + (by updating the mapped state information in the obj_section tables). + + The interface is as follows: + User commands: + overlay map -- tell gdb to consider this section mapped + overlay unmap -- tell gdb to consider this section unmapped + overlay list -- list the sections that GDB thinks are mapped + overlay read-target -- get the target's state of what's mapped + overlay off/manual/auto -- set overlay debugging state + Functional interface: + find_pc_mapped_section(pc): if the pc is in the range of a mapped + section, return that section. + find_pc_overlay(pc): find any overlay section that contains + the pc, either in its VMA or its LMA + overlay_is_mapped(sect): true if overlay is marked as mapped + section_is_overlay(sect): true if section's VMA != LMA + pc_in_mapped_range(pc,sec): true if pc belongs to section's VMA + pc_in_unmapped_range(...): true if pc belongs to section's LMA + sections_overlap(sec1, sec2): true if mapped sec1 and sec2 ranges overlap + overlay_mapped_address(...): map an address from section's LMA to VMA + overlay_unmapped_address(...): map an address from section's VMA to LMA + symbol_overlayed_address(...): Return a "current" address for symbol: + either in VMA or LMA depending on whether + the symbol's section is currently mapped + */ + +/* Overlay debugging state: */ + +enum overlay_debugging_state overlay_debugging = ovly_off; +int overlay_cache_invalid = 0; /* True if need to refresh mapped state */ + +/* Target vector for refreshing overlay mapped state */ +static void simple_overlay_update (struct obj_section *); +void (*target_overlay_update) (struct obj_section *) = simple_overlay_update; + +/* Function: section_is_overlay (SECTION) + Returns true if SECTION has VMA not equal to LMA, ie. + SECTION is loaded at an address different from where it will "run". */ + +int +section_is_overlay (asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section->lma != 0 && + section->vma != section->lma) + return 1; + + return 0; +} + +/* Function: overlay_invalidate_all (void) + Invalidate the mapped state of all overlay sections (mark it as stale). */ + +static void +overlay_invalidate_all (void) +{ + struct objfile *objfile; + struct obj_section *sect; + + ALL_OBJSECTIONS (objfile, sect) + if (section_is_overlay (sect->the_bfd_section)) + sect->ovly_mapped = -1; +} + +/* Function: overlay_is_mapped (SECTION) + Returns true if section is an overlay, and is currently mapped. + Private: public access is thru function section_is_mapped. + + Access to the ovly_mapped flag is restricted to this function, so + that we can do automatic update. If the global flag + OVERLAY_CACHE_INVALID is set (by wait_for_inferior), then call + overlay_invalidate_all. If the mapped state of the particular + section is stale, then call TARGET_OVERLAY_UPDATE to refresh it. */ + +static int +overlay_is_mapped (struct obj_section *osect) +{ + if (osect == 0 || !section_is_overlay (osect->the_bfd_section)) + return 0; + + switch (overlay_debugging) + { + default: + case ovly_off: + return 0; /* overlay debugging off */ + case ovly_auto: /* overlay debugging automatic */ + /* Unles there is a target_overlay_update function, + there's really nothing useful to do here (can't really go auto) */ + if (target_overlay_update) + { + if (overlay_cache_invalid) + { + overlay_invalidate_all (); + overlay_cache_invalid = 0; + } + if (osect->ovly_mapped == -1) + (*target_overlay_update) (osect); + } + /* fall thru to manual case */ + case ovly_on: /* overlay debugging manual */ + return osect->ovly_mapped == 1; + } +} + +/* Function: section_is_mapped + Returns true if section is an overlay, and is currently mapped. */ + +int +section_is_mapped (asection *section) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + ALL_OBJSECTIONS (objfile, osect) + if (osect->the_bfd_section == section) + return overlay_is_mapped (osect); + + return 0; +} + +/* Function: pc_in_unmapped_range + If PC falls into the lma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_unmapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->lma <= pc && pc < section->lma + size) + return 1; + } + return 0; +} + +/* Function: pc_in_mapped_range + If PC falls into the vma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_mapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->vma <= pc && pc < section->vma + size) + return 1; + } + return 0; +} + + +/* Return true if the mapped ranges of sections A and B overlap, false + otherwise. */ +static int +sections_overlap (asection *a, asection *b) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + CORE_ADDR a_start = a->vma; + CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a); + CORE_ADDR b_start = b->vma; + CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b); + + return (a_start < b_end && b_start < a_end); +} + +/* Function: overlay_unmapped_address (PC, SECTION) + Returns the address corresponding to PC in the unmapped (load) range. + May be the same as PC. */ + +CORE_ADDR +overlay_unmapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_mapped_range (pc, section)) + return pc + section->lma - section->vma; + + return pc; +} + +/* Function: overlay_mapped_address (PC, SECTION) + Returns the address corresponding to PC in the mapped (runtime) range. + May be the same as PC. */ + +CORE_ADDR +overlay_mapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_unmapped_range (pc, section)) + return pc + section->vma - section->lma; + + return pc; +} + + +/* Function: symbol_overlayed_address + Return one of two addresses (relative to the VMA or to the LMA), + depending on whether the section is mapped or not. */ + +CORE_ADDR +symbol_overlayed_address (CORE_ADDR address, asection *section) +{ + if (overlay_debugging) + { + /* If the symbol has no section, just return its regular address. */ + if (section == 0) + return address; + /* If the symbol's section is not an overlay, just return its address */ + if (!section_is_overlay (section)) + return address; + /* If the symbol's section is mapped, just return its address */ + if (section_is_mapped (section)) + return address; + /* + * HOWEVER: if the symbol is in an overlay section which is NOT mapped, + * then return its LOADED address rather than its vma address!! + */ + return overlay_unmapped_address (address, section); + } + return address; +} + +/* Function: find_pc_overlay (PC) + Return the best-match overlay section for PC: + If PC matches a mapped overlay section's VMA, return that section. + Else if PC matches an unmapped section's VMA, return that section. + Else if PC matches an unmapped section's LMA, return that section. */ + +asection * +find_pc_overlay (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect, *best_match = NULL; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + if (pc_in_mapped_range (pc, osect->the_bfd_section)) + { + if (overlay_is_mapped (osect)) + return osect->the_bfd_section; + else + best_match = osect; + } + else if (pc_in_unmapped_range (pc, osect->the_bfd_section)) + best_match = osect; + } + return best_match ? best_match->the_bfd_section : NULL; +} + +/* Function: find_pc_mapped_section (PC) + If PC falls into the VMA address range of an overlay section that is + currently marked as MAPPED, return that section. Else return NULL. */ + +asection * +find_pc_mapped_section (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (pc_in_mapped_range (pc, osect->the_bfd_section) && + overlay_is_mapped (osect)) + return osect->the_bfd_section; + + return NULL; +} + +/* Function: list_overlays_command + Print a list of mapped sections and their PC ranges */ + +void +list_overlays_command (char *args, int from_tty) +{ + int nmapped = 0; + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (overlay_is_mapped (osect)) + { + const char *name; + bfd_vma lma, vma; + int size; + + vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section); + lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section); + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + name = bfd_section_name (objfile->obfd, osect->the_bfd_section); + + printf_filtered ("Section %s, loaded at ", name); + print_address_numeric (lma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (lma + size, 1, gdb_stdout); + printf_filtered (", mapped at "); + print_address_numeric (vma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (vma + size, 1, gdb_stdout); + puts_filtered ("\n"); + + nmapped++; + } + if (nmapped == 0) + printf_filtered ("No sections are mapped.\n"); +} + +/* Function: map_overlay_command + Mark the named section as mapped (ie. residing at its VMA address). */ + +void +map_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile, *objfile2; + struct obj_section *sec, *sec2; + asection *bfdsec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + /* Now, check to see if the section is an overlay. */ + bfdsec = sec->the_bfd_section; + if (!section_is_overlay (bfdsec)) + continue; /* not an overlay section */ + + /* Mark the overlay as "mapped" */ + sec->ovly_mapped = 1; + + /* Next, make a pass and unmap any sections that are + overlapped by this new section: */ + ALL_OBJSECTIONS (objfile2, sec2) + if (sec2->ovly_mapped + && sec != sec2 + && sec->the_bfd_section != sec2->the_bfd_section + && sections_overlap (sec->the_bfd_section, + sec2->the_bfd_section)) + { + if (info_verbose) + printf_unfiltered ("Note: section %s unmapped by overlap\n", + bfd_section_name (objfile->obfd, + sec2->the_bfd_section)); + sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */ + } + return; + } + error ("No overlay section called %s", args); +} + +/* Function: unmap_overlay_command + Mark the overlay section as unmapped + (ie. resident in its LMA address range, rather than the VMA range). */ + +void +unmap_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile; + struct obj_section *sec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + if (!sec->ovly_mapped) + error ("Section %s is not mapped", args); + sec->ovly_mapped = 0; + return; + } + error ("No overlay section called %s", args); +} + +/* Function: overlay_auto_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_auto_command (char *args, int from_tty) +{ + overlay_debugging = ovly_auto; + enable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Automatic overlay debugging enabled."); +} + +/* Function: overlay_manual_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_manual_command (char *args, int from_tty) +{ + overlay_debugging = ovly_on; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging enabled."); +} + +/* Function: overlay_off_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_off_command (char *args, int from_tty) +{ + overlay_debugging = ovly_off; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging disabled."); +} + +static void +overlay_load_command (char *args, int from_tty) +{ + if (target_overlay_update) + (*target_overlay_update) (NULL); + else + error ("This target does not know how to read its overlay state."); +} + +/* Function: overlay_command + A place-holder for a mis-typed command */ + +/* Command list chain containing all defined "overlay" subcommands. */ +struct cmd_list_element *overlaylist; + +static void +overlay_command (char *args, int from_tty) +{ + printf_unfiltered + ("\"overlay\" must be followed by the name of an overlay command.\n"); + help_list (overlaylist, "overlay ", -1, gdb_stdout); +} + + +/* Target Overlays for the "Simplest" overlay manager: + + This is GDB's default target overlay layer. It works with the + minimal overlay manager supplied as an example by Cygnus. The + entry point is via a function pointer "target_overlay_update", + so targets that use a different runtime overlay manager can + substitute their own overlay_update function and take over the + function pointer. + + The overlay_update function pokes around in the target's data structures + to see what overlays are mapped, and updates GDB's overlay mapping with + this information. + + In this simple implementation, the target data structures are as follows: + unsigned _novlys; /# number of overlay sections #/ + unsigned _ovly_table[_novlys][4] = { + {VMA, SIZE, LMA, MAPPED}, /# one entry per overlay section #/ + {..., ..., ..., ...}, + } + unsigned _novly_regions; /# number of overlay regions #/ + unsigned _ovly_region_table[_novly_regions][3] = { + {VMA, SIZE, MAPPED_TO_LMA}, /# one entry per overlay region #/ + {..., ..., ...}, + } + These functions will attempt to update GDB's mappedness state in the + symbol section table, based on the target's mappedness state. + + To do this, we keep a cached copy of the target's _ovly_table, and + attempt to detect when the cached copy is invalidated. The main + entry point is "simple_overlay_update(SECT), which looks up SECT in + the cached table and re-reads only the entry for that section from + the target (whenever possible). + */ + +/* Cached, dynamically allocated copies of the target data structures: */ +static unsigned (*cache_ovly_table)[4] = 0; +#if 0 +static unsigned (*cache_ovly_region_table)[3] = 0; +#endif +static unsigned cache_novlys = 0; +#if 0 +static unsigned cache_novly_regions = 0; +#endif +static CORE_ADDR cache_ovly_table_base = 0; +#if 0 +static CORE_ADDR cache_ovly_region_table_base = 0; +#endif +enum ovly_index + { + VMA, SIZE, LMA, MAPPED + }; +#define TARGET_LONG_BYTES (TARGET_LONG_BIT / TARGET_CHAR_BIT) + +/* Throw away the cached copy of _ovly_table */ +static void +simple_free_overlay_table (void) +{ + if (cache_ovly_table) + xfree (cache_ovly_table); + cache_novlys = 0; + cache_ovly_table = NULL; + cache_ovly_table_base = 0; +} + +#if 0 +/* Throw away the cached copy of _ovly_region_table */ +static void +simple_free_overlay_region_table (void) +{ + if (cache_ovly_region_table) + xfree (cache_ovly_region_table); + cache_novly_regions = 0; + cache_ovly_region_table = NULL; + cache_ovly_region_table_base = 0; +} +#endif + +/* Read an array of ints from the target into a local buffer. + Convert to host order. int LEN is number of ints */ +static void +read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len) +{ + /* FIXME (alloca): Not safe if array is very large. */ + char *buf = alloca (len * TARGET_LONG_BYTES); + int i; + + read_memory (memaddr, buf, len * TARGET_LONG_BYTES); + for (i = 0; i < len; i++) + myaddr[i] = extract_unsigned_integer (TARGET_LONG_BYTES * i + buf, + TARGET_LONG_BYTES); +} + +/* Find and grab a copy of the target _ovly_table + (and _novlys, which is needed for the table's size) */ +static int +simple_read_overlay_table (void) +{ + struct minimal_symbol *novlys_msym, *ovly_table_msym; + + simple_free_overlay_table (); + novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); + if (! novlys_msym) + { + error ("Error reading inferior's overlay table: " + "couldn't find `_novlys' variable\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); + if (! ovly_table_msym) + { + error ("Error reading inferior's overlay table: couldn't find " + "`_ovly_table' array\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym), 4); + cache_ovly_table + = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); + cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym); + read_target_long_array (cache_ovly_table_base, + (int *) cache_ovly_table, + cache_novlys * 4); + + return 1; /* SUCCESS */ +} + +#if 0 +/* Find and grab a copy of the target _ovly_region_table + (and _novly_regions, which is needed for the table's size) */ +static int +simple_read_overlay_region_table (void) +{ + struct minimal_symbol *msym; + + simple_free_overlay_region_table (); + msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL); + if (msym != NULL) + cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym), 4); + else + return 0; /* failure */ + cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12); + if (cache_ovly_region_table != NULL) + { + msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL); + if (msym != NULL) + { + cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym); + read_target_long_array (cache_ovly_region_table_base, + (int *) cache_ovly_region_table, + cache_novly_regions * 3); + } + else + return 0; /* failure */ + } + else + return 0; /* failure */ + return 1; /* SUCCESS */ +} +#endif + +/* Function: simple_overlay_update_1 + A helper function for simple_overlay_update. Assuming a cached copy + of _ovly_table exists, look through it to find an entry whose vma, + lma and size match those of OSECT. Re-read the entry and make sure + it still matches OSECT (else the table may no longer be valid). + Set OSECT's mapped state to match the entry. Return: 1 for + success, 0 for failure. */ + +static int +simple_overlay_update_1 (struct obj_section *osect) +{ + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES, + (int *) cache_ovly_table[i], 4); + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + return 1; + } + else /* Warning! Warning! Target's ovly table has changed! */ + return 0; + } + return 0; +} + +/* Function: simple_overlay_update + If OSECT is NULL, then update all sections' mapped state + (after re-reading the entire target _ovly_table). + If OSECT is non-NULL, then try to find a matching entry in the + cached ovly_table and update only OSECT's mapped state. + If a cached entry can't be found or the cache isn't valid, then + re-read the entire cache, and go ahead and update all sections. */ + +static void +simple_overlay_update (struct obj_section *osect) +{ + struct objfile *objfile; + + /* Were we given an osect to look up? NULL means do all of them. */ + if (osect) + /* Have we got a cached copy of the target's overlay table? */ + if (cache_ovly_table != NULL) + /* Does its cached location match what's currently in the symtab? */ + if (cache_ovly_table_base == + SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL))) + /* Then go ahead and try to look up this single section in the cache */ + if (simple_overlay_update_1 (osect)) + /* Found it! We're done. */ + return; + + /* Cached table no good: need to read the entire table anew. + Or else we want all the sections, in which case it's actually + more efficient to read the whole table in one block anyway. */ + + if (! simple_read_overlay_table ()) + return; + + /* Now may as well update all sections, even if only one was requested. */ + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { /* obj_section matches i'th entry in ovly_table */ + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + break; /* finished with inner for loop: break out */ + } + } +} + +/* Set the output sections and output offsets for section SECTP in + ABFD. The relocation code in BFD will read these offsets, so we + need to be sure they're initialized. We map each section to itself, + with no offset; this means that SECTP->vma will be honored. */ + +static void +symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy) +{ + sectp->output_section = sectp; + sectp->output_offset = 0; +} + +/* Relocate the contents of a debug section SECTP in ABFD. The + contents are stored in BUF if it is non-NULL, or returned in a + malloc'd buffer otherwise. + + For some platforms and debug info formats, shared libraries contain + relocations against the debug sections (particularly for DWARF-2; + one affected platform is PowerPC GNU/Linux, although it depends on + the version of the linker in use). Also, ELF object files naturally + have unresolved relocations for their debug sections. We need to apply + the relocations in order to get the locations of symbols correct. */ + +bfd_byte * +symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) +{ +#ifdef CRASH_MERGE + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; +#endif + /* We're only interested in debugging sections with relocation + information. */ + if ((sectp->flags & SEC_RELOC) == 0) + return NULL; + if ((sectp->flags & SEC_DEBUGGING) == 0) + return NULL; + + /* We will handle section offsets properly elsewhere, so relocate as if + all sections begin at 0. */ + bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL); + + return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL); +} + +void +_initialize_symfile (void) +{ + struct cmd_list_element *c; + + c = add_cmd ("symbol-file", class_files, symbol_file_command, + "Load symbol table from executable file FILE.\n\ +The `file' command can also load symbol tables, as well as setting the file\n\ +to execute.", &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, + "Usage: add-symbol-file FILE ADDR [-s -s ...]\n\ +Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\ +ADDR is the starting address of the file's text.\n\ +The optional arguments are section-name section-address pairs and\n\ +should be specified if the data and bss segments are not contiguous\n\ +with the text. SECT is a section name to be loaded at SECT_ADDR.", + &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-shared-symbol-files", class_files, + add_shared_symbol_files_command, + "Load the symbols from shared objects in the dynamic linker's link map.", + &cmdlist); + c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1, + &cmdlist); + + c = add_cmd ("load", class_files, load_command, + "Dynamically load FILE into the running program, and record its symbols\n\ +for access from GDB.", &cmdlist); + set_cmd_completer (c, filename_completer); + + add_show_from_set + (add_set_cmd ("symbol-reloading", class_support, var_boolean, + (char *) &symbol_reloading, + "Set dynamic symbol table reloading multiple times in one run.", + &setlist), + &showlist); + + add_prefix_cmd ("overlay", class_support, overlay_command, + "Commands for debugging overlays.", &overlaylist, + "overlay ", 0, &cmdlist); + + add_com_alias ("ovly", "overlay", class_alias, 1); + add_com_alias ("ov", "overlay", class_alias, 1); + + add_cmd ("map-overlay", class_support, map_overlay_command, + "Assert that an overlay section is mapped.", &overlaylist); + + add_cmd ("unmap-overlay", class_support, unmap_overlay_command, + "Assert that an overlay section is unmapped.", &overlaylist); + + add_cmd ("list-overlays", class_support, list_overlays_command, + "List mappings of overlay sections.", &overlaylist); + + add_cmd ("manual", class_support, overlay_manual_command, + "Enable overlay debugging.", &overlaylist); + add_cmd ("off", class_support, overlay_off_command, + "Disable overlay debugging.", &overlaylist); + add_cmd ("auto", class_support, overlay_auto_command, + "Enable automatic overlay debugging.", &overlaylist); + add_cmd ("load-target", class_support, overlay_load_command, + "Read the overlay mapping state from the target.", &overlaylist); + + /* Filename extension to source language lookup table: */ + init_filename_language_table (); + c = add_set_cmd ("extension-language", class_files, var_string_noescape, + (char *) &ext_args, + "Set mapping between filename extension and source language.\n\ +Usage: set extension-language .foo bar", + &setlist); + set_cmd_cfunc (c, set_ext_lang_command); + + add_info ("extensions", info_ext_lang_command, + "All filename extensions associated with a source language."); + + add_show_from_set + (add_set_cmd ("download-write-size", class_obscure, + var_integer, (char *) &download_write_size, + "Set the write size used when downloading a program.\n" + "Only used when downloading a program onto a remote\n" + "target. Specify zero, or a negative value, to disable\n" + "blocked writes. The actual size of each transfer is also\n" + "limited by the size of the target packet and the memory\n" + "cache.\n", + &setlist), + &showlist); + + debug_file_directory = xstrdup (DEBUGDIR); + c = (add_set_cmd + ("debug-file-directory", class_support, var_string, + (char *) &debug_file_directory, + "Set the directory where separate debug symbols are searched for.\n" + "Separate debug symbols are first searched for in the same\n" + "directory as the binary, then in the `" DEBUG_SUBDIRECTORY + "' subdirectory,\n" + "and lastly at the path of the directory of the binary with\n" + "the global debug-file directory prepended\n", + &setlist)); + add_show_from_set (c, &showlist); + set_cmd_completer (c, filename_completer); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symtab.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symtab.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symtab.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/symtab.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,4814 @@ +/* Symbol table lookup for the GNU debugger, GDB. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +/* Prototypes for local functions */ + +static void completion_list_add_name (char *, char *, int, char *, char *); + +static void rbreak_command (char *, int); + +static void types_info (char *, int); + +static void functions_info (char *, int); + +static void variables_info (char *, int); + +static void sources_info (char *, int); + +static void output_source_filename (char *, int *); + +static int find_line_common (struct linetable *, int, int *); + +/* This one is used by linespec.c */ + +char *operator_chars (char *p, char **end); + +static struct symbol *lookup_symbol_aux (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_local (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_symtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_psymtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +#if 0 +static +struct symbol *lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); +#endif + +/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ +/* Signals the presence of objects compiled by HP compilers */ +int hp_som_som_object_present = 0; + +static void fixup_section (struct general_symbol_info *, struct objfile *); + +static int file_matches (char *, char **, int); + +static void print_symbol_info (domain_enum, + struct symtab *, struct symbol *, int, char *); + +static void print_msymbol_info (struct minimal_symbol *); + +static void symtab_symbol_info (char *, domain_enum, int); + +void _initialize_symtab (void); + +/* */ + +/* The single non-language-specific builtin type */ +struct type *builtin_type_error; + +/* Block in which the most recently searched-for symbol was found. + Might be better to make this a parameter to lookup_symbol and + value_of_this. */ + +const struct block *block_found; + +/* Check for a symtab of a specific name; first in symtabs, then in + psymtabs. *If* there is no '/' in the name, a match after a '/' + in the symtab filename will also work. */ + +struct symtab * +lookup_symtab (const char *name) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + char *real_path = NULL; + char *full_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + +got_symtab: + + /* First, search for an exact match */ + + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (name, s->filename) == 0) + { + return s; + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + + if (full_path != NULL) + { + const char *fp = symtab_to_filename (s); + if (FILENAME_CMP (full_path, fp) == 0) + { + return s; + } + } + + if (real_path != NULL) + { + char *rp = gdb_realpath (symtab_to_filename (s)); + make_cleanup (xfree, rp); + if (FILENAME_CMP (real_path, rp) == 0) + { + return s; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (lbasename (s->filename), name) == 0) + return s; + } + + /* Same search rules as above apply here, but now we look thru the + psymtabs. */ + + ps = lookup_partial_symtab (name); + if (!ps) + return (NULL); + + if (ps->readin) + error ("Internal: readin %s pst for `%s' found when no symtab found.", + ps->filename, name); + + s = PSYMTAB_TO_SYMTAB (ps); + + if (s) + return s; + + /* At this point, we have located the psymtab for this file, but + the conversion to a symtab has failed. This usually happens + when we are looking up an include file. In this case, + PSYMTAB_TO_SYMTAB doesn't return a symtab, even though one has + been created. So, we need to run through the symtabs again in + order to find the file. + XXX - This is a crock, and should be fixed inside of the the + symbol parsing routines. */ + goto got_symtab; +} + +/* Lookup the partial symbol table of a source file named NAME. + *If* there is no '/' in the name, a match after a '/' + in the psymtab filename will also work. */ + +struct partial_symtab * +lookup_partial_symtab (const char *name) +{ + struct partial_symtab *pst; + struct objfile *objfile; + char *full_path = NULL; + char *real_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (name, pst->filename) == 0) + { + return (pst); + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + if (full_path != NULL) + { + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL + && FILENAME_CMP (full_path, pst->fullname) == 0) + { + return pst; + } + } + + if (real_path != NULL) + { + char *rp = NULL; + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL) + { + rp = gdb_realpath (pst->fullname); + make_cleanup (xfree, rp); + } + if (rp != NULL && FILENAME_CMP (real_path, rp) == 0) + { + return pst; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (lbasename (pst->filename), name) == 0) + return (pst); + } + + return (NULL); +} + +/* Mangle a GDB method stub type. This actually reassembles the pieces of the + full method name, which consist of the class name (from T), the unadorned + method name from METHOD_ID, and the signature for the specific overload, + specified by SIGNATURE_ID. Note that this function is g++ specific. */ + +char * +gdb_mangle_name (struct type *type, int method_id, int signature_id) +{ + int mangled_name_len; + char *mangled_name; + struct fn_field *f = TYPE_FN_FIELDLIST1 (type, method_id); + struct fn_field *method = &f[signature_id]; + char *field_name = TYPE_FN_FIELDLIST_NAME (type, method_id); + char *physname = TYPE_FN_FIELD_PHYSNAME (f, signature_id); + char *newname = type_name_no_tag (type); + + /* Does the form of physname indicate that it is the full mangled name + of a constructor (not just the args)? */ + int is_full_physname_constructor; + + int is_constructor; + int is_destructor = is_destructor_name (physname); + /* Need a new type prefix. */ + char *const_prefix = method->is_const ? "C" : ""; + char *volatile_prefix = method->is_volatile ? "V" : ""; + char buf[20]; + int len = (newname == NULL ? 0 : strlen (newname)); + + /* Nothing to do if physname already contains a fully mangled v3 abi name + or an operator name. */ + if ((physname[0] == '_' && physname[1] == 'Z') + || is_operator_name (field_name)) + return xstrdup (physname); + + is_full_physname_constructor = is_constructor_name (physname); + + is_constructor = + is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0); + + if (!is_destructor) + is_destructor = (strncmp (physname, "__dt", 4) == 0); + + if (is_destructor || is_full_physname_constructor) + { + mangled_name = (char *) xmalloc (strlen (physname) + 1); + strcpy (mangled_name, physname); + return mangled_name; + } + + if (len == 0) + { + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + } + else if (physname[0] == 't' || physname[0] == 'Q') + { + /* The physname for template and qualified methods already includes + the class name. */ + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + newname = NULL; + len = 0; + } + else + { + sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); + } + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + + strlen (buf) + len + strlen (physname) + 1); + + { + mangled_name = (char *) xmalloc (mangled_name_len); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); + } + strcat (mangled_name, buf); + /* If the class doesn't have a name, i.e. newname NULL, then we just + mangle it using 0 for the length of the class. Thus it gets mangled + as something starting with `::' rather than `classname::'. */ + if (newname != NULL) + strcat (mangled_name, newname); + + strcat (mangled_name, physname); + return (mangled_name); +} + + +/* Initialize the language dependent portion of a symbol + depending upon the language for the symbol. */ +void +symbol_init_language_specific (struct general_symbol_info *gsymbol, + enum language language) +{ + gsymbol->language = language; + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + memset (&gsymbol->language_specific, 0, + sizeof (gsymbol->language_specific)); + } +} + +/* Functions to initialize a symbol's mangled name. */ + +/* Create the hash table used for demangled names. Each hash entry is + a pair of strings; one for the mangled name and one for the demangled + name. The entry is hashed via just the mangled name. */ + +static void +create_demangled_names_hash (struct objfile *objfile) +{ + /* Choose 256 as the starting size of the hash table, somewhat arbitrarily. + The hash table code will round this up to the next prime number. + Choosing a much larger table size wastes memory, and saves only about + 1% in symbol reading. */ + + objfile->demangled_names_hash = htab_create_alloc_ex + (256, htab_hash_string, (int (*) (const void *, const void *)) streq, + NULL, objfile->md, xmcalloc, xmfree); +} + +/* Try to determine the demangled name for a symbol, based on the + language of that symbol. If the language is set to language_auto, + it will attempt to find any demangling algorithm that works and + then set the language appropriately. The returned name is allocated + by the demangler and should be xfree'd. */ + +static char * +symbol_find_demangled_name (struct general_symbol_info *gsymbol, + const char *mangled) +{ + char *demangled = NULL; + + if (gsymbol->language == language_unknown) + gsymbol->language = language_auto; + + if (gsymbol->language == language_objc + || gsymbol->language == language_auto) + { + demangled = + objc_demangle (mangled, 0); + if (demangled != NULL) + { + gsymbol->language = language_objc; + return demangled; + } + } + if (gsymbol->language == language_cplus + || gsymbol->language == language_auto) + { + demangled = + cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI); + if (demangled != NULL) + { + gsymbol->language = language_cplus; + return demangled; + } + } + if (gsymbol->language == language_java) + { + demangled = + cplus_demangle (mangled, + DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); + if (demangled != NULL) + { + gsymbol->language = language_java; + return demangled; + } + } + return NULL; +} + +/* Set both the mangled and demangled (if any) names for GSYMBOL based + on LINKAGE_NAME and LEN. The hash table corresponding to OBJFILE + is used, and the memory comes from that objfile's objfile_obstack. + LINKAGE_NAME is copied, so the pointer can be discarded after + calling this function. */ + +/* We have to be careful when dealing with Java names: when we run + into a Java minimal symbol, we don't know it's a Java symbol, so it + gets demangled as a C++ name. This is unfortunate, but there's not + much we can do about it: but when demangling partial symbols and + regular symbols, we'd better not reuse the wrong demangled name. + (See PR gdb/1039.) We solve this by putting a distinctive prefix + on Java names when storing them in the hash table. */ + +/* FIXME: carlton/2003-03-13: This is an unfortunate situation. I + don't mind the Java prefix so much: different languages have + different demangling requirements, so it's only natural that we + need to keep language data around in our demangling cache. But + it's not good that the minimal symbol has the wrong demangled name. + Unfortunately, I can't think of any easy solution to that + problem. */ + +#define JAVA_PREFIX "##JAVA$$" +#define JAVA_PREFIX_LEN 8 + +void +symbol_set_names (struct general_symbol_info *gsymbol, + const char *linkage_name, int len, struct objfile *objfile) +{ + char **slot; + /* A 0-terminated copy of the linkage name. */ + const char *linkage_name_copy; + /* A copy of the linkage name that might have a special Java prefix + added to it, for use when looking names up in the hash table. */ + const char *lookup_name; + /* The length of lookup_name. */ + int lookup_len; + + if (objfile->demangled_names_hash == NULL) + create_demangled_names_hash (objfile); + + /* The stabs reader generally provides names that are not + NUL-terminated; most of the other readers don't do this, so we + can just use the given copy, unless we're in the Java case. */ + if (gsymbol->language == language_java) + { + char *alloc_name; + lookup_len = len + JAVA_PREFIX_LEN; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN); + memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name + JAVA_PREFIX_LEN; + } + else if (linkage_name[len] != '\0') + { + char *alloc_name; + lookup_len = len; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name; + } + else + { + lookup_len = len; + lookup_name = linkage_name; + linkage_name_copy = linkage_name; + } + + slot = (char **) htab_find_slot (objfile->demangled_names_hash, + lookup_name, INSERT); + + /* If this name is not in the hash table, add it. */ + if (*slot == NULL) + { + char *demangled_name = symbol_find_demangled_name (gsymbol, + linkage_name_copy); + int demangled_len = demangled_name ? strlen (demangled_name) : 0; + + /* If there is a demangled name, place it right after the mangled name. + Otherwise, just place a second zero byte after the end of the mangled + name. */ + *slot = obstack_alloc (&objfile->objfile_obstack, + lookup_len + demangled_len + 2); + memcpy (*slot, lookup_name, lookup_len + 1); + if (demangled_name != NULL) + { + memcpy (*slot + lookup_len + 1, demangled_name, demangled_len + 1); + xfree (demangled_name); + } + else + (*slot)[lookup_len + 1] = '\0'; + } + + gsymbol->name = *slot + lookup_len - len; + if ((*slot)[lookup_len + 1] != '\0') + gsymbol->language_specific.cplus_specific.demangled_name + = &(*slot)[lookup_len + 1]; + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; +} + +/* Initialize the demangled name of GSYMBOL if possible. Any required space + to store the name is obtained from the specified obstack. The function + symbol_set_names, above, should be used instead where possible for more + efficient memory usage. */ + +void +symbol_init_demangled_name (struct general_symbol_info *gsymbol, + struct obstack *obstack) +{ + char *mangled = gsymbol->name; + char *demangled = NULL; + + demangled = symbol_find_demangled_name (gsymbol, mangled); + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + if (demangled) + { + gsymbol->language_specific.cplus_specific.demangled_name + = obsavestring (demangled, strlen (demangled), obstack); + xfree (demangled); + } + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + /* Unknown language; just clean up quietly. */ + if (demangled) + xfree (demangled); + } +} + +/* Return the source code name of a symbol. In languages where + demangling is necessary, this is the demangled name. */ + +char * +symbol_natural_name (const struct general_symbol_info *gsymbol) +{ + if ((gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + && (gsymbol->language_specific.cplus_specific.demangled_name != NULL)) + { + return gsymbol->language_specific.cplus_specific.demangled_name; + } + else + { + return gsymbol->name; + } +} + +/* Return the demangled name for a symbol based on the language for + that symbol. If no demangled name exists, return NULL. */ +char * +symbol_demangled_name (struct general_symbol_info *gsymbol) +{ + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + return gsymbol->language_specific.cplus_specific.demangled_name; + + else + return NULL; +} + +/* Initialize the structure fields to zero values. */ +void +init_sal (struct symtab_and_line *sal) +{ + sal->symtab = 0; + sal->section = 0; + sal->line = 0; + sal->pc = 0; + sal->end = 0; +} + + + +/* Find which partial symtab contains PC and SECTION. Return 0 if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ +struct partial_symtab * +find_pc_sect_psymtab (CORE_ADDR pc, asection *section) +{ + struct partial_symtab *pst; + struct objfile *objfile; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on texthigh and textlow, which do + not include the data ranges. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + ALL_PSYMTABS (objfile, pst) + { + if (pc >= pst->textlow && pc < pst->texthigh) + { + struct partial_symtab *tpst; + struct partial_symtab *best_pst = pst; + struct partial_symbol *best_psym = NULL; + + /* An objfile that has its functions reordered might have + many partial symbol tables containing the PC, but + we want the partial symbol table that contains the + function containing the PC. */ + if (!(objfile->flags & OBJF_REORDERED) && + section == 0) /* can't validate section this way */ + return (pst); + + if (msymbol == NULL) + return (pst); + + /* The code range of partial symtabs sometimes overlap, so, in + the loop below, we need to check all partial symtabs and + find the one that fits better for the given PC address. We + select the partial symtab that contains a symbol whose + address is closest to the PC address. By closest we mean + that find_pc_sect_symbol returns the symbol with address + that is closest and still less than the given PC. */ + for (tpst = pst; tpst != NULL; tpst = tpst->next) + { + if (pc >= tpst->textlow && pc < tpst->texthigh) + { + struct partial_symbol *p; + + p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && SYMBOL_VALUE_ADDRESS (p) + == SYMBOL_VALUE_ADDRESS (msymbol)) + return (tpst); + if (p != NULL) + { + /* We found a symbol in this partial symtab which + matches (or is closest to) PC, check whether it + is closer than our current BEST_PSYM. Since + this symbol address is necessarily lower or + equal to PC, the symbol closer to PC is the + symbol which address is the highest. */ + /* This way we return the psymtab which contains + such best match symbol. This can help in cases + where the symbol information/debuginfo is not + complete, like for instance on IRIX6 with gcc, + where no debug info is emitted for + statics. (See also the nodebug.exp + testcase.) */ + if (best_psym == NULL + || SYMBOL_VALUE_ADDRESS (p) + > SYMBOL_VALUE_ADDRESS (best_psym)) + { + best_psym = p; + best_pst = tpst; + } + } + + } + } + return (best_pst); + } + } + return (NULL); +} + +/* Find which partial symtab contains PC. Return 0 if none. + Backward compatibility, no section */ + +struct partial_symtab * +find_pc_psymtab (CORE_ADDR pc) +{ + return find_pc_sect_psymtab (pc, find_pc_mapped_section (pc)); +} + +/* Find which partial symbol within a psymtab matches PC and SECTION. + Return 0 if none. Check all psymtabs if PSYMTAB is 0. */ + +struct partial_symbol * +find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, + asection *section) +{ + struct partial_symbol *best = NULL, *p, **pp; + CORE_ADDR best_pc; + + if (!psymtab) + psymtab = find_pc_sect_psymtab (pc, section); + if (!psymtab) + return 0; + + /* Cope with programs that start at address 0 */ + best_pc = (psymtab->textlow != 0) ? psymtab->textlow - 1 : 0; + + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; + (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) + < psymtab->n_static_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + return best; +} + +/* Find which partial symbol within a psymtab matches PC. Return 0 if none. + Check all psymtabs if PSYMTAB is 0. Backwards compatibility, no section. */ + +struct partial_symbol * +find_pc_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc) +{ + return find_pc_sect_psymbol (psymtab, pc, find_pc_mapped_section (pc)); +} + +/* Debug symbols usually don't have section information. We need to dig that + out of the minimal symbols and stash that in the debug symbol. */ + +static void +fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile) +{ + struct minimal_symbol *msym; + msym = lookup_minimal_symbol (ginfo->name, NULL, objfile); + + if (msym) + { + ginfo->bfd_section = SYMBOL_BFD_SECTION (msym); + ginfo->section = SYMBOL_SECTION (msym); + } +} + +struct symbol * +fixup_symbol_section (struct symbol *sym, struct objfile *objfile) +{ + if (!sym) + return NULL; + + if (SYMBOL_BFD_SECTION (sym)) + return sym; + + fixup_section (&sym->ginfo, objfile); + + return sym; +} + +struct partial_symbol * +fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) +{ + if (!psym) + return NULL; + + if (SYMBOL_BFD_SECTION (psym)) + return psym; + + fixup_section (&psym->ginfo, objfile); + + return psym; +} + +/* Find the definition for a specified symbol name NAME + in domain DOMAIN, visible from lexical block BLOCK. + Returns the struct symbol pointer, or zero if no symbol is found. + If SYMTAB is non-NULL, store the symbol table in which the + symbol was found there, or NULL if not found. + C++: if IS_A_FIELD_OF_THIS is nonzero on entry, check to see if + NAME is a field of the current implied argument `this'. If so set + *IS_A_FIELD_OF_THIS to 1, otherwise set it to zero. + BLOCK_FOUND is set to the block in which NAME is found (in the case of + a field of `this', value_of_this sets BLOCK_FOUND to the proper value.) */ + +/* This function has a bunch of loops in it and it would seem to be + attractive to put in some QUIT's (though I'm not really sure + whether it can run long enough to be really important). But there + are a few calls for which it would appear to be bad news to quit + out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note + that there is C++ code below which can error(), but that probably + doesn't affect these calls since they are looking for a known + variable and thus can probably assume it will never hit the C++ + code). */ +#ifdef CRASH_MERGE +static void gdb_bait_and_switch(char *, struct symbol *); +#endif +struct symbol * +lookup_symbol (const char *name, const struct block *block, + const domain_enum domain, int *is_a_field_of_this, + struct symtab **symtab) +{ + char *demangled_name = NULL; + const char *modified_name = NULL; + const char *mangled_name = NULL; + int needtofreename = 0; + struct symbol *returnval; + + modified_name = name; + + /* If we are using C++ language, demangle the name before doing a lookup, so + we can always binary search. */ + if (current_language->la_language == language_cplus) + { + demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); + if (demangled_name) + { + mangled_name = name; + modified_name = demangled_name; + needtofreename = 1; + } + } + + if (case_sensitivity == case_sensitive_off) + { + char *copy; + int len, i; + + len = strlen (name); + copy = (char *) alloca (len + 1); + for (i= 0; i < len; i++) + copy[i] = tolower (name[i]); + copy[len] = 0; + modified_name = copy; + } + + returnval = lookup_symbol_aux (modified_name, mangled_name, block, + domain, is_a_field_of_this, symtab); + if (needtofreename) + xfree (demangled_name); + +#ifdef CRASH_MERGE + if (returnval && (domain == VAR_DOMAIN)) { + gdb_bait_and_switch((char *)modified_name, returnval); + } +#endif + + return returnval; +} + +/* Behave like lookup_symbol_aux except that NAME is the natural name + of the symbol that we're looking for and, if LINKAGE_NAME is + non-NULL, ensure that the symbol's linkage name matches as + well. */ + +static struct symbol * +lookup_symbol_aux (const char *name, const char *linkage_name, + const struct block *block, const domain_enum domain, + int *is_a_field_of_this, struct symtab **symtab) +{ + struct symbol *sym; + + /* Make sure we do something sensible with is_a_field_of_this, since + the callers that set this parameter to some non-null value will + certainly use it later and expect it to be either 0 or 1. + If we don't set it, the contents of is_a_field_of_this are + undefined. */ + if (is_a_field_of_this != NULL) + *is_a_field_of_this = 0; + + /* Search specified block and its superiors. Don't search + STATIC_BLOCK or GLOBAL_BLOCK. */ + + sym = lookup_symbol_aux_local (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + + /* If requested to do so by the caller and if appropriate for the + current language, check to see if NAME is a field of `this'. */ + + if (current_language->la_value_of_this != NULL + && is_a_field_of_this != NULL) + { + struct value *v = current_language->la_value_of_this (0); + + if (v && check_field (v, name)) + { + *is_a_field_of_this = 1; + if (symtab != NULL) + *symtab = NULL; + return NULL; + } + } + + /* Now do whatever is appropriate for the current language to look + up static and global variables. */ + + sym = current_language->la_lookup_symbol_nonlocal (name, linkage_name, + block, domain, + symtab); + if (sym != NULL) + return sym; + + /* Now search all static file-level symbols. Not strictly correct, + but more useful than an error. Do the symtabs first, then check + the psymtabs. If a psymtab indicates the existence of the + desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + if (symtab != NULL) + *symtab = NULL; + return NULL; +} + +/* Check to see if the symbol is defined in BLOCK or its superiors. + Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ + +static struct symbol * +lookup_symbol_aux_local (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + const struct block *static_block = block_static_block (block); + + /* Check if either no block is specified or it's a global block. */ + + if (static_block == NULL) + return NULL; + + while (block != static_block) + { + sym = lookup_symbol_aux_block (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + block = BLOCK_SUPERBLOCK (block); + } + + /* We've reached the static block without finding a result. */ + + return NULL; +} + +/* Look up a symbol in a block; if found, locate its symtab, fixup the + symbol, and set block_found appropriately. */ + +struct symbol * +lookup_symbol_aux_block (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile = NULL; + struct blockvector *bv; + struct block *b; + struct symtab *s = NULL; + + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + { + /* Search the list of symtabs for one which contains the + address of the start of this block. */ + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + if (BLOCK_START (b) <= BLOCK_START (block) + && BLOCK_END (b) > BLOCK_START (block)) + goto found; + } + found: + *symtab = s; + } + + return fixup_symbol_section (sym, objfile); + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the symtabs. + BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK, + depending on whether or not we want to search global symbols or + static symbols. */ + +static struct symbol * +lookup_symbol_aux_symtabs (int block_index, + const char *name, const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct symtab *s; + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the partial + symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or + STATIC_BLOCK, depending on whether or not we want to search global + symbols or static symbols. */ + +static struct symbol * +lookup_symbol_aux_psymtabs (int block_index, const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct partial_symtab *ps; + struct symtab *s; + const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin + && lookup_partial_symbol (ps, name, linkage_name, + psymtab_index, domain)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort try + looking in the statics even though the psymtab claimed + the symbol was global, or vice-versa. It's possible + that the psymtab gets it wrong in some cases. */ + + /* FIXME: carlton/2002-09-30: Should we really do that? + If that happens, isn't it likely to be a GDB error, in + which case we should fix the GDB error rather than + silently dealing with it here? So I'd vote for + removing the check for the symbol in the other + block. */ + block = BLOCKVECTOR_BLOCK (bv, + block_index == GLOBAL_BLOCK ? + STATIC_BLOCK : GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s).", + block_index == GLOBAL_BLOCK ? "global" : "static", + name, ps->filename, name, name); + } + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +#if 0 +/* Check for the possibility of the symbol being a function or a + mangled variable that is stored in one of the minimal symbol + tables. Eventually, all global symbols might be resolved in this + way. */ + +/* NOTE: carlton/2002-12-05: At one point, this function was part of + lookup_symbol_aux, and what are now 'return' statements within + lookup_symbol_aux_minsyms returned from lookup_symbol_aux, even if + sym was NULL. As far as I can tell, this was basically accidental; + it didn't happen every time that msymbol was non-NULL, but only if + some additional conditions held as well, and it caused problems + with HP-generated symbol tables. */ + +/* NOTE: carlton/2003-05-14: This function was once used as part of + lookup_symbol. It is currently unnecessary for correctness + reasons, however, and using it doesn't seem to be any faster than + using lookup_symbol_aux_psymtabs, so I'm commenting it out. */ + +static struct symbol * +lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab) +{ + struct symbol *sym; + struct blockvector *bv; + const struct block *block; + struct minimal_symbol *msymbol; + struct symtab *s; + + if (domain == VAR_DOMAIN) + { + msymbol = lookup_minimal_symbol (name, NULL, NULL); + + if (msymbol != NULL) + { + /* OK, we found a minimal symbol in spite of not finding any + symbol. There are various possible explanations for + this. One possibility is the symbol exists in code not + compiled -g. Another possibility is that the 'psymtab' + isn't doing its job. A third possibility, related to #2, + is that we were confused by name-mangling. For instance, + maybe the psymtab isn't doing its job because it only + know about demangled names, but we were given a mangled + name... */ + + /* We first use the address in the msymbol to try to locate + the appropriate symtab. Note that find_pc_sect_symtab() + has a side-effect of doing psymtab-to-symtab expansion, + for the found symtab. */ + s = find_pc_sect_symtab (SYMBOL_VALUE_ADDRESS (msymbol), + SYMBOL_BFD_SECTION (msymbol)); + if (s != NULL) + { + /* This is a function which has a symtab for its address. */ + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the + `name' argument to lookup_block_symbol. But the name + of a minimal symbol is always mangled, so that seems + to be clearly the wrong thing to pass as the + unmangled name. */ + sym = + lookup_block_symbol (block, name, linkage_name, domain); + /* We kept static functions in minimal symbol table as well as + in static scope. We want to find them in the symbol table. */ + if (!sym) + { + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, + linkage_name, domain); + } + + /* NOTE: carlton/2002-12-04: The following comment was + taken from a time when two versions of this function + were part of the body of lookup_symbol_aux: this + comment was taken from the version of the function + that was #ifdef HPUXHPPA, and the comment was right + before the 'return NULL' part of lookup_symbol_aux. + (Hence the "Fall through and return 0" comment.) + Elena did some digging into the situation for + Fortran, and she reports: + + "I asked around (thanks to Jeff Knaggs), and I think + the story for Fortran goes like this: + + "Apparently, in older Fortrans, '_' was not part of + the user namespace. g77 attached a final '_' to + procedure names as the exported symbols for linkage + (foo_) , but the symbols went in the debug info just + like 'foo'. The rationale behind this is not + completely clear, and maybe it was done to other + symbols as well, not just procedures." */ + + /* If we get here with sym == 0, the symbol was + found in the minimal symbol table + but not in the symtab. + Fall through and return 0 to use the msymbol + definition of "foo_". + (Note that outer code generally follows up a call + to this routine with a call to lookup_minimal_symbol(), + so a 0 return means we'll just flow into that other routine). + + This happens for Fortran "foo_" symbols, + which are "foo" in the symtab. + + This can also happen if "asm" is used to make a + regular symbol but not a debugging symbol, e.g. + asm(".globl _main"); + asm("_main:"); + */ + + if (symtab != NULL && sym != NULL) + *symtab = s; + return fixup_symbol_section (sym, s->objfile); + } + } + } + + return NULL; +} +#endif /* 0 */ + +/* A default version of lookup_symbol_nonlocal for use by languages + that can't think of anything better to do. This implements the C + lookup rules. */ + +struct symbol * +basic_lookup_symbol_nonlocal (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + /* NOTE: carlton/2003-05-19: The comments below were written when + this (or what turned into this) was part of lookup_symbol_aux; + I'm much less worried about these questions now, since these + decisions have turned out well, but I leave these comments here + for posterity. */ + + /* NOTE: carlton/2002-12-05: There is a question as to whether or + not it would be appropriate to search the current global block + here as well. (That's what this code used to do before the + is_a_field_of_this check was moved up.) On the one hand, it's + redundant with the lookup_symbol_aux_symtabs search that happens + next. On the other hand, if decode_line_1 is passed an argument + like filename:var, then the user presumably wants 'var' to be + searched for in filename. On the third hand, there shouldn't be + multiple global variables all of which are named 'var', and it's + not like decode_line_1 has ever restricted its search to only + global variables in a single filename. All in all, only + searching the static block here seems best: it's correct and it's + cleanest. */ + + /* NOTE: carlton/2002-12-05: There's also a possible performance + issue here: if you usually search for global symbols in the + current file, then it would be slightly better to search the + current global block before searching all the symtabs. But there + are other factors that have a much greater effect on performance + than that one, so I don't think we should worry about that for + now. */ + + sym = lookup_symbol_static (name, linkage_name, block, domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_global (name, linkage_name, domain, symtab); +} + +/* Lookup a symbol in the static block associated to BLOCK, if there + is one; do nothing if BLOCK is NULL or a global block. */ + +struct symbol * +lookup_symbol_static (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + const struct block *static_block = block_static_block (block); + + if (static_block != NULL) + return lookup_symbol_aux_block (name, linkage_name, static_block, + domain, symtab); + else + return NULL; +} + +/* Lookup a symbol in all files' global blocks (searching psymtabs if + necessary). */ + +struct symbol * +lookup_symbol_global (const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); +} + +/* Look, in partial_symtab PST, for symbol whose natural name is NAME. + If LINKAGE_NAME is non-NULL, check in addition that the symbol's + linkage name matches it. Check the global symbols if GLOBAL, the + static symbols if not */ + +struct partial_symbol * +lookup_partial_symbol (struct partial_symtab *pst, const char *name, + const char *linkage_name, int global, + domain_enum domain) +{ + struct partial_symbol *temp; + struct partial_symbol **start, **psym; + struct partial_symbol **top, **real_top, **bottom, **center; + int length = (global ? pst->n_global_syms : pst->n_static_syms); + int do_linear_search = 1; + + if (length == 0) + { + return (NULL); + } + start = (global ? + pst->objfile->global_psymbols.list + pst->globals_offset : + pst->objfile->static_psymbols.list + pst->statics_offset); + + if (global) /* This means we can use a binary search. */ + { + do_linear_search = 0; + + /* Binary search. This search is guaranteed to end with center + pointing at the earliest partial symbol whose name might be + correct. At that point *all* partial symbols with an + appropriate name will be checked against the correct + domain. */ + + bottom = start; + top = start + length - 1; + real_top = top; + while (top > bottom) + { + center = bottom + (top - bottom) / 2; + if (!(center < top)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + if (!do_linear_search + && (SYMBOL_LANGUAGE (*center) == language_java)) + { + do_linear_search = 1; + } + if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0) + { + top = center; + } + else + { + bottom = center + 1; + } + } + if (!(top == bottom)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + while (top <= real_top + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) + { + if (SYMBOL_DOMAIN (*top) == domain) + { + return (*top); + } + top++; + } + } + + /* Can't use a binary search or else we found during the binary search that + we should also do a linear search. */ + + if (do_linear_search) + { + for (psym = start; psym < start + length; psym++) + { + if (domain == SYMBOL_DOMAIN (*psym)) + { + if (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*psym, name)) + { + return (*psym); + } + } + } + } + + return (NULL); +} + +/* Look up a type named NAME in the struct_domain. The type returned + must not be opaque -- i.e., must have at least one field + defined. */ + +struct type * +lookup_transparent_type (const char *name) +{ + return current_language->la_lookup_transparent_type (name); +} + +/* The standard implementation of lookup_transparent_type. This code + was modeled on lookup_symbol -- the parts not relevant to looking + up types were just left out. In particular it's assumed here that + types are available in struct_domain and only at file-static or + global blocks. */ + +struct type * +basic_lookup_transparent_type (const char *name) +{ + struct symbol *sym; + struct symtab *s = NULL; + struct partial_symtab *ps; + struct blockvector *bv; + struct objfile *objfile; + struct block *block; + + /* Now search all the global symbols. Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a global, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, + 1, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the statics even though the psymtab + * claimed the symbol was global. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + + /* Now search the static file-level symbols. + Not strictly correct, but more useful than an error. + Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. + */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the globals even though the psymtab + * claimed the symbol was static. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + return (struct type *) 0; +} + + +/* Find the psymtab containing main(). */ +/* FIXME: What about languages without main() or specially linked + executables that have no main() ? */ + +struct partial_symtab * +find_main_psymtab (void) +{ + struct partial_symtab *pst; + struct objfile *objfile; + + ALL_PSYMTABS (objfile, pst) + { + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + { + return (pst); + } + } + return (NULL); +} + +/* Search BLOCK for symbol NAME in DOMAIN. + + Note that if NAME is the demangled form of a C++ symbol, we will fail + to find a match during the binary search of the non-encoded names, but + for now we don't worry about the slight inefficiency of looking for + a match we'll never find, since it will go pretty quick. Once the + binary search terminates, we drop through and do a straight linear + search on the symbols. Each symbol which is marked as being a ObjC/C++ + symbol (language_cplus or language_objc set) has both the encoded and + non-encoded names tested for a match. + + If LINKAGE_NAME is non-NULL, verify that any symbol we find has this + particular mangled name. +*/ + +struct symbol * +lookup_block_symbol (const struct block *block, const char *name, + const char *linkage_name, + const domain_enum domain) +{ + struct dict_iterator iter; + struct symbol *sym; + + if (!BLOCK_FUNCTION (block)) + { + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + return sym; + } + return NULL; + } + else + { + /* Note that parameter symbols do not always show up last in the + list; this loop makes sure to take anything else other than + parameter symbols first; it only uses parameter symbols as a + last resort. Note that this only takes up extra computation + time on a match. */ + + struct symbol *sym_found = NULL; + + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + { + sym_found = sym; + if (SYMBOL_CLASS (sym) != LOC_ARG && + SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && + SYMBOL_CLASS (sym) != LOC_REF_ARG && + SYMBOL_CLASS (sym) != LOC_REGPARM && + SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR && + SYMBOL_CLASS (sym) != LOC_BASEREG_ARG && + SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG) + { + break; + } + } + } + return (sym_found); /* Will be NULL if not found. */ + } +} + +/* Find the symtab associated with PC and SECTION. Look through the + psymtabs and read in another symtab if necessary. */ + +struct symtab * +find_pc_sect_symtab (CORE_ADDR pc, asection *section) +{ + struct block *b; + struct blockvector *bv; + struct symtab *s = NULL; + struct symtab *best_s = NULL; + struct partial_symtab *ps; + struct objfile *objfile; + CORE_ADDR distance = 0; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on the block's high and low code + addresses, which do not include the data ranges, and because + we call find_pc_sect_psymtab which has a similar restriction based + on the partial_symtab's texthigh and textlow. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + /* Search all symtabs for the one whose file contains our address, and which + is the smallest of all the ones containing the address. This is designed + to deal with a case like symtab a is at 0x1000-0x2000 and 0x3000-0x4000 + and symtab b is at 0x2000-0x3000. So the GLOBAL_BLOCK for a is from + 0x1000-0x4000, but for address 0x2345 we want to return symtab b. + + This happens for native ecoff format, where code from included files + gets its own symtab. The symtab for the included file should have + been read in already via the dependency mechanism. + It might be swifter to create several symtabs with the same name + like xcoff does (I'm not sure). + + It also happens for objfiles that have their functions reordered. + For these, the symtab we are looking for is not necessarily read in. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + if (BLOCK_START (b) <= pc + && BLOCK_END (b) > pc + && (distance == 0 + || BLOCK_END (b) - BLOCK_START (b) < distance)) + { + /* For an objfile that has its functions reordered, + find_pc_psymtab will find the proper partial symbol table + and we simply return its corresponding symtab. */ + /* In order to better support objfiles that contain both + stabs and coff debugging info, we continue on if a psymtab + can't be found. */ + if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs) + { + ps = find_pc_sect_psymtab (pc, section); + if (ps) + return PSYMTAB_TO_SYMTAB (ps); + } + if (section != 0) + { + struct dict_iterator iter; + struct symbol *sym = NULL; + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + fixup_symbol_section (sym, objfile); + if (section == SYMBOL_BFD_SECTION (sym)) + break; + } + if (sym == NULL) + continue; /* no symbol in this symtab matches section */ + } + distance = BLOCK_END (b) - BLOCK_START (b); + best_s = s; + } + } + + if (best_s != NULL) + return (best_s); + + s = NULL; + ps = find_pc_sect_psymtab (pc, section); + if (ps) + { + if (ps->readin) + /* Might want to error() here (in case symtab is corrupt and + will cause a core dump), but maybe we can successfully + continue, so let's not. */ + warning ("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + paddr_nz (pc)); + s = PSYMTAB_TO_SYMTAB (ps); + } + return (s); +} + +/* Find the symtab associated with PC. Look through the psymtabs and + read in another symtab if necessary. Backward compatibility, no section */ + +struct symtab * +find_pc_symtab (CORE_ADDR pc) +{ + return find_pc_sect_symtab (pc, find_pc_mapped_section (pc)); +} + + +/* Find the source file and line number for a given PC value and SECTION. + Return a structure containing a symtab pointer, a line number, + and a pc range for the entire source line. + The value's .pc field is NOT the specified pc. + NOTCURRENT nonzero means, if specified pc is on a line boundary, + use the line that ends there. Otherwise, in that case, the line + that begins there is used. */ + +/* The big complication here is that a line may start in one file, and end just + before the start of another file. This usually occurs when you #include + code in the middle of a subroutine. To properly find the end of a line's PC + range, we must search all symtabs associated with this compilation unit, and + find the one whose first PC is closer than that of the next line in this + symtab. */ + +/* If it's worth the effort, we could be using a binary search. */ + +struct symtab_and_line +find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent) +{ + struct symtab *s; + struct linetable *l; + int len; + int i; + struct linetable_entry *item; + struct symtab_and_line val; + struct blockvector *bv; + struct minimal_symbol *msymbol; + struct minimal_symbol *mfunsym; + + /* Info on best line seen so far, and where it starts, and its file. */ + + struct linetable_entry *best = NULL; + CORE_ADDR best_end = 0; + struct symtab *best_symtab = 0; + + /* Store here the first line number + of a file which contains the line at the smallest pc after PC. + If we don't find a line whose range contains PC, + we will use a line one less than this, + with a range from the start of that file to the first line's pc. */ + struct linetable_entry *alt = NULL; + struct symtab *alt_symtab = 0; + + /* Info on best line seen in this file. */ + + struct linetable_entry *prev; + + /* If this pc is not from the current frame, + it is the address of the end of a call instruction. + Quite likely that is the start of the following statement. + But what we want is the statement containing the instruction. + Fudge the pc to make sure we get that. */ + + init_sal (&val); /* initialize to zeroes */ + + /* It's tempting to assume that, if we can't find debugging info for + any function enclosing PC, that we shouldn't search for line + number info, either. However, GAS can emit line number info for + assembly files --- very helpful when debugging hand-written + assembly code. In such a case, we'd have no debug info for the + function, but we would have line info. */ + + if (notcurrent) + pc -= 1; + + /* elz: added this because this function returned the wrong + information if the pc belongs to a stub (import/export) + to call a shlib function. This stub would be anywhere between + two functions in the target, and the line info was erroneously + taken to be the one of the line before the pc. + */ + /* RT: Further explanation: + + * We have stubs (trampolines) inserted between procedures. + * + * Example: "shr1" exists in a shared library, and a "shr1" stub also + * exists in the main image. + * + * In the minimal symbol table, we have a bunch of symbols + * sorted by start address. The stubs are marked as "trampoline", + * the others appear as text. E.g.: + * + * Minimal symbol table for main image + * main: code for main (text symbol) + * shr1: stub (trampoline symbol) + * foo: code for foo (text symbol) + * ... + * Minimal symbol table for "shr1" image: + * ... + * shr1: code for shr1 (text symbol) + * ... + * + * So the code below is trying to detect if we are in the stub + * ("shr1" stub), and if so, find the real code ("shr1" trampoline), + * and if found, do the symbolization from the real-code address + * rather than the stub address. + * + * Assumptions being made about the minimal symbol table: + * 1. lookup_minimal_symbol_by_pc() will return a trampoline only + * if we're really in the trampoline. If we're beyond it (say + * we're in "foo" in the above example), it'll have a closer + * symbol (the "foo" text symbol for example) and will not + * return the trampoline. + * 2. lookup_minimal_symbol_text() will find a real text symbol + * corresponding to the trampoline, and whose address will + * be different than the trampoline address. I put in a sanity + * check for the address being the same, to avoid an + * infinite recursion. + */ + msymbol = lookup_minimal_symbol_by_pc (pc); + if (msymbol != NULL) + if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + { + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL); + if (mfunsym == NULL) + /* I eliminated this warning since it is coming out + * in the following situation: + * gdb shmain // test program with shared libraries + * (gdb) break shr1 // function in shared lib + * Warning: In stub for ... + * In the above situation, the shared lib is not loaded yet, + * so of course we can't find the real func/line info, + * but the "break" still works, and the warning is annoying. + * So I commented out the warning. RT */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) + /* Avoid infinite recursion */ + /* See above comment about why warning is commented out */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else + return find_pc_line (SYMBOL_VALUE (mfunsym), 0); + } + + + s = find_pc_sect_symtab (pc, section); + if (!s) + { + /* if no symbol information, return previous pc */ + if (notcurrent) + pc++; + val.pc = pc; + return val; + } + + bv = BLOCKVECTOR (s); + + /* Look at all the symtabs that share this blockvector. + They all have the same apriori range, that we found was right; + but they have different line tables. */ + + for (; s && BLOCKVECTOR (s) == bv; s = s->next) + { + /* Find the best line in this symtab. */ + l = LINETABLE (s); + if (!l) + continue; + len = l->nitems; + if (len <= 0) + { + /* I think len can be zero if the symtab lacks line numbers + (e.g. gcc -g1). (Either that or the LINETABLE is NULL; + I'm not sure which, and maybe it depends on the symbol + reader). */ + continue; + } + + prev = NULL; + item = l->item; /* Get first line info */ + + /* Is this file's first line closer than the first lines of other files? + If so, record this file, and its first line, as best alternate. */ + if (item->pc > pc && (!alt || item->pc < alt->pc)) + { + alt = item; + alt_symtab = s; + } + + for (i = 0; i < len; i++, item++) + { + /* Leave prev pointing to the linetable entry for the last line + that started at or before PC. */ + if (item->pc > pc) + break; + + prev = item; + } + + /* At this point, prev points at the line whose start addr is <= pc, and + item points at the next line. If we ran off the end of the linetable + (pc >= start of the last line), then prev == item. If pc < start of + the first line, prev will not be set. */ + + /* Is this file's best line closer than the best in the other files? + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ + + if (prev && prev->line && (!best || prev->pc > best->pc)) + { + best = prev; + best_symtab = s; + + /* Discard BEST_END if it's before the PC of the current BEST. */ + if (best_end <= best->pc) + best_end = 0; + } + + /* If another line (denoted by ITEM) is in the linetable and its + PC is after BEST's PC, but before the current BEST_END, then + use ITEM's PC as the new best_end. */ + if (best && i < len && item->pc > best->pc + && (best_end == 0 || best_end > item->pc)) + best_end = item->pc; + } + + if (!best_symtab) + { + if (!alt_symtab) + { /* If we didn't find any line # info, just + return zeros. */ + val.pc = pc; + } + else + { + val.symtab = alt_symtab; + val.line = alt->line - 1; + + /* Don't return line 0, that means that we didn't find the line. */ + if (val.line == 0) + ++val.line; + + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + val.end = alt->pc; + } + } + else if (best->line == 0) + { + /* If our best fit is in a range of PC's for which no line + number info is available (line number is zero) then we didn't + find any valid line information. */ + val.pc = pc; + } + else + { + val.symtab = best_symtab; + val.line = best->line; + val.pc = best->pc; + if (best_end && (!alt || best_end < alt->pc)) + val.end = best_end; + else if (alt) + val.end = alt->pc; + else + val.end = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + } + val.section = section; + return val; +} + +/* Backward compatibility (no section) */ + +struct symtab_and_line +find_pc_line (CORE_ADDR pc, int notcurrent) +{ + asection *section; + + section = find_pc_overlay (pc); + if (pc_in_unmapped_range (pc, section)) + pc = overlay_mapped_address (pc, section); + return find_pc_sect_line (pc, section, notcurrent); +} + +/* Find line number LINE in any symtab whose name is the same as + SYMTAB. + + If found, return the symtab that contains the linetable in which it was + found, set *INDEX to the index in the linetable of the best entry + found, and set *EXACT_MATCH nonzero if the value returned is an + exact match. + + If not found, return NULL. */ + +struct symtab * +find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match) +{ + int exact; + + /* BEST_INDEX and BEST_LINETABLE identify the smallest linenumber > LINE + so far seen. */ + + int best_index; + struct linetable *best_linetable; + struct symtab *best_symtab; + + /* First try looking it up in the given symtab. */ + best_linetable = LINETABLE (symtab); + best_symtab = symtab; + best_index = find_line_common (best_linetable, line, &exact); + if (best_index < 0 || !exact) + { + /* Didn't find an exact match. So we better keep looking for + another symtab with the same name. In the case of xcoff, + multiple csects for one source file (produced by IBM's FORTRAN + compiler) produce multiple symtabs (this is unavoidable + assuming csects can be at arbitrary places in memory and that + the GLOBAL_BLOCK of a symtab has a begin and end address). */ + + /* BEST is the smallest linenumber > LINE so far seen, + or 0 if none has been seen so far. + BEST_INDEX and BEST_LINETABLE identify the item for it. */ + int best; + + struct objfile *objfile; + struct symtab *s; + + if (best_index >= 0) + best = best_linetable->item[best_index].line; + else + best = 0; + + ALL_SYMTABS (objfile, s) + { + struct linetable *l; + int ind; + + if (strcmp (symtab->filename, s->filename) != 0) + continue; + l = LINETABLE (s); + ind = find_line_common (l, line, &exact); + if (ind >= 0) + { + if (exact) + { + best_index = ind; + best_linetable = l; + best_symtab = s; + goto done; + } + if (best == 0 || l->item[ind].line < best) + { + best = l->item[ind].line; + best_index = ind; + best_linetable = l; + best_symtab = s; + } + } + } + } +done: + if (best_index < 0) + return NULL; + + if (index) + *index = best_index; + if (exact_match) + *exact_match = exact; + + return best_symtab; +} + +/* Set the PC value for a given source file and line number and return true. + Returns zero for invalid line number (and sets the PC to 0). + The source file is specified with a struct symtab. */ + +int +find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc) +{ + struct linetable *l; + int ind; + + *pc = 0; + if (symtab == 0) + return 0; + + symtab = find_line_symtab (symtab, line, &ind, NULL); + if (symtab != NULL) + { + l = LINETABLE (symtab); + *pc = l->item[ind].pc; + return 1; + } + else + return 0; +} + +/* Find the range of pc values in a line. + Store the starting pc of the line into *STARTPTR + and the ending pc (start of next line) into *ENDPTR. + Returns 1 to indicate success. + Returns 0 if could not find the specified line. */ + +int +find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, + CORE_ADDR *endptr) +{ + CORE_ADDR startaddr; + struct symtab_and_line found_sal; + + startaddr = sal.pc; + if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr)) + return 0; + + /* This whole function is based on address. For example, if line 10 has + two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then + "info line *0x123" should say the line goes from 0x100 to 0x200 + and "info line *0x355" should say the line goes from 0x300 to 0x400. + This also insures that we never give a range like "starts at 0x134 + and ends at 0x12c". */ + + found_sal = find_pc_sect_line (startaddr, sal.section, 0); + if (found_sal.line != sal.line) + { + /* The specified line (sal) has zero bytes. */ + *startptr = found_sal.pc; + *endptr = found_sal.pc; + } + else + { + *startptr = found_sal.pc; + *endptr = found_sal.end; + } + return 1; +} + +/* Given a line table and a line number, return the index into the line + table for the pc of the nearest line whose number is >= the specified one. + Return -1 if none is found. The value is >= 0 if it is an index. + + Set *EXACT_MATCH nonzero if the value returned is an exact match. */ + +static int +find_line_common (struct linetable *l, int lineno, + int *exact_match) +{ + int i; + int len; + + /* BEST is the smallest linenumber > LINENO so far seen, + or 0 if none has been seen so far. + BEST_INDEX identifies the item for it. */ + + int best_index = -1; + int best = 0; + + if (lineno <= 0) + return -1; + if (l == 0) + return -1; + + len = l->nitems; + for (i = 0; i < len; i++) + { + struct linetable_entry *item = &(l->item[i]); + + if (item->line == lineno) + { + /* Return the first (lowest address) entry which matches. */ + *exact_match = 1; + return i; + } + + if (item->line > lineno && (best == 0 || item->line < best)) + { + best = item->line; + best_index = i; + } + } + + /* If we got here, we didn't get an exact match. */ + + *exact_match = 0; + return best_index; +} + +int +find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr) +{ + struct symtab_and_line sal; + sal = find_pc_line (pc, 0); + *startptr = sal.pc; + *endptr = sal.end; + return sal.symtab != 0; +} + +/* Given a function symbol SYM, find the symtab and line for the start + of the function. + If the argument FUNFIRSTLINE is nonzero, we want the first line + of real code inside the function. */ + +struct symtab_and_line +find_function_start_sal (struct symbol *sym, int funfirstline) +{ + CORE_ADDR pc; + struct symtab_and_line sal; + + pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + fixup_symbol_section (sym, NULL); + if (funfirstline) + { /* skip "first line" of function (which is actually its prologue) */ + asection *section = SYMBOL_BFD_SECTION (sym); + /* If function is in an unmapped overlay, use its unmapped LMA + address, so that SKIP_PROLOGUE has something unique to work on */ + if (section_is_overlay (section) && + !section_is_mapped (section)) + pc = overlay_unmapped_address (pc, section); + + pc += FUNCTION_START_OFFSET; + pc = SKIP_PROLOGUE (pc); + + /* For overlays, map pc back into its mapped VMA range */ + pc = overlay_mapped_address (pc, section); + } + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + + /* Check if SKIP_PROLOGUE left us in mid-line, and the next + line is still part of the same function. */ + if (sal.pc != pc + && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end + && sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym))) + { + /* First pc of next line */ + pc = sal.end; + /* Recalculate the line number (might not be N+1). */ + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + } + sal.pc = pc; + + return sal; +} + +/* If P is of the form "operator[ \t]+..." where `...' is + some legitimate operator text, return a pointer to the + beginning of the substring of the operator text. + Otherwise, return "". */ +char * +operator_chars (char *p, char **end) +{ + *end = ""; + if (strncmp (p, "operator", 8)) + return *end; + p += 8; + + /* Don't get faked out by `operator' being part of a longer + identifier. */ + if (isalpha (*p) || *p == '_' || *p == '$' || *p == '\0') + return *end; + + /* Allow some whitespace between `operator' and the operator symbol. */ + while (*p == ' ' || *p == '\t') + p++; + + /* Recognize 'operator TYPENAME'. */ + + if (isalpha (*p) || *p == '_' || *p == '$') + { + char *q = p + 1; + while (isalnum (*q) || *q == '_' || *q == '$') + q++; + *end = q; + return p; + } + + while (*p) + switch (*p) + { + case '\\': /* regexp quoting */ + if (p[1] == '*') + { + if (p[2] == '=') /* 'operator\*=' */ + *end = p + 3; + else /* 'operator\*' */ + *end = p + 2; + return p; + } + else if (p[1] == '[') + { + if (p[2] == ']') + error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + else if (p[2] == '\\' && p[3] == ']') + { + *end = p + 4; /* 'operator\[\]' */ + return p; + } + else + error ("nothing is allowed between '[' and ']'"); + } + else + { + /* Gratuitous qoute: skip it and move on. */ + p++; + continue; + } + break; + case '!': + case '=': + case '*': + case '/': + case '%': + case '^': + if (p[1] == '=') + *end = p + 2; + else + *end = p + 1; + return p; + case '<': + case '>': + case '+': + case '-': + case '&': + case '|': + if (p[0] == '-' && p[1] == '>') + { + /* Struct pointer member operator 'operator->'. */ + if (p[2] == '*') + { + *end = p + 3; /* 'operator->*' */ + return p; + } + else if (p[2] == '\\') + { + *end = p + 4; /* Hopefully 'operator->\*' */ + return p; + } + else + { + *end = p + 2; /* 'operator->' */ + return p; + } + } + if (p[1] == '=' || p[1] == p[0]) + *end = p + 2; + else + *end = p + 1; + return p; + case '~': + case ',': + *end = p + 1; + return p; + case '(': + if (p[1] != ')') + error ("`operator ()' must be specified without whitespace in `()'"); + *end = p + 2; + return p; + case '?': + if (p[1] != ':') + error ("`operator ?:' must be specified without whitespace in `?:'"); + *end = p + 2; + return p; + case '[': + if (p[1] != ']') + error ("`operator []' must be specified without whitespace in `[]'"); + *end = p + 2; + return p; + default: + error ("`operator %s' not supported", p); + break; + } + + *end = ""; + return *end; +} + + +/* If FILE is not already in the table of files, return zero; + otherwise return non-zero. Optionally add FILE to the table if ADD + is non-zero. If *FIRST is non-zero, forget the old table + contents. */ +static int +filename_seen (const char *file, int add, int *first) +{ + /* Table of files seen so far. */ + static const char **tab = NULL; + /* Allocated size of tab in elements. + Start with one 256-byte block (when using GNU malloc.c). + 24 is the malloc overhead when range checking is in effect. */ + static int tab_alloc_size = (256 - 24) / sizeof (char *); + /* Current size of tab in elements. */ + static int tab_cur_size; + const char **p; + + if (*first) + { + if (tab == NULL) + tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab)); + tab_cur_size = 0; + } + + /* Is FILE in tab? */ + for (p = tab; p < tab + tab_cur_size; p++) + if (strcmp (*p, file) == 0) + return 1; + + /* No; maybe add it to tab. */ + if (add) + { + if (tab_cur_size == tab_alloc_size) + { + tab_alloc_size *= 2; + tab = (const char **) xrealloc ((char *) tab, + tab_alloc_size * sizeof (*tab)); + } + tab[tab_cur_size++] = file; + } + + return 0; +} + +/* Slave routine for sources_info. Force line breaks at ,'s. + NAME is the name to print and *FIRST is nonzero if this is the first + name printed. Set *FIRST to zero. */ +static void +output_source_filename (char *name, int *first) +{ + /* Since a single source file can result in several partial symbol + tables, we need to avoid printing it more than once. Note: if + some of the psymtabs are read in and some are not, it gets + printed both under "Source files for which symbols have been + read" and "Source files for which symbols will be read in on + demand". I consider this a reasonable way to deal with the + situation. I'm not sure whether this can also happen for + symtabs; it doesn't hurt to check. */ + + /* Was NAME already seen? */ + if (filename_seen (name, 1, first)) + { + /* Yes; don't print it again. */ + return; + } + /* No; print it and reset *FIRST. */ + if (*first) + { + *first = 0; + } + else + { + printf_filtered (", "); + } + + wrap_here (""); + fputs_filtered (name, gdb_stdout); +} + +static void +sources_info (char *ignore, int from_tty) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first; + + if (!have_full_symbols () && !have_partial_symbols ()) + { + error ("No symbol table is loaded. Use the \"file\" command."); + } + + printf_filtered ("Source files for which symbols have been read in:\n\n"); + + first = 1; + ALL_SYMTABS (objfile, s) + { + output_source_filename (s->filename, &first); + } + printf_filtered ("\n\n"); + + printf_filtered ("Source files for which symbols will be read in on demand:\n\n"); + + first = 1; + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin) + { + output_source_filename (ps->filename, &first); + } + } + printf_filtered ("\n"); +} + +static int +file_matches (char *file, char *files[], int nfiles) +{ + int i; + + if (file != NULL && nfiles != 0) + { + for (i = 0; i < nfiles; i++) + { + if (strcmp (files[i], lbasename (file)) == 0) + return 1; + } + } + else if (nfiles == 0) + return 1; + return 0; +} + +/* Free any memory associated with a search. */ +void +free_search_symbols (struct symbol_search *symbols) +{ + struct symbol_search *p; + struct symbol_search *next; + + for (p = symbols; p != NULL; p = next) + { + next = p->next; + xfree (p); + } +} + +static void +do_free_search_symbols_cleanup (void *symbols) +{ + free_search_symbols (symbols); +} + +struct cleanup * +make_cleanup_free_search_symbols (struct symbol_search *symbols) +{ + return make_cleanup (do_free_search_symbols_cleanup, symbols); +} + +/* Helper function for sort_search_symbols and qsort. Can only + sort symbols, not minimal symbols. */ +static int +compare_search_syms (const void *sa, const void *sb) +{ + struct symbol_search **sym_a = (struct symbol_search **) sa; + struct symbol_search **sym_b = (struct symbol_search **) sb; + + return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol), + SYMBOL_PRINT_NAME ((*sym_b)->symbol)); +} + +/* Sort the ``nfound'' symbols in the list after prevtail. Leave + prevtail where it is, but update its next pointer to point to + the first of the sorted symbols. */ +static struct symbol_search * +sort_search_symbols (struct symbol_search *prevtail, int nfound) +{ + struct symbol_search **symbols, *symp, *old_next; + int i; + + symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *) + * nfound); + symp = prevtail->next; + for (i = 0; i < nfound; i++) + { + symbols[i] = symp; + symp = symp->next; + } + /* Generally NULL. */ + old_next = symp; + + qsort (symbols, nfound, sizeof (struct symbol_search *), + compare_search_syms); + + symp = prevtail; + for (i = 0; i < nfound; i++) + { + symp->next = symbols[i]; + symp = symp->next; + } + symp->next = old_next; + + xfree (symbols); + return symp; +} + +/* Search the symbol table for matches to the regular expression REGEXP, + returning the results in *MATCHES. + + Only symbols of KIND are searched: + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, + and constants (enums) + + free_search_symbols should be called when *MATCHES is no longer needed. + + The results are sorted locally; each symtab's global and static blocks are + separately alphabetized. + */ +void +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], + struct symbol_search **matches) +{ + struct symtab *s; + struct partial_symtab *ps; + struct blockvector *bv; + struct blockvector *prev_bv = 0; + struct block *b; + int i = 0; + struct dict_iterator iter; + struct symbol *sym; + struct partial_symbol **psym; + struct objfile *objfile; + struct minimal_symbol *msymbol; + char *val; + int found_misc = 0; + static enum minimal_symbol_type types[] + = + {mst_data, mst_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types2[] + = + {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = + {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = + {mst_file_bss, mst_text, mst_abs, mst_unknown}; + enum minimal_symbol_type ourtype; + enum minimal_symbol_type ourtype2; + enum minimal_symbol_type ourtype3; + enum minimal_symbol_type ourtype4; + struct symbol_search *sr; + struct symbol_search *psr; + struct symbol_search *tail; + struct cleanup *old_chain = NULL; + + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); + + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; + + sr = *matches = NULL; + tail = NULL; + + if (regexp != NULL) + { + /* Make sure spacing is right for C++ operators. + This is just a courtesy to make the matching less sensitive + to how many spaces the user leaves between 'operator' + and or . */ + char *opend; + char *opname = operator_chars (regexp, &opend); + if (*opname) + { + int fix = -1; /* -1 means ok; otherwise number of spaces needed. */ + if (isalpha (*opname) || *opname == '_' || *opname == '$') + { + /* There should 1 space between 'operator' and 'TYPENAME'. */ + if (opname[-1] != ' ' || opname[-2] == ' ') + fix = 1; + } + else + { + /* There should 0 spaces between 'operator' and 'OPERATOR'. */ + if (opname[-1] == ' ') + fix = 0; + } + /* If wrong number of spaces, fix it. */ + if (fix >= 0) + { + char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); + sprintf (tmp, "operator%.*s%s", fix, " ", opname); + regexp = tmp; + } + } + + if (0 != (val = re_comp (regexp))) + error ("Invalid regexp (%s): %s", val, regexp); + } + + /* Search through the partial symtabs *first* for all symbols + matching the regexp. That way we don't have to reproduce all of + the machinery below. */ + + ALL_PSYMTABS (objfile, ps) + { + struct partial_symbol **bound, **gbound, **sbound; + int keep_going = 1; + + if (ps->readin) + continue; + + gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms; + sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms; + bound = gbound; + + /* Go through all of the symbols stored in a partial + symtab in one loop. */ + psym = objfile->global_psymbols.list + ps->globals_offset; + while (keep_going) + { + if (psym >= bound) + { + if (bound == gbound && ps->n_static_syms != 0) + { + psym = objfile->static_psymbols.list + ps->statics_offset; + bound = sbound; + } + else + keep_going = 0; + continue; + } + else + { + QUIT; + + /* If it would match (logic taken from loop below) + load the file and go on to the next one */ + if (file_matches (ps->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && SYMBOL_CLASS (*psym) != LOC_BLOCK) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + { + PSYMTAB_TO_SYMTAB (ps); + keep_going = 0; + } + } + psym++; + } + } + + /* Here, we search through the minimal symbol tables for functions + and variables that match, and force their symbols to be read. + This is in particular necessary for demangled variable names, + which are no longer put into the partial symbol tables. + The symbol will then be found during the scan of symtabs below. + + For functions, find_pc_symtab should succeed if we have debug info + for the function, for variables we have to call lookup_symbol + to determine if the variable has debug info. + If the lookup fails, set found_misc so that we will rescan to print + any matching symbols without debug info. + */ + + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) + { + /* FIXME: carlton/2003-02-04: Given that the + semantics of lookup_symbol keeps on changing + slightly, it would be a nice idea if we had a + function lookup_symbol_minsym that found the + symbol associated to a given minimal symbol (if + any). */ + if (kind == FUNCTIONS_DOMAIN + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, + VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + found_misc = 1; + } + } + } + } + } + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + /* Often many files share a blockvector. + Scan each blockvector only once so that + we don't get every symbol many times. + It happens that the first symtab in the list + for any given blockvector is the main file. */ + if (bv != prev_bv) + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) + { + struct symbol_search *prevtail = tail; + int nfound = 0; + b = BLOCKVECTOR_BLOCK (bv, i); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + if (file_matches (s->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && SYMBOL_CLASS (sym) != LOC_BLOCK + && SYMBOL_CLASS (sym) != LOC_CONST) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->symtab = s; + psr->symbol = sym; + psr->msymbol = NULL; + psr->next = NULL; + if (tail == NULL) + sr = psr; + else + tail->next = psr; + tail = psr; + nfound ++; + } + } + if (nfound > 0) + { + if (prevtail == NULL) + { + struct symbol_search dummy; + + dummy.next = sr; + tail = sort_search_symbols (&dummy, nfound); + sr = dummy.next; + + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail = sort_search_symbols (prevtail, nfound); + } + } + prev_bv = bv; + } + + /* If there are no eyes, avoid all contact. I mean, if there are + no debug symbols, then print directly from the msymbol_vector. */ + + if (found_misc || kind != FUNCTIONS_DOMAIN) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + /* Functions: Look up by address. */ + if (kind != FUNCTIONS_DOMAIN || + (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) + { + /* Variables/Absolutes: Look up by name */ + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->msymbol = msymbol; + psr->symtab = NULL; + psr->symbol = NULL; + psr->next = NULL; + if (tail == NULL) + { + sr = psr; + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail->next = psr; + tail = psr; + } + } + } + } + } + } + + *matches = sr; + if (sr != NULL) + discard_cleanups (old_chain); +} + +/* Helper function for symtab_symbol_info, this function uses + the data returned from search_symbols() to print information + regarding the match to gdb_stdout. + */ +static void +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, + int block, char *last) +{ + if (last == NULL || strcmp (last, s->filename) != 0) + { + fputs_filtered ("\nFile ", gdb_stdout); + fputs_filtered (s->filename, gdb_stdout); + fputs_filtered (":\n", gdb_stdout); + } + + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) + printf_filtered ("static "); + + /* Typedef that is not a C++ class */ + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) + typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); + /* variable, func, or typedef-that-is-c++-class */ + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) + { + type_print (SYMBOL_TYPE (sym), + (SYMBOL_CLASS (sym) == LOC_TYPEDEF + ? "" : SYMBOL_PRINT_NAME (sym)), + gdb_stdout, 0); + + printf_filtered (";\n"); + } +} + +/* This help function for symtab_symbol_info() prints information + for non-debugging symbols to gdb_stdout. + */ +static void +print_msymbol_info (struct minimal_symbol *msymbol) +{ + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_PRINT_NAME (msymbol)); +} + +/* This is the guts of the commands "info functions", "info types", and + "info variables". It calls search_symbols to find all matches and then + print_[m]symbol_info to print out some useful information about the + matches. + */ +static void +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) +{ + static char *classnames[] + = + {"variable", "function", "type", "method"}; + struct symbol_search *symbols; + struct symbol_search *p; + struct cleanup *old_chain; + char *last_filename = NULL; + int first = 1; + + /* must make sure that if we're interrupted, symbols gets freed */ + search_symbols (regexp, kind, 0, (char **) NULL, &symbols); + old_chain = make_cleanup_free_search_symbols (symbols); + + printf_filtered (regexp + ? "All %ss matching regular expression \"%s\":\n" + : "All defined %ss:\n", + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); + + for (p = symbols; p != NULL; p = p->next) + { + QUIT; + + if (p->msymbol != NULL) + { + if (first) + { + printf_filtered ("\nNon-debugging symbols:\n"); + first = 0; + } + print_msymbol_info (p->msymbol); + } + else + { + print_symbol_info (kind, + p->symtab, + p->symbol, + p->block, + last_filename); + last_filename = p->symtab->filename; + } + } + + do_cleanups (old_chain); +} + +static void +variables_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); +} + +static void +functions_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); +} + + +static void +types_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); +} + +/* Breakpoint all functions matching regular expression. */ + +void +rbreak_command_wrapper (char *regexp, int from_tty) +{ + rbreak_command (regexp, from_tty); +} + +static void +rbreak_command (char *regexp, int from_tty) +{ + struct symbol_search *ss; + struct symbol_search *p; + struct cleanup *old_chain; + + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); + old_chain = make_cleanup_free_search_symbols (ss); + + for (p = ss; p != NULL; p = p->next) + { + if (p->msymbol == NULL) + { + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); + strcpy (string, p->symtab->filename); + strcat (string, ":'"); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); + strcat (string, "'"); + break_command (string, from_tty); + print_symbol_info (FUNCTIONS_DOMAIN, + p->symtab, + p->symbol, + p->block, + p->symtab->filename); + } + else + { + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); + printf_filtered (" %s;\n", + SYMBOL_PRINT_NAME (p->msymbol)); + } + } + + do_cleanups (old_chain); +} + + +/* Helper routine for make_symbol_completion_list. */ + +static int return_val_size; +static int return_val_index; +static char **return_val; + +#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ + completion_list_add_name \ + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) + +/* Test to see if the symbol specified by SYMNAME (which is already + demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN + characters. If so, add it to the current completion list. */ + +static void +completion_list_add_name (char *symname, char *sym_text, int sym_text_len, + char *text, char *word) +{ + int newsize; + int i; + + /* clip symbols that cannot match */ + + if (strncmp (symname, sym_text, sym_text_len) != 0) + { + return; + } + + /* We have a match for a completion, so add SYMNAME to the current list + of matches. Note that the name is moved to freshly malloc'd space. */ + + { + char *new; + if (word == sym_text) + { + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname); + } + else if (word > sym_text) + { + /* Return some portion of symname. */ + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname + (word - sym_text)); + } + else + { + /* Return some of SYM_TEXT plus symname. */ + new = xmalloc (strlen (symname) + (sym_text - word) + 5); + strncpy (new, word, sym_text - word); + new[sym_text - word] = '\0'; + strcat (new, symname); + } + + if (return_val_index + 3 > return_val_size) + { + newsize = (return_val_size *= 2) * sizeof (char *); + return_val = (char **) xrealloc ((char *) return_val, newsize); + } + return_val[return_val_index++] = new; + return_val[return_val_index] = NULL; + } +} + +/* ObjC: In case we are completing on a selector, look as the msymbol + again and feed all the selectors into the mill. */ + +static void +completion_list_objc_symbol (struct minimal_symbol *msymbol, char *sym_text, + int sym_text_len, char *text, char *word) +{ + static char *tmp = NULL; + static unsigned int tmplen = 0; + + char *method, *category, *selector; + char *tmp2 = NULL; + + method = SYMBOL_NATURAL_NAME (msymbol); + + /* Is it a method? */ + if ((method[0] != '-') && (method[0] != '+')) + return; + + if (sym_text[0] == '[') + /* Complete on shortened method method. */ + completion_list_add_name (method + 1, sym_text, sym_text_len, text, word); + + while ((strlen (method) + 1) >= tmplen) + { + if (tmplen == 0) + tmplen = 1024; + else + tmplen *= 2; + tmp = xrealloc (tmp, tmplen); + } + selector = strchr (method, ' '); + if (selector != NULL) + selector++; + + category = strchr (method, '('); + + if ((category != NULL) && (selector != NULL)) + { + memcpy (tmp, method, (category - method)); + tmp[category - method] = ' '; + memcpy (tmp + (category - method) + 1, selector, strlen (selector) + 1); + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + if (sym_text[0] == '[') + completion_list_add_name (tmp + 1, sym_text, sym_text_len, text, word); + } + + if (selector != NULL) + { + /* Complete on selector only. */ + strcpy (tmp, selector); + tmp2 = strchr (tmp, ']'); + if (tmp2 != NULL) + *tmp2 = '\0'; + + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + } +} + +/* Break the non-quoted text based on the characters which are in + symbols. FIXME: This should probably be language-specific. */ + +static char * +language_search_unquoted_string (char *text, char *p) +{ + for (; p > text; --p) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + continue; + else + { + if ((current_language->la_language == language_objc)) + { + if (p[-1] == ':') /* might be part of a method name */ + continue; + else if (p[-1] == '[' && (p[-2] == '-' || p[-2] == '+')) + p -= 2; /* beginning of a method name */ + else if (p[-1] == ' ' || p[-1] == '(' || p[-1] == ')') + { /* might be part of a method name */ + char *t = p; + + /* Seeing a ' ' or a '(' is not conclusive evidence + that we are in the middle of a method name. However, + finding "-[" or "+[" should be pretty un-ambiguous. + Unfortunately we have to find it now to decide. */ + + while (t > text) + if (isalnum (t[-1]) || t[-1] == '_' || + t[-1] == ' ' || t[-1] == ':' || + t[-1] == '(' || t[-1] == ')') + --t; + else + break; + + if (t[-1] == '[' && (t[-2] == '-' || t[-2] == '+')) + p = t - 2; /* method name detected */ + /* else we leave with p unchanged */ + } + } + break; + } + } + return p; +} + + +/* Return a NULL terminated array of all symbols (regardless of class) + which begin by matching TEXT. If the answer is no symbols, then + the return value is an array which contains only a NULL pointer. + + Problem: All of the symbols have to be copied because readline frees them. + I'm not going to worry about this; hopefully there won't be that many. */ + +char ** +make_symbol_completion_list (char *text, char *word) +{ + struct symbol *sym; + struct symtab *s; + struct partial_symtab *ps; + struct minimal_symbol *msymbol; + struct objfile *objfile; + struct block *b, *surrounding_static_block = 0; + struct dict_iterator iter; + int j; + struct partial_symbol **psym; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* It is not a quoted string. Break it based on the characters + which are in symbols. */ + while (p > text) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + --p; + else + break; + } + sym_text = p; + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 100; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Look through the partial symtabs for all symbols which begin + by matching SYM_TEXT. Add each one that you find to the list. */ + + ALL_PSYMTABS (objfile, ps) + { + /* If the psymtab's been read in we'll get it when we search + through the blockvector. */ + if (ps->readin) + continue; + + for (psym = objfile->global_psymbols.list + ps->globals_offset; + psym < (objfile->global_psymbols.list + ps->globals_offset + + ps->n_global_syms); + psym++) + { + /* If interrupted, then quit. */ + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + + for (psym = objfile->static_psymbols.list + ps->statics_offset; + psym < (objfile->static_psymbols.list + ps->statics_offset + + ps->n_static_syms); + psym++) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + } + + /* At this point scan through the misc symbol vectors and add each + symbol you find to the list. Eventually we want to ignore + anything that isn't a text symbol (everything else will be + handled by the psymtab code above). */ + + ALL_MSYMBOLS (objfile, msymbol) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text, word); + + completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text, word); + } + + /* Search upwards from currently selected frame (so that we can + complete on local vars. */ + + for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b)) + { + if (!BLOCK_SUPERBLOCK (b)) + { + surrounding_static_block = b; /* For elmin of dups */ + } + + /* Also catch fields of types defined in this places which match our + text string. Only complete on types visible from current context. */ + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + { + struct type *t = SYMBOL_TYPE (sym); + enum type_code c = TYPE_CODE (t); + + if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT) + { + for (j = TYPE_N_BASECLASSES (t); j < TYPE_NFIELDS (t); j++) + { + if (TYPE_FIELD_NAME (t, j)) + { + completion_list_add_name (TYPE_FIELD_NAME (t, j), + sym_text, sym_text_len, text, word); + } + } + } + } + } + } + + /* Go through the symtabs and check the externs and statics for + symbols which match. */ + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + /* Don't do this block twice. */ + if (b == surrounding_static_block) + continue; + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + return (return_val); +} + +/* Like make_symbol_completion_list, but returns a list of symbols + defined in a source file FILE. */ + +char ** +make_file_symbol_completion_list (char *text, char *word, char *srcfile) +{ + struct symbol *sym; + struct symtab *s; + struct block *b; + struct dict_iterator iter; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* Not a quoted string. */ + sym_text = language_search_unquoted_string (text, p); + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 10; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Find the symtab for SRCFILE (this loads it if it was not yet read + in). */ + s = lookup_symtab (srcfile); + if (s == NULL) + { + /* Maybe they typed the file with leading directories, while the + symbol tables record only its basename. */ + const char *tail = lbasename (srcfile); + + if (tail > srcfile) + s = lookup_symtab (tail); + } + + /* If we have no symtab for that file, return an empty list. */ + if (s == NULL) + return (return_val); + + /* Go through this symtab and check the externs and statics for + symbols which match. */ + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + return (return_val); +} + +/* A helper function for make_source_files_completion_list. It adds + another file name to a list of possible completions, growing the + list as necessary. */ + +static void +add_filename_to_list (const char *fname, char *text, char *word, + char ***list, int *list_used, int *list_alloced) +{ + char *new; + size_t fnlen = strlen (fname); + + if (*list_used + 1 >= *list_alloced) + { + *list_alloced *= 2; + *list = (char **) xrealloc ((char *) *list, + *list_alloced * sizeof (char *)); + } + + if (word == text) + { + /* Return exactly fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname); + } + else if (word > text) + { + /* Return some portion of fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname + (word - text)); + } + else + { + /* Return some of TEXT plus fname. */ + new = xmalloc (fnlen + (text - word) + 5); + strncpy (new, word, text - word); + new[text - word] = '\0'; + strcat (new, fname); + } + (*list)[*list_used] = new; + (*list)[++*list_used] = NULL; +} + +static int +not_interesting_fname (const char *fname) +{ + static const char *illegal_aliens[] = { + "_globals_", /* inserted by coff_symtab_read */ + NULL + }; + int i; + + for (i = 0; illegal_aliens[i]; i++) + { + if (strcmp (fname, illegal_aliens[i]) == 0) + return 1; + } + return 0; +} + +/* Return a NULL terminated array of all source files whose names + begin with matching TEXT. The file names are looked up in the + symbol tables of this program. If the answer is no matchess, then + the return value is an array which contains only a NULL pointer. */ + +char ** +make_source_files_completion_list (char *text, char *word) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first = 1; + int list_alloced = 1; + int list_used = 0; + size_t text_len = strlen (text); + char **list = (char **) xmalloc (list_alloced * sizeof (char *)); + const char *base_name; + + list[0] = NULL; + + if (!have_full_symbols () && !have_partial_symbols ()) + return list; + + ALL_SYMTABS (objfile, s) + { + if (not_interesting_fname (s->filename)) + continue; + if (!filename_seen (s->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (s->filename, text, text_len) == 0 +#else + && strncmp (s->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the current + list of matches. */ + add_filename_to_list (s->filename, text, word, + &list, &list_used, &list_alloced); + } + else + { + /* NOTE: We allow the user to type a base name when the + debug info records leading directories, but not the other + way around. This is what subroutines of breakpoint + command do when they parse file names. */ + base_name = lbasename (s->filename); + if (base_name != s->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (not_interesting_fname (ps->filename)) + continue; + if (!ps->readin) + { + if (!filename_seen (ps->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (ps->filename, text, text_len) == 0 +#else + && strncmp (ps->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the + current list of matches. */ + add_filename_to_list (ps->filename, text, word, + &list, &list_used, &list_alloced); + + } + else + { + base_name = lbasename (ps->filename); + if (base_name != ps->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + } + + return list; +} + +/* Determine if PC is in the prologue of a function. The prologue is the area + between the first instruction of a function, and the first executable line. + Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue. + + If non-zero, func_start is where we think the prologue starts, possibly + by previous examination of symbol table information. + */ + +int +in_prologue (CORE_ADDR pc, CORE_ADDR func_start) +{ + struct symtab_and_line sal; + CORE_ADDR func_addr, func_end; + + /* We have several sources of information we can consult to figure + this out. + - Compilers usually emit line number info that marks the prologue + as its own "source line". So the ending address of that "line" + is the end of the prologue. If available, this is the most + reliable method. + - The minimal symbols and partial symbols, which can usually tell + us the starting and ending addresses of a function. + - If we know the function's start address, we can call the + architecture-defined SKIP_PROLOGUE function to analyze the + instruction stream and guess where the prologue ends. + - Our `func_start' argument; if non-zero, this is the caller's + best guess as to the function's entry point. At the time of + this writing, handle_inferior_event doesn't get this right, so + it should be our last resort. */ + + /* Consult the partial symbol table, to find which function + the PC is in. */ + if (! find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + CORE_ADDR prologue_end; + + /* We don't even have minsym information, so fall back to using + func_start, if given. */ + if (! func_start) + return 1; /* We *might* be in a prologue. */ + + prologue_end = SKIP_PROLOGUE (func_start); + + return func_start <= pc && pc < prologue_end; + } + + /* If we have line number information for the function, that's + usually pretty reliable. */ + sal = find_pc_line (func_addr, 0); + + /* Now sal describes the source line at the function's entry point, + which (by convention) is the prologue. The end of that "line", + sal.end, is the end of the prologue. + + Note that, for functions whose source code is all on a single + line, the line number information doesn't always end up this way. + So we must verify that our purported end-of-prologue address is + *within* the function, not at its start or end. */ + if (sal.line == 0 + || sal.end <= func_addr + || func_end <= sal.end) + { + /* We don't have any good line number info, so use the minsym + information, together with the architecture-specific prologue + scanning code. */ + CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr); + + return func_addr <= pc && pc < prologue_end; + } + + /* We have line number info, and it looks good. */ + return func_addr <= pc && pc < sal.end; +} + +/* Given PC at the function's start address, attempt to find the + prologue end using SAL information. Return zero if the skip fails. + + A non-optimized prologue traditionally has one SAL for the function + and a second for the function body. A single line function has + them both pointing at the same line. + + An optimized prologue is similar but the prologue may contain + instructions (SALs) from the instruction body. Need to skip those + while not getting into the function body. + + The functions end point and an increasing SAL line are used as + indicators of the prologue's endpoint. + + This code is based on the function refine_prologue_limit (versions + found in both ia64 and ppc). */ + +CORE_ADDR +skip_prologue_using_sal (CORE_ADDR func_addr) +{ + struct symtab_and_line prologue_sal; + CORE_ADDR start_pc; + CORE_ADDR end_pc; + + /* Get an initial range for the function. */ + find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc); + start_pc += FUNCTION_START_OFFSET; + + prologue_sal = find_pc_line (start_pc, 0); + if (prologue_sal.line != 0) + { + while (prologue_sal.end < end_pc) + { + struct symtab_and_line sal; + + sal = find_pc_line (prologue_sal.end, 0); + if (sal.line == 0) + break; + /* Assume that a consecutive SAL for the same (or larger) + line mark the prologue -> body transition. */ + if (sal.line >= prologue_sal.line) + break; + /* The case in which compiler's optimizer/scheduler has + moved instructions into the prologue. We look ahead in + the function looking for address ranges whose + corresponding line number is less the first one that we + found for the function. This is more conservative then + refine_prologue_limit which scans a large number of SALs + looking for any in the prologue */ + prologue_sal = sal; + } + } + return prologue_sal.end; +} + +struct symtabs_and_lines +decode_line_spec (char *string, int funfirstline) +{ + struct symtabs_and_lines sals; + struct symtab_and_line cursal; + + if (string == 0) + error ("Empty line specification."); + + /* We use whatever is set as the current source line. We do not try + and get a default or it will recursively call us! */ + cursal = get_current_source_symtab_and_line (); + + sals = decode_line_1 (&string, funfirstline, + cursal.symtab, cursal.line, + (char ***) NULL, NULL); + + if (*string) + error ("Junk at end of line specification: %s", string); + return sals; +} + +/* Track MAIN */ +static char *name_of_main; + +void +set_main_name (const char *name) +{ + if (name_of_main != NULL) + { + xfree (name_of_main); + name_of_main = NULL; + } + if (name != NULL) + { + name_of_main = xstrdup (name); + } +} + +char * +main_name (void) +{ + if (name_of_main != NULL) + return name_of_main; + else + return "main"; +} + + +void +_initialize_symtab (void) +{ + add_info ("variables", variables_info, + "All global and static variable names, or those matching REGEXP."); + if (dbx_commands) + add_com ("whereis", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + + add_info ("functions", functions_info, + "All function names, or those matching REGEXP."); + + + /* FIXME: This command has at least the following problems: + 1. It prints builtin types (in a very strange and confusing fashion). + 2. It doesn't print right, e.g. with + typedef struct foo *FOO + type_print prints "FOO" when we want to make it (in this situation) + print "struct foo *". + I also think "ptype" or "whatis" is more likely to be useful (but if + there is much disagreement "info types" can be fixed). */ + add_info ("types", types_info, + "All type names, or those matching REGEXP."); + + add_info ("sources", sources_info, + "Source files in the program."); + + add_com ("rbreak", class_breakpoint, rbreak_command, + "Set a breakpoint for all functions matching REGEXP."); + + if (xdb_commands) + { + add_com ("lf", class_info, sources_info, "Source files in the program"); + add_com ("lg", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + } + + /* Initialize the one built-in type that isn't language dependent... */ + builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0, + "", (struct objfile *) NULL); +} + +#ifdef CRASH_MERGE +#include "gdb-stabs.h" +#include "version.h" +#define GDB_COMMON +#include "../../defs.h" + +static void get_member_data(struct gnu_request *, struct type *); +static void dump_enum(struct type *, struct gnu_request *); +static void eval_enum(struct type *, struct gnu_request *); +static void gdb_get_line_number(struct gnu_request *); +static void gdb_get_datatype(struct gnu_request *); +static void gdb_get_symbol_type(struct gnu_request *); +static void gdb_command_exists(struct gnu_request *); +#ifdef NEEDS_NEW_FUNCTIONALITY +static void gdb_stack_trace(struct gnu_request *); +#endif +static void gdb_debug_command(struct gnu_request *); +static void gdb_function_numargs(struct gnu_request *); +static void gdb_add_symbol_file(struct gnu_request *); +static void gdb_delete_symbol_file(struct gnu_request *); +static void gdb_patch_symbol_values(struct gnu_request *); +extern void replace_ui_file_FILE(struct ui_file *, FILE *); +extern int get_frame_offset(CORE_ADDR); + +static struct objfile *gdb_kernel_objfile = { 0 }; + +static ulong gdb_merge_flags = 0; +#define KERNEL_SYMBOLS_PATCHED (0x1) + +#undef STREQ +#define STREQ(A, B) (A && B && (strcmp(A, B) == 0)) + +/* + * All commands from above come through here. + */ +void +gdb_command_funnel(struct gnu_request *req) +{ + struct symbol *sym; + + if (req->command != GNU_VERSION) { + replace_ui_file_FILE(gdb_stdout, req->fp); + replace_ui_file_FILE(gdb_stderr, req->fp); + do_cleanups((struct cleanup *)0); + } + + switch (req->command) + { + case GNU_VERSION: + req->buf = (char *)version; + break; + + case GNU_PASS_THROUGH: + execute_command(req->buf, + req->flags & GNU_FROM_TTY_OFF ? FALSE : TRUE); + break; + + case GNU_STACK_TRACE: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * The get_current_frame() function in frame.c no longer can + * be subject of a CRASH_MERGE in which passed-in fp and pc + * value were substituted for read_fp() and read_pc() calls. + * Now there's a new unwind_to_current_frame() function and + * a new frame_info structure that are used. + */ + gdb_stack_trace(req); +#endif + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_RESOLVE_TEXT_ADDR: + sym = find_pc_function(req->addr); + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_DISASSEMBLE: + if (req->addr2) + sprintf(req->buf, "disassemble 0x%lx 0x%lx", + req->addr, req->addr2); + else + sprintf(req->buf, "disassemble 0x%lx", req->addr); + execute_command(req->buf, TRUE); + break; + + case GNU_ADD_SYMBOL_FILE: + gdb_add_symbol_file(req); + break; + + case GNU_DELETE_SYMBOL_FILE: + gdb_delete_symbol_file(req); + break; + + case GNU_GET_LINE_NUMBER: + gdb_get_line_number(req); + break; + + case GNU_GET_DATATYPE: + gdb_get_datatype(req); + break; + + case GNU_GET_SYMBOL_TYPE: + gdb_get_symbol_type(req); + break; + + case GNU_COMMAND_EXISTS: + gdb_command_exists(req); + break; + + case GNU_ALPHA_FRAME_OFFSET: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * get_frame_offset() was a CRASH_MERGE function located in + * alpha-tdep.c; going from 5.3 to 6.1 made its direct port + * impossible because of dependencies that no longer exist. + * Also changed in alpha-tdep.c, alpha_frame_chain() and + * read_next_frame_reg() no longer exist, and both of those + * contained CRASH_MERGE pieces. Until somebody gives me + * a new port of a function to calculate the size of a function + * frame, it appears that alpha back-traces may be far more + * likely to fail. + */ + req->value = get_frame_offset(req->pc); +#endif + req->value = 0; + break; + + case GNU_FUNCTION_NUMARGS: + gdb_function_numargs(req); + break; + + case GNU_DEBUG_COMMAND: + gdb_debug_command(req); + break; + + case GNU_PATCH_SYMBOL_VALUES: + gdb_patch_symbol_values(req); + break; + + default: + req->flags |= GNU_COMMAND_FAILED; + break; + } +} + +/* + * Given a PC value, return the file and line number. + */ +static void +gdb_get_line_number(struct gnu_request *req) +{ + struct symtab_and_line sal; + CORE_ADDR pc; + +#define LASTCHAR(s) (s[strlen(s)-1]) + + pc = req->addr; + + sal = find_pc_line(pc, 0); + + if (!sal.symtab) { + req->buf[0] = '\0'; + return; + } + + if (sal.symtab->filename && sal.symtab->dirname) { + if (sal.symtab->filename[0] == '/') + sprintf(req->buf, "%s: %d", + sal.symtab->filename, sal.line); + else + sprintf(req->buf, "%s%s%s: %d", + sal.symtab->dirname, + LASTCHAR(sal.symtab->dirname) == '/' ? "" : "/", sal.symtab->filename, sal.line); + } +} + + +/* + * General purpose routine for determining datatypes. + */ + +static void +gdb_get_datatype(struct gnu_request *req) +{ + register struct cleanup *old_chain = NULL; + register struct type *type; + register struct type *typedef_type; + struct expression *expr; + struct symbol *sym; + register int i; + struct field *nextfield; + struct value *val; + + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (a)\n", req->name); + + req->typecode = TYPE_CODE_UNDEF; + + /* + * lookup_symbol() will pick up struct and union names. + */ + sym = lookup_symbol(req->name, 0, STRUCT_DOMAIN, 0, + (struct symtab **) NULL); + if (sym) { + req->typecode = TYPE_CODE(sym->type); + req->length = TYPE_LENGTH(sym->type); + if (req->member) + get_member_data(req, sym->type); + + if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) { + if (req->flags & GNU_PRINT_ENUMERATORS) + dump_enum(sym->type, req); + } + + return; + } + + /* + * Otherwise parse the expression. + */ + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (b)\n", req->name); + + expr = parse_expression(req->name); + + old_chain = make_cleanup(free_current_contents, &expr); + + + switch (expr->elts[0].opcode) + { + case OP_VAR_VALUE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_VAR_VALUE\n"); + type = expr->elts[2].symbol->type; + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + req->typecode = TYPE_CODE(type); + req->value = SYMBOL_VALUE(expr->elts[2].symbol); + req->tagname = TYPE_TAG_NAME(type); + if (!req->tagname) { + val = evaluate_type(expr); + eval_enum(VALUE_TYPE(val), req); + } + } + break; + + case OP_TYPE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_TYPE\n"); + type = expr->elts[1].type; + + req->typecode = TYPE_CODE(type); + req->length = TYPE_LENGTH(type); + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + req->is_typedef = TYPE_CODE_TYPEDEF; + if ((typedef_type = check_typedef(type))) { + req->typecode = TYPE_CODE(typedef_type); + req->length = TYPE_LENGTH(typedef_type); + type = typedef_type; + } + } + + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + if (req->is_typedef) + if (req->flags & GNU_PRINT_ENUMERATORS) { + if (req->is_typedef) + fprintf_filtered(gdb_stdout, + "typedef "); + dump_enum(type, req); + } + } + + if (req->member) + get_member_data(req, type); + + break; + + default: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: %d (?)\n", + expr->elts[0].opcode); + break; + + } + + do_cleanups(old_chain); +} + +/* + * More robust enum list dump that gdb's, showing the value of each + * identifier, each on its own line. + */ +static void +dump_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, + "enum %s {\n", TYPE_TAG_NAME (type)); + else + fprintf_filtered(gdb_stdout, "enum {\n"); + + for (i = 0; i < len; i++) { + fprintf_filtered(gdb_stdout, " %s", + TYPE_FIELD_NAME (type, i)); + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + fprintf_filtered (gdb_stdout, " = %d", + TYPE_FIELD_BITPOS (type, i)); + lastval = TYPE_FIELD_BITPOS (type, i); + } else + fprintf_filtered(gdb_stdout, " = %d", lastval); + fprintf_filtered(gdb_stdout, "\n"); + lastval++; + } + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, "};\n"); + else + fprintf_filtered(gdb_stdout, "} %s;\n", req->name); +} + +/* + * Given an enum type with no tagname, determine its value. + */ +static void +eval_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + + for (i = 0; i < len; i++) { + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + lastval = TYPE_FIELD_BITPOS (type, i); + } + if (STREQ(TYPE_FIELD_NAME(type, i), req->name)) { + req->tagname = "(unknown)"; + req->value = lastval; + return; + } + lastval++; + } +} + +/* + * Walk through a struct type's list of fields looking for the desired + * member field, and when found, return its relevant data. + */ +static void +get_member_data(struct gnu_request *req, struct type *type) +{ + register short i; + struct field *nextfield; + short nfields; + struct type *typedef_type; + + req->member_offset = -1; + +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(type)->nfields; + nextfield = TYPE_MAIN_TYPE(type)->fields; +#else + nfields = type->nfields; + nextfield = type->fields; +#endif + + if (nfields == 0) { + struct type *newtype; + newtype = lookup_transparent_type(req->name); + if (newtype) { + console("get_member_data(%s.%s): switching type from %lx to %lx\n", + req->name, req->member, type, newtype); +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(newtype)->nfields; + nextfield = TYPE_MAIN_TYPE(newtype)->fields; +#else + nfields = newtype->nfields; + nextfield = newtype->fields; +#endif + } + } + + for (i = 0; i < nfields; i++) { + if (STREQ(req->member, nextfield->name)) { + req->member_offset = nextfield->loc.bitpos; + req->member_length = TYPE_LENGTH(nextfield->type); + req->member_typecode = TYPE_CODE(nextfield->type); + if ((req->member_typecode == TYPE_CODE_TYPEDEF) && + (typedef_type = check_typedef(nextfield->type))) + req->member_length = TYPE_LENGTH(typedef_type); + return; + } + nextfield++; + } +} + +#ifdef NEEDS_NEW_FUNCTIONALITY +/* + * Kick off a gdb stack trace, keeping copies of the starting frame and pc. + */ + +CORE_ADDR gdb_starting_pc; +CORE_ADDR gdb_starting_fp; + +static void +gdb_stack_trace(struct gnu_request *req) +{ + target_has_stack = TRUE; + target_has_registers = TRUE; + stop_soon_quietly = TRUE; + gdb_starting_pc = req->pc; + gdb_starting_fp = req->sp; + sprintf(req->buf, "backtrace"); + execute_command(req->buf, TRUE); +} +#endif + +/* + * Check whether a command exists. If it doesn't, the command will be + * returned indirectly via the error_hook. + */ +static void +gdb_command_exists(struct gnu_request *req) +{ + extern struct cmd_list_element *cmdlist; + register struct cmd_list_element *c; + + req->value = FALSE; + c = lookup_cmd(&req->name, cmdlist, "", 0, 1); + req->value = TRUE; +} + +static void +gdb_function_numargs(struct gnu_request *req) +{ + struct symbol *sym; + + sym = find_pc_function(req->pc); + + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) { + req->flags |= GNU_COMMAND_FAILED; + return; + } + + req->value = (ulong)TYPE_NFIELDS(sym->type); +} + +struct load_module *gdb_current_load_module = NULL; + +static void +gdb_add_symbol_file(struct gnu_request *req) +{ + register struct objfile *loaded_objfile = NULL; + register struct objfile *objfile; + register struct minimal_symbol *m; + struct load_module *lm; + struct syment *sp; + struct syment *spx; + int external, subsequent, found; + off_t offset; + ulong value, adjusted; + struct symbol *sym; + struct expression *expr; + struct cleanup *old_chain; + int i; + int allsect = 0; + char *secname; + char buf[80]; + + gdb_current_load_module = lm = (struct load_module *)req->addr; + + req->name = lm->mod_namelist; + gdb_delete_symbol_file(req); + + for (i = 0 ; i < lm->mod_sections; i++) { + if (STREQ(lm->mod_section_data[i].name, ".text") && + (lm->mod_section_data[i].flags & SEC_FOUND)) + allsect = 1; + } + + if (!allsect) { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start ? lm->mod_text_start : lm->mod_base); + if (lm->mod_data_start) { + sprintf(buf, " -s .data 0x%lx", lm->mod_data_start); + strcat(req->buf, buf); + } + if (lm->mod_bss_start) { + sprintf(buf, " -s .bss 0x%lx", lm->mod_bss_start); + strcat(req->buf, buf); + } + if (lm->mod_rodata_start) { + sprintf(buf, " -s .rodata 0x%lx", lm->mod_rodata_start); + strcat(req->buf, buf); + } + } else { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start); + for (i = 0; i < lm->mod_sections; i++) { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + strcat(req->buf, buf); + } + } + } + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, "gdb_add_symbol_file: %s\n", req->buf); + } + + execute_command(req->buf, FALSE); + + ALL_OBJFILES(objfile) { + if (same_file(objfile->name, lm->mod_namelist)) { + loaded_objfile = objfile; + break; + } + } + + if (!loaded_objfile) + req->flags |= GNU_COMMAND_FAILED; +} + +void +patch_load_module(struct objfile *objfile, struct minimal_symbol *msymbol) +{ + register int i; + struct syment *sp, *spx; + struct load_module *lm; + struct mod_section_data *msd; + struct section_offsets *section_offsets; + ulong start; + char *name; + int external; + struct obj_section *s; + extern void print_gdb_version (struct ui_file *); + + if (!gdb_kernel_objfile) { + gdb_kernel_objfile = objfile; + return; + } + + if (!(lm = gdb_current_load_module) || + (msymbol && !IN_MODULE(SYMBOL_VALUE_ADDRESS(msymbol), lm))) + return; + + if (msymbol) { + for (sp = lm->mod_load_symtable; + sp < lm->mod_load_symend; sp++) { + + if ((sp->value < lm->mod_data_start) || + !STREQ(sp->name, msymbol->ginfo.name)) + continue; + + for (external = FALSE, + spx = lm->mod_ext_symtable; + spx < lm->mod_ext_symend; + spx++) { + if (STREQ(sp->name, spx->name)) { + external = TRUE; + break; + } + } + if (external) + continue; + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, + "patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), + sp->value); + } + + console("patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), sp->value); + + SYMBOL_VALUE_ADDRESS(msymbol) = sp->value; + + break; + } + return; + } + + for (s = objfile->sections; s < objfile->sections_end; ++s) { + name = (char *)s->the_bfd_section->name; + + for (i = 0; i < lm->mod_sections; i++) { + msd = &lm->mod_section_data[i]; + if (STREQ(msd->name, name)) { + s->addr = lm->mod_base + msd->offset; + s->endaddr = s->addr + msd->size; + } + } + } + + section_offsets = objfile->section_offsets; + + if (objfile->sect_index_text != -1) + section_offsets->offsets[SECT_OFF_TEXT(objfile)] = + lm->mod_text_start; + + if (objfile->sect_index_data != -1) + section_offsets->offsets[SECT_OFF_DATA(objfile)] = + lm->mod_data_start; + + if (objfile->sect_index_bss != -1) + section_offsets->offsets[SECT_OFF_BSS(objfile)] = + lm->mod_bss_start; + + if (objfile->sect_index_rodata != -1) + section_offsets->offsets[SECT_OFF_RODATA(objfile)] = + lm->mod_rodata_start; + +#ifdef DEPRECATED_SECT_OFF_MAX + if (gdb_CRASHDEBUG(1)) { + for (i = 0; i < SECT_OFF_MAX; i++) { + if (ANOFFSET(objfile->section_offsets, i)) { + fprintf_filtered(gdb_stdout, + "section_offsets[%d]: %lx\n", i, + ANOFFSET(objfile->section_offsets, i)); + } + } + } +#endif +} + +static void +gdb_delete_symbol_file(struct gnu_request *req) +{ + register struct objfile *objfile; + + ALL_OBJFILES(objfile) { + if (STREQ(objfile->name, req->name)) { + free_objfile(objfile); + break; + } + } + + if (gdb_CRASHDEBUG(1)) + ALL_OBJFILES(objfile) + fprintf_filtered(gdb_stdout, "%s\n", objfile->name); +} + +/* + * Walk through all minimal_symbols, patching their values with the + * correct addresses. + */ +static void +gdb_patch_symbol_values(struct gnu_request *req) +{ + struct minimal_symbol *msymbol; + struct objfile *objfile; + + req->name = PATCH_KERNEL_SYMBOLS_START; + patch_kernel_symbol(req); + + ALL_MSYMBOLS (objfile, msymbol) + { + req->name = msymbol->ginfo.name; + req->addr = (ulong)(&SYMBOL_VALUE_ADDRESS(msymbol)); + if (!patch_kernel_symbol(req)) { + req->flags |= GNU_COMMAND_FAILED; + break; + } + } + + req->name = PATCH_KERNEL_SYMBOLS_STOP; + patch_kernel_symbol(req); + + clear_symtab_users(); + gdb_merge_flags |= KERNEL_SYMBOLS_PATCHED; +} + +static void +gdb_get_symbol_type(struct gnu_request *req) +{ + struct expression *expr; + struct value *val; + struct cleanup *old_chain = NULL; + struct type *type; + struct type *target_type; + + req->typecode = TYPE_CODE_UNDEF; + + expr = parse_expression (req->name); + old_chain = make_cleanup (free_current_contents, &expr); + val = evaluate_type (expr); + + type = VALUE_TYPE(val); + +#ifdef TYPE_MAIN_TYPE + req->typename = TYPE_MAIN_TYPE(type)->name; + req->typecode = TYPE_MAIN_TYPE(type)->code; + req->length = type->length; + target_type = TYPE_MAIN_TYPE(type)->target_type; +#else + req->typename = type->name; + req->typecode = type->code; + req->length = type->length; + target_type = type->target_type; +#endif + + if (target_type) { +#ifdef TYPE_MAIN_TYPE + req->target_typename = TYPE_MAIN_TYPE(target_type)->name; + req->target_typecode = TYPE_MAIN_TYPE(target_type)->code; + req->target_length = target_type->length; +#else + req->target_typename = target_type->name; + req->target_typecode = target_type->code; + req->target_length = target_type->length; +#endif + } + + if (req->member) + get_member_data(req, type); + + do_cleanups (old_chain); +} + +static void +gdb_debug_command(struct gnu_request *req) +{ + +} + +/* + * Only necessary on "patched" kernel symbol sessions, and called only by + * lookup_symbol(), pull a symbol value bait-and-switch operation by altering + * either a data symbol's address value or a text symbol's block start address. + */ +static void +gdb_bait_and_switch(char *name, struct symbol *sym) +{ + struct minimal_symbol *msym; + struct block *block; + + if ((gdb_merge_flags & KERNEL_SYMBOLS_PATCHED) && + (msym = lookup_minimal_symbol(name, NULL, gdb_kernel_objfile))) { + if (sym->aclass == LOC_BLOCK) { + block = (struct block *)SYMBOL_BLOCK_VALUE(sym); + BLOCK_START(block) = SYMBOL_VALUE_ADDRESS(msym); + } else + SYMBOL_VALUE_ADDRESS(sym) = SYMBOL_VALUE_ADDRESS(msym); + } +} + +#endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/target.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/target.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/target.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/target.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2458 @@ +/* Select target systems and architectures at runtime for GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include +#include "gdb_string.h" +#include "target.h" +#include "gdbcmd.h" +#include "symtab.h" +#include "inferior.h" +#include "bfd.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdb_wait.h" +#include "dcache.h" +#include +#include "regcache.h" +#include "gdb_assert.h" +#include "gdbcore.h" + +static void target_info (char *, int); + +static void maybe_kill_then_create_inferior (char *, char *, char **); + +static void maybe_kill_then_attach (char *, int); + +static void kill_or_be_killed (int); + +static void default_terminal_info (char *, int); + +static int default_region_size_ok_for_hw_watchpoint (int); + +static int nosymbol (char *, CORE_ADDR *); + +static void tcomplain (void); + +static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *); + +static int return_zero (void); + +static int return_one (void); + +static int return_minus_one (void); + +void target_ignore (void); + +static void target_command (char *, int); + +static struct target_ops *find_default_run_target (char *); + +static void nosupport_runtime (void); + +static LONGEST default_xfer_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, + ULONGEST offset, LONGEST len); + +/* Transfer LEN bytes between target address MEMADDR and GDB address + MYADDR. Returns 0 for success, errno code for failure (which + includes partial transfers -- if you want a more useful response to + partial transfers, try either target_read_memory_partial or + target_write_memory_partial). */ + +static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write); + +static void init_dummy_target (void); + +static void debug_to_open (char *, int); + +static void debug_to_close (int); + +static void debug_to_attach (char *, int); + +static void debug_to_detach (char *, int); + +static void debug_to_disconnect (char *, int); + +static void debug_to_resume (ptid_t, int, enum target_signal); + +static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *); + +static void debug_to_fetch_registers (int); + +static void debug_to_store_registers (int); + +static void debug_to_prepare_to_store (void); + +static int debug_to_xfer_memory (CORE_ADDR, char *, int, int, + struct mem_attrib *, struct target_ops *); + +static void debug_to_files_info (struct target_ops *); + +static int debug_to_insert_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_breakpoint (CORE_ADDR, char *); + +static int debug_to_can_use_hw_breakpoint (int, int, int); + +static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_insert_watchpoint (CORE_ADDR, int, int); + +static int debug_to_remove_watchpoint (CORE_ADDR, int, int); + +static int debug_to_stopped_by_watchpoint (void); + +static CORE_ADDR debug_to_stopped_data_address (void); + +static int debug_to_region_size_ok_for_hw_watchpoint (int); + +static void debug_to_terminal_init (void); + +static void debug_to_terminal_inferior (void); + +static void debug_to_terminal_ours_for_output (void); + +static void debug_to_terminal_save_ours (void); + +static void debug_to_terminal_ours (void); + +static void debug_to_terminal_info (char *, int); + +static void debug_to_kill (void); + +static void debug_to_load (char *, int); + +static int debug_to_lookup_symbol (char *, CORE_ADDR *); + +static void debug_to_create_inferior (char *, char *, char **); + +static void debug_to_mourn_inferior (void); + +static int debug_to_can_run (void); + +static void debug_to_notice_signals (ptid_t); + +static int debug_to_thread_alive (ptid_t); + +static void debug_to_stop (void); + +/* Pointer to array of target architecture structures; the size of the + array; the current index into the array; the allocated size of the + array. */ +struct target_ops **target_structs; +unsigned target_struct_size; +unsigned target_struct_index; +unsigned target_struct_allocsize; +#define DEFAULT_ALLOCSIZE 10 + +/* The initial current target, so that there is always a semi-valid + current target. */ + +static struct target_ops dummy_target; + +/* Top of target stack. */ + +static struct target_ops *target_stack; + +/* The target structure we are currently using to talk to a process + or file or whatever "inferior" we have. */ + +struct target_ops current_target; + +/* Command list for target. */ + +static struct cmd_list_element *targetlist = NULL; + +/* Nonzero if we are debugging an attached outside process + rather than an inferior. */ + +int attach_flag; + +/* Non-zero if we want to see trace of target level stuff. */ + +static int targetdebug = 0; + +static void setup_target_debug (void); + +DCACHE *target_dcache; + +/* The user just typed 'target' without the name of a target. */ + +static void +target_command (char *arg, int from_tty) +{ + fputs_filtered ("Argument required (target name). Try `help target'\n", + gdb_stdout); +} + +/* Add a possible target architecture to the list. */ + +void +add_target (struct target_ops *t) +{ + /* Provide default values for all "must have" methods. */ + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; + + if (!target_structs) + { + target_struct_allocsize = DEFAULT_ALLOCSIZE; + target_structs = (struct target_ops **) xmalloc + (target_struct_allocsize * sizeof (*target_structs)); + } + if (target_struct_size >= target_struct_allocsize) + { + target_struct_allocsize *= 2; + target_structs = (struct target_ops **) + xrealloc ((char *) target_structs, + target_struct_allocsize * sizeof (*target_structs)); + } + target_structs[target_struct_size++] = t; + + if (targetlist == NULL) + add_prefix_cmd ("target", class_run, target_command, + "Connect to a target machine or process.\n\ +The first argument is the type or protocol of the target machine.\n\ +Remaining arguments are interpreted by the target protocol. For more\n\ +information on the arguments for a particular protocol, type\n\ +`help target ' followed by the protocol name.", + &targetlist, "target ", 0, &cmdlist); + add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); +} + +/* Stub functions */ + +void +target_ignore (void) +{ +} + +void +target_load (char *arg, int from_tty) +{ + dcache_invalidate (target_dcache); + (*current_target.to_load) (arg, from_tty); +} + +static int +nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *t) +{ + errno = EIO; /* Can't read/write this location */ + return 0; /* No bytes handled */ +} + +static void +tcomplain (void) +{ + error ("You can't do that when your target is `%s'", + current_target.to_shortname); +} + +void +noprocess (void) +{ + error ("You can't do that without a process to debug."); +} + +static int +nosymbol (char *name, CORE_ADDR *addrp) +{ + return 1; /* Symbol does not exist in target env */ +} + +static void +nosupport_runtime (void) +{ + if (ptid_equal (inferior_ptid, null_ptid)) + noprocess (); + else + error ("No run-time support for this"); +} + + +static void +default_terminal_info (char *args, int from_tty) +{ + printf_unfiltered ("No saved terminal information.\n"); +} + +/* This is the default target_create_inferior and target_attach function. + If the current target is executing, it asks whether to kill it off. + If this function returns without calling error(), it has killed off + the target, and the operation should be attempted. */ + +static void +kill_or_be_killed (int from_tty) +{ + if (target_has_execution) + { + printf_unfiltered ("You are already running a program:\n"); + target_files_info (); + if (query ("Kill it? ")) + { + target_kill (); + if (target_has_execution) + error ("Killing the program did not help."); + return; + } + else + { + error ("Program not killed."); + } + } + tcomplain (); +} + +static void +maybe_kill_then_attach (char *args, int from_tty) +{ + kill_or_be_killed (from_tty); + target_attach (args, from_tty); +} + +static void +maybe_kill_then_create_inferior (char *exec, char *args, char **env) +{ + kill_or_be_killed (0); + target_create_inferior (exec, args, env); +} + +/* Go through the target stack from top to bottom, copying over zero + entries in current_target, then filling in still empty entries. In + effect, we are doing class inheritance through the pushed target + vectors. + + NOTE: cagney/2003-10-17: The problem with this inheritance, as it + is currently implemented, is that it discards any knowledge of + which target an inherited method originally belonged to. + Consequently, new new target methods should instead explicitly and + locally search the target stack for the target that can handle the + request. */ + +static void +update_current_target (void) +{ + struct target_ops *t; + + /* First, reset curren'ts contents. */ + memset (¤t_target, 0, sizeof (current_target)); + +#define INHERIT(FIELD, TARGET) \ + if (!current_target.FIELD) \ + current_target.FIELD = (TARGET)->FIELD + + for (t = target_stack; t; t = t->beneath) + { + INHERIT (to_shortname, t); + INHERIT (to_longname, t); + INHERIT (to_doc, t); + INHERIT (to_open, t); + INHERIT (to_close, t); + INHERIT (to_attach, t); + INHERIT (to_post_attach, t); + INHERIT (to_detach, t); + INHERIT (to_disconnect, t); + INHERIT (to_resume, t); + INHERIT (to_wait, t); + INHERIT (to_post_wait, t); + INHERIT (to_fetch_registers, t); + INHERIT (to_store_registers, t); + INHERIT (to_prepare_to_store, t); + INHERIT (to_xfer_memory, t); + INHERIT (to_files_info, t); + INHERIT (to_insert_breakpoint, t); + INHERIT (to_remove_breakpoint, t); + INHERIT (to_can_use_hw_breakpoint, t); + INHERIT (to_insert_hw_breakpoint, t); + INHERIT (to_remove_hw_breakpoint, t); + INHERIT (to_insert_watchpoint, t); + INHERIT (to_remove_watchpoint, t); + INHERIT (to_stopped_data_address, t); + INHERIT (to_stopped_by_watchpoint, t); + INHERIT (to_have_continuable_watchpoint, t); + INHERIT (to_region_size_ok_for_hw_watchpoint, t); + INHERIT (to_terminal_init, t); + INHERIT (to_terminal_inferior, t); + INHERIT (to_terminal_ours_for_output, t); + INHERIT (to_terminal_ours, t); + INHERIT (to_terminal_save_ours, t); + INHERIT (to_terminal_info, t); + INHERIT (to_kill, t); + INHERIT (to_load, t); + INHERIT (to_lookup_symbol, t); + INHERIT (to_create_inferior, t); + INHERIT (to_post_startup_inferior, t); + INHERIT (to_acknowledge_created_inferior, t); + INHERIT (to_insert_fork_catchpoint, t); + INHERIT (to_remove_fork_catchpoint, t); + INHERIT (to_insert_vfork_catchpoint, t); + INHERIT (to_remove_vfork_catchpoint, t); + INHERIT (to_follow_fork, t); + INHERIT (to_insert_exec_catchpoint, t); + INHERIT (to_remove_exec_catchpoint, t); + INHERIT (to_reported_exec_events_per_exec_call, t); + INHERIT (to_has_exited, t); + INHERIT (to_mourn_inferior, t); + INHERIT (to_can_run, t); + INHERIT (to_notice_signals, t); + INHERIT (to_thread_alive, t); + INHERIT (to_find_new_threads, t); + INHERIT (to_pid_to_str, t); + INHERIT (to_extra_thread_info, t); + INHERIT (to_stop, t); + /* Do not inherit to_xfer_partial. */ + INHERIT (to_rcmd, t); + INHERIT (to_enable_exception_callback, t); + INHERIT (to_get_current_exception_event, t); + INHERIT (to_pid_to_exec_file, t); + INHERIT (to_stratum, t); + INHERIT (to_has_all_memory, t); + INHERIT (to_has_memory, t); + INHERIT (to_has_stack, t); + INHERIT (to_has_registers, t); + INHERIT (to_has_execution, t); + INHERIT (to_has_thread_control, t); + INHERIT (to_sections, t); + INHERIT (to_sections_end, t); + INHERIT (to_can_async_p, t); + INHERIT (to_is_async_p, t); + INHERIT (to_async, t); + INHERIT (to_async_mask_value, t); + INHERIT (to_find_memory_regions, t); + INHERIT (to_make_corefile_notes, t); + INHERIT (to_get_thread_local_address, t); + INHERIT (to_magic, t); + } +#undef INHERIT + + /* Clean up a target struct so it no longer has any zero pointers in + it. Some entries are defaulted to a method that print an error, + others are hard-wired to a standard recursive default. */ + +#define de_fault(field, value) \ + if (!current_target.field) \ + current_target.field = value + + de_fault (to_open, + (void (*) (char *, int)) + tcomplain); + de_fault (to_close, + (void (*) (int)) + target_ignore); + de_fault (to_attach, + maybe_kill_then_attach); + de_fault (to_post_attach, + (void (*) (int)) + target_ignore); + de_fault (to_detach, + (void (*) (char *, int)) + target_ignore); + de_fault (to_disconnect, + (void (*) (char *, int)) + tcomplain); + de_fault (to_resume, + (void (*) (ptid_t, int, enum target_signal)) + noprocess); + de_fault (to_wait, + (ptid_t (*) (ptid_t, struct target_waitstatus *)) + noprocess); + de_fault (to_post_wait, + (void (*) (ptid_t, int)) + target_ignore); + de_fault (to_fetch_registers, + (void (*) (int)) + target_ignore); + de_fault (to_store_registers, + (void (*) (int)) + noprocess); + de_fault (to_prepare_to_store, + (void (*) (void)) + noprocess); + de_fault (to_xfer_memory, + (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) + nomemory); + de_fault (to_files_info, + (void (*) (struct target_ops *)) + target_ignore); + de_fault (to_insert_breakpoint, + memory_insert_breakpoint); + de_fault (to_remove_breakpoint, + memory_remove_breakpoint); + de_fault (to_can_use_hw_breakpoint, + (int (*) (int, int, int)) + return_zero); + de_fault (to_insert_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_remove_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_insert_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_remove_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_stopped_by_watchpoint, + (int (*) (void)) + return_zero); + de_fault (to_stopped_data_address, + (CORE_ADDR (*) (void)) + return_zero); + de_fault (to_region_size_ok_for_hw_watchpoint, + default_region_size_ok_for_hw_watchpoint); + de_fault (to_terminal_init, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_inferior, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours_for_output, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_save_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_info, + default_terminal_info); + de_fault (to_kill, + (void (*) (void)) + noprocess); + de_fault (to_load, + (void (*) (char *, int)) + tcomplain); + de_fault (to_lookup_symbol, + (int (*) (char *, CORE_ADDR *)) + nosymbol); + de_fault (to_create_inferior, + maybe_kill_then_create_inferior); + de_fault (to_post_startup_inferior, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_acknowledge_created_inferior, + (void (*) (int)) + target_ignore); + de_fault (to_insert_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_insert_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_follow_fork, + (int (*) (int)) + target_ignore); + de_fault (to_insert_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_reported_exec_events_per_exec_call, + (int (*) (void)) + return_one); + de_fault (to_has_exited, + (int (*) (int, int, int *)) + return_zero); + de_fault (to_mourn_inferior, + (void (*) (void)) + noprocess); + de_fault (to_can_run, + return_zero); + de_fault (to_notice_signals, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_thread_alive, + (int (*) (ptid_t)) + return_zero); + de_fault (to_find_new_threads, + (void (*) (void)) + target_ignore); + de_fault (to_extra_thread_info, + (char *(*) (struct thread_info *)) + return_zero); + de_fault (to_stop, + (void (*) (void)) + target_ignore); + current_target.to_xfer_partial = default_xfer_partial; + de_fault (to_rcmd, + (void (*) (char *, struct ui_file *)) + tcomplain); + de_fault (to_enable_exception_callback, + (struct symtab_and_line * (*) (enum exception_event_kind, int)) + nosupport_runtime); + de_fault (to_get_current_exception_event, + (struct exception_event_record * (*) (void)) + nosupport_runtime); + de_fault (to_pid_to_exec_file, + (char *(*) (int)) + return_zero); + de_fault (to_can_async_p, + (int (*) (void)) + return_zero); + de_fault (to_is_async_p, + (int (*) (void)) + return_zero); + de_fault (to_async, + (void (*) (void (*) (enum inferior_event_type, void*), void*)) + tcomplain); +#undef de_fault + + /* Finally, position the target-stack beneath the squashed + "current_target". That way code looking for a non-inherited + target method can quickly and simply find it. */ + current_target.beneath = target_stack; +} + +/* Push a new target type into the stack of the existing target accessors, + possibly superseding some of the existing accessors. + + Result is zero if the pushed target ended up on top of the stack, + nonzero if at least one target is on top of it. + + Rather than allow an empty stack, we always have the dummy target at + the bottom stratum, so we can call the function vectors without + checking them. */ + +int +push_target (struct target_ops *t) +{ + struct target_ops **cur; + + /* Check magic number. If wrong, it probably means someone changed + the struct definition, but not all the places that initialize one. */ + if (t->to_magic != OPS_MAGIC) + { + fprintf_unfiltered (gdb_stderr, + "Magic number of %s target struct wrong\n", + t->to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + } + + /* Find the proper stratum to install this target in. */ + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum) + break; + } + + /* If there's already targets at this stratum, remove them. */ + /* FIXME: cagney/2003-10-15: I think this should be poping all + targets to CUR, and not just those at this stratum level. */ + while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) + { + /* There's already something at this stratum level. Close it, + and un-hook it from the stack. */ + struct target_ops *tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + target_close (tmp, 0); + } + + /* We have removed all targets in our stratum, now add the new one. */ + t->beneath = (*cur); + (*cur) = t; + + update_current_target (); + + if (targetdebug) + setup_target_debug (); + + /* Not on top? */ + return (t != target_stack); +} + +/* Remove a target_ops vector from the stack, wherever it may be. + Return how many times it was removed (0 or 1). */ + +int +unpush_target (struct target_ops *t) +{ + struct target_ops **cur; + struct target_ops *tmp; + + /* Look for the specified target. Note that we assume that a target + can only occur once in the target stack. */ + + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((*cur) == t) + break; + } + + if ((*cur) == NULL) + return 0; /* Didn't find target_ops, quit now */ + + /* NOTE: cagney/2003-12-06: In '94 the close call was made + unconditional by moving it to before the above check that the + target was in the target stack (something about "Change the way + pushing and popping of targets work to support target overlays + and inheritance"). This doesn't make much sense - only open + targets should be closed. */ + target_close (t, 0); + + /* Unchain the target */ + tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + + update_current_target (); + + return 1; +} + +void +pop_target (void) +{ + target_close (¤t_target, 0); /* Let it clean up */ + if (unpush_target (target_stack) == 1) + return; + + fprintf_unfiltered (gdb_stderr, + "pop_target couldn't find target %s\n", + current_target.to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); +} + +#undef MIN +#define MIN(A, B) (((A) <= (B)) ? (A) : (B)) + +/* target_read_string -- read a null terminated string, up to LEN bytes, + from MEMADDR in target. Set *ERRNOP to the errno code, or 0 if successful. + Set *STRING to a pointer to malloc'd memory containing the data; the caller + is responsible for freeing it. Return the number of bytes successfully + read. */ + +int +target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop) +{ + int tlen, origlen, offset, i; + char buf[4]; + int errcode = 0; + char *buffer; + int buffer_allocated; + char *bufptr; + unsigned int nbytes_read = 0; + + /* Small for testing. */ + buffer_allocated = 4; + buffer = xmalloc (buffer_allocated); + bufptr = buffer; + + origlen = len; + + while (len > 0) + { + tlen = MIN (len, 4 - (memaddr & 3)); + offset = memaddr & 3; + + errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0); + if (errcode != 0) + { + /* The transfer request might have crossed the boundary to an + unallocated region of memory. Retry the transfer, requesting + a single byte. */ + tlen = 1; + offset = 0; + errcode = target_xfer_memory (memaddr, buf, 1, 0); + if (errcode != 0) + goto done; + } + + if (bufptr - buffer + tlen > buffer_allocated) + { + unsigned int bytes; + bytes = bufptr - buffer; + buffer_allocated *= 2; + buffer = xrealloc (buffer, buffer_allocated); + bufptr = buffer + bytes; + } + + for (i = 0; i < tlen; i++) + { + *bufptr++ = buf[i + offset]; + if (buf[i + offset] == '\000') + { + nbytes_read += i + 1; + goto done; + } + } + + memaddr += tlen; + len -= tlen; + nbytes_read += tlen; + } +done: + if (errnop != NULL) + *errnop = errcode; + if (string != NULL) + *string = buffer; + return nbytes_read; +} + +/* Find a section containing ADDR. */ +struct section_table * +target_section_by_addr (struct target_ops *target, CORE_ADDR addr) +{ + struct section_table *secp; + for (secp = target->to_sections; + secp < target->to_sections_end; + secp++) + { + if (addr >= secp->addr && addr < secp->endaddr) + return secp; + } + return NULL; +} + +/* Read LEN bytes of target memory at address MEMADDR, placing the results in + GDB's memory at MYADDR. Returns either 0 for success or an errno value + if any error occurs. + + If an error occurs, no guarantee is made about the contents of the data at + MYADDR. In particular, the caller should not depend upon partial reads + filling the buffer with good data. There is no way for the caller to know + how much good data might have been transfered anyway. Callers that can + deal with partial reads should call target_read_memory_partial. */ + +int +target_read_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 0); +} + +int +target_write_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 1); +} + +static int trust_readonly = 0; + +/* Move memory to or from the targets. The top target gets priority; + if it cannot handle it, it is offered to the next one down, etc. + + Result is -1 on error, or the number of bytes transfered. */ + +int +do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib) +{ + int res; + int done = 0; + struct target_ops *t; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + return 0; + + /* to_xfer_memory is not guaranteed to set errno, even when it returns + 0. */ + errno = 0; + + if (!write && trust_readonly) + { + struct section_table *secp; + /* User-settable option, "trust-readonly-sections". If true, + then memory from any SEC_READONLY bfd section may be read + directly from the bfd file. */ + secp = target_section_by_addr (¤t_target, memaddr); + if (secp != NULL + && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) + & SEC_READONLY)) + return xfer_memory (memaddr, myaddr, len, 0, attrib, ¤t_target); + } + + /* The quick case is that the top target can handle the transfer. */ + res = current_target.to_xfer_memory + (memaddr, myaddr, len, write, attrib, ¤t_target); + + /* If res <= 0 then we call it again in the loop. Ah well. */ + if (res <= 0) + { + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t); + if (res > 0) + break; /* Handled all or part of xfer */ + if (t->to_has_all_memory) + break; + } + + if (res <= 0) + return -1; + } + + return res; +} + + +/* Perform a memory transfer. Iterate until the entire region has + been transfered. + + Result is 0 or errno value. */ + +static int +target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write) +{ + int res; + int reg_len; + struct mem_region *region; + +#ifdef CRASH_MERGE + int gdb_readmem_callback(ulong, void *, int, int); + if (gdb_readmem_callback(memaddr, myaddr, len, write)) + return 0; +#endif + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + return 0; + } + + while (len > 0) + { + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write) + return EIO; + break; + + case MEM_WO: + if (!write) + return EIO; + break; + } + + while (reg_len > 0) + { + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write, + ®ion->attrib); + + if (res <= 0) + { + /* If this address is for nonexistent memory, read zeros + if reading, or do nothing if writing. Return + error. */ + if (!write) + memset (myaddr, 0, len); + if (errno == 0) + return EIO; + else + return errno; + } + + memaddr += res; + myaddr += res; + len -= res; + reg_len -= res; + } + } + + return 0; /* We managed to cover it all somehow. */ +} + + +/* Perform a partial memory transfer. + + Result is -1 on error, or the number of bytes transfered. */ + +static int +target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len, + int write_p, int *err) +{ + int res; + int reg_len; + struct mem_region *region; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + *err = 0; + return 0; + } + + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + + case MEM_WO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + } + + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write_p); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write_p, + ®ion->attrib); + + if (res <= 0) + { + if (errno != 0) + *err = errno; + else + *err = EIO; + + return -1; + } + + *err = 0; + return res; +} + +int +target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 0, err); +} + +int +target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 1, err); +} + +/* More generic transfers. */ + +static LONGEST +default_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_MEMORY + && ops->to_xfer_memory != NULL) + /* If available, fall back to the target's "to_xfer_memory" + method. */ + { + int xfered = -1; + errno = 0; + if (writebuf != NULL) + { + void *buffer = xmalloc (len); + struct cleanup *cleanup = make_cleanup (xfree, buffer); + memcpy (buffer, writebuf, len); + xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL, + ops); + do_cleanups (cleanup); + } + if (readbuf != NULL) + xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL, + ops); + if (xfered > 0) + return xfered; + else if (xfered == 0 && errno == 0) + /* "to_xfer_memory" uses 0, cross checked against ERRNO as one + indication of an error. */ + return 0; + else + return -1; + } + else if (ops->beneath != NULL) + return ops->beneath->to_xfer_partial (ops->beneath, object, annex, + readbuf, writebuf, offset, len); + else + return -1; +} + +/* Target vector read/write partial wrapper functions. + + NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial + (inbuf, outbuf)", instead of separate read/write methods, make life + easier. */ + +LONGEST +target_read_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len); +} + +LONGEST +target_write_partial (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len); +} + +/* Wrappers to perform the full transfer. */ +LONGEST +target_read (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_read_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +LONGEST +target_write (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_write_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +/* Memory transfer methods. */ + +void +get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf, + LONGEST len) +{ + if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) + != len) + memory_error (EIO, addr); +} + +ULONGEST +get_target_memory_unsigned (struct target_ops *ops, + CORE_ADDR addr, int len) +{ + char buf[sizeof (ULONGEST)]; + + gdb_assert (len <= sizeof (buf)); + get_target_memory (ops, addr, buf, len); + return extract_unsigned_integer (buf, len); +} + +static void +target_info (char *args, int from_tty) +{ + struct target_ops *t; + int has_all_mem = 0; + + if (symfile_objfile != NULL) + printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name); + +#ifdef FILES_INFO_HOOK + if (FILES_INFO_HOOK ()) + return; +#endif + + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + if ((int) (t->to_stratum) <= (int) dummy_stratum) + continue; + if (has_all_mem) + printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n"); + printf_unfiltered ("%s:\n", t->to_longname); + (t->to_files_info) (t); + has_all_mem = t->to_has_all_memory; + } +} + +/* This is to be called by the open routine before it does + anything. */ + +void +target_preopen (int from_tty) +{ + dont_repeat (); + + if (target_has_execution) + { + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) + target_kill (); + else + error ("Program not killed."); + } + + /* Calling target_kill may remove the target from the stack. But if + it doesn't (which seems like a win for UDI), remove it now. */ + + if (target_has_execution) + pop_target (); +} + +/* Detach a target after doing deferred register stores. */ + +void +target_detach (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_detach) (args, from_tty); +} + +void +target_disconnect (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_disconnect) (args, from_tty); +} + +void +target_link (char *modname, CORE_ADDR *t_reloc) +{ + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) + { + (current_target.to_lookup_symbol) (modname, t_reloc); + if (*t_reloc == 0) + error ("Unable to link to %s and get relocation in rombug", modname); + } + else + *t_reloc = (CORE_ADDR) -1; +} + +int +target_async_mask (int mask) +{ + int saved_async_masked_status = target_async_mask_value; + target_async_mask_value = mask; + return saved_async_masked_status; +} + +/* Look through the list of possible targets for a target that can + execute a run or attach command without any other data. This is + used to locate the default process stratum. + + Result is always valid (error() is called for errors). */ + +static struct target_ops * +find_default_run_target (char *do_mesg) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + if (count != 1) + error ("Don't know how to %s. Try \"help target\".", do_mesg); + + return runable; +} + +void +find_default_attach (char *args, int from_tty) +{ + struct target_ops *t; + + t = find_default_run_target ("attach"); + (t->to_attach) (args, from_tty); + return; +} + +void +find_default_create_inferior (char *exec_file, char *allargs, char **env) +{ + struct target_ops *t; + + t = find_default_run_target ("run"); + (t->to_create_inferior) (exec_file, allargs, env); + return; +} + +static int +default_region_size_ok_for_hw_watchpoint (int byte_count) +{ + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); +} + +static int +return_zero (void) +{ + return 0; +} + +static int +return_one (void) +{ + return 1; +} + +static int +return_minus_one (void) +{ + return -1; +} + +/* + * Resize the to_sections pointer. Also make sure that anyone that + * was holding on to an old value of it gets updated. + * Returns the old size. + */ + +int +target_resize_to_sections (struct target_ops *target, int num_added) +{ + struct target_ops **t; + struct section_table *old_value; + int old_count; + + old_value = target->to_sections; + + if (target->to_sections) + { + old_count = target->to_sections_end - target->to_sections; + target->to_sections = (struct section_table *) + xrealloc ((char *) target->to_sections, + (sizeof (struct section_table)) * (num_added + old_count)); + } + else + { + old_count = 0; + target->to_sections = (struct section_table *) + xmalloc ((sizeof (struct section_table)) * num_added); + } + target->to_sections_end = target->to_sections + (num_added + old_count); + + /* Check to see if anyone else was pointing to this structure. + If old_value was null, then no one was. */ + + if (old_value) + { + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_sections == old_value) + { + (*t)->to_sections = target->to_sections; + (*t)->to_sections_end = target->to_sections_end; + } + } + } + + return old_count; + +} + +/* Remove all target sections taken from ABFD. + + Scan the current target stack for targets whose section tables + refer to sections from BFD, and remove those sections. We use this + when we notice that the inferior has unloaded a shared object, for + example. */ +void +remove_target_sections (bfd *abfd) +{ + struct target_ops **t; + + for (t = target_structs; t < target_structs + target_struct_size; t++) + { + struct section_table *src, *dest; + + dest = (*t)->to_sections; + for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++) + if (src->bfd != abfd) + { + /* Keep this section. */ + if (dest < src) *dest = *src; + dest++; + } + + /* If we've dropped any sections, resize the section table. */ + if (dest < src) + target_resize_to_sections (*t, dest - src); + } +} + + + + +/* Find a single runnable target in the stack and return it. If for + some reason there is more than one, return NULL. */ + +struct target_ops * +find_run_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* Find a single core_stratum target in the list of targets and return it. + If for some reason there is more than one, return NULL. */ + +struct target_ops * +find_core_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_stratum == core_stratum) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* + * Find the next target down the stack from the specified target. + */ + +struct target_ops * +find_target_beneath (struct target_ops *t) +{ + return t->beneath; +} + + +/* The inferior process has died. Long live the inferior! */ + +void +generic_mourn_inferior (void) +{ + extern int show_breakpoint_hit_counts; + + inferior_ptid = null_ptid; + attach_flag = 0; + breakpoint_init_inferior (inf_exited); + registers_changed (); + +#ifdef CLEAR_DEFERRED_STORES + /* Delete any pending stores to the inferior... */ + CLEAR_DEFERRED_STORES; +#endif + + reopen_exec_file (); + reinit_frame_cache (); + + /* It is confusing to the user for ignore counts to stick around + from previous runs of the inferior. So clear them. */ + /* However, it is more confusing for the ignore counts to disappear when + using hit counts. So don't clear them if we're counting hits. */ + if (!show_breakpoint_hit_counts) + breakpoint_clear_ignore_counts (); + + if (detach_hook) + detach_hook (); +} + +/* Helper function for child_wait and the Lynx derivatives of child_wait. + HOSTSTATUS is the waitstatus from wait() or the equivalent; store our + translation of that in OURSTATUS. */ +void +store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus) +{ +#ifdef CHILD_SPECIAL_WAITSTATUS + /* CHILD_SPECIAL_WAITSTATUS should return nonzero and set *OURSTATUS + if it wants to deal with hoststatus. */ + if (CHILD_SPECIAL_WAITSTATUS (ourstatus, hoststatus)) + return; +#endif + + if (WIFEXITED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_EXITED; + ourstatus->value.integer = WEXITSTATUS (hoststatus); + } + else if (!WIFSTOPPED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus)); + } + else + { + ourstatus->kind = TARGET_WAITKIND_STOPPED; + ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus)); + } +} + +/* Returns zero to leave the inferior alone, one to interrupt it. */ +int (*target_activity_function) (void); +int target_activity_fd; + +/* Convert a normal process ID to a string. Returns the string in a static + buffer. */ + +char * +normal_pid_to_str (ptid_t ptid) +{ + static char buf[30]; + + sprintf (buf, "process %d", PIDGET (ptid)); + return buf; +} + +/* Error-catcher for target_find_memory_regions */ +static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) +{ + error ("No target."); + return 0; +} + +/* Error-catcher for target_make_corefile_notes */ +static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) +{ + error ("No target."); + return NULL; +} + +/* Set up the handful of non-empty slots needed by the dummy target + vector. */ + +static void +init_dummy_target (void) +{ + dummy_target.to_shortname = "None"; + dummy_target.to_longname = "None"; + dummy_target.to_doc = ""; + dummy_target.to_attach = find_default_attach; + dummy_target.to_create_inferior = find_default_create_inferior; + dummy_target.to_pid_to_str = normal_pid_to_str; + dummy_target.to_stratum = dummy_stratum; + dummy_target.to_find_memory_regions = dummy_find_memory_regions; + dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; + dummy_target.to_magic = OPS_MAGIC; +} + + +static struct target_ops debug_target; + +static void +debug_to_open (char *args, int from_tty) +{ + debug_target.to_open (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty); +} + +static void +debug_to_close (int quitting) +{ + target_close (&debug_target, quitting); + fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting); +} + +void +target_close (struct target_ops *targ, int quitting) +{ + if (targ->to_xclose != NULL) + targ->to_xclose (targ, quitting); + else if (targ->to_close != NULL) + targ->to_close (quitting); +} + +static void +debug_to_attach (char *args, int from_tty) +{ + debug_target.to_attach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty); +} + + +static void +debug_to_post_attach (int pid) +{ + debug_target.to_post_attach (pid); + + fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid); +} + +static void +debug_to_detach (char *args, int from_tty) +{ + debug_target.to_detach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty); +} + +static void +debug_to_disconnect (char *args, int from_tty) +{ + debug_target.to_disconnect (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); +} + +static void +debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal) +{ + debug_target.to_resume (ptid, step, siggnal); + + fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid), + step ? "step" : "continue", + target_signal_to_name (siggnal)); +} + +static ptid_t +debug_to_wait (ptid_t ptid, struct target_waitstatus *status) +{ + ptid_t retval; + + retval = debug_target.to_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, + "target_wait (%d, status) = %d, ", PIDGET (ptid), + PIDGET (retval)); + fprintf_unfiltered (gdb_stdlog, "status->kind = "); + switch (status->kind) + { + case TARGET_WAITKIND_EXITED: + fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n", + status->value.integer); + break; + case TARGET_WAITKIND_STOPPED: + fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_SIGNALLED: + fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_LOADED: + fprintf_unfiltered (gdb_stdlog, "loaded\n"); + break; + case TARGET_WAITKIND_FORKED: + fprintf_unfiltered (gdb_stdlog, "forked\n"); + break; + case TARGET_WAITKIND_VFORKED: + fprintf_unfiltered (gdb_stdlog, "vforked\n"); + break; + case TARGET_WAITKIND_EXECD: + fprintf_unfiltered (gdb_stdlog, "execd\n"); + break; + case TARGET_WAITKIND_SPURIOUS: + fprintf_unfiltered (gdb_stdlog, "spurious\n"); + break; + default: + fprintf_unfiltered (gdb_stdlog, "unknown???\n"); + break; + } + + return retval; +} + +static void +debug_to_post_wait (ptid_t ptid, int status) +{ + debug_target.to_post_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n", + PIDGET (ptid), status); +} + +static void +debug_print_register (const char * func, int regno) +{ + fprintf_unfiltered (gdb_stdlog, "%s ", func); + if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS + && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0') + fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno)); + else + fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + if (regno >= 0) + { + int i; + unsigned char buf[MAX_REGISTER_SIZE]; + deprecated_read_register_gen (regno, buf); + fprintf_unfiltered (gdb_stdlog, " = "); + for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++) + { + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + } + if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST)) + { + fprintf_unfiltered (gdb_stdlog, " 0x%s %s", + paddr_nz (read_register (regno)), + paddr_d (read_register (regno))); + } + } + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_fetch_registers (int regno) +{ + debug_target.to_fetch_registers (regno); + debug_print_register ("target_fetch_registers", regno); +} + +static void +debug_to_store_registers (int regno) +{ + debug_target.to_store_registers (regno); + debug_print_register ("target_store_registers", regno); + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_prepare_to_store (void) +{ + debug_target.to_prepare_to_store (); + + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); +} + +static int +debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib, + struct target_ops *target) +{ + int retval; + + retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, + attrib, target); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d", + (unsigned int) memaddr, /* possable truncate long long */ + len, write ? "write" : "read", retval); + + + + if (retval > 0) + { + int i; + + fputs_unfiltered (", bytes =", gdb_stdlog); + for (i = 0; i < retval; i++) + { + if ((((long) &(myaddr[i])) & 0xf) == 0) + fprintf_unfiltered (gdb_stdlog, "\n"); + fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + } + } + + fputc_unfiltered ('\n', gdb_stdlog); + + return retval; +} + +static void +debug_to_files_info (struct target_ops *target) +{ + debug_target.to_files_info (target); + + fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n"); +} + +static int +debug_to_insert_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty) +{ + int retval; + + retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty); + + fprintf_unfiltered (gdb_stdlog, + "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n", + (unsigned long) type, + (unsigned long) cnt, + (unsigned long) from_tty, + (unsigned long) retval); + return retval; +} + +static int +debug_to_region_size_ok_for_hw_watchpoint (int byte_count) +{ + CORE_ADDR retval; + + retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count); + + fprintf_unfiltered (gdb_stdlog, + "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n", + (unsigned long) byte_count, + (unsigned long) retval); + return retval; +} + +static int +debug_to_stopped_by_watchpoint (void) +{ + int retval; + + retval = debug_target.to_stopped_by_watchpoint (); + + fprintf_unfiltered (gdb_stdlog, + "STOPPED_BY_WATCHPOINT () = %ld\n", + (unsigned long) retval); + return retval; +} + +static CORE_ADDR +debug_to_stopped_data_address (void) +{ + CORE_ADDR retval; + + retval = debug_target.to_stopped_data_address (); + + fprintf_unfiltered (gdb_stdlog, + "target_stopped_data_address () = 0x%lx\n", + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static void +debug_to_terminal_init (void) +{ + debug_target.to_terminal_init (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n"); +} + +static void +debug_to_terminal_inferior (void) +{ + debug_target.to_terminal_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); +} + +static void +debug_to_terminal_ours_for_output (void) +{ + debug_target.to_terminal_ours_for_output (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); +} + +static void +debug_to_terminal_ours (void) +{ + debug_target.to_terminal_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n"); +} + +static void +debug_to_terminal_save_ours (void) +{ + debug_target.to_terminal_save_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n"); +} + +static void +debug_to_terminal_info (char *arg, int from_tty) +{ + debug_target.to_terminal_info (arg, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg, + from_tty); +} + +static void +debug_to_kill (void) +{ + debug_target.to_kill (); + + fprintf_unfiltered (gdb_stdlog, "target_kill ()\n"); +} + +static void +debug_to_load (char *args, int from_tty) +{ + debug_target.to_load (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty); +} + +static int +debug_to_lookup_symbol (char *name, CORE_ADDR *addrp) +{ + int retval; + + retval = debug_target.to_lookup_symbol (name, addrp); + + fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name); + + return retval; +} + +static void +debug_to_create_inferior (char *exec_file, char *args, char **env) +{ + debug_target.to_create_inferior (exec_file, args, env); + + fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n", + exec_file, args); +} + +static void +debug_to_post_startup_inferior (ptid_t ptid) +{ + debug_target.to_post_startup_inferior (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n", + PIDGET (ptid)); +} + +static void +debug_to_acknowledge_created_inferior (int pid) +{ + debug_target.to_acknowledge_created_inferior (pid); + + fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n", + pid); +} + +static int +debug_to_insert_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_insert_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_follow_fork (int follow_child) +{ + int retval = debug_target.to_follow_fork (follow_child); + + fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n", + follow_child, retval); + + return retval; +} + +static int +debug_to_insert_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_reported_exec_events_per_exec_call (void) +{ + int reported_exec_events; + + reported_exec_events = debug_target.to_reported_exec_events_per_exec_call (); + + fprintf_unfiltered (gdb_stdlog, + "target_reported_exec_events_per_exec_call () = %d\n", + reported_exec_events); + + return reported_exec_events; +} + +static int +debug_to_has_exited (int pid, int wait_status, int *exit_status) +{ + int has_exited; + + has_exited = debug_target.to_has_exited (pid, wait_status, exit_status); + + fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n", + pid, wait_status, *exit_status, has_exited); + + return has_exited; +} + +static void +debug_to_mourn_inferior (void) +{ + debug_target.to_mourn_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n"); +} + +static int +debug_to_can_run (void) +{ + int retval; + + retval = debug_target.to_can_run (); + + fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval); + + return retval; +} + +static void +debug_to_notice_signals (ptid_t ptid) +{ + debug_target.to_notice_signals (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", + PIDGET (ptid)); +} + +static int +debug_to_thread_alive (ptid_t ptid) +{ + int retval; + + retval = debug_target.to_thread_alive (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + PIDGET (ptid), retval); + + return retval; +} + +static void +debug_to_find_new_threads (void) +{ + debug_target.to_find_new_threads (); + + fputs_unfiltered ("target_find_new_threads ()\n", gdb_stdlog); +} + +static void +debug_to_stop (void) +{ + debug_target.to_stop (); + + fprintf_unfiltered (gdb_stdlog, "target_stop ()\n"); +} + +static LONGEST +debug_to_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + LONGEST retval; + + retval = debug_target.to_xfer_partial (&debug_target, object, annex, + readbuf, writebuf, offset, len); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n", + (int) object, (annex ? annex : "(null)"), + (long) readbuf, (long) writebuf, paddr_nz (offset), + paddr_d (len), paddr_d (retval)); + + return retval; +} + +static void +debug_to_rcmd (char *command, + struct ui_file *outbuf) +{ + debug_target.to_rcmd (command, outbuf); + fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); +} + +static struct symtab_and_line * +debug_to_enable_exception_callback (enum exception_event_kind kind, int enable) +{ + struct symtab_and_line *result; + result = debug_target.to_enable_exception_callback (kind, enable); + fprintf_unfiltered (gdb_stdlog, + "target get_exception_callback_sal (%d, %d)\n", + kind, enable); + return result; +} + +static struct exception_event_record * +debug_to_get_current_exception_event (void) +{ + struct exception_event_record *result; + result = debug_target.to_get_current_exception_event (); + fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n"); + return result; +} + +static char * +debug_to_pid_to_exec_file (int pid) +{ + char *exec_file; + + exec_file = debug_target.to_pid_to_exec_file (pid); + + fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n", + pid, exec_file); + + return exec_file; +} + +static void +setup_target_debug (void) +{ + memcpy (&debug_target, ¤t_target, sizeof debug_target); + + current_target.to_open = debug_to_open; + current_target.to_close = debug_to_close; + current_target.to_attach = debug_to_attach; + current_target.to_post_attach = debug_to_post_attach; + current_target.to_detach = debug_to_detach; + current_target.to_disconnect = debug_to_disconnect; + current_target.to_resume = debug_to_resume; + current_target.to_wait = debug_to_wait; + current_target.to_post_wait = debug_to_post_wait; + current_target.to_fetch_registers = debug_to_fetch_registers; + current_target.to_store_registers = debug_to_store_registers; + current_target.to_prepare_to_store = debug_to_prepare_to_store; + current_target.to_xfer_memory = debug_to_xfer_memory; + current_target.to_files_info = debug_to_files_info; + current_target.to_insert_breakpoint = debug_to_insert_breakpoint; + current_target.to_remove_breakpoint = debug_to_remove_breakpoint; + current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint; + current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint; + current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint; + current_target.to_insert_watchpoint = debug_to_insert_watchpoint; + current_target.to_remove_watchpoint = debug_to_remove_watchpoint; + current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint; + current_target.to_stopped_data_address = debug_to_stopped_data_address; + current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint; + current_target.to_terminal_init = debug_to_terminal_init; + current_target.to_terminal_inferior = debug_to_terminal_inferior; + current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output; + current_target.to_terminal_ours = debug_to_terminal_ours; + current_target.to_terminal_save_ours = debug_to_terminal_save_ours; + current_target.to_terminal_info = debug_to_terminal_info; + current_target.to_kill = debug_to_kill; + current_target.to_load = debug_to_load; + current_target.to_lookup_symbol = debug_to_lookup_symbol; + current_target.to_create_inferior = debug_to_create_inferior; + current_target.to_post_startup_inferior = debug_to_post_startup_inferior; + current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior; + current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint; + current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint; + current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint; + current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint; + current_target.to_follow_fork = debug_to_follow_fork; + current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint; + current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint; + current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call; + current_target.to_has_exited = debug_to_has_exited; + current_target.to_mourn_inferior = debug_to_mourn_inferior; + current_target.to_can_run = debug_to_can_run; + current_target.to_notice_signals = debug_to_notice_signals; + current_target.to_thread_alive = debug_to_thread_alive; + current_target.to_find_new_threads = debug_to_find_new_threads; + current_target.to_stop = debug_to_stop; + current_target.to_xfer_partial = debug_to_xfer_partial; + current_target.to_rcmd = debug_to_rcmd; + current_target.to_enable_exception_callback = debug_to_enable_exception_callback; + current_target.to_get_current_exception_event = debug_to_get_current_exception_event; + current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file; + +} + + +static char targ_desc[] = +"Names of targets and files being debugged.\n\ +Shows the entire stack of targets currently in use (including the exec-file,\n\ +core-file, and process, if any), as well as the symbol file name."; + +static void +do_monitor_command (char *cmd, + int from_tty) +{ + if ((current_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain) + || (current_target.to_rcmd == debug_to_rcmd + && (debug_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain))) + { + error ("\"monitor\" command not supported by this target.\n"); + } + target_rcmd (cmd, gdb_stdtarg); +} + +void +initialize_targets (void) +{ + init_dummy_target (); + push_target (&dummy_target); + + add_info ("target", target_info, targ_desc); + add_info ("files", target_info, targ_desc); + + add_show_from_set + (add_set_cmd ("target", class_maintenance, var_zinteger, + (char *) &targetdebug, + "Set target debugging.\n\ +When non-zero, target debugging is enabled.", &setdebuglist), + &showdebuglist); + + add_setshow_boolean_cmd ("trust-readonly-sections", class_support, + &trust_readonly, "\ +Set mode for reading from readonly sections.\n\ +When this mode is on, memory reads from readonly sections (such as .text)\n\ +will be read from the object file instead of from the target. This will\n\ +result in significant performance improvement for remote targets.", "\ +Show mode for reading from readonly sections.\n", + NULL, NULL, + &setlist, &showlist); + + add_com ("monitor", class_obscure, do_monitor_command, + "Send a command to the remote monitor (remote targets only)."); + + target_dcache = dcache_init (); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ui-file.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ui-file.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ui-file.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/ui-file.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,630 @@ +/* UI_FILE - a generic STDIO like output stream. + + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Implement the ``struct ui_file'' object. */ + +#include "defs.h" +#include "ui-file.h" +#include "gdb_string.h" + +#include + +static ui_file_isatty_ftype null_file_isatty; +static ui_file_write_ftype null_file_write; +static ui_file_fputs_ftype null_file_fputs; +static ui_file_read_ftype null_file_read; +static ui_file_flush_ftype null_file_flush; +static ui_file_delete_ftype null_file_delete; +static ui_file_rewind_ftype null_file_rewind; +static ui_file_put_ftype null_file_put; + +struct ui_file + { + int *magic; + ui_file_flush_ftype *to_flush; + ui_file_write_ftype *to_write; + ui_file_fputs_ftype *to_fputs; + ui_file_read_ftype *to_read; + ui_file_delete_ftype *to_delete; + ui_file_isatty_ftype *to_isatty; + ui_file_rewind_ftype *to_rewind; + ui_file_put_ftype *to_put; + void *to_data; + }; +int ui_file_magic; + +struct ui_file * +ui_file_new (void) +{ + struct ui_file *file = xmalloc (sizeof (struct ui_file)); + file->magic = &ui_file_magic; + set_ui_file_data (file, NULL, null_file_delete); + set_ui_file_flush (file, null_file_flush); + set_ui_file_write (file, null_file_write); + set_ui_file_fputs (file, null_file_fputs); + set_ui_file_read (file, null_file_read); + set_ui_file_isatty (file, null_file_isatty); + set_ui_file_rewind (file, null_file_rewind); + set_ui_file_put (file, null_file_put); + return file; +} + +void +ui_file_delete (struct ui_file *file) +{ + file->to_delete (file); + xfree (file); +} + +static int +null_file_isatty (struct ui_file *file) +{ + return 0; +} + +static void +null_file_rewind (struct ui_file *file) +{ + return; +} + +static void +null_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + return; +} + +static void +null_file_flush (struct ui_file *file) +{ + return; +} + +static void +null_file_write (struct ui_file *file, + const char *buf, + long sizeof_buf) +{ + if (file->to_fputs == null_file_fputs) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The fputs method isn't null, slowly pass the write request + onto that. FYI, this isn't as bad as it may look - the + current (as of 1999-11-07) printf_* function calls fputc and + fputc does exactly the below. By having a write function it + is possible to clean up that code. */ + int i; + char b[2]; + b[1] = '\0'; + for (i = 0; i < sizeof_buf; i++) + { + b[0] = buf[i]; + file->to_fputs (b, file); + } + return; + } +} + +static long +null_file_read (struct ui_file *file, + char *buf, + long sizeof_buf) +{ + errno = EBADF; + return 0; +} + +static void +null_file_fputs (const char *buf, struct ui_file *file) +{ + if (file->to_write == null_file_write) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The write method was implemented, use that. */ + file->to_write (file, buf, strlen (buf)); + } +} + +static void +null_file_delete (struct ui_file *file) +{ + return; +} + +void * +ui_file_data (struct ui_file *file) +{ + if (file->magic != &ui_file_magic) + internal_error (__FILE__, __LINE__, + "ui_file_data: bad magic number"); + return file->to_data; +} + +void +gdb_flush (struct ui_file *file) +{ + file->to_flush (file); +} + +int +ui_file_isatty (struct ui_file *file) +{ + return file->to_isatty (file); +} + +void +ui_file_rewind (struct ui_file *file) +{ + file->to_rewind (file); +} + +void +ui_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + file->to_put (file, write, dest); +} + +void +ui_file_write (struct ui_file *file, + const char *buf, + long length_buf) +{ + file->to_write (file, buf, length_buf); +} + +long +ui_file_read (struct ui_file *file, char *buf, long length_buf) +{ + return file->to_read (file, buf, length_buf); +} + +void +fputs_unfiltered (const char *buf, struct ui_file *file) +{ + file->to_fputs (buf, file); +} + +void +set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush) +{ + file->to_flush = flush; +} + +void +set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty) +{ + file->to_isatty = isatty; +} + +void +set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind) +{ + file->to_rewind = rewind; +} + +void +set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put) +{ + file->to_put = put; +} + +void +set_ui_file_write (struct ui_file *file, + ui_file_write_ftype *write) +{ + file->to_write = write; +} + +void +set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read) +{ + file->to_read = read; +} + +void +set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs) +{ + file->to_fputs = fputs; +} + +void +set_ui_file_data (struct ui_file *file, void *data, + ui_file_delete_ftype *delete) +{ + file->to_data = data; + file->to_delete = delete; +} + +/* ui_file utility function for converting a ``struct ui_file'' into + a memory buffer''. */ + +struct accumulated_ui_file +{ + char *buffer; + long length; +}; + +static void +do_ui_file_xstrdup (void *context, const char *buffer, long length) +{ + struct accumulated_ui_file *acc = context; + if (acc->buffer == NULL) + acc->buffer = xmalloc (length + 1); + else + acc->buffer = xrealloc (acc->buffer, acc->length + length + 1); + memcpy (acc->buffer + acc->length, buffer, length); + acc->length += length; + acc->buffer[acc->length] = '\0'; +} + +char * +ui_file_xstrdup (struct ui_file *file, + long *length) +{ + struct accumulated_ui_file acc; + acc.buffer = NULL; + acc.length = 0; + ui_file_put (file, do_ui_file_xstrdup, &acc); + if (acc.buffer == NULL) + acc.buffer = xstrdup (""); + *length = acc.length; + return acc.buffer; +} + +/* A pure memory based ``struct ui_file'' that can be used an output + buffer. The buffers accumulated contents are available via + ui_file_put(). */ + +struct mem_file + { + int *magic; + char *buffer; + int sizeof_buffer; + int length_buffer; + }; + +static ui_file_rewind_ftype mem_file_rewind; +static ui_file_put_ftype mem_file_put; +static ui_file_write_ftype mem_file_write; +static ui_file_delete_ftype mem_file_delete; +static struct ui_file *mem_file_new (void); +static int mem_file_magic; + +static struct ui_file * +mem_file_new (void) +{ + struct mem_file *stream = XMALLOC (struct mem_file); + struct ui_file *file = ui_file_new (); + set_ui_file_data (file, stream, mem_file_delete); + set_ui_file_rewind (file, mem_file_rewind); + set_ui_file_put (file, mem_file_put); + set_ui_file_write (file, mem_file_write); + stream->magic = &mem_file_magic; + stream->buffer = NULL; + stream->sizeof_buffer = 0; + stream->length_buffer = 0; + return file; +} + +static void +mem_file_delete (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_delete: bad magic number"); + if (stream->buffer != NULL) + xfree (stream->buffer); + xfree (stream); +} + +struct ui_file * +mem_fileopen (void) +{ + return mem_file_new (); +} + +static void +mem_file_rewind (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_rewind: bad magic number"); + stream->length_buffer = 0; +} + +static void +mem_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_put: bad magic number"); + if (stream->length_buffer > 0) + write (dest, stream->buffer, stream->length_buffer); +} + +void +mem_file_write (struct ui_file *file, + const char *buffer, + long length_buffer) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_write: bad magic number"); + if (stream->buffer == NULL) + { + stream->length_buffer = length_buffer; + stream->sizeof_buffer = length_buffer; + stream->buffer = xmalloc (stream->sizeof_buffer); + memcpy (stream->buffer, buffer, length_buffer); + } + else + { + int new_length = stream->length_buffer + length_buffer; + if (new_length >= stream->sizeof_buffer) + { + stream->sizeof_buffer = new_length; + stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer); + } + memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer); + stream->length_buffer = new_length; + } +} + +/* ``struct ui_file'' implementation that maps directly onto + 's FILE. */ + +static ui_file_write_ftype stdio_file_write; +static ui_file_fputs_ftype stdio_file_fputs; +static ui_file_read_ftype stdio_file_read; +static ui_file_isatty_ftype stdio_file_isatty; +static ui_file_delete_ftype stdio_file_delete; +static struct ui_file *stdio_file_new (FILE * file, int close_p); +static ui_file_flush_ftype stdio_file_flush; + +static int stdio_file_magic; + +struct stdio_file + { + int *magic; + FILE *file; + int close_p; + }; + +static struct ui_file * +stdio_file_new (FILE *file, int close_p) +{ + struct ui_file *ui_file = ui_file_new (); + struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file)); + stdio->magic = &stdio_file_magic; + stdio->file = file; + stdio->close_p = close_p; + set_ui_file_data (ui_file, stdio, stdio_file_delete); + set_ui_file_flush (ui_file, stdio_file_flush); + set_ui_file_write (ui_file, stdio_file_write); + set_ui_file_fputs (ui_file, stdio_file_fputs); + set_ui_file_read (ui_file, stdio_file_read); + set_ui_file_isatty (ui_file, stdio_file_isatty); + return ui_file; +} + +static void +stdio_file_delete (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_delete: bad magic number"); + if (stdio->close_p) + { + fclose (stdio->file); + } + xfree (stdio); +} + +static void +stdio_file_flush (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_flush: bad magic number"); + fflush (stdio->file); +} + +static long +stdio_file_read (struct ui_file *file, char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_read: bad magic number"); + return read (fileno (stdio->file), buf, length_buf); +} + +static void +stdio_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_write: bad magic number"); + fwrite (buf, length_buf, 1, stdio->file); +} + +static void +stdio_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_fputs: bad magic number"); + fputs (linebuffer, stdio->file); +} + +static int +stdio_file_isatty (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_isatty: bad magic number"); + return (isatty (fileno (stdio->file))); +} + +/* Like fdopen(). Create a ui_file from a previously opened FILE. */ + +struct ui_file * +stdio_fileopen (FILE *file) +{ + return stdio_file_new (file, 0); +} + +struct ui_file * +gdb_fopen (char *name, char *mode) +{ + FILE *f = fopen (name, mode); + if (f == NULL) + return NULL; + return stdio_file_new (f, 1); +} + +#ifdef CRASH_MERGE +void +replace_ui_file_FILE(struct ui_file *file, FILE *fp) +{ + struct stdio_file *stdio_file; + + stdio_file = (struct stdio_file *)ui_file_data(file); + stdio_file->file = fp; +} +#endif + +/* ``struct ui_file'' implementation that maps onto two ui-file objects. */ + +static ui_file_write_ftype tee_file_write; +static ui_file_fputs_ftype tee_file_fputs; +static ui_file_isatty_ftype tee_file_isatty; +static ui_file_delete_ftype tee_file_delete; +static ui_file_flush_ftype tee_file_flush; + +static int tee_file_magic; + +struct tee_file + { + int *magic; + struct ui_file *one, *two; + int close_one, close_two; + }; + +struct ui_file * +tee_file_new (struct ui_file *one, int close_one, + struct ui_file *two, int close_two) +{ + struct ui_file *ui_file = ui_file_new (); + struct tee_file *tee = xmalloc (sizeof (struct tee_file)); + tee->magic = &tee_file_magic; + tee->one = one; + tee->two = two; + tee->close_one = close_one; + tee->close_two = close_two; + set_ui_file_data (ui_file, tee, tee_file_delete); + set_ui_file_flush (ui_file, tee_file_flush); + set_ui_file_write (ui_file, tee_file_write); + set_ui_file_fputs (ui_file, tee_file_fputs); + set_ui_file_isatty (ui_file, tee_file_isatty); + return ui_file; +} + +static void +tee_file_delete (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_delete: bad magic number"); + if (tee->close_one) + ui_file_delete (tee->one); + if (tee->close_two) + ui_file_delete (tee->two); + + xfree (tee); +} + +static void +tee_file_flush (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_flush: bad magic number"); + tee->one->to_flush (tee->one); + tee->two->to_flush (tee->two); +} + +static void +tee_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_write: bad magic number"); + ui_file_write (tee->one, buf, length_buf); + ui_file_write (tee->two, buf, length_buf); +} + +static void +tee_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_fputs: bad magic number"); + tee->one->to_fputs (linebuffer, tee->one); + tee->two->to_fputs (linebuffer, tee->two); +} + +static int +tee_file_isatty (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_isatty: bad magic number"); + return (0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/utils.c /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/utils.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/utils.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/gdb/utils.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3068 @@ +/* General utility routines for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" + +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + +#ifdef __GO32__ +#include +#endif + +/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ +#ifdef reg +#undef reg +#endif + +#include +#include "gdbcmd.h" +#include "serial.h" +#include "bfd.h" +#include "target.h" +#include "demangle.h" +#include "expression.h" +#include "language.h" +#include "charset.h" +#include "annotate.h" +#include "filenames.h" + +#include "inferior.h" /* for signed_pointer_to_address */ + +#include /* For MAXPATHLEN */ + +#ifdef HAVE_CURSES_H +#include +#endif +#ifdef HAVE_TERM_H +#include +#endif + +#include "readline/readline.h" + +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif +/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) +extern char *canonicalize_file_name (const char *); +#endif + +/* readline defines this. */ +#undef savestring + +void (*error_begin_hook) (void); + +/* Holds the last error message issued by gdb */ + +static struct ui_file *gdb_lasterr; + +/* Prototypes for local functions */ + +static void vfprintf_maybe_filtered (struct ui_file *, const char *, + va_list, int); + +static void fputs_maybe_filtered (const char *, struct ui_file *, int); + +static void do_my_cleanups (struct cleanup **, struct cleanup *); + +static void prompt_for_continue (void); + +static void set_screen_size (void); +static void set_width (void); + +/* Chain of cleanup actions established with make_cleanup, + to be executed if an error happens. */ + +static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ +static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ +static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ +static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; + +/* Pointer to what is left to do for an execution command after the + target stops. Used only in asynchronous mode, by targets that + support async execution. The finish and until commands use it. So + does the target extended-remote command. */ +struct continuation *cmd_continuation; +struct continuation *intermediate_continuation; + +/* Nonzero if we have job control. */ + +int job_control; + +/* Nonzero means a quit has been requested. */ + +int quit_flag; + +/* Nonzero means quit immediately if Control-C is typed now, rather + than waiting until QUIT is executed. Be careful in setting this; + code which executes with immediate_quit set has to be very careful + about being able to deal with being interrupted at any time. It is + almost always better to use QUIT; the only exception I can think of + is being able to quit out of a system call (using EINTR loses if + the SIGINT happens between the previous QUIT and the system call). + To immediately quit in the case in which a SIGINT happens between + the previous QUIT and setting immediate_quit (desirable anytime we + expect to block), call QUIT after setting immediate_quit. */ + +int immediate_quit; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form rather than raw. */ + +int demangle = 1; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form even in assembler language displays. If this is set, but + DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */ + +int asm_demangle = 0; + +/* Nonzero means that strings with character values >0x7F should be printed + as octal escapes. Zero means just print the value (e.g. it's an + international character, and the terminal or window can cope.) */ + +int sevenbit_strings = 0; + +/* String to be printed before error messages, if any. */ + +char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + +char *warning_pre_print = "\nwarning: "; + +int pagination_enabled = 1; + + +/* Add a new cleanup to the cleanup_chain, + and return the previous chain pointer + to be passed later to do_cleanups or discard_cleanups. + Args are FUNCTION to clean up with, and ARG to pass to it. */ + +struct cleanup * +make_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&cleanup_chain, function, arg); +} + +struct cleanup * +make_final_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&final_cleanup_chain, function, arg); +} + +struct cleanup * +make_run_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&run_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_error_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + +static void +do_freeargv (void *arg) +{ + freeargv ((char **) arg); +} + +struct cleanup * +make_cleanup_freeargv (char **arg) +{ + return make_my_cleanup (&cleanup_chain, do_freeargv, arg); +} + +static void +do_bfd_close_cleanup (void *arg) +{ + bfd_close (arg); +} + +struct cleanup * +make_cleanup_bfd_close (bfd *abfd) +{ + return make_cleanup (do_bfd_close_cleanup, abfd); +} + +static void +do_close_cleanup (void *arg) +{ + int *fd = arg; + close (*fd); + xfree (fd); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + int *saved_fd = xmalloc (sizeof (fd)); + *saved_fd = fd; + return make_cleanup (do_close_cleanup, saved_fd); +} + +static void +do_ui_file_delete (void *arg) +{ + ui_file_delete (arg); +} + +struct cleanup * +make_cleanup_ui_file_delete (struct ui_file *arg) +{ + return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg); +} + +struct cleanup * +make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function, + void *arg) +{ + struct cleanup *new + = (struct cleanup *) xmalloc (sizeof (struct cleanup)); + struct cleanup *old_chain = *pmy_chain; + + new->next = *pmy_chain; + new->function = function; + new->arg = arg; + *pmy_chain = new; + + return old_chain; +} + +/* Discard cleanups and do the actions they describe + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +do_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&cleanup_chain, old_chain); +} + +void +do_final_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +do_run_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&run_cleanup_chain, old_chain); +} + +void +do_exec_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_cleanup_chain, old_chain); +} + +void +do_exec_error_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +static void +do_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; /* Do this first incase recursion */ + (*ptr->function) (ptr->arg); + xfree (ptr); + } +} + +/* Discard cleanups, not doing the actions they describe, + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +discard_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&cleanup_chain, old_chain); +} + +void +discard_final_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +discard_exec_error_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +void +discard_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; + xfree (ptr); + } +} + +/* Set the cleanup_chain to 0, and return the old cleanup chain. */ +struct cleanup * +save_cleanups (void) +{ + return save_my_cleanups (&cleanup_chain); +} + +struct cleanup * +save_final_cleanups (void) +{ + return save_my_cleanups (&final_cleanup_chain); +} + +struct cleanup * +save_my_cleanups (struct cleanup **pmy_chain) +{ + struct cleanup *old_chain = *pmy_chain; + + *pmy_chain = 0; + return old_chain; +} + +/* Restore the cleanup chain from a previously saved chain. */ +void +restore_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&cleanup_chain, chain); +} + +void +restore_final_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&final_cleanup_chain, chain); +} + +void +restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) +{ + *pmy_chain = chain; +} + +/* This function is useful for cleanups. + Do + + foo = xmalloc (...); + old_chain = make_cleanup (free_current_contents, &foo); + + to arrange to free the object thus allocated. */ + +void +free_current_contents (void *ptr) +{ + void **location = ptr; + if (location == NULL) + internal_error (__FILE__, __LINE__, + "free_current_contents: NULL pointer"); + if (*location != NULL) + { + xfree (*location); + *location = NULL; + } +} + +/* Provide a known function that does nothing, to use as a base for + for a possibly long chain of cleanups. This is useful where we + use the cleanup chain for handling normal cleanups as well as dealing + with cleanups that need to be done as a result of a call to error(). + In such cases, we may not be certain where the first cleanup is, unless + we have a do-nothing one to always use as the base. */ + +void +null_cleanup (void *arg) +{ +} + +/* Add a continuation to the continuation list, the global list + cmd_continuation. The new continuation will be added at the front.*/ +void +add_continuation (void (*continuation_hook) (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = cmd_continuation; + cmd_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = cmd_continuation; + cmd_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_continuations (void) +{ + struct continuation *continuation_ptr; + + while (cmd_continuation) + { + continuation_ptr = cmd_continuation; + cmd_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + +/* Add a continuation to the continuation list, the global list + intermediate_continuation. The new continuation will be added at the front.*/ +void +add_intermediate_continuation (void (*continuation_hook) + (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = intermediate_continuation; + intermediate_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = intermediate_continuation; + intermediate_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + + while (intermediate_continuation) + { + continuation_ptr = intermediate_continuation; + intermediate_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + + + +/* Print a warning message. The first argument STRING is the warning + message, used as an fprintf format string, the second is the + va_list of arguments for that string. A warning is unfiltered (not + paginated) so that the user does not need to page through each + screen full of warnings when there are lots of them. */ + +void +vwarning (const char *string, va_list args) +{ + if (warning_hook) + (*warning_hook) (string, args); + else + { + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + va_end (args); + } +} + +/* Print a warning message. + The first argument STRING is the warning message, used as a fprintf string, + and the remaining args are passed as arguments to it. + The primary difference between warnings and errors is that a warning + does not force the return to command level. */ + +void +warning (const char *string, ...) +{ + va_list args; + va_start (args, string); + vwarning (string, args); + va_end (args); +} + +/* Print an error message and return to command level. + The first argument STRING is the error message, used as a fprintf string, + and the remaining args are passed as arguments to it. */ + +NORETURN void +verror (const char *string, va_list args) +{ + struct ui_file *tmp_stream = mem_fileopen (); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + error_stream (tmp_stream); +} + +NORETURN void +error (const char *string, ...) +{ + va_list args; + va_start (args, string); + verror (string, args); + va_end (args); +} + +static void +do_write (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +/* Cause a silent error to occur. Any error message is recorded + though it is not issued. */ +NORETURN void +error_silent (const char *string, ...) +{ + va_list args; + struct ui_file *tmp_stream = mem_fileopen (); + va_start (args, string); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (tmp_stream, do_write, gdb_lasterr); + va_end (args); + + throw_exception (RETURN_ERROR); +} + +/* Output an error message including any pre-print text to gdb_stderr. */ +void +error_output_message (char *pre_print, char *msg) +{ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (pre_print) + fputs_filtered (pre_print, gdb_stderr); + fputs_filtered (msg, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +} + +NORETURN void +error_stream (struct ui_file *stream) +{ + if (error_begin_hook) + error_begin_hook (); + + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (stream, do_write, gdb_lasterr); + + /* Write the message plus any error_pre_print to gdb_stderr. */ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (error_pre_print) + fputs_filtered (error_pre_print, gdb_stderr); + ui_file_put (stream, do_write, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +#ifdef CRASH_MERGE + if (error_hook) + (*error_hook)(); + else { + int console(char *, ...); + console("verror() called without error_hook\n"); + } +#endif + throw_exception (RETURN_ERROR); +} + +/* Get the last error message issued by gdb */ + +char * +error_last_message (void) +{ + long len; + return ui_file_xstrdup (gdb_lasterr, &len); +} + +/* This is to be called by main() at the very beginning */ + +void +error_init (void) +{ + gdb_lasterr = mem_fileopen (); +} + +/* Print a message reporting an internal error/warning. Ask the user + if they want to continue, dump core, or just exit. Return + something to indicate a quit. */ + +struct internal_problem +{ + const char *name; + /* FIXME: cagney/2002-08-15: There should be ``maint set/show'' + commands available for controlling these variables. */ + enum auto_boolean should_quit; + enum auto_boolean should_dump_core; +}; + +/* Report a problem, internal to GDB, to the user. Once the problem + has been reported, and assuming GDB didn't quit, the caller can + either allow execution to resume or throw an error. */ + +static void +internal_vproblem (struct internal_problem *problem, + const char *file, int line, const char *fmt, va_list ap) +{ + static int dejavu; + int quit_p; + int dump_core_p; + char *reason; + + /* Don't allow infinite error/warning recursion. */ + { + static char msg[] = "Recursive internal problem.\n"; + switch (dejavu) + { + case 0: + dejavu = 1; + break; + case 1: + dejavu = 2; + fputs_unfiltered (msg, gdb_stderr); + abort (); /* NOTE: GDB has only three calls to abort(). */ + default: + dejavu = 3; + write (STDERR_FILENO, msg, sizeof (msg)); + exit (1); + } + } + + /* Try to get the message out and at the start of a new line. */ + target_terminal_ours (); + begin_line (); + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason + (error/warning) and question become separated. Format using a + style similar to a compiler error message. Include extra detail + so that the user knows that they are living on the edge. */ + { + char *msg; + xvasprintf (&msg, fmt, ap); + xasprintf (&reason, "\ +%s:%d: %s: %s\n\ +A problem internal to GDB has been detected,\n\ +further debugging may prove unreliable.", file, line, problem->name, msg); + xfree (msg); + make_cleanup (xfree, reason); + } + + switch (problem->should_quit) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to quit GDB. When in batch mode + this lessens the likelhood of GDB going into an infinate + loop. */ + quit_p = query ("%s\nQuit this debugging session? ", reason); + break; + case AUTO_BOOLEAN_TRUE: + quit_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + quit_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + switch (problem->should_dump_core) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to dump core. This leaves a GDB + `dropping' so that it is easier to see that something went + wrong in GDB. */ + dump_core_p = query ("%s\nCreate a core file of GDB? ", reason); + break; + break; + case AUTO_BOOLEAN_TRUE: + dump_core_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + dump_core_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + if (quit_p) + { + if (dump_core_p) + abort (); /* NOTE: GDB has only three calls to abort(). */ + else + exit (1); + } + else + { + if (dump_core_p) + { + if (fork () == 0) + abort (); /* NOTE: GDB has only three calls to abort(). */ + } + } + + dejavu = 0; +} + +static struct internal_problem internal_error_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +NORETURN void +internal_verror (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_error_problem, file, line, fmt, ap); + throw_exception (RETURN_ERROR); +} + +NORETURN void +internal_error (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_verror (file, line, string, ap); + va_end (ap); +} + +static struct internal_problem internal_warning_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +void +internal_vwarning (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_warning_problem, file, line, fmt, ap); +} + +void +internal_warning (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_vwarning (file, line, string, ap); + va_end (ap); +} + +/* The strerror() function can return NULL for errno values that are + out of range. Provide a "safe" version that always returns a + printable string. */ + +char * +safe_strerror (int errnum) +{ + char *msg; + static char buf[32]; + + msg = strerror (errnum); + if (msg == NULL) + { + sprintf (buf, "(undocumented errno %d)", errnum); + msg = buf; + } + return (msg); +} + +/* Print the system error message for errno, and also mention STRING + as the file name for which the error was encountered. + Then return to command level. */ + +NORETURN void +perror_with_name (const char *string) +{ + char *err; + char *combined; + + err = safe_strerror (errno); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* I understand setting these is a matter of taste. Still, some people + may clear errno but not know about bfd_error. Doing this here is not + unreasonable. */ + bfd_set_error (bfd_error_no_error); + errno = 0; + + error ("%s.", combined); +} + +/* Print the system error message for ERRCODE, and also mention STRING + as the file name for which the error was encountered. */ + +void +print_sys_errmsg (const char *string, int errcode) +{ + char *err; + char *combined; + + err = safe_strerror (errcode); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* We want anything which was printed on stdout to come out first, before + this message. */ + gdb_flush (gdb_stdout); + fprintf_unfiltered (gdb_stderr, "%s.\n", combined); +} + +/* Control C eventually causes this to be called, at a convenient time. */ + +void +quit (void) +{ + struct serial *gdb_stdout_serial = serial_fdopen (1); + + target_terminal_ours (); + + /* We want all output to appear now, before we print "Quit". We + have 3 levels of buffering we have to flush (it's possible that + some of these should be changed to flush the lower-level ones + too): */ + + /* 1. The _filtered buffer. */ + wrap_here ((char *) 0); + + /* 2. The stdio buffer. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + + /* 3. The system-level buffer. */ + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + + annotate_error_begin (); + + /* Don't use *_filtered; we don't want to prompt the user to continue. */ + if (quit_pre_print) + fputs_unfiltered (quit_pre_print, gdb_stderr); + +#ifdef __MSDOS__ + /* No steenking SIGINT will ever be coming our way when the + program is resumed. Don't lie. */ + fprintf_unfiltered (gdb_stderr, "Quit\n"); +#else + if (job_control + /* If there is no terminal switching for this target, then we can't + possibly get screwed by the lack of job control. */ + || current_target.to_terminal_ours == NULL) + fprintf_unfiltered (gdb_stderr, "Quit\n"); + else + fprintf_unfiltered (gdb_stderr, + "Quit (expect signal SIGINT when the program is resumed)\n"); +#endif + throw_exception (RETURN_QUIT); +} + +/* Control C comes here */ +void +request_quit (int signo) +{ + quit_flag = 1; + /* Restore the signal handler. Harmless with BSD-style signals, needed + for System V-style signals. So just always do it, rather than worrying + about USG defines and stuff like that. */ + signal (signo, request_quit); + + if (immediate_quit) + quit (); +} + +/* Memory management stuff (malloc friends). */ + +static void * +mmalloc (void *md, size_t size) +{ + return malloc (size); /* NOTE: GDB's only call to malloc() */ +} + +static void * +mrealloc (void *md, void *ptr, size_t size) +{ + if (ptr == 0) /* Guard against old realloc's */ + return mmalloc (md, size); + else + return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */ +} + +static void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); /* NOTE: GDB's only call to calloc() */ +} + +static void +mfree (void *md, void *ptr) +{ + free (ptr); /* NOTE: GDB's only call to free() */ +} + +/* This used to do something interesting with USE_MMALLOC. + * It can be retired any time. -- chastain 2004-01-19. */ +void +init_malloc (void *md) +{ +} + +/* Called when a memory allocation fails, with the number of bytes of + memory requested in SIZE. */ + +NORETURN void +nomem (long size) +{ + if (size > 0) + { + internal_error (__FILE__, __LINE__, + "virtual memory exhausted: can't allocate %ld bytes.", + size); + } + else + { + internal_error (__FILE__, __LINE__, "virtual memory exhausted."); + } +} + +/* The xmmalloc() family of memory management routines. + + These are are like the mmalloc() family except that they implement + consistent semantics and guard against typical memory management + problems: if a malloc fails, an internal error is thrown; if + free(NULL) is called, it is ignored; if *alloc(0) is called, NULL + is returned. + + All these routines are implemented using the mmalloc() family. */ + +void * +xmmalloc (void *md, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmrealloc (void *md, void *ptr, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + if (ptr != NULL) + val = mrealloc (md, ptr, size); + else + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmcalloc (void *md, size_t number, size_t size) +{ + void *mem; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (number == 0 || size == 0) + { + number = 1; + size = 1; + } + + mem = mcalloc (md, number, size); + if (mem == NULL) + nomem (number * size); + + return mem; +} + +void +xmfree (void *md, void *ptr) +{ + if (ptr != NULL) + mfree (md, ptr); +} + +/* The xmalloc() (libiberty.h) family of memory management routines. + + These are like the ISO-C malloc() family except that they implement + consistent semantics and guard against typical memory management + problems. See xmmalloc() above for further information. + + All these routines are wrappers to the xmmalloc() family. */ + +/* NOTE: These are declared using PTR to ensure consistency with + "libiberty.h". xfree() is GDB local. */ + +PTR /* OK: PTR */ +xmalloc (size_t size) +{ + return xmmalloc (NULL, size); +} + +PTR /* OK: PTR */ +xrealloc (PTR ptr, size_t size) /* OK: PTR */ +{ + return xmrealloc (NULL, ptr, size); +} + +PTR /* OK: PTR */ +xcalloc (size_t number, size_t size) +{ + return xmcalloc (NULL, number, size); +} + +void +xfree (void *ptr) +{ + xmfree (NULL, ptr); +} + + +/* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + +void +xasprintf (char **ret, const char *format, ...) +{ + va_list args; + va_start (args, format); + xvasprintf (ret, format, args); + va_end (args); +} + +void +xvasprintf (char **ret, const char *format, va_list ap) +{ + int status = vasprintf (ret, format, ap); + /* NULL could be returned due to a memory allocation problem; a + badly format string; or something else. */ + if ((*ret) == NULL) + internal_error (__FILE__, __LINE__, + "vasprintf returned NULL buffer (errno %d)", errno); + /* A negative status with a non-NULL buffer shouldn't never + happen. But to be sure. */ + if (status < 0) + internal_error (__FILE__, __LINE__, + "vasprintf call failed (errno %d)", errno); +} + + +/* My replacement for the read system call. + Used like `read' but keeps going if `read' returns too soon. */ + +int +myread (int desc, char *addr, int len) +{ + int val; + int orglen = len; + + while (len > 0) + { + val = read (desc, addr, len); + if (val < 0) + return val; + if (val == 0) + return orglen - len; + len -= val; + addr += val; + } + return orglen; +} + +/* Make a copy of the string at PTR with SIZE characters + (and add a null character at the end in the copy). + Uses malloc to get the space. Returns the address of the copy. */ + +char * +savestring (const char *ptr, size_t size) +{ + char *p = (char *) xmalloc (size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +msavestring (void *md, const char *ptr, size_t size) +{ + char *p = (char *) xmmalloc (md, size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +mstrsave (void *md, const char *ptr) +{ + return (msavestring (md, ptr, strlen (ptr))); +} + +void +print_spaces (int n, struct ui_file *file) +{ + fputs_unfiltered (n_spaces (n), file); +} + +/* Print a host address. */ + +void +gdb_print_host_address (const void *addr, struct ui_file *stream) +{ + + /* We could use the %p conversion specifier to fprintf if we had any + way of knowing whether this host supports it. But the following + should work on the Alpha and on 32 bit machines. */ + + fprintf_filtered (stream, "0x%lx", (unsigned long) addr); +} + +/* Ask user a y-or-n question and return 1 iff answer is yes. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +/* VARARGS */ +int +query (const char *ctlstr, ...) +{ + va_list args; + int answer; + int ans2; + int retval; + + va_start (args, ctlstr); + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer "yes" if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return 1; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-query\n"); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(y or n) "); + + if (annotation_level > 1) + printf_filtered ("\n\032\032query\n"); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = 1; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + if (answer == 'Y') + { + retval = 1; + break; + } + if (answer == 'N') + { + retval = 0; + break; + } + printf_filtered ("Please answer y or n.\n"); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-query\n"); + return retval; +} + + +/* This function supports the nquery() and yquery() functions. + Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or default the answer to the specified default. + DEFCHAR is either 'y' or 'n' and refers to the default answer. + CTLSTR is the control string and should end in "? ". It should + not say how to answer, because we do that. + ARGS are the arguments passed along with the CTLSTR argument to + printf. */ + +static int +defaulted_query (const char *ctlstr, const char defchar, va_list args) +{ + int answer; + int ans2; + int retval; + int def_value; + char def_answer, not_def_answer; + char *y_string, *n_string; + + /* Set up according to which answer is the default. */ + if (defchar == 'y') + { + def_value = 1; + def_answer = 'Y'; + not_def_answer = 'N'; + y_string = "[y]"; + n_string = "n"; + } + else + { + def_value = 0; + def_answer = 'N'; + not_def_answer = 'Y'; + y_string = "y"; + n_string = "[n]"; + } + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer default value if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return def_value; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-%cquery\n", defchar); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(%s or %s) ", y_string, n_string); + + if (annotation_level > 1) + printf_filtered ("\n\032\032%cquery\n", defchar); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = def_value; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + /* Check answer. For the non-default, the user must specify + the non-default explicitly. */ + if (answer == not_def_answer) + { + retval = !def_value; + break; + } + /* Otherwise, for the default, the user may either specify + the required input or have it default by entering nothing. */ + if (answer == def_answer || answer == '\n' || + answer == '\r' || answer == EOF) + { + retval = def_value; + break; + } + /* Invalid entries are not defaulted and require another selection. */ + printf_filtered ("Please answer %s or %s.\n", + y_string, n_string); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-%cquery\n", defchar); + return retval; +} + + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 0 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +nquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'n', args); + va_end (args); +} + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 1 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +yquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'y', args); + va_end (args); +} + +/* Print an error message saying that we couldn't make sense of a + \^mumble sequence in a string or character constant. START and END + indicate a substring of some larger string that contains the + erroneous backslash sequence, missing the initial backslash. */ +static NORETURN int +no_control_char_error (const char *start, const char *end) +{ + int len = end - start; + char *copy = alloca (end - start + 1); + + memcpy (copy, start, len); + copy[len] = '\0'; + + error ("There is no control character `\\%s' in the `%s' character set.", + copy, target_charset ()); +} + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + should point to the character after the \. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +int +parse_escape (char **string_ptr) +{ + int target_char; + int c = *(*string_ptr)++; + if (c_parse_backslash (c, &target_char)) + return target_char; + else + switch (c) + { + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + case '^': + { + /* Remember where this escape sequence started, for reporting + errors. */ + char *sequence_start_pos = *string_ptr - 1; + + c = *(*string_ptr)++; + + if (c == '?') + { + /* XXXCHARSET: What is `delete' in the host character set? */ + c = 0177; + + if (!host_char_to_target (c, &target_char)) + error ("There is no character corresponding to `Delete' " + "in the target character set `%s'.", host_charset ()); + + return target_char; + } + else if (c == '\\') + target_char = parse_escape (string_ptr); + else + { + if (!host_char_to_target (c, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + } + + /* Now target_char is something like `c', and we want to find + its control-character equivalent. */ + if (!target_char_to_control_char (target_char, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + + return target_char; + } + + /* XXXCHARSET: we need to use isdigit and value-of-digit + methods of the host character set here. */ + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int i = c - '0'; + int count = 0; + while (++count < 3) + { + c = (**string_ptr); + if (c >= '0' && c <= '7') + { + (*string_ptr)++; + i *= 8; + i += c - '0'; + } + else + { + break; + } + } + return i; + } + default: + if (!host_char_to_target (c, &target_char)) + error + ("The escape sequence `\%c' is equivalent to plain `%c', which" + " has no equivalent\n" "in the `%s' character set.", c, c, + target_charset ()); + return target_char; + } +} + +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that this routine should only + be call for printing things which are independent of the language + of the program being debugged. */ + +static void +printchar (int c, void (*do_fputs) (const char *, struct ui_file *), + void (*do_fprintf) (struct ui_file *, const char *, ...), + struct ui_file *stream, int quoter) +{ + + c &= 0xFF; /* Avoid sign bit follies */ + + if (c < 0x20 || /* Low control chars */ + (c >= 0x7F && c < 0xA0) || /* DEL, High controls */ + (sevenbit_strings && c >= 0x80)) + { /* high order bit set */ + switch (c) + { + case '\n': + do_fputs ("\\n", stream); + break; + case '\b': + do_fputs ("\\b", stream); + break; + case '\t': + do_fputs ("\\t", stream); + break; + case '\f': + do_fputs ("\\f", stream); + break; + case '\r': + do_fputs ("\\r", stream); + break; + case '\033': + do_fputs ("\\e", stream); + break; + case '\007': + do_fputs ("\\a", stream); + break; + default: + do_fprintf (stream, "\\%.3o", (unsigned int) c); + break; + } + } + else + { + if (c == '\\' || c == quoter) + do_fputs ("\\", stream); + do_fprintf (stream, "%c", c); + } +} + +/* Print the character C on STREAM as part of the contents of a + literal string whose delimiter is QUOTER. Note that these routines + should only be call for printing things which are independent of + the language of the program being debugged. */ + +void +fputstr_filtered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter); +} + +void +fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + +void +fputstrn_unfiltered (const char *str, int n, int quoter, + struct ui_file *stream) +{ + int i; + for (i = 0; i < n; i++) + printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + + +/* Number of lines per page or UINT_MAX if paging is disabled. */ +static unsigned int lines_per_page; + +/* Number of chars per line or UINT_MAX if line folding is disabled. */ +static unsigned int chars_per_line; + +/* Current count of lines printed on this page, chars on this line. */ +static unsigned int lines_printed, chars_printed; + +/* Buffer and start column of buffered text, for doing smarter word- + wrapping. When someone calls wrap_here(), we start buffering output + that comes through fputs_filtered(). If we see a newline, we just + spit it out and forget about the wrap_here(). If we see another + wrap_here(), we spit it out and remember the newer one. If we see + the end of the line, we spit out a newline, the indent, and then + the buffered output. */ + +/* Malloc'd buffer with chars_per_line+2 bytes. Contains characters which + are waiting to be output (they have already been counted in chars_printed). + When wrap_buffer[0] is null, the buffer is empty. */ +static char *wrap_buffer; + +/* Pointer in wrap_buffer to the next character to fill. */ +static char *wrap_pointer; + +/* String to indent by if the wrap occurs. Must not be NULL if wrap_column + is non-zero. */ +static char *wrap_indent; + +/* Column number on the screen where wrap_buffer begins, or 0 if wrapping + is not in effect. */ +static int wrap_column; + + +/* Inialize the number of lines per page and chars per line. */ + +void +init_page_info (void) +{ +#if defined(TUI) + if (!tui_get_command_dimension (&chars_per_line, &lines_per_page)) +#endif + { + int rows, cols; + +#if defined(__GO32__) + rows = ScreenRows (); + cols = ScreenCols (); + lines_per_page = rows; + chars_per_line = cols; +#else + /* Make sure Readline has initialized its terminal settings. */ + rl_reset_terminal (NULL); + + /* Get the screen size from Readline. */ + rl_get_screen_size (&rows, &cols); + lines_per_page = rows; + chars_per_line = cols; + + /* Readline should have fetched the termcap entry for us. */ + if (tgetnum ("li") < 0 || getenv ("EMACS")) + { + /* The number of lines per page is not mentioned in the + terminal description. This probably means that paging is + not useful (e.g. emacs shell window), so disable paging. */ + lines_per_page = UINT_MAX; + } + + /* FIXME: Get rid of this junk. */ +#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) + SIGWINCH_HANDLER (SIGWINCH); +#endif + + /* If the output is not a terminal, don't paginate it. */ + if (!ui_file_isatty (gdb_stdout)) + lines_per_page = UINT_MAX; +#endif + } + + set_screen_size (); + set_width (); +} + +/* Set the screen size based on LINES_PER_PAGE and CHARS_PER_LINE. */ + +static void +set_screen_size (void) +{ + int rows = lines_per_page; + int cols = chars_per_line; + + if (rows <= 0) + rows = INT_MAX; + + if (cols <= 0) + rl_get_screen_size (NULL, &cols); + + /* Update Readline's idea of the terminal size. */ + rl_set_screen_size (rows, cols); +} + +/* Reinitialize WRAP_BUFFER according to the current value of + CHARS_PER_LINE. */ + +static void +set_width (void) +{ + if (chars_per_line == 0) + init_page_info (); + + if (!wrap_buffer) + { + wrap_buffer = (char *) xmalloc (chars_per_line + 2); + wrap_buffer[0] = '\0'; + } + else + wrap_buffer = (char *) xrealloc (wrap_buffer, chars_per_line + 2); + wrap_pointer = wrap_buffer; /* Start it at the beginning. */ +} + +static void +set_width_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); + set_width (); +} + +static void +set_height_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); +} + +/* Wait, so the user can read what's on the screen. Prompt the user + to continue by pressing RETURN. */ + +static void +prompt_for_continue (void) +{ + char *ignore; + char cont_prompt[120]; + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032pre-prompt-for-continue\n"); + + strcpy (cont_prompt, + "---Type to continue, or q to quit---"); + if (annotation_level > 1) + strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); + + /* We must do this *before* we call gdb_readline, else it will eventually + call us -- thinking that we're trying to print beyond the end of the + screen. */ + reinitialize_more_filter (); + + immediate_quit++; + /* On a real operating system, the user can quit with SIGINT. + But not on GO32. + + 'q' is provided on all systems so users don't have to change habits + from system to system, and because telling them what to do in + the prompt is more user-friendly than expecting them to think of + SIGINT. */ + /* Call readline, not gdb_readline, because GO32 readline handles control-C + whereas control-C to gdb_readline will cause the user to get dumped + out to DOS. */ + ignore = gdb_readline_wrapper (cont_prompt); + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032post-prompt-for-continue\n"); + + if (ignore) + { + char *p = ignore; + while (*p == ' ' || *p == '\t') + ++p; + if (p[0] == 'q') + { + if (!event_loop_p) + request_quit (SIGINT); + else + async_request_quit (0); + } + xfree (ignore); + } + immediate_quit--; + + /* Now we have to do this again, so that GDB will know that it doesn't + need to save the ---Type --- line at the top of the screen. */ + reinitialize_more_filter (); + + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ +} + +/* Reinitialize filter; ie. tell it to reset to original values. */ + +void +reinitialize_more_filter (void) +{ + lines_printed = 0; + chars_printed = 0; +} + +/* Indicate that if the next sequence of characters overflows the line, + a newline should be inserted here rather than when it hits the end. + If INDENT is non-null, it is a string to be printed to indent the + wrapped part on the next line. INDENT must remain accessible until + the next call to wrap_here() or until a newline is printed through + fputs_filtered(). + + If the line is already overfull, we immediately print a newline and + the indentation, and disable further wrapping. + + If we don't know the width of lines, but we know the page height, + we must not wrap words, but should still keep track of newlines + that were explicitly printed. + + INDENT should not contain tabs, as that will mess up the char count + on the next line. FIXME. + + This routine is guaranteed to force out any output which has been + squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be + used to force out output from the wrap_buffer. */ + +void +wrap_here (char *indent) +{ + /* This should have been allocated, but be paranoid anyway. */ + if (!wrap_buffer) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + if (wrap_buffer[0]) + { + *wrap_pointer = '\0'; + fputs_unfiltered (wrap_buffer, gdb_stdout); + } + wrap_pointer = wrap_buffer; + wrap_buffer[0] = '\0'; + if (chars_per_line == UINT_MAX) /* No line overflow checking */ + { + wrap_column = 0; + } + else if (chars_printed >= chars_per_line) + { + puts_filtered ("\n"); + if (indent != NULL) + puts_filtered (indent); + wrap_column = 0; + } + else + { + wrap_column = chars_printed; + if (indent == NULL) + wrap_indent = ""; + else + wrap_indent = indent; + } +} + +/* Print input string to gdb_stdout, filtered, with wrap, + arranging strings in columns of n chars. String can be + right or left justified in the column. Never prints + trailing spaces. String should never be longer than + width. FIXME: this could be useful for the EXAMINE + command, which currently doesn't tabulate very well */ + +void +puts_filtered_tabular (char *string, int width, int right) +{ + int spaces = 0; + int stringlen; + char *spacebuf; + + gdb_assert (chars_per_line > 0); + if (chars_per_line == UINT_MAX) + { + fputs_filtered (string, gdb_stdout); + fputs_filtered ("\n", gdb_stdout); + return; + } + + if (((chars_printed - 1) / width + 2) * width >= chars_per_line) + fputs_filtered ("\n", gdb_stdout); + + if (width >= chars_per_line) + width = chars_per_line - 1; + + stringlen = strlen (string); + + if (chars_printed > 0) + spaces = width - (chars_printed - 1) % width - 1; + if (right) + spaces += width - stringlen; + + spacebuf = alloca (spaces + 1); + spacebuf[spaces] = '\0'; + while (spaces--) + spacebuf[spaces] = ' '; + + fputs_filtered (spacebuf, gdb_stdout); + fputs_filtered (string, gdb_stdout); +} + + +/* Ensure that whatever gets printed next, using the filtered output + commands, starts at the beginning of the line. I.E. if there is + any pending output for the current line, flush it and start a new + line. Otherwise do nothing. */ + +void +begin_line (void) +{ + if (chars_printed > 0) + { + puts_filtered ("\n"); + } +} + + +/* Like fputs but if FILTER is true, pause after every screenful. + + Regardless of FILTER can wrap at points other than the final + character of a line. + + Unlike fputs, fputs_maybe_filtered does not return a value. + It is OK for LINEBUFFER to be NULL, in which case just don't print + anything. + + Note that a longjmp to top level may occur in this routine (only if + FILTER is true) (since prompt_for_continue may do so) so this + routine should not be called when cleanups are not in place. */ + +static void +fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + int filter) +{ + const char *lineptr; + + if (linebuffer == 0) + return; + + /* Don't do any filtering if it is disabled. */ + if ((stream != gdb_stdout) || !pagination_enabled + || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) + { + fputs_unfiltered (linebuffer, stream); + return; + } + + /* Go through and output each character. Show line extension + when this is necessary; prompt user for new page when this is + necessary. */ + + lineptr = linebuffer; + while (*lineptr) + { + /* Possible new page. */ + if (filter && (lines_printed >= lines_per_page - 1)) + prompt_for_continue (); + + while (*lineptr && *lineptr != '\n') + { + /* Print a single line. */ + if (*lineptr == '\t') + { + if (wrap_column) + *wrap_pointer++ = '\t'; + else + fputc_unfiltered ('\t', stream); + /* Shifting right by 3 produces the number of tab stops + we have already passed, and then adding one and + shifting left 3 advances to the next tab stop. */ + chars_printed = ((chars_printed >> 3) + 1) << 3; + lineptr++; + } + else + { + if (wrap_column) + *wrap_pointer++ = *lineptr; + else + fputc_unfiltered (*lineptr, stream); + chars_printed++; + lineptr++; + } + + if (chars_printed >= chars_per_line) + { + unsigned int save_chars = chars_printed; + + chars_printed = 0; + lines_printed++; + /* If we aren't actually wrapping, don't output newline -- + if chars_per_line is right, we probably just overflowed + anyway; if it's wrong, let us keep going. */ + if (wrap_column) + fputc_unfiltered ('\n', stream); + + /* Possible new page. */ + if (lines_printed >= lines_per_page - 1) + prompt_for_continue (); + + /* Now output indentation and wrapped string */ + if (wrap_column) + { + fputs_unfiltered (wrap_indent, stream); + *wrap_pointer = '\0'; /* Null-terminate saved stuff */ + fputs_unfiltered (wrap_buffer, stream); /* and eject it */ + /* FIXME, this strlen is what prevents wrap_indent from + containing tabs. However, if we recurse to print it + and count its chars, we risk trouble if wrap_indent is + longer than (the user settable) chars_per_line. + Note also that this can set chars_printed > chars_per_line + if we are printing a long string. */ + chars_printed = strlen (wrap_indent) + + (save_chars - wrap_column); + wrap_pointer = wrap_buffer; /* Reset buffer */ + wrap_buffer[0] = '\0'; + wrap_column = 0; /* And disable fancy wrap */ + } + } + } + + if (*lineptr == '\n') + { + chars_printed = 0; + wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */ + lines_printed++; + fputc_unfiltered ('\n', stream); + lineptr++; + } + } +} + +void +fputs_filtered (const char *linebuffer, struct ui_file *stream) +{ + fputs_maybe_filtered (linebuffer, stream, 1); +} + +int +putchar_unfiltered (int c) +{ + char buf = c; + ui_file_write (gdb_stdout, &buf, 1); + return c; +} + +/* Write character C to gdb_stdout using GDB's paging mechanism and return C. + May return nonlocally. */ + +int +putchar_filtered (int c) +{ + return fputc_filtered (c, gdb_stdout); +} + +int +fputc_unfiltered (int c, struct ui_file *stream) +{ + char buf = c; + ui_file_write (stream, &buf, 1); + return c; +} + +int +fputc_filtered (int c, struct ui_file *stream) +{ + char buf[2]; + + buf[0] = c; + buf[1] = 0; + fputs_filtered (buf, stream); + return c; +} + +/* puts_debug is like fputs_unfiltered, except it prints special + characters in printable fashion. */ + +void +puts_debug (char *prefix, char *string, char *suffix) +{ + int ch; + + /* Print prefix and suffix after each line. */ + static int new_line = 1; + static int return_p = 0; + static char *prev_prefix = ""; + static char *prev_suffix = ""; + + if (*string == '\n') + return_p = 0; + + /* If the prefix is changing, print the previous suffix, a new line, + and the new prefix. */ + if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line) + { + fputs_unfiltered (prev_suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + fputs_unfiltered (prefix, gdb_stdlog); + } + + /* Print prefix if we printed a newline during the previous call. */ + if (new_line) + { + new_line = 0; + fputs_unfiltered (prefix, gdb_stdlog); + } + + prev_prefix = prefix; + prev_suffix = suffix; + + /* Output characters in a printable format. */ + while ((ch = *string++) != '\0') + { + switch (ch) + { + default: + if (isprint (ch)) + fputc_unfiltered (ch, gdb_stdlog); + + else + fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff); + break; + + case '\\': + fputs_unfiltered ("\\\\", gdb_stdlog); + break; + case '\b': + fputs_unfiltered ("\\b", gdb_stdlog); + break; + case '\f': + fputs_unfiltered ("\\f", gdb_stdlog); + break; + case '\n': + new_line = 1; + fputs_unfiltered ("\\n", gdb_stdlog); + break; + case '\r': + fputs_unfiltered ("\\r", gdb_stdlog); + break; + case '\t': + fputs_unfiltered ("\\t", gdb_stdlog); + break; + case '\v': + fputs_unfiltered ("\\v", gdb_stdlog); + break; + } + + return_p = ch == '\r'; + } + + /* Print suffix if we printed a newline. */ + if (new_line) + { + fputs_unfiltered (suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + } +} + + +/* Print a variable number of ARGS using format FORMAT. If this + information is going to put the amount written (since the last call + to REINITIALIZE_MORE_FILTER or the last page break) over the page size, + call prompt_for_continue to get the users permision to continue. + + Unlike fprintf, this function does not return a value. + + We implement three variants, vfprintf (takes a vararg list and stream), + fprintf (takes a stream to write on), and printf (the usual). + + Note also that a longjmp to top level may occur in this routine + (since prompt_for_continue may do so) so this routine should not be + called when cleanups are not in place. */ + +static void +vfprintf_maybe_filtered (struct ui_file *stream, const char *format, + va_list args, int filter) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_maybe_filtered (linebuffer, stream, filter); + do_cleanups (old_cleanups); +} + + +void +vfprintf_filtered (struct ui_file *stream, const char *format, va_list args) +{ + vfprintf_maybe_filtered (stream, format, args, 1); +} + +void +vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_unfiltered (linebuffer, stream); + do_cleanups (old_cleanups); +} + +void +vprintf_filtered (const char *format, va_list args) +{ + vfprintf_maybe_filtered (gdb_stdout, format, args, 1); +} + +void +vprintf_unfiltered (const char *format, va_list args) +{ + vfprintf_unfiltered (gdb_stdout, format, args); +} + +void +fprintf_filtered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (stream, format, args); + va_end (args); +} + +void +fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (stream, format, args); + va_end (args); +} + +/* Like fprintf_filtered, but prints its result indented. + Called as fprintfi_filtered (spaces, stream, format, ...); */ + +void +fprintfi_filtered (int spaces, struct ui_file *stream, const char *format, + ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, stream); + + vfprintf_filtered (stream, format, args); + va_end (args); +} + + +void +printf_filtered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + + +void +printf_unfiltered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (gdb_stdout, format, args); + va_end (args); +} + +/* Like printf_filtered, but prints it's result indented. + Called as printfi_filtered (spaces, format, ...); */ + +void +printfi_filtered (int spaces, const char *format, ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, gdb_stdout); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + +/* Easy -- but watch out! + + This routine is *not* a replacement for puts()! puts() appends a newline. + This one doesn't, and had better not! */ + +void +puts_filtered (const char *string) +{ + fputs_filtered (string, gdb_stdout); +} + +void +puts_unfiltered (const char *string) +{ + fputs_unfiltered (string, gdb_stdout); +} + +/* Return a pointer to N spaces and a null. The pointer is good + until the next call to here. */ +char * +n_spaces (int n) +{ + char *t; + static char *spaces = 0; + static int max_spaces = -1; + + if (n > max_spaces) + { + if (spaces) + xfree (spaces); + spaces = (char *) xmalloc (n + 1); + for (t = spaces + n; t != spaces;) + *--t = ' '; + spaces[n] = '\0'; + max_spaces = n; + } + + return spaces + max_spaces - n; +} + +/* Print N spaces. */ +void +print_spaces_filtered (int n, struct ui_file *stream) +{ + fputs_filtered (n_spaces (n), stream); +} + +/* C++/ObjC demangler stuff. */ + +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + +void +fprintf_symbol_filtered (struct ui_file *stream, char *name, + enum language lang, int arg_mode) +{ + char *demangled; + + if (name != NULL) + { + /* If user wants to see raw output, no problem. */ + if (!demangle) + { + fputs_filtered (name, stream); + } + else + { + demangled = language_demangle (language_def (lang), name, arg_mode); + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + xfree (demangled); + } + } + } +} + +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any + differences in whitespace. Returns 0 if they match, non-zero if they + don't (slightly different than strcmp()'s range of return values). + + As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO". + This "feature" is useful when searching for matching C++ function names + (such as if the user types 'break FOO', where FOO is a mangled C++ + function). */ + +int +strcmp_iw (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0'); +} + +/* This is like strcmp except that it ignores whitespace and treats + '(' as the first non-NULL character in terms of ordering. Like + strcmp (and unlike strcmp_iw), it returns negative if STRING1 < + STRING2, 0 if STRING2 = STRING2, and positive if STRING1 > STRING2 + according to that ordering. + + If a list is sorted according to this function and if you want to + find names in the list that match some fixed NAME according to + strcmp_iw(LIST_ELT, NAME), then the place to start looking is right + where this function would put NAME. + + Here are some examples of why using strcmp to sort is a bad idea: + + Whitespace example: + + Say your partial symtab contains: "foo", "goo". Then, if + we try to do a search for "foo", strcmp will locate this + after "foo" and before "goo". Then lookup_partial_symbol + will start looking at strings beginning with "goo", and will never + see the correct match of "foo". + + Parenthesis example: + + In practice, this is less like to be an issue, but I'll give it a + shot. Let's assume that '$' is a legitimate character to occur in + symbols. (Which may well even be the case on some systems.) Then + say that the partial symbol table contains "foo$" and "foo(int)". + strcmp will put them in this order, since '$' < '('. Now, if the + user searches for "foo", then strcmp will sort "foo" before "foo$". + Then lookup_partial_symbol will notice that strcmp_iw("foo$", + "foo") is false, so it won't proceed to the actual match of + "foo(int)" with "foo". */ + +int +strcmp_iw_ordered (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + + switch (*string1) + { + /* Characters are non-equal unless they're both '\0'; we want to + make sure we get the comparison right according to our + comparison in the cases where one of them is '\0' or '('. */ + case '\0': + if (*string2 == '\0') + return 0; + else + return -1; + case '(': + if (*string2 == '\0') + return 1; + else + return -1; + default: + if (*string2 == '(') + return 1; + else + return *string1 - *string2; + } +} + +/* A simple comparison function with opposite semantics to strcmp. */ + +int +streq (const char *lhs, const char *rhs) +{ + return !strcmp (lhs, rhs); +} + + +/* + ** subset_compare() + ** Answer whether string_to_compare is a full or partial match to + ** template_string. The partial match must be in sequence starting + ** at index 0. + */ +int +subset_compare (char *string_to_compare, char *template_string) +{ + int match; + if (template_string != (char *) NULL && string_to_compare != (char *) NULL + && strlen (string_to_compare) <= strlen (template_string)) + match = + (strncmp + (template_string, string_to_compare, strlen (string_to_compare)) == 0); + else + match = 0; + return match; +} + + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_on_command (char *arg, int from_tty) +{ + pagination_enabled = 1; +} + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_off_command (char *arg, int from_tty) +{ + pagination_enabled = 0; +} + + +void +initialize_utils (void) +{ + struct cmd_list_element *c; + + c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, + "Set number of characters gdb thinks are in a line.", + &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_width_command); + + c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, + "Set number of lines gdb thinks are in a page.", &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_height_command); + + init_page_info (); + + add_show_from_set + (add_set_cmd ("demangle", class_support, var_boolean, + (char *) &demangle, + "Set demangling of encoded C++/ObjC names when displaying symbols.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("pagination", class_support, + var_boolean, (char *) &pagination_enabled, + "Set state of pagination.", &setlist), &showlist); + + if (xdb_commands) + { + add_com ("am", class_support, pagination_on_command, + "Enable pagination"); + add_com ("sm", class_support, pagination_off_command, + "Disable pagination"); + } + + add_show_from_set + (add_set_cmd ("sevenbit-strings", class_support, var_boolean, + (char *) &sevenbit_strings, + "Set printing of 8-bit characters in strings as \\nnn.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("asm-demangle", class_support, var_boolean, + (char *) &asm_demangle, + "Set demangling of C++/ObjC names in disassembly listings.", + &setprintlist), &showprintlist); +} + +/* Machine specific function to handle SIGWINCH signal. */ + +#ifdef SIGWINCH_HANDLER_BODY +SIGWINCH_HANDLER_BODY +#endif +/* print routines to handle variable size regs, etc. */ +/* temporary storage using circular buffer */ +#define NUMCELLS 16 +#define CELLSIZE 32 +static char * +get_cell (void) +{ + static char buf[NUMCELLS][CELLSIZE]; + static int cell = 0; + if (++cell >= NUMCELLS) + cell = 0; + return buf[cell]; +} + +int +strlen_paddr (void) +{ + return (TARGET_ADDR_BIT / 8 * 2); +} + +char * +paddr (CORE_ADDR addr) +{ + return phex (addr, TARGET_ADDR_BIT / 8); +} + +char * +paddr_nz (CORE_ADDR addr) +{ + return phex_nz (addr, TARGET_ADDR_BIT / 8); +} + +static void +decimal2str (char *paddr_str, char *sign, ULONGEST addr) +{ + /* steal code from valprint.c:print_decimal(). Should this worry + about the real size of addr as the above does? */ + unsigned long temp[3]; + int i = 0; + do + { + temp[i] = addr % (1000 * 1000 * 1000); + addr /= (1000 * 1000 * 1000); + i++; + } + while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); + switch (i) + { + case 1: + sprintf (paddr_str, "%s%lu", sign, temp[0]); + break; + case 2: + sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]); + break; + case 3: + sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]); + break; + default: + internal_error (__FILE__, __LINE__, + "failed internal consistency check"); + } +} + +char * +paddr_u (CORE_ADDR addr) +{ + char *paddr_str = get_cell (); + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +char * +paddr_d (LONGEST addr) +{ + char *paddr_str = get_cell (); + if (addr < 0) + decimal2str (paddr_str, "-", -addr); + else + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +/* eliminate warning from compiler on 32-bit systems */ +static int thirty_two = 32; + +char * +phex (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + str = get_cell (); + sprintf (str, "%08lx%08lx", + (unsigned long) (l >> thirty_two), + (unsigned long) (l & 0xffffffff)); + break; + case 4: + str = get_cell (); + sprintf (str, "%08lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%04x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex (l, sizeof (l)); + break; + } + return str; +} + +char * +phex_nz (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + { + unsigned long high = (unsigned long) (l >> thirty_two); + str = get_cell (); + if (high == 0) + sprintf (str, "%lx", (unsigned long) (l & 0xffffffff)); + else + sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff)); + break; + } + case 4: + str = get_cell (); + sprintf (str, "%lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex_nz (l, sizeof (l)); + break; + } + return str; +} + + +/* Convert a CORE_ADDR into a string. */ +const char * +core_addr_to_string (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex (addr, sizeof (addr))); + return str; +} + +const char * +core_addr_to_string_nz (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex_nz (addr, sizeof (addr))); + return str; +} + +/* Convert a string back into a CORE_ADDR. */ +CORE_ADDR +string_to_core_addr (const char *my_string) +{ + CORE_ADDR addr = 0; + if (my_string[0] == '0' && tolower (my_string[1]) == 'x') + { + /* Assume that it is in decimal. */ + int i; + for (i = 2; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 16); + else if (isxdigit (my_string[i])) + addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16); + else + internal_error (__FILE__, __LINE__, "invalid hex"); + } + } + else + { + /* Assume that it is in decimal. */ + int i; + for (i = 0; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 10); + else + internal_error (__FILE__, __LINE__, "invalid decimal"); + } + } + return addr; +} + +char * +gdb_realpath (const char *filename) +{ + /* Method 1: The system has a compile time upper bound on a filename + path. Use that and realpath() to canonicalize the name. This is + the most common case. Note that, if there isn't a compile time + upper bound, you want to avoid realpath() at all costs. */ +#if defined(HAVE_REALPATH) + { +# if defined (PATH_MAX) + char buf[PATH_MAX]; +# define USE_REALPATH +# elif defined (MAXPATHLEN) + char buf[MAXPATHLEN]; +# define USE_REALPATH +# endif +# if defined (USE_REALPATH) + const char *rp = realpath (filename, buf); + if (rp == NULL) + rp = filename; + return xstrdup (rp); +# endif + } +#endif /* HAVE_REALPATH */ + + /* Method 2: The host system (i.e., GNU) has the function + canonicalize_file_name() which malloc's a chunk of memory and + returns that, use that. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) + { + char *rp = canonicalize_file_name (filename); + if (rp == NULL) + return xstrdup (filename); + else + return rp; + } +#endif + + /* FIXME: cagney/2002-11-13: + + Method 2a: Use realpath() with a NULL buffer. Some systems, due + to the problems described in in method 3, have modified their + realpath() implementation so that it will allocate a buffer when + NULL is passed in. Before this can be used, though, some sort of + configure time test would need to be added. Otherwize the code + will likely core dump. */ + + /* Method 3: Now we're getting desperate! The system doesn't have a + compile time buffer size and no alternative function. Query the + OS, using pathconf(), for the buffer limit. Care is needed + though, some systems do not limit PATH_MAX (return -1 for + pathconf()) making it impossible to pass a correctly sized buffer + to realpath() (it could always overflow). On those systems, we + skip this. */ +#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA) + { + /* Find out the max path size. */ + long path_max = pathconf ("/", _PC_PATH_MAX); + if (path_max > 0) + { + /* PATH_MAX is bounded. */ + char *buf = alloca (path_max); + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); + } + } +#endif + + /* This system is a lost cause, just dup the buffer. */ + return xstrdup (filename); +} + +/* Return a copy of FILENAME, with its directory prefix canonicalized + by gdb_realpath. */ + +char * +xfullpath (const char *filename) +{ + const char *base_name = lbasename (filename); + char *dir_name; + char *real_path; + char *result; + + /* Extract the basename of filename, and return immediately + a copy of filename if it does not contain any directory prefix. */ + if (base_name == filename) + return xstrdup (filename); + + dir_name = alloca ((size_t) (base_name - filename + 2)); + /* Allocate enough space to store the dir_name + plus one extra + character sometimes needed under Windows (see below), and + then the closing \000 character */ + strncpy (dir_name, filename, base_name - filename); + dir_name[base_name - filename] = '\000'; + +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + /* We need to be careful when filename is of the form 'd:foo', which + is equivalent of d:./foo, which is totally different from d:/foo. */ + if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') + { + dir_name[2] = '.'; + dir_name[3] = '\000'; + } +#endif + + /* Canonicalize the directory prefix, and build the resulting + filename. If the dirname realpath already contains an ending + directory separator, avoid doubling it. */ + real_path = gdb_realpath (dir_name); + if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) + result = concat (real_path, base_name, NULL); + else + result = concat (real_path, SLASH_STRING, base_name, NULL); + + xfree (real_path); + return result; +} + + +/* This is the 32-bit CRC function used by the GNU separate debug + facility. An executable may contain a section named + .gnu_debuglink, which holds the name of a separate executable file + containing its debug info, and a checksum of that file's contents, + computed using this function. */ +unsigned long +gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) +{ + static const unsigned long crc32_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d + }; + unsigned char *end; + + crc = ~crc & 0xffffffff; + for (end = buf + len; buf < end; ++buf) + crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return ~crc & 0xffffffff;; +} + +ULONGEST +align_up (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v + n - 1) & -n; +} + +ULONGEST +align_down (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v & -n); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/include/obstack.h /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/include/obstack.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/include/obstack.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/include/obstack.h 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,612 @@ +/* obstack.h - object stack macros + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserve + + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@gnu.org. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Summary: + +All the apparent functions defined here are macros. The idea +is that you would use these pre-tested macros to solve a +very specific set of problems, and they would run fast. +Caution: no side-effects in arguments please!! They may be +evaluated MANY times!! + +These macros operate a stack of objects. Each object starts life +small, and may grow to maturity. (Consider building a word syllable +by syllable.) An object can move while it is growing. Once it has +been "finished" it never changes address again. So the "top of the +stack" is typically an immature growing object, while the rest of the +stack is of mature, fixed size and fixed address objects. + +These routines grab large chunks of memory, using a function you +supply, called `obstack_chunk_alloc'. On occasion, they free chunks, +by calling `obstack_chunk_free'. You must define them and declare +them before using any obstack macros. + +Each independent stack is represented by a `struct obstack'. +Each of the obstack macros expects a pointer to such a structure +as the first argument. + +One motivation for this package is the problem of growing char strings +in symbol tables. Unless you are "fascist pig with a read-only mind" +--Gosper's immortal quote from HAKMEM item 154, out of context--you +would not like to put any arbitrary upper limit on the length of your +symbols. + +In practice this often means you will build many short symbols and a +few long symbols. At the time you are reading a symbol you don't know +how long it is. One traditional method is to read a symbol into a +buffer, realloc()ating the buffer every time you try to read a symbol +that is longer than the buffer. This is beaut, but you still will +want to copy the symbol from the buffer to a more permanent +symbol-table entry say about half the time. + +With obstacks, you can work differently. Use one obstack for all symbol +names. As you read a symbol, grow the name in the obstack gradually. +When the name is complete, finalize it. Then, if the symbol exists already, +free the newly read name. + +The way we do this is to take a large chunk, allocating memory from +low addresses. When you want to build a symbol in the chunk you just +add chars above the current "high water mark" in the chunk. When you +have finished adding chars, because you got to the end of the symbol, +you know how long the chars are, and you can create a new object. +Mostly the chars will not burst over the highest address of the chunk, +because you would typically expect a chunk to be (say) 100 times as +long as an average object. + +In case that isn't clear, when we have enough chars to make up +the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) +so we just point to it where it lies. No moving of chars is +needed and this is the second win: potentially long strings need +never be explicitly shuffled. Once an object is formed, it does not +change its address during its lifetime. + +When the chars burst over a chunk boundary, we allocate a larger +chunk, and then copy the partly formed object from the end of the old +chunk to the beginning of the new larger chunk. We then carry on +accreting characters to the end of the object as we normally would. + +A special macro is provided to add a single char at a time to a +growing object. This allows the use of register variables, which +break the ordinary 'growth' macro. + +Summary: + We allocate large chunks. + We carve out one object at a time from the current chunk. + Once carved, an object never moves. + We are free to append data of any size to the currently + growing object. + Exactly one object is growing in an obstack at any one time. + You can run one obstack per control block. + You may have as many control blocks as you dare. + Because of the way we do it, you can `unwind' an obstack + back to a previous state. (You may remove objects much + as you would with a stack.) +*/ + + +/* Don't do the contents of this file more than once. */ + +#ifndef _OBSTACK_H +#define _OBSTACK_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use subtraction of (char *) 0 instead of casting to int + because on word-addressable machines a simple cast to int + may ignore the byte-within-word field of the pointer. */ + +#ifndef __PTR_TO_INT +# define __PTR_TO_INT(P) ((P) - (char *) 0) +#endif + +#ifndef __INT_TO_PTR +# define __INT_TO_PTR(P) ((P) + (char *) 0) +#endif + +/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is + defined, as with GNU C, use that; that way we don't pollute the + namespace with 's symbols. Otherwise, if is + available, include it and use ptrdiff_t. In traditional C, long is + the best that we can do. */ + +#ifdef __PTRDIFF_TYPE__ +# define PTR_INT_TYPE __PTRDIFF_TYPE__ +#else +# ifdef HAVE_STDDEF_H +# include +# define PTR_INT_TYPE ptrdiff_t +# else +# define PTR_INT_TYPE long +# endif +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +# if defined __STDC__ && __STDC__ +# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) +# else +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# endif +#else +# ifdef memcpy +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# else +# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) +# endif +#endif + +struct _obstack_chunk /* Lives at front of each chunk. */ +{ + char *limit; /* 1 past end of this chunk */ + struct _obstack_chunk *prev; /* address of prior chunk or NULL */ + char contents[4]; /* objects begin here */ +}; + +struct obstack /* control current object in current chunk */ +{ + long chunk_size; /* preferred size to allocate chunks in */ + struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ + char *object_base; /* address of object we are building */ + char *next_free; /* where to add next char to current object */ + char *chunk_limit; /* address of char after current chunk */ + PTR_INT_TYPE temp; /* Temporary for some macros. */ + int alignment_mask; /* Mask of alignment for each object. */ +#if defined __STDC__ && __STDC__ + /* These prototypes vary based on `use_extra_arg', and we use + casts to the prototypeless function type in all assignments, + but having prototypes here quiets -Wstrict-prototypes. */ + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#else + struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ + void (*freefun) (); /* User's function to free a chunk. */ + char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#endif + unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ + unsigned maybe_empty_object:1;/* There is a possibility that the current + chunk contains a zero-length object. This + prevents freeing the chunk if we allocate + a bigger chunk to replace it. */ + unsigned alloc_failed:1; /* No longer used, as we now call the failed + handler on error, but retained for binary + compatibility. */ +}; + +/* Declare the external functions we use; they are in obstack.c. */ + +#if defined __STDC__ && __STDC__ +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); +#else +extern void _obstack_newchunk (); +extern void _obstack_free (); +extern int _obstack_begin (); +extern int _obstack_begin_1 (); +extern int _obstack_memory_used (); +#endif + +#if defined __STDC__ && __STDC__ + +/* Do the function-declarations after the structs + but before defining the macros. */ + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + +#endif /* __STDC__ */ + +/* Non-ANSI C cannot really support alternative functions for these macros, + so we do not declare them. */ + +/* Error handler called when `obstack_chunk_alloc' failed to allocate + more memory. This can be set to a user defined function. The + default action is to print a message and abort. */ +#if defined __STDC__ && __STDC__ +extern void (*obstack_alloc_failed_handler) (void); +#else +extern void (*obstack_alloc_failed_handler) (); +#endif + +/* Exit value used when `print_and_abort' is used. */ +extern int obstack_exit_failure; + +/* Pointer to beginning of object being allocated or to be allocated next. + Note that this might not be the final address of the object + because a new chunk might be needed to hold the final size. */ + +#define obstack_base(h) ((h)->object_base) + +/* Size for allocating ordinary chunks. */ + +#define obstack_chunk_size(h) ((h)->chunk_size) + +/* Pointer to next byte not yet allocated in current chunk. */ + +#define obstack_next_free(h) ((h)->next_free) + +/* Mask specifying low bits that should be clear in address of an object. */ + +#define obstack_alignment_mask(h) ((h)->alignment_mask) + +/* To prevent prototype warnings provide complete argument list in + standard C version. */ +#if defined __STDC__ && __STDC__ + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) (void *, long)) (chunkfun), \ + (void (*) (void *, void *)) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) + +#else + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)()) (newfreefun)) + +#endif + +#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + +#define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +#define obstack_memory_used(h) _obstack_memory_used (h) + +#if defined __GNUC__ && defined __STDC__ && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) +# define __extension__ +# endif + +/* For GNU C, if not -traditional, + we can define these macros to compute all args only once + without using a global variable. + Also, we can avoid using the `temp' slot, to make faster code. */ + +# define obstack_object_size(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->next_free - __o->object_base); }) + +# define obstack_room(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->chunk_limit - __o->next_free); }) + +# define obstack_make_room(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + (void) 0; }) + +# define obstack_empty_p(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + +# define obstack_grow(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len > __o->chunk_limit) \ + _obstack_newchunk (__o, __len); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + (void) 0; }) + +# define obstack_grow0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, __len + 1); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + *(__o->next_free)++ = 0; \ + (void) 0; }) + +# define obstack_1grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ + obstack_1grow_fast (__o, datum); \ + (void) 0; }) + +/* These assume that the obstack alignment is good enough for pointers or ints, + and that the data added so far to the current object + shares that much alignment. */ + +# define obstack_ptr_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + obstack_ptr_grow_fast (__o, datum); }) + +# define obstack_int_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ + obstack_int_grow_fast (__o, datum); }) + +# define obstack_ptr_grow_fast(OBSTACK,aptr) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(const void **) __o1->next_free = (aptr); \ + __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +# define obstack_int_grow_fast(OBSTACK,aint) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(int *) __o1->next_free = (aint); \ + __o1->next_free += sizeof (int); \ + (void) 0; }) + +# define obstack_blank(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + obstack_blank_fast (__o, __len); \ + (void) 0; }) + +# define obstack_alloc(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_blank (__h, (length)); \ + obstack_finish (__h); }) + +# define obstack_copy(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow (__h, (where), (length)); \ + obstack_finish (__h); }) + +# define obstack_copy0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow0 (__h, (where), (length)); \ + obstack_finish (__h); }) + +/* The local variable is named __o1 to avoid a name conflict + when obstack_blank is called. */ +# define obstack_finish(OBSTACK) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + void *value; \ + value = (void *) __o1->object_base; \ + if (__o1->next_free == value) \ + __o1->maybe_empty_object = 1; \ + __o1->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ + & ~ (__o1->alignment_mask)); \ + if (__o1->next_free - (char *)__o1->chunk \ + > __o1->chunk_limit - (char *)__o1->chunk) \ + __o1->next_free = __o1->chunk_limit; \ + __o1->object_base = __o1->next_free; \ + value; }) + +# define obstack_free(OBSTACK, OBJ) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + void *__obj = (void *) (OBJ); \ + if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ + __o->next_free = __o->object_base = (char *) __obj; \ + else (obstack_free) (__o, __obj); }) + +#else /* not __GNUC__ or not __STDC__ */ + +# define obstack_object_size(h) \ + (unsigned) ((h)->next_free - (h)->object_base) + +# define obstack_room(h) \ + (unsigned) ((h)->chunk_limit - (h)->next_free) + +# define obstack_empty_p(h) \ + ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + +/* Note that the call to _obstack_newchunk is enclosed in (..., 0) + so that we can avoid having void expressions + in the arms of the conditional expression. + Casting the third operand to void was tried before, + but some compilers won't accept it. */ + +# define obstack_make_room(h,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) + +# define obstack_grow(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp) + +# define obstack_grow0(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp, \ + *((h)->next_free)++ = 0) + +# define obstack_1grow(h,datum) \ +( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ + obstack_1grow_fast (h, datum)) + +# define obstack_ptr_grow(h,datum) \ +( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ + obstack_ptr_grow_fast (h, datum)) + +# define obstack_int_grow(h,datum) \ +( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ + obstack_int_grow_fast (h, datum)) + +# define obstack_ptr_grow_fast(h,aptr) \ + (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +# define obstack_int_grow_fast(h,aint) \ + (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + +# define obstack_blank(h,length) \ +( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + obstack_blank_fast (h, (h)->temp)) + +# define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) + +# define obstack_copy(h,where,length) \ + (obstack_grow ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_copy0(h,where,length) \ + (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_finish(h) \ +( ((h)->next_free == (h)->object_base \ + ? (((h)->maybe_empty_object = 1), 0) \ + : 0), \ + (h)->temp = __PTR_TO_INT ((h)->object_base), \ + (h)->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ + & ~ ((h)->alignment_mask)), \ + (((h)->next_free - (char *) (h)->chunk \ + > (h)->chunk_limit - (char *) (h)->chunk) \ + ? ((h)->next_free = (h)->chunk_limit) : 0), \ + (h)->object_base = (h)->next_free, \ + __INT_TO_PTR ((h)->temp)) + +# if defined __STDC__ && __STDC__ +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) +# else +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) +# endif + +#endif /* not __GNUC__ or not __STDC__ */ + +#ifdef __cplusplus +} /* C++ */ +#endif + +#endif /* obstack.h */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/gdb-6.1/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,23927 @@ + +# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. +# +# Makefile for directory with subdirs to build. +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation +# Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# ------------------------------- +# Standard Autoconf-set variables +# ------------------------------- +VPATH=@srcdir@ + +build_alias=@build_alias@ +build=@build@ +host_alias=@host_alias@ +host=@host@ +target_alias=@target_alias@ +target=@target@ + +program_transform_name = @program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +srcdir = @srcdir@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +includedir = @includedir@ +oldincludedir = @oldincludedir@ +infodir = @infodir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +# ------------------------------------------------- +# Miscellaneous non-standard autoconf-set variables +# ------------------------------------------------- + +links=@configlinks@ +# The file containing GCC's version number. +gcc_version_trigger = @gcc_version_trigger@ +gcc_version = @gcc_version@ + +# The gcc driver likes to know the arguments it was configured with. +TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ + +gxx_include_dir = @gxx_include_dir@ +libstdcxx_incdir = @libstdcxx_incdir@ + +tooldir = @tooldir@ +build_tooldir = @build_tooldir@ + +# Directory in which the compiler finds executables, libraries, etc. +libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) +GDB_NLM_DEPS = + +# This is the name of the environment variable used for the path to +# the libraries. +RPATH_ENVVAR = @RPATH_ENVVAR@ + +# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared +# was used. +SET_LIB_PATH = @SET_LIB_PATH@ + +# configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. +REALLY_SET_LIB_PATH = \ + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + +# This is the list of directories to be built for the build system. +BUILD_CONFIGDIRS = libiberty +# Build programs are put under this directory. +BUILD_SUBDIR = @build_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the build system. +BUILD_CONFIGARGS = @build_configargs@ + +# This is the list of directories to built for the host system. +SUBDIRS = @configdirs@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the host system. +HOST_CONFIGARGS = @host_configargs@ + +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = @target_configdirs@ +# Target libraries are put under this directory: +TARGET_SUBDIR = @target_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the target. +TARGET_CONFIGARGS = @target_configargs@ + +# ---------------------------------------------- +# Programs producing files for the BUILD machine +# ---------------------------------------------- + +SHELL = @config_shell@ + +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) + +# compilers to use to create programs which must be run in the build +# environment. +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + +ifeq ($(ARCH), ppc64) +CFLAGS_FOR_BUILD += -m64 -fPIC +endif + +CXX_FOR_BUILD = $(CXX) + +# Special variables passed down in EXTRA_GCC_FLAGS. They are defined +# here so that they can be overridden by Makefile fragments. +BUILD_PREFIX = @BUILD_PREFIX@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + +BISON=@BISON@ +USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -L $$s/bison/ ; \ + else \ + echo bison ; \ + fi` + +DEFAULT_YACC = @DEFAULT_YACC@ +YACC=@YACC@ +USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -y -L $$s/bison/ ; \ + elif [ -f $$r/byacc/byacc ] ; then \ + echo $$r/byacc/byacc ; \ + else \ + echo ${DEFAULT_YACC} ; \ + fi` + +DEFAULT_LEX = @DEFAULT_LEX@ +LEX=@LEX@ +USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ + then echo $$r/flex/flex ; \ + else echo ${DEFAULT_LEX} ; fi` + +DEFAULT_M4 = @DEFAULT_M4@ +M4 = `if [ -f $$r/m4/m4 ] ; \ + then echo $$r/m4/m4 ; \ + else echo ${DEFAULT_M4} ; fi` + +# For an installed makeinfo, we require it to be from texinfo 4.2 or +# higher, else we use the "missing" dummy. +MAKEINFO=@MAKEINFO@ +USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ + then echo $$r/texinfo/makeinfo/makeinfo ; \ + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` + +# This just becomes part of the MAKEINFO definition passed down to +# sub-makes. It lets flags be given on the command line while still +# using the makeinfo from the object tree. +# (Default to avoid splitting info files by setting the threshold high.) +MAKEINFOFLAGS = --split-size=5000000 + +EXPECT = `if [ -f $$r/expect/expect ] ; \ + then echo $$r/expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ + then echo $$s/dejagnu/runtest ; \ + else echo runtest ; fi` + +# --------------------------------------------- +# Programs producing files for the HOST machine +# --------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +AS = @AS@ + +AR = @AR@ +AR_FLAGS = rc + +CC = @CC@ +CFLAGS = @CFLAGS@ +ifeq ($(ARCH), ppc64) +CFLAGS += -m64 -fPIC +endif +LIBCFLAGS = $(CFLAGS) + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + +DLLTOOL = @DLLTOOL@ + +NM = @NM@ + +LD = @LD@ +LDFLAGS = + +RANLIB = @RANLIB@ + +WINDRES = @WINDRES@ + +PICFLAG = + +# ----------------------------------------------- +# Programs producing files for the TARGET machine +# ----------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: + +FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ + +AR_FOR_TARGET=@AR_FOR_TARGET@ +USUAL_AR_FOR_TARGET = ` \ + if [ -f $$r/binutils/ar ] ; then \ + echo $$r/binutils/ar ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AR); \ + else \ + echo ar | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +AS_FOR_TARGET=@AS_FOR_TARGET@ +USUAL_AS_FOR_TARGET = ` \ + if [ -f $$r/gas/as-new ] ; then \ + echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AS); \ + else \ + echo as | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +CC_FOR_TARGET = @CC_FOR_TARGET@ +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +# If GCC_FOR_TARGET is not overriden on the command line, then this +# variable is passed down to the gcc Makefile, where it is used to +# build libgcc2.a. We define it here so that it can itself be +# overridden on the command line. +GCC_FOR_TARGET=@GCC_FOR_TARGET@ +USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + +CXX_FOR_TARGET = @CXX_FOR_TARGET@ +RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ +USUAL_DLLTOOL_FOR_TARGET = ` \ + if [ -f $$r/binutils/dlltool ] ; then \ + echo $$r/binutils/dlltool ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(DLLTOOL); \ + else \ + echo dlltool | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ + +LD_FOR_TARGET=@LD_FOR_TARGET@ +USUAL_LD_FOR_TARGET = ` \ + if [ -f $$r/ld/ld-new ] ; then \ + echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(LD); \ + else \ + echo ld | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +LDFLAGS_FOR_TARGET = + +NM_FOR_TARGET=@NM_FOR_TARGET@ +USUAL_NM_FOR_TARGET = ` \ + if [ -f $$r/binutils/nm-new ] ; then \ + echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(NM); \ + else \ + echo nm | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +USUAL_RANLIB_FOR_TARGET = ` \ + if [ -f $$r/binutils/ranlib ] ; then \ + echo $$r/binutils/ranlib ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + if [ x'$(RANLIB)' != x ]; then \ + echo $(RANLIB); \ + else \ + echo ranlib; \ + fi; \ + else \ + echo ranlib | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ +USUAL_WINDRES_FOR_TARGET = ` \ + if [ -f $$r/binutils/windres ] ; then \ + echo $$r/binutils/windres ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(WINDRES); \ + else \ + echo windres | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +PICFLAG_FOR_TARGET = + +# ------------------------------------ +# Miscellaneous targets and flag lists +# ------------------------------------ + +# The first rule in the file had better be this one. Don't put any above it. +# This lives here to allow makefile fragments to contain dependencies. +all: all.normal +.PHONY: all + +#### host and target specific makefile fragments come in here. +@target_makefile_frag@ +@alphaieee_frag@ +@ospace_frag@ +@host_makefile_frag@ +### + +# Flags to pass down to all sub-makes. +BASE_FLAGS_TO_PASS = \ + "DESTDIR=$(DESTDIR)" \ + "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ + "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ + "bindir=$(bindir)" \ + "datadir=$(datadir)" \ + "exec_prefix=$(exec_prefix)" \ + "includedir=$(includedir)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "libexecdir=$(libexecdir)" \ + "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ + "localstatedir=$(localstatedir)" \ + "mandir=$(mandir)" \ + "oldincludedir=$(oldincludedir)" \ + "prefix=$(prefix)" \ + "sbindir=$(sbindir)" \ + "sharedstatedir=$(sharedstatedir)" \ + "sysconfdir=$(sysconfdir)" \ + "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "gcc_version=$(gcc_version)" \ + "gcc_version_trigger=$(gcc_version_trigger)" \ + "target_alias=$(target_alias)" \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "SHELL=$(SHELL)" \ + "YACC=$(YACC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ + "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ + "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "CONFIG_SHELL=$(SHELL)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + +# Flags to pass down to most sub-makes, in which we're building with +# the host environment. +EXTRA_HOST_FLAGS = \ + 'AR=$(AR)' \ + 'AS=$(AS)' \ + 'CC=$(CC)' \ + 'CXX=$(CXX)' \ + 'DLLTOOL=$(DLLTOOL)' \ + 'LD=$(LD)' \ + 'NM=$(NM)' \ + 'RANLIB=$(RANLIB)' \ + 'WINDRES=$(WINDRES)' + +FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) + +# Flags that are concerned with the location of the X11 include files +# and library files +# +# NOTE: until the top-level is getting the values via autoconf, it only +# causes problems to have this top-level Makefile overriding the autoconf-set +# values in child directories. Only variables that don't conflict with +# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. +# +X11_FLAGS_TO_PASS = \ + 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ + 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' + +# Flags to pass down to makes which are built with the target environment. +# The double $ decreases the length of the command line; the variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +EXTRA_TARGET_FLAGS = \ + 'AR=$$(AR_FOR_TARGET)' \ + 'AS=$$(AS_FOR_TARGET)' \ + 'CC=$$(CC_FOR_TARGET)' \ + 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ + 'CXX=$$(CXX_FOR_TARGET)' \ + 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ + 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ + 'LD=$$(LD_FOR_TARGET)' \ + 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ + 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ + 'NM=$$(NM_FOR_TARGET)' \ + 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'WINDRES=$$(WINDRES_FOR_TARGET)' + +TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) + +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. +# If any variables are added here, they must be added to do-*, below. +# The BUILD_* variables are a special case, which are used for the gcc +# cross-building scheme. +EXTRA_GCC_FLAGS = \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + +GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) + +.PHONY: configure-host +configure-host: maybe-configure-gcc \ + maybe-configure-ash \ + maybe-configure-autoconf \ + maybe-configure-automake \ + maybe-configure-bash \ + maybe-configure-bfd \ + maybe-configure-opcodes \ + maybe-configure-binutils \ + maybe-configure-bison \ + maybe-configure-byacc \ + maybe-configure-bzip2 \ + maybe-configure-dejagnu \ + maybe-configure-diff \ + maybe-configure-dosutils \ + maybe-configure-etc \ + maybe-configure-fastjar \ + maybe-configure-fileutils \ + maybe-configure-findutils \ + maybe-configure-find \ + maybe-configure-flex \ + maybe-configure-gas \ + maybe-configure-gawk \ + maybe-configure-gettext \ + maybe-configure-gnuserv \ + maybe-configure-gprof \ + maybe-configure-gzip \ + maybe-configure-hello \ + maybe-configure-indent \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ + maybe-configure-ld \ + maybe-configure-libgui \ + maybe-configure-libiberty \ + maybe-configure-libtool \ + maybe-configure-m4 \ + maybe-configure-make \ + maybe-configure-mmalloc \ + maybe-configure-patch \ + maybe-configure-perl \ + maybe-configure-prms \ + maybe-configure-rcs \ + maybe-configure-readline \ + maybe-configure-release \ + maybe-configure-recode \ + maybe-configure-sed \ + maybe-configure-send-pr \ + maybe-configure-shellutils \ + maybe-configure-sid \ + maybe-configure-sim \ + maybe-configure-tar \ + maybe-configure-texinfo \ + maybe-configure-textutils \ + maybe-configure-time \ + maybe-configure-uudecode \ + maybe-configure-wdiff \ + maybe-configure-zip \ + maybe-configure-zlib \ + maybe-configure-gdb \ + maybe-configure-expect \ + maybe-configure-guile \ + maybe-configure-tk \ + maybe-configure-tix \ + maybe-configure-libtermcap \ + maybe-configure-utils +.PHONY: configure-target +configure-target: \ + maybe-configure-target-libstdc++-v3 \ + maybe-configure-target-newlib \ + maybe-configure-target-libf2c \ + maybe-configure-target-libobjc \ + maybe-configure-target-libtermcap \ + maybe-configure-target-winsup \ + maybe-configure-target-libgloss \ + maybe-configure-target-libiberty \ + maybe-configure-target-gperf \ + maybe-configure-target-examples \ + maybe-configure-target-libffi \ + maybe-configure-target-libjava \ + maybe-configure-target-zlib \ + maybe-configure-target-boehm-gc \ + maybe-configure-target-qthreads \ + maybe-configure-target-rda \ + maybe-configure-target-libada + +# The target built for a native build. +.PHONY: all.normal +all.normal: @all_build_modules@ all-host all-target + +.PHONY: all-host +all-host: maybe-all-gcc \ + maybe-all-ash \ + maybe-all-autoconf \ + maybe-all-automake \ + maybe-all-bash \ + maybe-all-bfd \ + maybe-all-opcodes \ + maybe-all-binutils \ + maybe-all-bison \ + maybe-all-byacc \ + maybe-all-bzip2 \ + maybe-all-dejagnu \ + maybe-all-diff \ + maybe-all-dosutils \ + maybe-all-etc \ + maybe-all-fastjar \ + maybe-all-fileutils \ + maybe-all-findutils \ + maybe-all-find \ + maybe-all-flex \ + maybe-all-gas \ + maybe-all-gawk \ + maybe-all-gettext \ + maybe-all-gnuserv \ + maybe-all-gprof \ + maybe-all-gzip \ + maybe-all-hello \ + maybe-all-indent \ + maybe-all-intl \ + maybe-all-tcl \ + maybe-all-itcl \ + maybe-all-ld \ + maybe-all-libgui \ + maybe-all-libiberty \ + maybe-all-libtool \ + maybe-all-m4 \ + maybe-all-make \ + maybe-all-mmalloc \ + maybe-all-patch \ + maybe-all-perl \ + maybe-all-prms \ + maybe-all-rcs \ + maybe-all-readline \ + maybe-all-release \ + maybe-all-recode \ + maybe-all-sed \ + maybe-all-send-pr \ + maybe-all-shellutils \ + maybe-all-sid \ + maybe-all-sim \ + maybe-all-tar \ + maybe-all-texinfo \ + maybe-all-textutils \ + maybe-all-time \ + maybe-all-uudecode \ + maybe-all-wdiff \ + maybe-all-zip \ + maybe-all-zlib \ + maybe-all-gdb \ + maybe-all-expect \ + maybe-all-guile \ + maybe-all-tk \ + maybe-all-tix \ + maybe-all-libtermcap +# maybe-all-utils +.PHONY: all-target +all-target: \ + maybe-all-target-libstdc++-v3 \ + maybe-all-target-newlib \ + maybe-all-target-libf2c \ + maybe-all-target-libobjc \ + maybe-all-target-libtermcap \ + maybe-all-target-winsup \ + maybe-all-target-libgloss \ + maybe-all-target-libiberty \ + maybe-all-target-gperf \ + maybe-all-target-examples \ + maybe-all-target-libffi \ + maybe-all-target-libjava \ + maybe-all-target-zlib \ + maybe-all-target-boehm-gc \ + maybe-all-target-qthreads \ + maybe-all-target-rda \ + maybe-all-target-libada + +# Do a target for all the subdirectories. A ``make do-X'' will do a +# ``make X'' in all subdirectories (because, in general, there is a +# dependency (below) of X upon do-X, a ``make X'' will also do this, +# but it may do additional work as well). + +.PHONY: do-info +do-info: info-host info-target + +.PHONY: info-host +info-host: maybe-info-gcc \ + maybe-info-ash \ + maybe-info-autoconf \ + maybe-info-automake \ + maybe-info-bash \ + maybe-info-bfd \ + maybe-info-opcodes \ + maybe-info-binutils \ + maybe-info-bison \ + maybe-info-byacc \ + maybe-info-bzip2 \ + maybe-info-dejagnu \ + maybe-info-diff \ + maybe-info-dosutils \ + maybe-info-etc \ + maybe-info-fastjar \ + maybe-info-fileutils \ + maybe-info-findutils \ + maybe-info-find \ + maybe-info-flex \ + maybe-info-gas \ + maybe-info-gawk \ + maybe-info-gettext \ + maybe-info-gnuserv \ + maybe-info-gprof \ + maybe-info-gzip \ + maybe-info-hello \ + maybe-info-indent \ + maybe-info-intl \ + maybe-info-tcl \ + maybe-info-itcl \ + maybe-info-ld \ + maybe-info-libgui \ + maybe-info-libiberty \ + maybe-info-libtool \ + maybe-info-m4 \ + maybe-info-make \ + maybe-info-mmalloc \ + maybe-info-patch \ + maybe-info-perl \ + maybe-info-prms \ + maybe-info-rcs \ + maybe-info-readline \ + maybe-info-release \ + maybe-info-recode \ + maybe-info-sed \ + maybe-info-send-pr \ + maybe-info-shellutils \ + maybe-info-sid \ + maybe-info-sim \ + maybe-info-tar \ + maybe-info-texinfo \ + maybe-info-textutils \ + maybe-info-time \ + maybe-info-uudecode \ + maybe-info-wdiff \ + maybe-info-zip \ + maybe-info-zlib \ + maybe-info-gdb \ + maybe-info-expect \ + maybe-info-guile \ + maybe-info-tk \ + maybe-info-tix \ + maybe-info-libtermcap \ + maybe-info-utils + +.PHONY: info-target +info-target: \ + maybe-info-target-libstdc++-v3 \ + maybe-info-target-newlib \ + maybe-info-target-libf2c \ + maybe-info-target-libobjc \ + maybe-info-target-libtermcap \ + maybe-info-target-winsup \ + maybe-info-target-libgloss \ + maybe-info-target-libiberty \ + maybe-info-target-gperf \ + maybe-info-target-examples \ + maybe-info-target-libffi \ + maybe-info-target-libjava \ + maybe-info-target-zlib \ + maybe-info-target-boehm-gc \ + maybe-info-target-qthreads \ + maybe-info-target-rda \ + maybe-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-info-gcc info-gcc +maybe-info-gcc: +info-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-info-ash info-ash +maybe-info-ash: + +info-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-autoconf info-autoconf +maybe-info-autoconf: + +info-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-automake info-automake +maybe-info-automake: + +info-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bash info-bash +maybe-info-bash: + +info-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bfd info-bfd +maybe-info-bfd: + +info-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-opcodes info-opcodes +maybe-info-opcodes: + +info-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-binutils info-binutils +maybe-info-binutils: + +info-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bison info-bison +maybe-info-bison: + +info-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-byacc info-byacc +maybe-info-byacc: + +info-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bzip2 info-bzip2 +maybe-info-bzip2: + +info-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dejagnu info-dejagnu +maybe-info-dejagnu: + +info-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-diff info-diff +maybe-info-diff: + +info-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dosutils info-dosutils +maybe-info-dosutils: + +info-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-etc info-etc +maybe-info-etc: + +info-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fastjar info-fastjar +maybe-info-fastjar: + +info-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fileutils info-fileutils +maybe-info-fileutils: + +info-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-findutils info-findutils +maybe-info-findutils: + +info-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-find info-find +maybe-info-find: + +info-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-flex info-flex +maybe-info-flex: + +info-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gas info-gas +maybe-info-gas: + +info-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gawk info-gawk +maybe-info-gawk: + +info-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gettext info-gettext +maybe-info-gettext: + +info-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gnuserv info-gnuserv +maybe-info-gnuserv: + +info-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: + +info-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gzip info-gzip +maybe-info-gzip: + +info-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-hello info-hello +maybe-info-hello: + +info-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-indent info-indent +maybe-info-indent: + +info-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-intl info-intl +maybe-info-intl: + +info-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tcl info-tcl +maybe-info-tcl: + +info-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-itcl info-itcl +maybe-info-itcl: + +info-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-ld info-ld +maybe-info-ld: + +info-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libgui info-libgui +maybe-info-libgui: + +info-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libiberty info-libiberty +maybe-info-libiberty: + +info-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtool info-libtool +maybe-info-libtool: + +info-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-m4 info-m4 +maybe-info-m4: + +info-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-make info-make +maybe-info-make: + +info-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-mmalloc info-mmalloc +maybe-info-mmalloc: + +info-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-patch info-patch +maybe-info-patch: + +info-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-perl info-perl +maybe-info-perl: + +info-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-prms info-prms +maybe-info-prms: + +info-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-rcs info-rcs +maybe-info-rcs: + +info-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-readline info-readline +maybe-info-readline: + +info-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-release info-release +maybe-info-release: + +info-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-recode info-recode +maybe-info-recode: + +info-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sed info-sed +maybe-info-sed: + +info-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-send-pr info-send-pr +maybe-info-send-pr: + +info-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-shellutils info-shellutils +maybe-info-shellutils: + +info-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sid info-sid +maybe-info-sid: + +info-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sim info-sim +maybe-info-sim: + +info-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tar info-tar +maybe-info-tar: + +info-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-texinfo info-texinfo +maybe-info-texinfo: + +info-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-textutils info-textutils +maybe-info-textutils: + +info-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-time info-time +maybe-info-time: + +info-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-uudecode info-uudecode +maybe-info-uudecode: + +info-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-wdiff info-wdiff +maybe-info-wdiff: + +info-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zip info-zip +maybe-info-zip: + +info-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zlib info-zlib +maybe-info-zlib: + +info-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gdb info-gdb +maybe-info-gdb: + +info-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-expect info-expect +maybe-info-expect: + +info-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-guile info-guile +maybe-info-guile: + +info-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tk info-tk +maybe-info-tk: + +info-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tix info-tix +maybe-info-tix: + +info-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtermcap info-libtermcap +maybe-info-libtermcap: + +info-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-utils info-utils +maybe-info-utils: + +info-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3 +maybe-info-target-libstdc++-v3: + +info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-newlib info-target-newlib +maybe-info-target-newlib: + +info-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libf2c info-target-libf2c +maybe-info-target-libf2c: + +info-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libobjc info-target-libobjc +maybe-info-target-libobjc: + +info-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libtermcap info-target-libtermcap +maybe-info-target-libtermcap: + +info-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-winsup info-target-winsup +maybe-info-target-winsup: + +info-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libgloss info-target-libgloss +maybe-info-target-libgloss: + +info-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libiberty info-target-libiberty +maybe-info-target-libiberty: + +info-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-gperf info-target-gperf +maybe-info-target-gperf: + +info-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-examples info-target-examples +maybe-info-target-examples: + +info-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libffi info-target-libffi +maybe-info-target-libffi: + +info-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libjava info-target-libjava +maybe-info-target-libjava: + +info-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-zlib info-target-zlib +maybe-info-target-zlib: + +info-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc +maybe-info-target-boehm-gc: + +info-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-qthreads info-target-qthreads +maybe-info-target-qthreads: + +info-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-rda info-target-rda +maybe-info-target-rda: + +info-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libada info-target-libada +maybe-info-target-libada: + +info-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +.PHONY: do-dvi +do-dvi: dvi-host dvi-target + +.PHONY: dvi-host +dvi-host: maybe-dvi-gcc \ + maybe-dvi-ash \ + maybe-dvi-autoconf \ + maybe-dvi-automake \ + maybe-dvi-bash \ + maybe-dvi-bfd \ + maybe-dvi-opcodes \ + maybe-dvi-binutils \ + maybe-dvi-bison \ + maybe-dvi-byacc \ + maybe-dvi-bzip2 \ + maybe-dvi-dejagnu \ + maybe-dvi-diff \ + maybe-dvi-dosutils \ + maybe-dvi-etc \ + maybe-dvi-fastjar \ + maybe-dvi-fileutils \ + maybe-dvi-findutils \ + maybe-dvi-find \ + maybe-dvi-flex \ + maybe-dvi-gas \ + maybe-dvi-gawk \ + maybe-dvi-gettext \ + maybe-dvi-gnuserv \ + maybe-dvi-gprof \ + maybe-dvi-gzip \ + maybe-dvi-hello \ + maybe-dvi-indent \ + maybe-dvi-intl \ + maybe-dvi-tcl \ + maybe-dvi-itcl \ + maybe-dvi-ld \ + maybe-dvi-libgui \ + maybe-dvi-libiberty \ + maybe-dvi-libtool \ + maybe-dvi-m4 \ + maybe-dvi-make \ + maybe-dvi-mmalloc \ + maybe-dvi-patch \ + maybe-dvi-perl \ + maybe-dvi-prms \ + maybe-dvi-rcs \ + maybe-dvi-readline \ + maybe-dvi-release \ + maybe-dvi-recode \ + maybe-dvi-sed \ + maybe-dvi-send-pr \ + maybe-dvi-shellutils \ + maybe-dvi-sid \ + maybe-dvi-sim \ + maybe-dvi-tar \ + maybe-dvi-texinfo \ + maybe-dvi-textutils \ + maybe-dvi-time \ + maybe-dvi-uudecode \ + maybe-dvi-wdiff \ + maybe-dvi-zip \ + maybe-dvi-zlib \ + maybe-dvi-gdb \ + maybe-dvi-expect \ + maybe-dvi-guile \ + maybe-dvi-tk \ + maybe-dvi-tix \ + maybe-dvi-libtermcap \ + maybe-dvi-utils + +.PHONY: dvi-target +dvi-target: \ + maybe-dvi-target-libstdc++-v3 \ + maybe-dvi-target-newlib \ + maybe-dvi-target-libf2c \ + maybe-dvi-target-libobjc \ + maybe-dvi-target-libtermcap \ + maybe-dvi-target-winsup \ + maybe-dvi-target-libgloss \ + maybe-dvi-target-libiberty \ + maybe-dvi-target-gperf \ + maybe-dvi-target-examples \ + maybe-dvi-target-libffi \ + maybe-dvi-target-libjava \ + maybe-dvi-target-zlib \ + maybe-dvi-target-boehm-gc \ + maybe-dvi-target-qthreads \ + maybe-dvi-target-rda \ + maybe-dvi-target-libada + +# GCC, the eternal special case +.PHONY: maybe-dvi-gcc dvi-gcc +maybe-dvi-gcc: +dvi-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-dvi-ash dvi-ash +maybe-dvi-ash: + +dvi-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-autoconf dvi-autoconf +maybe-dvi-autoconf: + +dvi-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-automake dvi-automake +maybe-dvi-automake: + +dvi-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bash dvi-bash +maybe-dvi-bash: + +dvi-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bfd dvi-bfd +maybe-dvi-bfd: + +dvi-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-opcodes dvi-opcodes +maybe-dvi-opcodes: + +dvi-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-binutils dvi-binutils +maybe-dvi-binutils: + +dvi-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bison dvi-bison +maybe-dvi-bison: + +dvi-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-byacc dvi-byacc +maybe-dvi-byacc: + +dvi-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bzip2 dvi-bzip2 +maybe-dvi-bzip2: + +dvi-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dejagnu dvi-dejagnu +maybe-dvi-dejagnu: + +dvi-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-diff dvi-diff +maybe-dvi-diff: + +dvi-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dosutils dvi-dosutils +maybe-dvi-dosutils: + +dvi-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-etc dvi-etc +maybe-dvi-etc: + +dvi-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fastjar dvi-fastjar +maybe-dvi-fastjar: + +dvi-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fileutils dvi-fileutils +maybe-dvi-fileutils: + +dvi-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-findutils dvi-findutils +maybe-dvi-findutils: + +dvi-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-find dvi-find +maybe-dvi-find: + +dvi-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-flex dvi-flex +maybe-dvi-flex: + +dvi-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gas dvi-gas +maybe-dvi-gas: + +dvi-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gawk dvi-gawk +maybe-dvi-gawk: + +dvi-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gettext dvi-gettext +maybe-dvi-gettext: + +dvi-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gnuserv dvi-gnuserv +maybe-dvi-gnuserv: + +dvi-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: + +dvi-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gzip dvi-gzip +maybe-dvi-gzip: + +dvi-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-hello dvi-hello +maybe-dvi-hello: + +dvi-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-indent dvi-indent +maybe-dvi-indent: + +dvi-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-intl dvi-intl +maybe-dvi-intl: + +dvi-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tcl dvi-tcl +maybe-dvi-tcl: + +dvi-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-itcl dvi-itcl +maybe-dvi-itcl: + +dvi-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-ld dvi-ld +maybe-dvi-ld: + +dvi-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libgui dvi-libgui +maybe-dvi-libgui: + +dvi-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libiberty dvi-libiberty +maybe-dvi-libiberty: + +dvi-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtool dvi-libtool +maybe-dvi-libtool: + +dvi-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-m4 dvi-m4 +maybe-dvi-m4: + +dvi-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-make dvi-make +maybe-dvi-make: + +dvi-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-mmalloc dvi-mmalloc +maybe-dvi-mmalloc: + +dvi-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-patch dvi-patch +maybe-dvi-patch: + +dvi-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-perl dvi-perl +maybe-dvi-perl: + +dvi-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-prms dvi-prms +maybe-dvi-prms: + +dvi-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-rcs dvi-rcs +maybe-dvi-rcs: + +dvi-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-readline dvi-readline +maybe-dvi-readline: + +dvi-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-release dvi-release +maybe-dvi-release: + +dvi-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-recode dvi-recode +maybe-dvi-recode: + +dvi-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sed dvi-sed +maybe-dvi-sed: + +dvi-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-send-pr dvi-send-pr +maybe-dvi-send-pr: + +dvi-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-shellutils dvi-shellutils +maybe-dvi-shellutils: + +dvi-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sid dvi-sid +maybe-dvi-sid: + +dvi-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sim dvi-sim +maybe-dvi-sim: + +dvi-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tar dvi-tar +maybe-dvi-tar: + +dvi-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-texinfo dvi-texinfo +maybe-dvi-texinfo: + +dvi-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-textutils dvi-textutils +maybe-dvi-textutils: + +dvi-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-time dvi-time +maybe-dvi-time: + +dvi-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-uudecode dvi-uudecode +maybe-dvi-uudecode: + +dvi-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-wdiff dvi-wdiff +maybe-dvi-wdiff: + +dvi-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zip dvi-zip +maybe-dvi-zip: + +dvi-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zlib dvi-zlib +maybe-dvi-zlib: + +dvi-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gdb dvi-gdb +maybe-dvi-gdb: + +dvi-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-expect dvi-expect +maybe-dvi-expect: + +dvi-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-guile dvi-guile +maybe-dvi-guile: + +dvi-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tk dvi-tk +maybe-dvi-tk: + +dvi-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tix dvi-tix +maybe-dvi-tix: + +dvi-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtermcap dvi-libtermcap +maybe-dvi-libtermcap: + +dvi-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-utils dvi-utils +maybe-dvi-utils: + +dvi-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3 +maybe-dvi-target-libstdc++-v3: + +dvi-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-newlib dvi-target-newlib +maybe-dvi-target-newlib: + +dvi-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c +maybe-dvi-target-libf2c: + +dvi-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc +maybe-dvi-target-libobjc: + +dvi-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap +maybe-dvi-target-libtermcap: + +dvi-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-winsup dvi-target-winsup +maybe-dvi-target-winsup: + +dvi-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss +maybe-dvi-target-libgloss: + +dvi-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty +maybe-dvi-target-libiberty: + +dvi-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-gperf dvi-target-gperf +maybe-dvi-target-gperf: + +dvi-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-examples dvi-target-examples +maybe-dvi-target-examples: + +dvi-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libffi dvi-target-libffi +maybe-dvi-target-libffi: + +dvi-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libjava dvi-target-libjava +maybe-dvi-target-libjava: + +dvi-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-zlib dvi-target-zlib +maybe-dvi-target-zlib: + +dvi-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc +maybe-dvi-target-boehm-gc: + +dvi-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads +maybe-dvi-target-qthreads: + +dvi-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-rda dvi-target-rda +maybe-dvi-target-rda: + +dvi-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libada dvi-target-libada +maybe-dvi-target-libada: + +dvi-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +.PHONY: do-TAGS +do-TAGS: TAGS-host TAGS-target + +.PHONY: TAGS-host +TAGS-host: maybe-TAGS-gcc \ + maybe-TAGS-ash \ + maybe-TAGS-autoconf \ + maybe-TAGS-automake \ + maybe-TAGS-bash \ + maybe-TAGS-bfd \ + maybe-TAGS-opcodes \ + maybe-TAGS-binutils \ + maybe-TAGS-bison \ + maybe-TAGS-byacc \ + maybe-TAGS-bzip2 \ + maybe-TAGS-dejagnu \ + maybe-TAGS-diff \ + maybe-TAGS-dosutils \ + maybe-TAGS-etc \ + maybe-TAGS-fastjar \ + maybe-TAGS-fileutils \ + maybe-TAGS-findutils \ + maybe-TAGS-find \ + maybe-TAGS-flex \ + maybe-TAGS-gas \ + maybe-TAGS-gawk \ + maybe-TAGS-gettext \ + maybe-TAGS-gnuserv \ + maybe-TAGS-gprof \ + maybe-TAGS-gzip \ + maybe-TAGS-hello \ + maybe-TAGS-indent \ + maybe-TAGS-intl \ + maybe-TAGS-tcl \ + maybe-TAGS-itcl \ + maybe-TAGS-ld \ + maybe-TAGS-libgui \ + maybe-TAGS-libiberty \ + maybe-TAGS-libtool \ + maybe-TAGS-m4 \ + maybe-TAGS-make \ + maybe-TAGS-mmalloc \ + maybe-TAGS-patch \ + maybe-TAGS-perl \ + maybe-TAGS-prms \ + maybe-TAGS-rcs \ + maybe-TAGS-readline \ + maybe-TAGS-release \ + maybe-TAGS-recode \ + maybe-TAGS-sed \ + maybe-TAGS-send-pr \ + maybe-TAGS-shellutils \ + maybe-TAGS-sid \ + maybe-TAGS-sim \ + maybe-TAGS-tar \ + maybe-TAGS-texinfo \ + maybe-TAGS-textutils \ + maybe-TAGS-time \ + maybe-TAGS-uudecode \ + maybe-TAGS-wdiff \ + maybe-TAGS-zip \ + maybe-TAGS-zlib \ + maybe-TAGS-gdb \ + maybe-TAGS-expect \ + maybe-TAGS-guile \ + maybe-TAGS-tk \ + maybe-TAGS-tix \ + maybe-TAGS-libtermcap \ + maybe-TAGS-utils + +.PHONY: TAGS-target +TAGS-target: \ + maybe-TAGS-target-libstdc++-v3 \ + maybe-TAGS-target-newlib \ + maybe-TAGS-target-libf2c \ + maybe-TAGS-target-libobjc \ + maybe-TAGS-target-libtermcap \ + maybe-TAGS-target-winsup \ + maybe-TAGS-target-libgloss \ + maybe-TAGS-target-libiberty \ + maybe-TAGS-target-gperf \ + maybe-TAGS-target-examples \ + maybe-TAGS-target-libffi \ + maybe-TAGS-target-libjava \ + maybe-TAGS-target-zlib \ + maybe-TAGS-target-boehm-gc \ + maybe-TAGS-target-qthreads \ + maybe-TAGS-target-rda \ + maybe-TAGS-target-libada + +# GCC, the eternal special case +.PHONY: maybe-TAGS-gcc TAGS-gcc +maybe-TAGS-gcc: +TAGS-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-TAGS-ash TAGS-ash +maybe-TAGS-ash: + +TAGS-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-autoconf TAGS-autoconf +maybe-TAGS-autoconf: + +TAGS-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-automake TAGS-automake +maybe-TAGS-automake: + +TAGS-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bash TAGS-bash +maybe-TAGS-bash: + +TAGS-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bfd TAGS-bfd +maybe-TAGS-bfd: + +TAGS-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-opcodes TAGS-opcodes +maybe-TAGS-opcodes: + +TAGS-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-binutils TAGS-binutils +maybe-TAGS-binutils: + +TAGS-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bison TAGS-bison +maybe-TAGS-bison: + +TAGS-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-byacc TAGS-byacc +maybe-TAGS-byacc: + +TAGS-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bzip2 TAGS-bzip2 +maybe-TAGS-bzip2: + +TAGS-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu +maybe-TAGS-dejagnu: + +TAGS-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-diff TAGS-diff +maybe-TAGS-diff: + +TAGS-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dosutils TAGS-dosutils +maybe-TAGS-dosutils: + +TAGS-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-etc TAGS-etc +maybe-TAGS-etc: + +TAGS-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fastjar TAGS-fastjar +maybe-TAGS-fastjar: + +TAGS-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fileutils TAGS-fileutils +maybe-TAGS-fileutils: + +TAGS-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-findutils TAGS-findutils +maybe-TAGS-findutils: + +TAGS-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-find TAGS-find +maybe-TAGS-find: + +TAGS-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-flex TAGS-flex +maybe-TAGS-flex: + +TAGS-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gas TAGS-gas +maybe-TAGS-gas: + +TAGS-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gawk TAGS-gawk +maybe-TAGS-gawk: + +TAGS-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gettext TAGS-gettext +maybe-TAGS-gettext: + +TAGS-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv +maybe-TAGS-gnuserv: + +TAGS-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: + +TAGS-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gzip TAGS-gzip +maybe-TAGS-gzip: + +TAGS-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-hello TAGS-hello +maybe-TAGS-hello: + +TAGS-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-indent TAGS-indent +maybe-TAGS-indent: + +TAGS-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-intl TAGS-intl +maybe-TAGS-intl: + +TAGS-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tcl TAGS-tcl +maybe-TAGS-tcl: + +TAGS-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-itcl TAGS-itcl +maybe-TAGS-itcl: + +TAGS-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-ld TAGS-ld +maybe-TAGS-ld: + +TAGS-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libgui TAGS-libgui +maybe-TAGS-libgui: + +TAGS-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libiberty TAGS-libiberty +maybe-TAGS-libiberty: + +TAGS-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtool TAGS-libtool +maybe-TAGS-libtool: + +TAGS-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-m4 TAGS-m4 +maybe-TAGS-m4: + +TAGS-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-make TAGS-make +maybe-TAGS-make: + +TAGS-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc +maybe-TAGS-mmalloc: + +TAGS-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-patch TAGS-patch +maybe-TAGS-patch: + +TAGS-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-perl TAGS-perl +maybe-TAGS-perl: + +TAGS-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-prms TAGS-prms +maybe-TAGS-prms: + +TAGS-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-rcs TAGS-rcs +maybe-TAGS-rcs: + +TAGS-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-readline TAGS-readline +maybe-TAGS-readline: + +TAGS-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-release TAGS-release +maybe-TAGS-release: + +TAGS-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-recode TAGS-recode +maybe-TAGS-recode: + +TAGS-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sed TAGS-sed +maybe-TAGS-sed: + +TAGS-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-send-pr TAGS-send-pr +maybe-TAGS-send-pr: + +TAGS-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-shellutils TAGS-shellutils +maybe-TAGS-shellutils: + +TAGS-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sid TAGS-sid +maybe-TAGS-sid: + +TAGS-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sim TAGS-sim +maybe-TAGS-sim: + +TAGS-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tar TAGS-tar +maybe-TAGS-tar: + +TAGS-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-texinfo TAGS-texinfo +maybe-TAGS-texinfo: + +TAGS-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-textutils TAGS-textutils +maybe-TAGS-textutils: + +TAGS-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-time TAGS-time +maybe-TAGS-time: + +TAGS-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-uudecode TAGS-uudecode +maybe-TAGS-uudecode: + +TAGS-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-wdiff TAGS-wdiff +maybe-TAGS-wdiff: + +TAGS-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zip TAGS-zip +maybe-TAGS-zip: + +TAGS-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zlib TAGS-zlib +maybe-TAGS-zlib: + +TAGS-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gdb TAGS-gdb +maybe-TAGS-gdb: + +TAGS-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-expect TAGS-expect +maybe-TAGS-expect: + +TAGS-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-guile TAGS-guile +maybe-TAGS-guile: + +TAGS-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tk TAGS-tk +maybe-TAGS-tk: + +TAGS-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tix TAGS-tix +maybe-TAGS-tix: + +TAGS-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap +maybe-TAGS-libtermcap: + +TAGS-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-utils TAGS-utils +maybe-TAGS-utils: + +TAGS-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3 +maybe-TAGS-target-libstdc++-v3: + +TAGS-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib +maybe-TAGS-target-newlib: + +TAGS-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c +maybe-TAGS-target-libf2c: + +TAGS-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc +maybe-TAGS-target-libobjc: + +TAGS-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap +maybe-TAGS-target-libtermcap: + +TAGS-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup +maybe-TAGS-target-winsup: + +TAGS-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss +maybe-TAGS-target-libgloss: + +TAGS-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty +maybe-TAGS-target-libiberty: + +TAGS-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf +maybe-TAGS-target-gperf: + +TAGS-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-examples TAGS-target-examples +maybe-TAGS-target-examples: + +TAGS-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi +maybe-TAGS-target-libffi: + +TAGS-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava +maybe-TAGS-target-libjava: + +TAGS-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib +maybe-TAGS-target-zlib: + +TAGS-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc +maybe-TAGS-target-boehm-gc: + +TAGS-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads +maybe-TAGS-target-qthreads: + +TAGS-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-rda TAGS-target-rda +maybe-TAGS-target-rda: + +TAGS-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libada TAGS-target-libada +maybe-TAGS-target-libada: + +TAGS-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +.PHONY: do-install-info +do-install-info: install-info-host install-info-target + +.PHONY: install-info-host +install-info-host: maybe-install-info-gcc \ + maybe-install-info-ash \ + maybe-install-info-autoconf \ + maybe-install-info-automake \ + maybe-install-info-bash \ + maybe-install-info-bfd \ + maybe-install-info-opcodes \ + maybe-install-info-binutils \ + maybe-install-info-bison \ + maybe-install-info-byacc \ + maybe-install-info-bzip2 \ + maybe-install-info-dejagnu \ + maybe-install-info-diff \ + maybe-install-info-dosutils \ + maybe-install-info-etc \ + maybe-install-info-fastjar \ + maybe-install-info-fileutils \ + maybe-install-info-findutils \ + maybe-install-info-find \ + maybe-install-info-flex \ + maybe-install-info-gas \ + maybe-install-info-gawk \ + maybe-install-info-gettext \ + maybe-install-info-gnuserv \ + maybe-install-info-gprof \ + maybe-install-info-gzip \ + maybe-install-info-hello \ + maybe-install-info-indent \ + maybe-install-info-intl \ + maybe-install-info-tcl \ + maybe-install-info-itcl \ + maybe-install-info-ld \ + maybe-install-info-libgui \ + maybe-install-info-libiberty \ + maybe-install-info-libtool \ + maybe-install-info-m4 \ + maybe-install-info-make \ + maybe-install-info-mmalloc \ + maybe-install-info-patch \ + maybe-install-info-perl \ + maybe-install-info-prms \ + maybe-install-info-rcs \ + maybe-install-info-readline \ + maybe-install-info-release \ + maybe-install-info-recode \ + maybe-install-info-sed \ + maybe-install-info-send-pr \ + maybe-install-info-shellutils \ + maybe-install-info-sid \ + maybe-install-info-sim \ + maybe-install-info-tar \ + maybe-install-info-texinfo \ + maybe-install-info-textutils \ + maybe-install-info-time \ + maybe-install-info-uudecode \ + maybe-install-info-wdiff \ + maybe-install-info-zip \ + maybe-install-info-zlib \ + maybe-install-info-gdb \ + maybe-install-info-expect \ + maybe-install-info-guile \ + maybe-install-info-tk \ + maybe-install-info-tix \ + maybe-install-info-libtermcap \ + maybe-install-info-utils + +.PHONY: install-info-target +install-info-target: \ + maybe-install-info-target-libstdc++-v3 \ + maybe-install-info-target-newlib \ + maybe-install-info-target-libf2c \ + maybe-install-info-target-libobjc \ + maybe-install-info-target-libtermcap \ + maybe-install-info-target-winsup \ + maybe-install-info-target-libgloss \ + maybe-install-info-target-libiberty \ + maybe-install-info-target-gperf \ + maybe-install-info-target-examples \ + maybe-install-info-target-libffi \ + maybe-install-info-target-libjava \ + maybe-install-info-target-zlib \ + maybe-install-info-target-boehm-gc \ + maybe-install-info-target-qthreads \ + maybe-install-info-target-rda \ + maybe-install-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-install-info-gcc install-info-gcc +maybe-install-info-gcc: +install-info-gcc: \ + configure-gcc \ + info-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-install-info-ash install-info-ash +maybe-install-info-ash: + +install-info-ash: \ + configure-ash \ + info-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-autoconf install-info-autoconf +maybe-install-info-autoconf: + +install-info-autoconf: \ + configure-autoconf \ + info-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-automake install-info-automake +maybe-install-info-automake: + +install-info-automake: \ + configure-automake \ + info-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bash install-info-bash +maybe-install-info-bash: + +install-info-bash: \ + configure-bash \ + info-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bfd install-info-bfd +maybe-install-info-bfd: + +install-info-bfd: \ + configure-bfd \ + info-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-opcodes install-info-opcodes +maybe-install-info-opcodes: + +install-info-opcodes: \ + configure-opcodes \ + info-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-binutils install-info-binutils +maybe-install-info-binutils: + +install-info-binutils: \ + configure-binutils \ + info-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bison install-info-bison +maybe-install-info-bison: + +install-info-bison: \ + configure-bison \ + info-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-byacc install-info-byacc +maybe-install-info-byacc: + +install-info-byacc: \ + configure-byacc \ + info-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bzip2 install-info-bzip2 +maybe-install-info-bzip2: + +install-info-bzip2: \ + configure-bzip2 \ + info-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dejagnu install-info-dejagnu +maybe-install-info-dejagnu: + +install-info-dejagnu: \ + configure-dejagnu \ + info-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-diff install-info-diff +maybe-install-info-diff: + +install-info-diff: \ + configure-diff \ + info-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dosutils install-info-dosutils +maybe-install-info-dosutils: + +install-info-dosutils: \ + configure-dosutils \ + info-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-etc install-info-etc +maybe-install-info-etc: + +install-info-etc: \ + configure-etc \ + info-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fastjar install-info-fastjar +maybe-install-info-fastjar: + +install-info-fastjar: \ + configure-fastjar \ + info-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fileutils install-info-fileutils +maybe-install-info-fileutils: + +install-info-fileutils: \ + configure-fileutils \ + info-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-findutils install-info-findutils +maybe-install-info-findutils: + +install-info-findutils: \ + configure-findutils \ + info-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-find install-info-find +maybe-install-info-find: + +install-info-find: \ + configure-find \ + info-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-flex install-info-flex +maybe-install-info-flex: + +install-info-flex: \ + configure-flex \ + info-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gas install-info-gas +maybe-install-info-gas: + +install-info-gas: \ + configure-gas \ + info-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gawk install-info-gawk +maybe-install-info-gawk: + +install-info-gawk: \ + configure-gawk \ + info-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gettext install-info-gettext +maybe-install-info-gettext: + +install-info-gettext: \ + configure-gettext \ + info-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gnuserv install-info-gnuserv +maybe-install-info-gnuserv: + +install-info-gnuserv: \ + configure-gnuserv \ + info-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: + +install-info-gprof: \ + configure-gprof \ + info-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gzip install-info-gzip +maybe-install-info-gzip: + +install-info-gzip: \ + configure-gzip \ + info-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-hello install-info-hello +maybe-install-info-hello: + +install-info-hello: \ + configure-hello \ + info-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-indent install-info-indent +maybe-install-info-indent: + +install-info-indent: \ + configure-indent \ + info-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-intl install-info-intl +maybe-install-info-intl: + +install-info-intl: \ + configure-intl \ + info-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tcl install-info-tcl +maybe-install-info-tcl: + +install-info-tcl: \ + configure-tcl \ + info-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-itcl install-info-itcl +maybe-install-info-itcl: + +install-info-itcl: \ + configure-itcl \ + info-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-ld install-info-ld +maybe-install-info-ld: + +install-info-ld: \ + configure-ld \ + info-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libgui install-info-libgui +maybe-install-info-libgui: + +install-info-libgui: \ + configure-libgui \ + info-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libiberty install-info-libiberty +maybe-install-info-libiberty: + +install-info-libiberty: \ + configure-libiberty \ + info-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtool install-info-libtool +maybe-install-info-libtool: + +install-info-libtool: \ + configure-libtool \ + info-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-m4 install-info-m4 +maybe-install-info-m4: + +install-info-m4: \ + configure-m4 \ + info-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-make install-info-make +maybe-install-info-make: + +install-info-make: \ + configure-make \ + info-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-mmalloc install-info-mmalloc +maybe-install-info-mmalloc: + +install-info-mmalloc: \ + configure-mmalloc \ + info-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-patch install-info-patch +maybe-install-info-patch: + +install-info-patch: \ + configure-patch \ + info-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-perl install-info-perl +maybe-install-info-perl: + +install-info-perl: \ + configure-perl \ + info-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-prms install-info-prms +maybe-install-info-prms: + +install-info-prms: \ + configure-prms \ + info-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-rcs install-info-rcs +maybe-install-info-rcs: + +install-info-rcs: \ + configure-rcs \ + info-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-readline install-info-readline +maybe-install-info-readline: + +install-info-readline: \ + configure-readline \ + info-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-release install-info-release +maybe-install-info-release: + +install-info-release: \ + configure-release \ + info-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-recode install-info-recode +maybe-install-info-recode: + +install-info-recode: \ + configure-recode \ + info-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sed install-info-sed +maybe-install-info-sed: + +install-info-sed: \ + configure-sed \ + info-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-send-pr install-info-send-pr +maybe-install-info-send-pr: + +install-info-send-pr: \ + configure-send-pr \ + info-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-shellutils install-info-shellutils +maybe-install-info-shellutils: + +install-info-shellutils: \ + configure-shellutils \ + info-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sid install-info-sid +maybe-install-info-sid: + +install-info-sid: \ + configure-sid \ + info-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sim install-info-sim +maybe-install-info-sim: + +install-info-sim: \ + configure-sim \ + info-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tar install-info-tar +maybe-install-info-tar: + +install-info-tar: \ + configure-tar \ + info-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-texinfo install-info-texinfo +maybe-install-info-texinfo: + +install-info-texinfo: \ + configure-texinfo \ + info-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-textutils install-info-textutils +maybe-install-info-textutils: + +install-info-textutils: \ + configure-textutils \ + info-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-time install-info-time +maybe-install-info-time: + +install-info-time: \ + configure-time \ + info-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-uudecode install-info-uudecode +maybe-install-info-uudecode: + +install-info-uudecode: \ + configure-uudecode \ + info-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-wdiff install-info-wdiff +maybe-install-info-wdiff: + +install-info-wdiff: \ + configure-wdiff \ + info-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zip install-info-zip +maybe-install-info-zip: + +install-info-zip: \ + configure-zip \ + info-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zlib install-info-zlib +maybe-install-info-zlib: + +install-info-zlib: \ + configure-zlib \ + info-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gdb install-info-gdb +maybe-install-info-gdb: + +install-info-gdb: \ + configure-gdb \ + info-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-expect install-info-expect +maybe-install-info-expect: + +install-info-expect: \ + configure-expect \ + info-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-guile install-info-guile +maybe-install-info-guile: + +install-info-guile: \ + configure-guile \ + info-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tk install-info-tk +maybe-install-info-tk: + +install-info-tk: \ + configure-tk \ + info-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tix install-info-tix +maybe-install-info-tix: + +install-info-tix: \ + configure-tix \ + info-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtermcap install-info-libtermcap +maybe-install-info-libtermcap: + +install-info-libtermcap: \ + configure-libtermcap \ + info-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-utils install-info-utils +maybe-install-info-utils: + +install-info-utils: \ + configure-utils \ + info-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3 +maybe-install-info-target-libstdc++-v3: + +install-info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 \ + info-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-newlib install-info-target-newlib +maybe-install-info-target-newlib: + +install-info-target-newlib: \ + configure-target-newlib \ + info-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c +maybe-install-info-target-libf2c: + +install-info-target-libf2c: \ + configure-target-libf2c \ + info-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc +maybe-install-info-target-libobjc: + +install-info-target-libobjc: \ + configure-target-libobjc \ + info-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap +maybe-install-info-target-libtermcap: + +install-info-target-libtermcap: \ + configure-target-libtermcap \ + info-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-winsup install-info-target-winsup +maybe-install-info-target-winsup: + +install-info-target-winsup: \ + configure-target-winsup \ + info-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss +maybe-install-info-target-libgloss: + +install-info-target-libgloss: \ + configure-target-libgloss \ + info-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty +maybe-install-info-target-libiberty: + +install-info-target-libiberty: \ + configure-target-libiberty \ + info-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-gperf install-info-target-gperf +maybe-install-info-target-gperf: + +install-info-target-gperf: \ + configure-target-gperf \ + info-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-examples install-info-target-examples +maybe-install-info-target-examples: + +install-info-target-examples: \ + configure-target-examples \ + info-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libffi install-info-target-libffi +maybe-install-info-target-libffi: + +install-info-target-libffi: \ + configure-target-libffi \ + info-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libjava install-info-target-libjava +maybe-install-info-target-libjava: + +install-info-target-libjava: \ + configure-target-libjava \ + info-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-zlib install-info-target-zlib +maybe-install-info-target-zlib: + +install-info-target-zlib: \ + configure-target-zlib \ + info-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc +maybe-install-info-target-boehm-gc: + +install-info-target-boehm-gc: \ + configure-target-boehm-gc \ + info-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads +maybe-install-info-target-qthreads: + +install-info-target-qthreads: \ + configure-target-qthreads \ + info-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-rda install-info-target-rda +maybe-install-info-target-rda: + +install-info-target-rda: \ + configure-target-rda \ + info-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libada install-info-target-libada +maybe-install-info-target-libada: + +install-info-target-libada: \ + configure-target-libada \ + info-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +.PHONY: do-installcheck +do-installcheck: installcheck-host installcheck-target + +.PHONY: installcheck-host +installcheck-host: maybe-installcheck-gcc \ + maybe-installcheck-ash \ + maybe-installcheck-autoconf \ + maybe-installcheck-automake \ + maybe-installcheck-bash \ + maybe-installcheck-bfd \ + maybe-installcheck-opcodes \ + maybe-installcheck-binutils \ + maybe-installcheck-bison \ + maybe-installcheck-byacc \ + maybe-installcheck-bzip2 \ + maybe-installcheck-dejagnu \ + maybe-installcheck-diff \ + maybe-installcheck-dosutils \ + maybe-installcheck-etc \ + maybe-installcheck-fastjar \ + maybe-installcheck-fileutils \ + maybe-installcheck-findutils \ + maybe-installcheck-find \ + maybe-installcheck-flex \ + maybe-installcheck-gas \ + maybe-installcheck-gawk \ + maybe-installcheck-gettext \ + maybe-installcheck-gnuserv \ + maybe-installcheck-gprof \ + maybe-installcheck-gzip \ + maybe-installcheck-hello \ + maybe-installcheck-indent \ + maybe-installcheck-intl \ + maybe-installcheck-tcl \ + maybe-installcheck-itcl \ + maybe-installcheck-ld \ + maybe-installcheck-libgui \ + maybe-installcheck-libiberty \ + maybe-installcheck-libtool \ + maybe-installcheck-m4 \ + maybe-installcheck-make \ + maybe-installcheck-mmalloc \ + maybe-installcheck-patch \ + maybe-installcheck-perl \ + maybe-installcheck-prms \ + maybe-installcheck-rcs \ + maybe-installcheck-readline \ + maybe-installcheck-release \ + maybe-installcheck-recode \ + maybe-installcheck-sed \ + maybe-installcheck-send-pr \ + maybe-installcheck-shellutils \ + maybe-installcheck-sid \ + maybe-installcheck-sim \ + maybe-installcheck-tar \ + maybe-installcheck-texinfo \ + maybe-installcheck-textutils \ + maybe-installcheck-time \ + maybe-installcheck-uudecode \ + maybe-installcheck-wdiff \ + maybe-installcheck-zip \ + maybe-installcheck-zlib \ + maybe-installcheck-gdb \ + maybe-installcheck-expect \ + maybe-installcheck-guile \ + maybe-installcheck-tk \ + maybe-installcheck-tix \ + maybe-installcheck-libtermcap \ + maybe-installcheck-utils + +.PHONY: installcheck-target +installcheck-target: \ + maybe-installcheck-target-libstdc++-v3 \ + maybe-installcheck-target-newlib \ + maybe-installcheck-target-libf2c \ + maybe-installcheck-target-libobjc \ + maybe-installcheck-target-libtermcap \ + maybe-installcheck-target-winsup \ + maybe-installcheck-target-libgloss \ + maybe-installcheck-target-libiberty \ + maybe-installcheck-target-gperf \ + maybe-installcheck-target-examples \ + maybe-installcheck-target-libffi \ + maybe-installcheck-target-libjava \ + maybe-installcheck-target-zlib \ + maybe-installcheck-target-boehm-gc \ + maybe-installcheck-target-qthreads \ + maybe-installcheck-target-rda \ + maybe-installcheck-target-libada + +# GCC, the eternal special case +.PHONY: maybe-installcheck-gcc installcheck-gcc +maybe-installcheck-gcc: +installcheck-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-installcheck-ash installcheck-ash +maybe-installcheck-ash: + +installcheck-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-autoconf installcheck-autoconf +maybe-installcheck-autoconf: + +installcheck-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-automake installcheck-automake +maybe-installcheck-automake: + +installcheck-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bash installcheck-bash +maybe-installcheck-bash: + +installcheck-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bfd installcheck-bfd +maybe-installcheck-bfd: + +installcheck-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-opcodes installcheck-opcodes +maybe-installcheck-opcodes: + +installcheck-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-binutils installcheck-binutils +maybe-installcheck-binutils: + +installcheck-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bison installcheck-bison +maybe-installcheck-bison: + +installcheck-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-byacc installcheck-byacc +maybe-installcheck-byacc: + +installcheck-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bzip2 installcheck-bzip2 +maybe-installcheck-bzip2: + +installcheck-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu +maybe-installcheck-dejagnu: + +installcheck-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-diff installcheck-diff +maybe-installcheck-diff: + +installcheck-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dosutils installcheck-dosutils +maybe-installcheck-dosutils: + +installcheck-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-etc installcheck-etc +maybe-installcheck-etc: + +installcheck-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fastjar installcheck-fastjar +maybe-installcheck-fastjar: + +installcheck-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fileutils installcheck-fileutils +maybe-installcheck-fileutils: + +installcheck-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-findutils installcheck-findutils +maybe-installcheck-findutils: + +installcheck-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-find installcheck-find +maybe-installcheck-find: + +installcheck-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-flex installcheck-flex +maybe-installcheck-flex: + +installcheck-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gas installcheck-gas +maybe-installcheck-gas: + +installcheck-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gawk installcheck-gawk +maybe-installcheck-gawk: + +installcheck-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gettext installcheck-gettext +maybe-installcheck-gettext: + +installcheck-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv +maybe-installcheck-gnuserv: + +installcheck-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: + +installcheck-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gzip installcheck-gzip +maybe-installcheck-gzip: + +installcheck-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-hello installcheck-hello +maybe-installcheck-hello: + +installcheck-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-indent installcheck-indent +maybe-installcheck-indent: + +installcheck-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-intl installcheck-intl +maybe-installcheck-intl: + +installcheck-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tcl installcheck-tcl +maybe-installcheck-tcl: + +installcheck-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-itcl installcheck-itcl +maybe-installcheck-itcl: + +installcheck-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-ld installcheck-ld +maybe-installcheck-ld: + +installcheck-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libgui installcheck-libgui +maybe-installcheck-libgui: + +installcheck-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libiberty installcheck-libiberty +maybe-installcheck-libiberty: + +installcheck-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtool installcheck-libtool +maybe-installcheck-libtool: + +installcheck-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-m4 installcheck-m4 +maybe-installcheck-m4: + +installcheck-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-make installcheck-make +maybe-installcheck-make: + +installcheck-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc +maybe-installcheck-mmalloc: + +installcheck-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-patch installcheck-patch +maybe-installcheck-patch: + +installcheck-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-perl installcheck-perl +maybe-installcheck-perl: + +installcheck-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-prms installcheck-prms +maybe-installcheck-prms: + +installcheck-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-rcs installcheck-rcs +maybe-installcheck-rcs: + +installcheck-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-readline installcheck-readline +maybe-installcheck-readline: + +installcheck-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-release installcheck-release +maybe-installcheck-release: + +installcheck-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-recode installcheck-recode +maybe-installcheck-recode: + +installcheck-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sed installcheck-sed +maybe-installcheck-sed: + +installcheck-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-send-pr installcheck-send-pr +maybe-installcheck-send-pr: + +installcheck-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-shellutils installcheck-shellutils +maybe-installcheck-shellutils: + +installcheck-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sid installcheck-sid +maybe-installcheck-sid: + +installcheck-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sim installcheck-sim +maybe-installcheck-sim: + +installcheck-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tar installcheck-tar +maybe-installcheck-tar: + +installcheck-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-texinfo installcheck-texinfo +maybe-installcheck-texinfo: + +installcheck-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-textutils installcheck-textutils +maybe-installcheck-textutils: + +installcheck-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-time installcheck-time +maybe-installcheck-time: + +installcheck-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-uudecode installcheck-uudecode +maybe-installcheck-uudecode: + +installcheck-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-wdiff installcheck-wdiff +maybe-installcheck-wdiff: + +installcheck-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zip installcheck-zip +maybe-installcheck-zip: + +installcheck-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zlib installcheck-zlib +maybe-installcheck-zlib: + +installcheck-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gdb installcheck-gdb +maybe-installcheck-gdb: + +installcheck-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-expect installcheck-expect +maybe-installcheck-expect: + +installcheck-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-guile installcheck-guile +maybe-installcheck-guile: + +installcheck-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tk installcheck-tk +maybe-installcheck-tk: + +installcheck-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tix installcheck-tix +maybe-installcheck-tix: + +installcheck-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap +maybe-installcheck-libtermcap: + +installcheck-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-utils installcheck-utils +maybe-installcheck-utils: + +installcheck-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3 +maybe-installcheck-target-libstdc++-v3: + +installcheck-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib +maybe-installcheck-target-newlib: + +installcheck-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c +maybe-installcheck-target-libf2c: + +installcheck-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc +maybe-installcheck-target-libobjc: + +installcheck-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap +maybe-installcheck-target-libtermcap: + +installcheck-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup +maybe-installcheck-target-winsup: + +installcheck-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss +maybe-installcheck-target-libgloss: + +installcheck-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty +maybe-installcheck-target-libiberty: + +installcheck-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf +maybe-installcheck-target-gperf: + +installcheck-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-examples installcheck-target-examples +maybe-installcheck-target-examples: + +installcheck-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi +maybe-installcheck-target-libffi: + +installcheck-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava +maybe-installcheck-target-libjava: + +installcheck-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib +maybe-installcheck-target-zlib: + +installcheck-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc +maybe-installcheck-target-boehm-gc: + +installcheck-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads +maybe-installcheck-target-qthreads: + +installcheck-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-rda installcheck-target-rda +maybe-installcheck-target-rda: + +installcheck-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libada installcheck-target-libada +maybe-installcheck-target-libada: + +installcheck-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +.PHONY: do-mostlyclean +do-mostlyclean: mostlyclean-host mostlyclean-target + +.PHONY: mostlyclean-host +mostlyclean-host: maybe-mostlyclean-gcc \ + maybe-mostlyclean-ash \ + maybe-mostlyclean-autoconf \ + maybe-mostlyclean-automake \ + maybe-mostlyclean-bash \ + maybe-mostlyclean-bfd \ + maybe-mostlyclean-opcodes \ + maybe-mostlyclean-binutils \ + maybe-mostlyclean-bison \ + maybe-mostlyclean-byacc \ + maybe-mostlyclean-bzip2 \ + maybe-mostlyclean-dejagnu \ + maybe-mostlyclean-diff \ + maybe-mostlyclean-dosutils \ + maybe-mostlyclean-etc \ + maybe-mostlyclean-fastjar \ + maybe-mostlyclean-fileutils \ + maybe-mostlyclean-findutils \ + maybe-mostlyclean-find \ + maybe-mostlyclean-flex \ + maybe-mostlyclean-gas \ + maybe-mostlyclean-gawk \ + maybe-mostlyclean-gettext \ + maybe-mostlyclean-gnuserv \ + maybe-mostlyclean-gprof \ + maybe-mostlyclean-gzip \ + maybe-mostlyclean-hello \ + maybe-mostlyclean-indent \ + maybe-mostlyclean-intl \ + maybe-mostlyclean-tcl \ + maybe-mostlyclean-itcl \ + maybe-mostlyclean-ld \ + maybe-mostlyclean-libgui \ + maybe-mostlyclean-libiberty \ + maybe-mostlyclean-libtool \ + maybe-mostlyclean-m4 \ + maybe-mostlyclean-make \ + maybe-mostlyclean-mmalloc \ + maybe-mostlyclean-patch \ + maybe-mostlyclean-perl \ + maybe-mostlyclean-prms \ + maybe-mostlyclean-rcs \ + maybe-mostlyclean-readline \ + maybe-mostlyclean-release \ + maybe-mostlyclean-recode \ + maybe-mostlyclean-sed \ + maybe-mostlyclean-send-pr \ + maybe-mostlyclean-shellutils \ + maybe-mostlyclean-sid \ + maybe-mostlyclean-sim \ + maybe-mostlyclean-tar \ + maybe-mostlyclean-texinfo \ + maybe-mostlyclean-textutils \ + maybe-mostlyclean-time \ + maybe-mostlyclean-uudecode \ + maybe-mostlyclean-wdiff \ + maybe-mostlyclean-zip \ + maybe-mostlyclean-zlib \ + maybe-mostlyclean-gdb \ + maybe-mostlyclean-expect \ + maybe-mostlyclean-guile \ + maybe-mostlyclean-tk \ + maybe-mostlyclean-tix \ + maybe-mostlyclean-libtermcap \ + maybe-mostlyclean-utils + +.PHONY: mostlyclean-target +mostlyclean-target: \ + maybe-mostlyclean-target-libstdc++-v3 \ + maybe-mostlyclean-target-newlib \ + maybe-mostlyclean-target-libf2c \ + maybe-mostlyclean-target-libobjc \ + maybe-mostlyclean-target-libtermcap \ + maybe-mostlyclean-target-winsup \ + maybe-mostlyclean-target-libgloss \ + maybe-mostlyclean-target-libiberty \ + maybe-mostlyclean-target-gperf \ + maybe-mostlyclean-target-examples \ + maybe-mostlyclean-target-libffi \ + maybe-mostlyclean-target-libjava \ + maybe-mostlyclean-target-zlib \ + maybe-mostlyclean-target-boehm-gc \ + maybe-mostlyclean-target-qthreads \ + maybe-mostlyclean-target-rda \ + maybe-mostlyclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc +maybe-mostlyclean-gcc: +mostlyclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-mostlyclean-ash mostlyclean-ash +maybe-mostlyclean-ash: + +mostlyclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf +maybe-mostlyclean-autoconf: + +mostlyclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-automake mostlyclean-automake +maybe-mostlyclean-automake: + +mostlyclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bash mostlyclean-bash +maybe-mostlyclean-bash: + +mostlyclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd +maybe-mostlyclean-bfd: + +mostlyclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes +maybe-mostlyclean-opcodes: + +mostlyclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils +maybe-mostlyclean-binutils: + +mostlyclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bison mostlyclean-bison +maybe-mostlyclean-bison: + +mostlyclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc +maybe-mostlyclean-byacc: + +mostlyclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2 +maybe-mostlyclean-bzip2: + +mostlyclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu +maybe-mostlyclean-dejagnu: + +mostlyclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-diff mostlyclean-diff +maybe-mostlyclean-diff: + +mostlyclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils +maybe-mostlyclean-dosutils: + +mostlyclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-etc mostlyclean-etc +maybe-mostlyclean-etc: + +mostlyclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar +maybe-mostlyclean-fastjar: + +mostlyclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils +maybe-mostlyclean-fileutils: + +mostlyclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils +maybe-mostlyclean-findutils: + +mostlyclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-find mostlyclean-find +maybe-mostlyclean-find: + +mostlyclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-flex mostlyclean-flex +maybe-mostlyclean-flex: + +mostlyclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gas mostlyclean-gas +maybe-mostlyclean-gas: + +mostlyclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk +maybe-mostlyclean-gawk: + +mostlyclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext +maybe-mostlyclean-gettext: + +mostlyclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv +maybe-mostlyclean-gnuserv: + +mostlyclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: + +mostlyclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip +maybe-mostlyclean-gzip: + +mostlyclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-hello mostlyclean-hello +maybe-mostlyclean-hello: + +mostlyclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-indent mostlyclean-indent +maybe-mostlyclean-indent: + +mostlyclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-intl mostlyclean-intl +maybe-mostlyclean-intl: + +mostlyclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl +maybe-mostlyclean-tcl: + +# tcl doesn't support mostlyclean. +mostlyclean-tcl: + + +.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl +maybe-mostlyclean-itcl: + +mostlyclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-ld mostlyclean-ld +maybe-mostlyclean-ld: + +mostlyclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui +maybe-mostlyclean-libgui: + +mostlyclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty +maybe-mostlyclean-libiberty: + +mostlyclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool +maybe-mostlyclean-libtool: + +mostlyclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-m4 mostlyclean-m4 +maybe-mostlyclean-m4: + +mostlyclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-make mostlyclean-make +maybe-mostlyclean-make: + +mostlyclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc +maybe-mostlyclean-mmalloc: + +mostlyclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-patch mostlyclean-patch +maybe-mostlyclean-patch: + +mostlyclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-perl mostlyclean-perl +maybe-mostlyclean-perl: + +mostlyclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-prms mostlyclean-prms +maybe-mostlyclean-prms: + +mostlyclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs +maybe-mostlyclean-rcs: + +mostlyclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-readline mostlyclean-readline +maybe-mostlyclean-readline: + +mostlyclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-release mostlyclean-release +maybe-mostlyclean-release: + +mostlyclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-recode mostlyclean-recode +maybe-mostlyclean-recode: + +mostlyclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sed mostlyclean-sed +maybe-mostlyclean-sed: + +mostlyclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr +maybe-mostlyclean-send-pr: + +mostlyclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils +maybe-mostlyclean-shellutils: + +mostlyclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sid mostlyclean-sid +maybe-mostlyclean-sid: + +mostlyclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sim mostlyclean-sim +maybe-mostlyclean-sim: + +mostlyclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tar mostlyclean-tar +maybe-mostlyclean-tar: + +mostlyclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo +maybe-mostlyclean-texinfo: + +mostlyclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils +maybe-mostlyclean-textutils: + +mostlyclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-time mostlyclean-time +maybe-mostlyclean-time: + +mostlyclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode +maybe-mostlyclean-uudecode: + +mostlyclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff +maybe-mostlyclean-wdiff: + +mostlyclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zip mostlyclean-zip +maybe-mostlyclean-zip: + +mostlyclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib +maybe-mostlyclean-zlib: + +mostlyclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb +maybe-mostlyclean-gdb: + +mostlyclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-expect mostlyclean-expect +maybe-mostlyclean-expect: + +mostlyclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-guile mostlyclean-guile +maybe-mostlyclean-guile: + +mostlyclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tk mostlyclean-tk +maybe-mostlyclean-tk: + +mostlyclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tix mostlyclean-tix +maybe-mostlyclean-tix: + +mostlyclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap +maybe-mostlyclean-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-libtermcap: + + +.PHONY: maybe-mostlyclean-utils mostlyclean-utils +maybe-mostlyclean-utils: + +mostlyclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3 +maybe-mostlyclean-target-libstdc++-v3: + +mostlyclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib +maybe-mostlyclean-target-newlib: + +mostlyclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c +maybe-mostlyclean-target-libf2c: + +mostlyclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc +maybe-mostlyclean-target-libobjc: + +mostlyclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap +maybe-mostlyclean-target-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-target-libtermcap: + + +.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup +maybe-mostlyclean-target-winsup: + +mostlyclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss +maybe-mostlyclean-target-libgloss: + +mostlyclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty +maybe-mostlyclean-target-libiberty: + +mostlyclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf +maybe-mostlyclean-target-gperf: + +mostlyclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples +maybe-mostlyclean-target-examples: + +mostlyclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi +maybe-mostlyclean-target-libffi: + +mostlyclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava +maybe-mostlyclean-target-libjava: + +mostlyclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib +maybe-mostlyclean-target-zlib: + +mostlyclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc +maybe-mostlyclean-target-boehm-gc: + +mostlyclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads +maybe-mostlyclean-target-qthreads: + +mostlyclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda +maybe-mostlyclean-target-rda: + +mostlyclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada +maybe-mostlyclean-target-libada: + +mostlyclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +.PHONY: do-clean +do-clean: clean-host clean-target + +.PHONY: clean-host +clean-host: maybe-clean-gcc \ + maybe-clean-ash \ + maybe-clean-autoconf \ + maybe-clean-automake \ + maybe-clean-bash \ + maybe-clean-bfd \ + maybe-clean-opcodes \ + maybe-clean-binutils \ + maybe-clean-bison \ + maybe-clean-byacc \ + maybe-clean-bzip2 \ + maybe-clean-dejagnu \ + maybe-clean-diff \ + maybe-clean-dosutils \ + maybe-clean-etc \ + maybe-clean-fastjar \ + maybe-clean-fileutils \ + maybe-clean-findutils \ + maybe-clean-find \ + maybe-clean-flex \ + maybe-clean-gas \ + maybe-clean-gawk \ + maybe-clean-gettext \ + maybe-clean-gnuserv \ + maybe-clean-gprof \ + maybe-clean-gzip \ + maybe-clean-hello \ + maybe-clean-indent \ + maybe-clean-intl \ + maybe-clean-tcl \ + maybe-clean-itcl \ + maybe-clean-ld \ + maybe-clean-libgui \ + maybe-clean-libiberty \ + maybe-clean-libtool \ + maybe-clean-m4 \ + maybe-clean-make \ + maybe-clean-mmalloc \ + maybe-clean-patch \ + maybe-clean-perl \ + maybe-clean-prms \ + maybe-clean-rcs \ + maybe-clean-readline \ + maybe-clean-release \ + maybe-clean-recode \ + maybe-clean-sed \ + maybe-clean-send-pr \ + maybe-clean-shellutils \ + maybe-clean-sid \ + maybe-clean-sim \ + maybe-clean-tar \ + maybe-clean-texinfo \ + maybe-clean-textutils \ + maybe-clean-time \ + maybe-clean-uudecode \ + maybe-clean-wdiff \ + maybe-clean-zip \ + maybe-clean-zlib \ + maybe-clean-gdb \ + maybe-clean-expect \ + maybe-clean-guile \ + maybe-clean-tk \ + maybe-clean-tix \ + maybe-clean-libtermcap \ + maybe-clean-utils + +.PHONY: clean-target +clean-target: \ + maybe-clean-target-libstdc++-v3 \ + maybe-clean-target-newlib \ + maybe-clean-target-libf2c \ + maybe-clean-target-libobjc \ + maybe-clean-target-libtermcap \ + maybe-clean-target-winsup \ + maybe-clean-target-libgloss \ + maybe-clean-target-libiberty \ + maybe-clean-target-gperf \ + maybe-clean-target-examples \ + maybe-clean-target-libffi \ + maybe-clean-target-libjava \ + maybe-clean-target-zlib \ + maybe-clean-target-boehm-gc \ + maybe-clean-target-qthreads \ + maybe-clean-target-rda \ + maybe-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-clean-gcc clean-gcc +maybe-clean-gcc: +clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-clean-ash clean-ash +maybe-clean-ash: + +clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-autoconf clean-autoconf +maybe-clean-autoconf: + +clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-automake clean-automake +maybe-clean-automake: + +clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bash clean-bash +maybe-clean-bash: + +clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bfd clean-bfd +maybe-clean-bfd: + +clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-opcodes clean-opcodes +maybe-clean-opcodes: + +clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-binutils clean-binutils +maybe-clean-binutils: + +clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bison clean-bison +maybe-clean-bison: + +clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-byacc clean-byacc +maybe-clean-byacc: + +clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bzip2 clean-bzip2 +maybe-clean-bzip2: + +clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dejagnu clean-dejagnu +maybe-clean-dejagnu: + +clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-diff clean-diff +maybe-clean-diff: + +clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dosutils clean-dosutils +maybe-clean-dosutils: + +clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-etc clean-etc +maybe-clean-etc: + +clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fastjar clean-fastjar +maybe-clean-fastjar: + +clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fileutils clean-fileutils +maybe-clean-fileutils: + +clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-findutils clean-findutils +maybe-clean-findutils: + +clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-find clean-find +maybe-clean-find: + +clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-flex clean-flex +maybe-clean-flex: + +clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gas clean-gas +maybe-clean-gas: + +clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gawk clean-gawk +maybe-clean-gawk: + +clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gettext clean-gettext +maybe-clean-gettext: + +clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gnuserv clean-gnuserv +maybe-clean-gnuserv: + +clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: + +clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gzip clean-gzip +maybe-clean-gzip: + +clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-hello clean-hello +maybe-clean-hello: + +clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-indent clean-indent +maybe-clean-indent: + +clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-intl clean-intl +maybe-clean-intl: + +clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tcl clean-tcl +maybe-clean-tcl: + +clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-itcl clean-itcl +maybe-clean-itcl: + +clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-ld clean-ld +maybe-clean-ld: + +clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libgui clean-libgui +maybe-clean-libgui: + +clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libiberty clean-libiberty +maybe-clean-libiberty: + +clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtool clean-libtool +maybe-clean-libtool: + +clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-m4 clean-m4 +maybe-clean-m4: + +clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-make clean-make +maybe-clean-make: + +clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-mmalloc clean-mmalloc +maybe-clean-mmalloc: + +clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-patch clean-patch +maybe-clean-patch: + +clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-perl clean-perl +maybe-clean-perl: + +clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-prms clean-prms +maybe-clean-prms: + +clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-rcs clean-rcs +maybe-clean-rcs: + +clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-readline clean-readline +maybe-clean-readline: + +clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-release clean-release +maybe-clean-release: + +clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-recode clean-recode +maybe-clean-recode: + +clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sed clean-sed +maybe-clean-sed: + +clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-send-pr clean-send-pr +maybe-clean-send-pr: + +clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-shellutils clean-shellutils +maybe-clean-shellutils: + +clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sid clean-sid +maybe-clean-sid: + +clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sim clean-sim +maybe-clean-sim: + +clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tar clean-tar +maybe-clean-tar: + +clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-texinfo clean-texinfo +maybe-clean-texinfo: + +clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-textutils clean-textutils +maybe-clean-textutils: + +clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-time clean-time +maybe-clean-time: + +clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-uudecode clean-uudecode +maybe-clean-uudecode: + +clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-wdiff clean-wdiff +maybe-clean-wdiff: + +clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zip clean-zip +maybe-clean-zip: + +clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zlib clean-zlib +maybe-clean-zlib: + +clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gdb clean-gdb +maybe-clean-gdb: + +clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-expect clean-expect +maybe-clean-expect: + +clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-guile clean-guile +maybe-clean-guile: + +clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tk clean-tk +maybe-clean-tk: + +clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tix clean-tix +maybe-clean-tix: + +clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtermcap clean-libtermcap +maybe-clean-libtermcap: + +# libtermcap doesn't support clean. +clean-libtermcap: + + +.PHONY: maybe-clean-utils clean-utils +maybe-clean-utils: + +clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3 +maybe-clean-target-libstdc++-v3: + +clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-newlib clean-target-newlib +maybe-clean-target-newlib: + +clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libf2c clean-target-libf2c +maybe-clean-target-libf2c: + +clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libobjc clean-target-libobjc +maybe-clean-target-libobjc: + +clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap +maybe-clean-target-libtermcap: + +# libtermcap doesn't support clean. +clean-target-libtermcap: + + +.PHONY: maybe-clean-target-winsup clean-target-winsup +maybe-clean-target-winsup: + +clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libgloss clean-target-libgloss +maybe-clean-target-libgloss: + +clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libiberty clean-target-libiberty +maybe-clean-target-libiberty: + +clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-gperf clean-target-gperf +maybe-clean-target-gperf: + +clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-examples clean-target-examples +maybe-clean-target-examples: + +clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libffi clean-target-libffi +maybe-clean-target-libffi: + +clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libjava clean-target-libjava +maybe-clean-target-libjava: + +clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-zlib clean-target-zlib +maybe-clean-target-zlib: + +clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc +maybe-clean-target-boehm-gc: + +clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-qthreads clean-target-qthreads +maybe-clean-target-qthreads: + +clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-rda clean-target-rda +maybe-clean-target-rda: + +clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libada clean-target-libada +maybe-clean-target-libada: + +clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +.PHONY: do-distclean +do-distclean: distclean-host distclean-target + +.PHONY: distclean-host +distclean-host: maybe-distclean-gcc \ + maybe-distclean-ash \ + maybe-distclean-autoconf \ + maybe-distclean-automake \ + maybe-distclean-bash \ + maybe-distclean-bfd \ + maybe-distclean-opcodes \ + maybe-distclean-binutils \ + maybe-distclean-bison \ + maybe-distclean-byacc \ + maybe-distclean-bzip2 \ + maybe-distclean-dejagnu \ + maybe-distclean-diff \ + maybe-distclean-dosutils \ + maybe-distclean-etc \ + maybe-distclean-fastjar \ + maybe-distclean-fileutils \ + maybe-distclean-findutils \ + maybe-distclean-find \ + maybe-distclean-flex \ + maybe-distclean-gas \ + maybe-distclean-gawk \ + maybe-distclean-gettext \ + maybe-distclean-gnuserv \ + maybe-distclean-gprof \ + maybe-distclean-gzip \ + maybe-distclean-hello \ + maybe-distclean-indent \ + maybe-distclean-intl \ + maybe-distclean-tcl \ + maybe-distclean-itcl \ + maybe-distclean-ld \ + maybe-distclean-libgui \ + maybe-distclean-libiberty \ + maybe-distclean-libtool \ + maybe-distclean-m4 \ + maybe-distclean-make \ + maybe-distclean-mmalloc \ + maybe-distclean-patch \ + maybe-distclean-perl \ + maybe-distclean-prms \ + maybe-distclean-rcs \ + maybe-distclean-readline \ + maybe-distclean-release \ + maybe-distclean-recode \ + maybe-distclean-sed \ + maybe-distclean-send-pr \ + maybe-distclean-shellutils \ + maybe-distclean-sid \ + maybe-distclean-sim \ + maybe-distclean-tar \ + maybe-distclean-texinfo \ + maybe-distclean-textutils \ + maybe-distclean-time \ + maybe-distclean-uudecode \ + maybe-distclean-wdiff \ + maybe-distclean-zip \ + maybe-distclean-zlib \ + maybe-distclean-gdb \ + maybe-distclean-expect \ + maybe-distclean-guile \ + maybe-distclean-tk \ + maybe-distclean-tix \ + maybe-distclean-libtermcap \ + maybe-distclean-utils + +.PHONY: distclean-target +distclean-target: \ + maybe-distclean-target-libstdc++-v3 \ + maybe-distclean-target-newlib \ + maybe-distclean-target-libf2c \ + maybe-distclean-target-libobjc \ + maybe-distclean-target-libtermcap \ + maybe-distclean-target-winsup \ + maybe-distclean-target-libgloss \ + maybe-distclean-target-libiberty \ + maybe-distclean-target-gperf \ + maybe-distclean-target-examples \ + maybe-distclean-target-libffi \ + maybe-distclean-target-libjava \ + maybe-distclean-target-zlib \ + maybe-distclean-target-boehm-gc \ + maybe-distclean-target-qthreads \ + maybe-distclean-target-rda \ + maybe-distclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-distclean-gcc distclean-gcc +maybe-distclean-gcc: +distclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-distclean-ash distclean-ash +maybe-distclean-ash: + +distclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-autoconf distclean-autoconf +maybe-distclean-autoconf: + +distclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-automake distclean-automake +maybe-distclean-automake: + +distclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bash distclean-bash +maybe-distclean-bash: + +distclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bfd distclean-bfd +maybe-distclean-bfd: + +distclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-opcodes distclean-opcodes +maybe-distclean-opcodes: + +distclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-binutils distclean-binutils +maybe-distclean-binutils: + +distclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bison distclean-bison +maybe-distclean-bison: + +distclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-byacc distclean-byacc +maybe-distclean-byacc: + +distclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bzip2 distclean-bzip2 +maybe-distclean-bzip2: + +distclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dejagnu distclean-dejagnu +maybe-distclean-dejagnu: + +distclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-diff distclean-diff +maybe-distclean-diff: + +distclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dosutils distclean-dosutils +maybe-distclean-dosutils: + +distclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-etc distclean-etc +maybe-distclean-etc: + +distclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fastjar distclean-fastjar +maybe-distclean-fastjar: + +distclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fileutils distclean-fileutils +maybe-distclean-fileutils: + +distclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-findutils distclean-findutils +maybe-distclean-findutils: + +distclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-find distclean-find +maybe-distclean-find: + +distclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-flex distclean-flex +maybe-distclean-flex: + +distclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gas distclean-gas +maybe-distclean-gas: + +distclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gawk distclean-gawk +maybe-distclean-gawk: + +distclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gettext distclean-gettext +maybe-distclean-gettext: + +distclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gnuserv distclean-gnuserv +maybe-distclean-gnuserv: + +distclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: + +distclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gzip distclean-gzip +maybe-distclean-gzip: + +distclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-hello distclean-hello +maybe-distclean-hello: + +distclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-indent distclean-indent +maybe-distclean-indent: + +distclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-intl distclean-intl +maybe-distclean-intl: + +distclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tcl distclean-tcl +maybe-distclean-tcl: + +distclean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-itcl distclean-itcl +maybe-distclean-itcl: + +distclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-ld distclean-ld +maybe-distclean-ld: + +distclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libgui distclean-libgui +maybe-distclean-libgui: + +distclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libiberty distclean-libiberty +maybe-distclean-libiberty: + +distclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtool distclean-libtool +maybe-distclean-libtool: + +distclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-m4 distclean-m4 +maybe-distclean-m4: + +distclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-make distclean-make +maybe-distclean-make: + +distclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-mmalloc distclean-mmalloc +maybe-distclean-mmalloc: + +distclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-patch distclean-patch +maybe-distclean-patch: + +distclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-perl distclean-perl +maybe-distclean-perl: + +distclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-prms distclean-prms +maybe-distclean-prms: + +distclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-rcs distclean-rcs +maybe-distclean-rcs: + +distclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-readline distclean-readline +maybe-distclean-readline: + +distclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-release distclean-release +maybe-distclean-release: + +distclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-recode distclean-recode +maybe-distclean-recode: + +distclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sed distclean-sed +maybe-distclean-sed: + +distclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-send-pr distclean-send-pr +maybe-distclean-send-pr: + +distclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-shellutils distclean-shellutils +maybe-distclean-shellutils: + +distclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sid distclean-sid +maybe-distclean-sid: + +distclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sim distclean-sim +maybe-distclean-sim: + +distclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tar distclean-tar +maybe-distclean-tar: + +distclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-texinfo distclean-texinfo +maybe-distclean-texinfo: + +distclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-textutils distclean-textutils +maybe-distclean-textutils: + +distclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-time distclean-time +maybe-distclean-time: + +distclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-uudecode distclean-uudecode +maybe-distclean-uudecode: + +distclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-wdiff distclean-wdiff +maybe-distclean-wdiff: + +distclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zip distclean-zip +maybe-distclean-zip: + +distclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zlib distclean-zlib +maybe-distclean-zlib: + +distclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gdb distclean-gdb +maybe-distclean-gdb: + +distclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-expect distclean-expect +maybe-distclean-expect: + +distclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-guile distclean-guile +maybe-distclean-guile: + +distclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tk distclean-tk +maybe-distclean-tk: + +distclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tix distclean-tix +maybe-distclean-tix: + +distclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtermcap distclean-libtermcap +maybe-distclean-libtermcap: + +# libtermcap doesn't support distclean. +distclean-libtermcap: + + +.PHONY: maybe-distclean-utils distclean-utils +maybe-distclean-utils: + +distclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3 +maybe-distclean-target-libstdc++-v3: + +distclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-newlib distclean-target-newlib +maybe-distclean-target-newlib: + +distclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c +maybe-distclean-target-libf2c: + +distclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc +maybe-distclean-target-libobjc: + +distclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap +maybe-distclean-target-libtermcap: + +# libtermcap doesn't support distclean. +distclean-target-libtermcap: + + +.PHONY: maybe-distclean-target-winsup distclean-target-winsup +maybe-distclean-target-winsup: + +distclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss +maybe-distclean-target-libgloss: + +distclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty +maybe-distclean-target-libiberty: + +distclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-gperf distclean-target-gperf +maybe-distclean-target-gperf: + +distclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-examples distclean-target-examples +maybe-distclean-target-examples: + +distclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libffi distclean-target-libffi +maybe-distclean-target-libffi: + +distclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libjava distclean-target-libjava +maybe-distclean-target-libjava: + +distclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-zlib distclean-target-zlib +maybe-distclean-target-zlib: + +distclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc +maybe-distclean-target-boehm-gc: + +distclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads +maybe-distclean-target-qthreads: + +distclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-rda distclean-target-rda +maybe-distclean-target-rda: + +distclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libada distclean-target-libada +maybe-distclean-target-libada: + +distclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +.PHONY: do-maintainer-clean +do-maintainer-clean: maintainer-clean-host maintainer-clean-target + +.PHONY: maintainer-clean-host +maintainer-clean-host: maybe-maintainer-clean-gcc \ + maybe-maintainer-clean-ash \ + maybe-maintainer-clean-autoconf \ + maybe-maintainer-clean-automake \ + maybe-maintainer-clean-bash \ + maybe-maintainer-clean-bfd \ + maybe-maintainer-clean-opcodes \ + maybe-maintainer-clean-binutils \ + maybe-maintainer-clean-bison \ + maybe-maintainer-clean-byacc \ + maybe-maintainer-clean-bzip2 \ + maybe-maintainer-clean-dejagnu \ + maybe-maintainer-clean-diff \ + maybe-maintainer-clean-dosutils \ + maybe-maintainer-clean-etc \ + maybe-maintainer-clean-fastjar \ + maybe-maintainer-clean-fileutils \ + maybe-maintainer-clean-findutils \ + maybe-maintainer-clean-find \ + maybe-maintainer-clean-flex \ + maybe-maintainer-clean-gas \ + maybe-maintainer-clean-gawk \ + maybe-maintainer-clean-gettext \ + maybe-maintainer-clean-gnuserv \ + maybe-maintainer-clean-gprof \ + maybe-maintainer-clean-gzip \ + maybe-maintainer-clean-hello \ + maybe-maintainer-clean-indent \ + maybe-maintainer-clean-intl \ + maybe-maintainer-clean-tcl \ + maybe-maintainer-clean-itcl \ + maybe-maintainer-clean-ld \ + maybe-maintainer-clean-libgui \ + maybe-maintainer-clean-libiberty \ + maybe-maintainer-clean-libtool \ + maybe-maintainer-clean-m4 \ + maybe-maintainer-clean-make \ + maybe-maintainer-clean-mmalloc \ + maybe-maintainer-clean-patch \ + maybe-maintainer-clean-perl \ + maybe-maintainer-clean-prms \ + maybe-maintainer-clean-rcs \ + maybe-maintainer-clean-readline \ + maybe-maintainer-clean-release \ + maybe-maintainer-clean-recode \ + maybe-maintainer-clean-sed \ + maybe-maintainer-clean-send-pr \ + maybe-maintainer-clean-shellutils \ + maybe-maintainer-clean-sid \ + maybe-maintainer-clean-sim \ + maybe-maintainer-clean-tar \ + maybe-maintainer-clean-texinfo \ + maybe-maintainer-clean-textutils \ + maybe-maintainer-clean-time \ + maybe-maintainer-clean-uudecode \ + maybe-maintainer-clean-wdiff \ + maybe-maintainer-clean-zip \ + maybe-maintainer-clean-zlib \ + maybe-maintainer-clean-gdb \ + maybe-maintainer-clean-expect \ + maybe-maintainer-clean-guile \ + maybe-maintainer-clean-tk \ + maybe-maintainer-clean-tix \ + maybe-maintainer-clean-libtermcap \ + maybe-maintainer-clean-utils + +.PHONY: maintainer-clean-target +maintainer-clean-target: \ + maybe-maintainer-clean-target-libstdc++-v3 \ + maybe-maintainer-clean-target-newlib \ + maybe-maintainer-clean-target-libf2c \ + maybe-maintainer-clean-target-libobjc \ + maybe-maintainer-clean-target-libtermcap \ + maybe-maintainer-clean-target-winsup \ + maybe-maintainer-clean-target-libgloss \ + maybe-maintainer-clean-target-libiberty \ + maybe-maintainer-clean-target-gperf \ + maybe-maintainer-clean-target-examples \ + maybe-maintainer-clean-target-libffi \ + maybe-maintainer-clean-target-libjava \ + maybe-maintainer-clean-target-zlib \ + maybe-maintainer-clean-target-boehm-gc \ + maybe-maintainer-clean-target-qthreads \ + maybe-maintainer-clean-target-rda \ + maybe-maintainer-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc +maybe-maintainer-clean-gcc: +maintainer-clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash +maybe-maintainer-clean-ash: + +maintainer-clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf +maybe-maintainer-clean-autoconf: + +maintainer-clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake +maybe-maintainer-clean-automake: + +maintainer-clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash +maybe-maintainer-clean-bash: + +maintainer-clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd +maybe-maintainer-clean-bfd: + +maintainer-clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes +maybe-maintainer-clean-opcodes: + +maintainer-clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils +maybe-maintainer-clean-binutils: + +maintainer-clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison +maybe-maintainer-clean-bison: + +maintainer-clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc +maybe-maintainer-clean-byacc: + +maintainer-clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2 +maybe-maintainer-clean-bzip2: + +maintainer-clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu +maybe-maintainer-clean-dejagnu: + +maintainer-clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff +maybe-maintainer-clean-diff: + +maintainer-clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils +maybe-maintainer-clean-dosutils: + +maintainer-clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc +maybe-maintainer-clean-etc: + +maintainer-clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar +maybe-maintainer-clean-fastjar: + +maintainer-clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils +maybe-maintainer-clean-fileutils: + +maintainer-clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils +maybe-maintainer-clean-findutils: + +maintainer-clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-find maintainer-clean-find +maybe-maintainer-clean-find: + +maintainer-clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex +maybe-maintainer-clean-flex: + +maintainer-clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas +maybe-maintainer-clean-gas: + +maintainer-clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk +maybe-maintainer-clean-gawk: + +maintainer-clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext +maybe-maintainer-clean-gettext: + +maintainer-clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv +maybe-maintainer-clean-gnuserv: + +maintainer-clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: + +maintainer-clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip +maybe-maintainer-clean-gzip: + +maintainer-clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello +maybe-maintainer-clean-hello: + +maintainer-clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent +maybe-maintainer-clean-indent: + +maintainer-clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl +maybe-maintainer-clean-intl: + +maintainer-clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl +maybe-maintainer-clean-tcl: + +maintainer-clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl +maybe-maintainer-clean-itcl: + +maintainer-clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld +maybe-maintainer-clean-ld: + +maintainer-clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui +maybe-maintainer-clean-libgui: + +maintainer-clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty +maybe-maintainer-clean-libiberty: + +maintainer-clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool +maybe-maintainer-clean-libtool: + +maintainer-clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4 +maybe-maintainer-clean-m4: + +maintainer-clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-make maintainer-clean-make +maybe-maintainer-clean-make: + +maintainer-clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc +maybe-maintainer-clean-mmalloc: + +maintainer-clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch +maybe-maintainer-clean-patch: + +maintainer-clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl +maybe-maintainer-clean-perl: + +maintainer-clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms +maybe-maintainer-clean-prms: + +maintainer-clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs +maybe-maintainer-clean-rcs: + +maintainer-clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +maybe-maintainer-clean-readline: + +maintainer-clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-release maintainer-clean-release +maybe-maintainer-clean-release: + +maintainer-clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode +maybe-maintainer-clean-recode: + +maintainer-clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed +maybe-maintainer-clean-sed: + +maintainer-clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr +maybe-maintainer-clean-send-pr: + +maintainer-clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils +maybe-maintainer-clean-shellutils: + +maintainer-clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid +maybe-maintainer-clean-sid: + +maintainer-clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim +maybe-maintainer-clean-sim: + +maintainer-clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar +maybe-maintainer-clean-tar: + +maintainer-clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo +maybe-maintainer-clean-texinfo: + +maintainer-clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils +maybe-maintainer-clean-textutils: + +maintainer-clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-time maintainer-clean-time +maybe-maintainer-clean-time: + +maintainer-clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode +maybe-maintainer-clean-uudecode: + +maintainer-clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff +maybe-maintainer-clean-wdiff: + +maintainer-clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip +maybe-maintainer-clean-zip: + +maintainer-clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib +maybe-maintainer-clean-zlib: + +maintainer-clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb +maybe-maintainer-clean-gdb: + +maintainer-clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect +maybe-maintainer-clean-expect: + +maintainer-clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile +maybe-maintainer-clean-guile: + +maintainer-clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk +maybe-maintainer-clean-tk: + +maintainer-clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix +maybe-maintainer-clean-tix: + +maintainer-clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap +maybe-maintainer-clean-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-libtermcap: + + +.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils +maybe-maintainer-clean-utils: + +maintainer-clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3 +maybe-maintainer-clean-target-libstdc++-v3: + +maintainer-clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib +maybe-maintainer-clean-target-newlib: + +maintainer-clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c +maybe-maintainer-clean-target-libf2c: + +maintainer-clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc +maybe-maintainer-clean-target-libobjc: + +maintainer-clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap +maybe-maintainer-clean-target-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-target-libtermcap: + + +.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup +maybe-maintainer-clean-target-winsup: + +maintainer-clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss +maybe-maintainer-clean-target-libgloss: + +maintainer-clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty +maybe-maintainer-clean-target-libiberty: + +maintainer-clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf +maybe-maintainer-clean-target-gperf: + +maintainer-clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples +maybe-maintainer-clean-target-examples: + +maintainer-clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi +maybe-maintainer-clean-target-libffi: + +maintainer-clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava +maybe-maintainer-clean-target-libjava: + +maintainer-clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib +maybe-maintainer-clean-target-zlib: + +maintainer-clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc +maybe-maintainer-clean-target-boehm-gc: + +maintainer-clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads +maybe-maintainer-clean-target-qthreads: + +maintainer-clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda +maybe-maintainer-clean-target-rda: + +maintainer-clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada +maybe-maintainer-clean-target-libada: + +maintainer-clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + + +# Here are the targets which correspond to the do-X targets. + +.PHONY: info installcheck dvi install-info +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean +info: do-info +installcheck: do-installcheck +dvi: do-dvi + +# Make sure makeinfo is built before we do a `make info', if we're +# in fact building texinfo. +do-info: maybe-all-texinfo + +install-info: do-install-info dir.info + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f dir.info ] ; then \ + $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \ + else true ; fi + +local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log + +local-distclean: + -rm -f Makefile config.status config.cache mh-frag mt-frag + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -if [ "$(TARGET_SUBDIR)" != "." ]; then \ + rm -rf $(TARGET_SUBDIR); \ + else true; fi + -rm -rf $(BUILD_SUBDIR) + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +clean: do-clean local-clean +mostlyclean: do-mostlyclean local-clean +distclean: do-distclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean + +# Extra dependency for clean-target, owing to the mixed nature of gcc +clean-target: clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc + +# Check target. + +.PHONY: check do-check +check: do-check + +# Only include modules actually being configured and built. +do-check: maybe-check-gcc \ + maybe-check-ash \ + maybe-check-autoconf \ + maybe-check-automake \ + maybe-check-bash \ + maybe-check-bfd \ + maybe-check-opcodes \ + maybe-check-binutils \ + maybe-check-bison \ + maybe-check-byacc \ + maybe-check-bzip2 \ + maybe-check-dejagnu \ + maybe-check-diff \ + maybe-check-dosutils \ + maybe-check-etc \ + maybe-check-fastjar \ + maybe-check-fileutils \ + maybe-check-findutils \ + maybe-check-find \ + maybe-check-flex \ + maybe-check-gas \ + maybe-check-gawk \ + maybe-check-gettext \ + maybe-check-gnuserv \ + maybe-check-gprof \ + maybe-check-gzip \ + maybe-check-hello \ + maybe-check-indent \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ + maybe-check-ld \ + maybe-check-libgui \ + maybe-check-libiberty \ + maybe-check-libtool \ + maybe-check-m4 \ + maybe-check-make \ + maybe-check-mmalloc \ + maybe-check-patch \ + maybe-check-perl \ + maybe-check-prms \ + maybe-check-rcs \ + maybe-check-readline \ + maybe-check-release \ + maybe-check-recode \ + maybe-check-sed \ + maybe-check-send-pr \ + maybe-check-shellutils \ + maybe-check-sid \ + maybe-check-sim \ + maybe-check-tar \ + maybe-check-texinfo \ + maybe-check-textutils \ + maybe-check-time \ + maybe-check-uudecode \ + maybe-check-wdiff \ + maybe-check-zip \ + maybe-check-zlib \ + maybe-check-gdb \ + maybe-check-expect \ + maybe-check-guile \ + maybe-check-tk \ + maybe-check-tix \ + maybe-check-libtermcap \ + maybe-check-utils \ + maybe-check-target-libstdc++-v3 \ + maybe-check-target-newlib \ + maybe-check-target-libf2c \ + maybe-check-target-libobjc \ + maybe-check-target-libtermcap \ + maybe-check-target-winsup \ + maybe-check-target-libgloss \ + maybe-check-target-libiberty \ + maybe-check-target-gperf \ + maybe-check-target-examples \ + maybe-check-target-libffi \ + maybe-check-target-libjava \ + maybe-check-target-zlib \ + maybe-check-target-boehm-gc \ + maybe-check-target-qthreads \ + maybe-check-target-rda \ + maybe-check-target-libada + +# Automated reporting of test results. + +warning.log: build.log + $(srcdir)/contrib/warn_summary build.log > $@ + +mail-report.log: + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +mail-report-with-warnings.log: warning.log + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t -i warning.log >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +# Installation targets. + +.PHONY: install uninstall +install: installdirs install-host install-target + +.PHONY: install-host-nogcc +install-host-nogcc: \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-host +install-host: maybe-install-gcc \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-target +install-target: \ + maybe-install-target-libstdc++-v3 \ + maybe-install-target-newlib \ + maybe-install-target-libf2c \ + maybe-install-target-libobjc \ + maybe-install-target-libtermcap \ + maybe-install-target-winsup \ + maybe-install-target-libgloss \ + maybe-install-target-libiberty \ + maybe-install-target-gperf \ + maybe-install-target-examples \ + maybe-install-target-libffi \ + maybe-install-target-libjava \ + maybe-install-target-zlib \ + maybe-install-target-boehm-gc \ + maybe-install-target-qthreads \ + maybe-install-target-rda \ + maybe-install-target-libada + +uninstall: + @echo "the uninstall target is not supported in this tree" + +.PHONY: install.all +install.all: install-no-fixedincludes + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}` ; export r ; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ + else \ + true ; \ + fi + +# install-no-fixedincludes is used because Cygnus can not distribute +# the fixed header files. +.PHONY: install-no-fixedincludes +install-no-fixedincludes: installdirs install-host-nogcc \ + install-target gcc-no-fixedincludes + +### other supporting targets + +MAKEDIRS= \ + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) +.PHONY: installdirs +installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) + +dir.info: do-install-info + if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ + $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ + mv -f dir.info.new dir.info ; \ + else true ; \ + fi + +dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" + +etags tags: TAGS + +# Right now this just builds TAGS in each subdirectory. emacs19 has the +# ability to use several tags files at once, so there is probably no need +# to combine them into one big TAGS file (like CVS 1.3 does). We could +# (if we felt like it) have this Makefile write a piece of elisp which +# the user could load to tell emacs19 where all the TAGS files we just +# built are. +TAGS: do-TAGS + +# -------------------------------------- +# Modules which run on the build machine +# -------------------------------------- + +.PHONY: configure-build-libiberty maybe-configure-build-libiberty +maybe-configure-build-libiberty: +configure-build-libiberty: + @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/libiberty; \ + cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 + +.PHONY: all-build-libiberty maybe-all-build-libiberty +maybe-all-build-libiberty: +all-build-libiberty: configure-build-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all) + + +# -------------------------------------- +# Modules which run on the host machine +# -------------------------------------- + +.PHONY: configure-ash maybe-configure-ash +maybe-configure-ash: +configure-ash: + @test ! -f ash/Makefile || exit 0; \ + [ -d ash ] || mkdir ash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ash; \ + cd ash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ash maybe-all-ash +maybe-all-ash: +all-ash: configure-ash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ash maybe-check-ash +maybe-check-ash: + +check-ash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ash maybe-install-ash +maybe-install-ash: + +install-ash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-autoconf maybe-configure-autoconf +maybe-configure-autoconf: +configure-autoconf: + @test ! -f autoconf/Makefile || exit 0; \ + [ -d autoconf ] || mkdir autoconf; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in autoconf; \ + cd autoconf || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-autoconf maybe-all-autoconf +maybe-all-autoconf: +all-autoconf: configure-autoconf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-autoconf maybe-check-autoconf +maybe-check-autoconf: + +check-autoconf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-autoconf maybe-install-autoconf +maybe-install-autoconf: + +install-autoconf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-automake maybe-configure-automake +maybe-configure-automake: +configure-automake: + @test ! -f automake/Makefile || exit 0; \ + [ -d automake ] || mkdir automake; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in automake; \ + cd automake || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-automake maybe-all-automake +maybe-all-automake: +all-automake: configure-automake + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-automake maybe-check-automake +maybe-check-automake: + +check-automake: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-automake maybe-install-automake +maybe-install-automake: + +install-automake: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bash maybe-configure-bash +maybe-configure-bash: +configure-bash: + @test ! -f bash/Makefile || exit 0; \ + [ -d bash ] || mkdir bash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bash; \ + cd bash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bash maybe-all-bash +maybe-all-bash: +all-bash: configure-bash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bash maybe-check-bash +maybe-check-bash: + +check-bash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bash maybe-install-bash +maybe-install-bash: + +install-bash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bfd maybe-configure-bfd +maybe-configure-bfd: +configure-bfd: + @test ! -f bfd/Makefile || exit 0; \ + [ -d bfd ] || mkdir bfd; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bfd; \ + cd bfd || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bfd maybe-all-bfd +maybe-all-bfd: +all-bfd: configure-bfd + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bfd maybe-check-bfd +maybe-check-bfd: + +check-bfd: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bfd maybe-install-bfd +maybe-install-bfd: + +install-bfd: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-opcodes maybe-configure-opcodes +maybe-configure-opcodes: +configure-opcodes: + @test ! -f opcodes/Makefile || exit 0; \ + [ -d opcodes ] || mkdir opcodes; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in opcodes; \ + cd opcodes || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-opcodes maybe-all-opcodes +maybe-all-opcodes: +all-opcodes: configure-opcodes + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-opcodes maybe-check-opcodes +maybe-check-opcodes: + +check-opcodes: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-opcodes maybe-install-opcodes +maybe-install-opcodes: + +install-opcodes: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-binutils maybe-configure-binutils +maybe-configure-binutils: +configure-binutils: + @test ! -f binutils/Makefile || exit 0; \ + [ -d binutils ] || mkdir binutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in binutils; \ + cd binutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-binutils maybe-all-binutils +maybe-all-binutils: +all-binutils: configure-binutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-binutils maybe-check-binutils +maybe-check-binutils: + +check-binutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-binutils maybe-install-binutils +maybe-install-binutils: + +install-binutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bison maybe-configure-bison +maybe-configure-bison: +configure-bison: + @test ! -f bison/Makefile || exit 0; \ + [ -d bison ] || mkdir bison; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bison; \ + cd bison || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bison maybe-all-bison +maybe-all-bison: +all-bison: configure-bison + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bison maybe-check-bison +maybe-check-bison: + +# This module is only tested in a native toolchain. +check-bison: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-bison maybe-install-bison +maybe-install-bison: + +install-bison: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-byacc maybe-configure-byacc +maybe-configure-byacc: +configure-byacc: + @test ! -f byacc/Makefile || exit 0; \ + [ -d byacc ] || mkdir byacc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in byacc; \ + cd byacc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-byacc maybe-all-byacc +maybe-all-byacc: +all-byacc: configure-byacc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-byacc maybe-check-byacc +maybe-check-byacc: + +# This module is only tested in a native toolchain. +check-byacc: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-byacc maybe-install-byacc +maybe-install-byacc: + +install-byacc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bzip2 maybe-configure-bzip2 +maybe-configure-bzip2: +configure-bzip2: + @test ! -f bzip2/Makefile || exit 0; \ + [ -d bzip2 ] || mkdir bzip2; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bzip2; \ + cd bzip2 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bzip2 maybe-all-bzip2 +maybe-all-bzip2: +all-bzip2: configure-bzip2 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bzip2 maybe-check-bzip2 +maybe-check-bzip2: + +check-bzip2: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bzip2 maybe-install-bzip2 +maybe-install-bzip2: + +install-bzip2: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dejagnu maybe-configure-dejagnu +maybe-configure-dejagnu: +configure-dejagnu: + @test ! -f dejagnu/Makefile || exit 0; \ + [ -d dejagnu ] || mkdir dejagnu; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dejagnu; \ + cd dejagnu || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dejagnu maybe-all-dejagnu +maybe-all-dejagnu: +all-dejagnu: configure-dejagnu + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dejagnu maybe-check-dejagnu +maybe-check-dejagnu: + +check-dejagnu: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-dejagnu maybe-install-dejagnu +maybe-install-dejagnu: + +install-dejagnu: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-diff maybe-configure-diff +maybe-configure-diff: +configure-diff: + @test ! -f diff/Makefile || exit 0; \ + [ -d diff ] || mkdir diff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in diff; \ + cd diff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-diff maybe-all-diff +maybe-all-diff: +all-diff: configure-diff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-diff maybe-check-diff +maybe-check-diff: + +check-diff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-diff maybe-install-diff +maybe-install-diff: + +install-diff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dosutils maybe-configure-dosutils +maybe-configure-dosutils: +configure-dosutils: + @test ! -f dosutils/Makefile || exit 0; \ + [ -d dosutils ] || mkdir dosutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dosutils; \ + cd dosutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dosutils maybe-all-dosutils +maybe-all-dosutils: +all-dosutils: configure-dosutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dosutils maybe-check-dosutils +maybe-check-dosutils: + +check-dosutils: + + +.PHONY: install-dosutils maybe-install-dosutils +maybe-install-dosutils: + +install-dosutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-etc maybe-configure-etc +maybe-configure-etc: +configure-etc: + @test ! -f etc/Makefile || exit 0; \ + [ -d etc ] || mkdir etc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in etc; \ + cd etc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-etc maybe-all-etc +maybe-all-etc: +all-etc: configure-etc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-etc maybe-check-etc +maybe-check-etc: + +check-etc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-etc maybe-install-etc +maybe-install-etc: + +install-etc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fastjar maybe-configure-fastjar +maybe-configure-fastjar: +configure-fastjar: + @test ! -f fastjar/Makefile || exit 0; \ + [ -d fastjar ] || mkdir fastjar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fastjar; \ + cd fastjar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fastjar maybe-all-fastjar +maybe-all-fastjar: +all-fastjar: configure-fastjar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fastjar maybe-check-fastjar +maybe-check-fastjar: + +# This module is only tested in a native toolchain. +check-fastjar: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-fastjar maybe-install-fastjar +maybe-install-fastjar: + +install-fastjar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fileutils maybe-configure-fileutils +maybe-configure-fileutils: +configure-fileutils: + @test ! -f fileutils/Makefile || exit 0; \ + [ -d fileutils ] || mkdir fileutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fileutils; \ + cd fileutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fileutils maybe-all-fileutils +maybe-all-fileutils: +all-fileutils: configure-fileutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fileutils maybe-check-fileutils +maybe-check-fileutils: + +check-fileutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-fileutils maybe-install-fileutils +maybe-install-fileutils: + +install-fileutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-findutils maybe-configure-findutils +maybe-configure-findutils: +configure-findutils: + @test ! -f findutils/Makefile || exit 0; \ + [ -d findutils ] || mkdir findutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in findutils; \ + cd findutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-findutils maybe-all-findutils +maybe-all-findutils: +all-findutils: configure-findutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-findutils maybe-check-findutils +maybe-check-findutils: + +check-findutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-findutils maybe-install-findutils +maybe-install-findutils: + +install-findutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-find maybe-configure-find +maybe-configure-find: +configure-find: + @test ! -f find/Makefile || exit 0; \ + [ -d find ] || mkdir find; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in find; \ + cd find || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-find maybe-all-find +maybe-all-find: +all-find: configure-find + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-find maybe-check-find +maybe-check-find: + +check-find: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-find maybe-install-find +maybe-install-find: + +install-find: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-flex maybe-configure-flex +maybe-configure-flex: +configure-flex: + @test ! -f flex/Makefile || exit 0; \ + [ -d flex ] || mkdir flex; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in flex; \ + cd flex || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-flex maybe-all-flex +maybe-all-flex: +all-flex: configure-flex + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-flex maybe-check-flex +maybe-check-flex: + +# This module is only tested in a native toolchain. +check-flex: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-flex maybe-install-flex +maybe-install-flex: + +install-flex: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gas maybe-configure-gas +maybe-configure-gas: +configure-gas: + @test ! -f gas/Makefile || exit 0; \ + [ -d gas ] || mkdir gas; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gas; \ + cd gas || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gas maybe-all-gas +maybe-all-gas: +all-gas: configure-gas + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gas maybe-check-gas +maybe-check-gas: + +check-gas: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gas maybe-install-gas +maybe-install-gas: + +install-gas: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gawk maybe-configure-gawk +maybe-configure-gawk: +configure-gawk: + @test ! -f gawk/Makefile || exit 0; \ + [ -d gawk ] || mkdir gawk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gawk; \ + cd gawk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gawk maybe-all-gawk +maybe-all-gawk: +all-gawk: configure-gawk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gawk maybe-check-gawk +maybe-check-gawk: + +check-gawk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gawk maybe-install-gawk +maybe-install-gawk: + +install-gawk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gettext maybe-configure-gettext +maybe-configure-gettext: +configure-gettext: + @test ! -f gettext/Makefile || exit 0; \ + [ -d gettext ] || mkdir gettext; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gettext; \ + cd gettext || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gettext maybe-all-gettext +maybe-all-gettext: +all-gettext: configure-gettext + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gettext maybe-check-gettext +maybe-check-gettext: + +check-gettext: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gettext maybe-install-gettext +maybe-install-gettext: + +install-gettext: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gnuserv maybe-configure-gnuserv +maybe-configure-gnuserv: +configure-gnuserv: + @test ! -f gnuserv/Makefile || exit 0; \ + [ -d gnuserv ] || mkdir gnuserv; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gnuserv; \ + cd gnuserv || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gnuserv maybe-all-gnuserv +maybe-all-gnuserv: +all-gnuserv: configure-gnuserv + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gnuserv maybe-check-gnuserv +maybe-check-gnuserv: + +check-gnuserv: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gnuserv maybe-install-gnuserv +maybe-install-gnuserv: + +install-gnuserv: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: +configure-gprof: + @test ! -f gprof/Makefile || exit 0; \ + [ -d gprof ] || mkdir gprof; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gprof; \ + cd gprof || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +all-gprof: configure-gprof + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: + +check-gprof: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: + +install-gprof: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gzip maybe-configure-gzip +maybe-configure-gzip: +configure-gzip: + @test ! -f gzip/Makefile || exit 0; \ + [ -d gzip ] || mkdir gzip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gzip; \ + cd gzip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gzip maybe-all-gzip +maybe-all-gzip: +all-gzip: configure-gzip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gzip maybe-check-gzip +maybe-check-gzip: + +check-gzip: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gzip maybe-install-gzip +maybe-install-gzip: + +install-gzip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-hello maybe-configure-hello +maybe-configure-hello: +configure-hello: + @test ! -f hello/Makefile || exit 0; \ + [ -d hello ] || mkdir hello; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in hello; \ + cd hello || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-hello maybe-all-hello +maybe-all-hello: +all-hello: configure-hello + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-hello maybe-check-hello +maybe-check-hello: + +check-hello: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-hello maybe-install-hello +maybe-install-hello: + +install-hello: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-indent maybe-configure-indent +maybe-configure-indent: +configure-indent: + @test ! -f indent/Makefile || exit 0; \ + [ -d indent ] || mkdir indent; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in indent; \ + cd indent || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-indent maybe-all-indent +maybe-all-indent: +all-indent: configure-indent + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-indent maybe-check-indent +maybe-check-indent: + +check-indent: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-indent maybe-install-indent +maybe-install-indent: + +install-indent: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-intl maybe-configure-intl +maybe-configure-intl: +configure-intl: + @test ! -f intl/Makefile || exit 0; \ + [ -d intl ] || mkdir intl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in intl; \ + cd intl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-intl maybe-all-intl +maybe-all-intl: +all-intl: configure-intl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-intl maybe-check-intl +maybe-check-intl: + +check-intl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-intl maybe-install-intl +maybe-install-intl: + +install-intl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tcl maybe-configure-tcl +maybe-configure-tcl: +configure-tcl: + @test ! -f tcl/Makefile || exit 0; \ + [ -d tcl ] || mkdir tcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tcl; \ + cd tcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tcl maybe-all-tcl +maybe-all-tcl: +all-tcl: configure-tcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tcl maybe-check-tcl +maybe-check-tcl: + +check-tcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tcl maybe-install-tcl +maybe-install-tcl: + +install-tcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-itcl maybe-configure-itcl +maybe-configure-itcl: +configure-itcl: + @test ! -f itcl/Makefile || exit 0; \ + [ -d itcl ] || mkdir itcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in itcl; \ + cd itcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-itcl maybe-all-itcl +maybe-all-itcl: +all-itcl: configure-itcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-itcl maybe-check-itcl +maybe-check-itcl: + +check-itcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-itcl maybe-install-itcl +maybe-install-itcl: + +install-itcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-ld maybe-configure-ld +maybe-configure-ld: +configure-ld: + @test ! -f ld/Makefile || exit 0; \ + [ -d ld ] || mkdir ld; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ld; \ + cd ld || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ld maybe-all-ld +maybe-all-ld: +all-ld: configure-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ld maybe-check-ld +maybe-check-ld: + +check-ld: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ld maybe-install-ld +maybe-install-ld: + +install-ld: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libgui maybe-configure-libgui +maybe-configure-libgui: +configure-libgui: + @test ! -f libgui/Makefile || exit 0; \ + [ -d libgui ] || mkdir libgui; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libgui; \ + cd libgui || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libgui maybe-all-libgui +maybe-all-libgui: +all-libgui: configure-libgui + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libgui maybe-check-libgui +maybe-check-libgui: + +check-libgui: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libgui maybe-install-libgui +maybe-install-libgui: + +install-libgui: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libiberty maybe-configure-libiberty +maybe-configure-libiberty: +configure-libiberty: + @test ! -f libiberty/Makefile || exit 0; \ + [ -d libiberty ] || mkdir libiberty; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libiberty; \ + cd libiberty || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libiberty maybe-all-libiberty +maybe-all-libiberty: +all-libiberty: configure-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libiberty maybe-check-libiberty +maybe-check-libiberty: + +check-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libiberty maybe-install-libiberty +maybe-install-libiberty: + +install-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libtool maybe-configure-libtool +maybe-configure-libtool: +configure-libtool: + @test ! -f libtool/Makefile || exit 0; \ + [ -d libtool ] || mkdir libtool; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtool; \ + cd libtool || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtool maybe-all-libtool +maybe-all-libtool: +all-libtool: configure-libtool + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtool maybe-check-libtool +maybe-check-libtool: + +check-libtool: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libtool maybe-install-libtool +maybe-install-libtool: + +install-libtool: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-m4 maybe-configure-m4 +maybe-configure-m4: +configure-m4: + @test ! -f m4/Makefile || exit 0; \ + [ -d m4 ] || mkdir m4; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in m4; \ + cd m4 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-m4 maybe-all-m4 +maybe-all-m4: +all-m4: configure-m4 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-m4 maybe-check-m4 +maybe-check-m4: + +check-m4: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-m4 maybe-install-m4 +maybe-install-m4: + +install-m4: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-make maybe-configure-make +maybe-configure-make: +configure-make: + @test ! -f make/Makefile || exit 0; \ + [ -d make ] || mkdir make; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in make; \ + cd make || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-make maybe-all-make +maybe-all-make: +all-make: configure-make + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-make maybe-check-make +maybe-check-make: + +check-make: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-make maybe-install-make +maybe-install-make: + +install-make: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-mmalloc maybe-configure-mmalloc +maybe-configure-mmalloc: +configure-mmalloc: + @test ! -f mmalloc/Makefile || exit 0; \ + [ -d mmalloc ] || mkdir mmalloc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in mmalloc; \ + cd mmalloc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-mmalloc maybe-all-mmalloc +maybe-all-mmalloc: +all-mmalloc: configure-mmalloc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-mmalloc maybe-check-mmalloc +maybe-check-mmalloc: + +check-mmalloc: + + +.PHONY: install-mmalloc maybe-install-mmalloc +maybe-install-mmalloc: + +install-mmalloc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-patch maybe-configure-patch +maybe-configure-patch: +configure-patch: + @test ! -f patch/Makefile || exit 0; \ + [ -d patch ] || mkdir patch; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in patch; \ + cd patch || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-patch maybe-all-patch +maybe-all-patch: +all-patch: configure-patch + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-patch maybe-check-patch +maybe-check-patch: + +check-patch: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-patch maybe-install-patch +maybe-install-patch: + +install-patch: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-perl maybe-configure-perl +maybe-configure-perl: +configure-perl: + @test ! -f perl/Makefile || exit 0; \ + [ -d perl ] || mkdir perl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in perl; \ + cd perl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-perl maybe-all-perl +maybe-all-perl: +all-perl: configure-perl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-perl maybe-check-perl +maybe-check-perl: + +check-perl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-perl maybe-install-perl +maybe-install-perl: + +install-perl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-prms maybe-configure-prms +maybe-configure-prms: +configure-prms: + @test ! -f prms/Makefile || exit 0; \ + [ -d prms ] || mkdir prms; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in prms; \ + cd prms || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-prms maybe-all-prms +maybe-all-prms: +all-prms: configure-prms + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-prms maybe-check-prms +maybe-check-prms: + +check-prms: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-prms maybe-install-prms +maybe-install-prms: + +install-prms: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-rcs maybe-configure-rcs +maybe-configure-rcs: +configure-rcs: + @test ! -f rcs/Makefile || exit 0; \ + [ -d rcs ] || mkdir rcs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in rcs; \ + cd rcs || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-rcs maybe-all-rcs +maybe-all-rcs: +all-rcs: configure-rcs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-rcs maybe-check-rcs +maybe-check-rcs: + +check-rcs: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-rcs maybe-install-rcs +maybe-install-rcs: + +install-rcs: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-readline maybe-configure-readline +maybe-configure-readline: +configure-readline: + @test ! -f readline/Makefile || exit 0; \ + [ -d readline ] || mkdir readline; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in readline; \ + cd readline || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-readline maybe-all-readline +maybe-all-readline: +all-readline: configure-readline + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-readline maybe-check-readline +maybe-check-readline: + +check-readline: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-readline maybe-install-readline +maybe-install-readline: + +install-readline: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-release maybe-configure-release +maybe-configure-release: +configure-release: + @test ! -f release/Makefile || exit 0; \ + [ -d release ] || mkdir release; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in release; \ + cd release || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-release maybe-all-release +maybe-all-release: +all-release: configure-release + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd release && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-release maybe-check-release +maybe-check-release: + +check-release: + + +.PHONY: install-release maybe-install-release +maybe-install-release: + +install-release: + + +.PHONY: configure-recode maybe-configure-recode +maybe-configure-recode: +configure-recode: + @test ! -f recode/Makefile || exit 0; \ + [ -d recode ] || mkdir recode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in recode; \ + cd recode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-recode maybe-all-recode +maybe-all-recode: +all-recode: configure-recode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-recode maybe-check-recode +maybe-check-recode: + +check-recode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-recode maybe-install-recode +maybe-install-recode: + +install-recode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sed maybe-configure-sed +maybe-configure-sed: +configure-sed: + @test ! -f sed/Makefile || exit 0; \ + [ -d sed ] || mkdir sed; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sed; \ + cd sed || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sed maybe-all-sed +maybe-all-sed: +all-sed: configure-sed + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sed maybe-check-sed +maybe-check-sed: + +check-sed: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sed maybe-install-sed +maybe-install-sed: + +install-sed: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-send-pr maybe-configure-send-pr +maybe-configure-send-pr: +configure-send-pr: + @test ! -f send-pr/Makefile || exit 0; \ + [ -d send-pr ] || mkdir send-pr; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in send-pr; \ + cd send-pr || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-send-pr maybe-all-send-pr +maybe-all-send-pr: +all-send-pr: configure-send-pr + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-send-pr maybe-check-send-pr +maybe-check-send-pr: + +check-send-pr: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-send-pr maybe-install-send-pr +maybe-install-send-pr: + +install-send-pr: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-shellutils maybe-configure-shellutils +maybe-configure-shellutils: +configure-shellutils: + @test ! -f shellutils/Makefile || exit 0; \ + [ -d shellutils ] || mkdir shellutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in shellutils; \ + cd shellutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-shellutils maybe-all-shellutils +maybe-all-shellutils: +all-shellutils: configure-shellutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-shellutils maybe-check-shellutils +maybe-check-shellutils: + +check-shellutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-shellutils maybe-install-shellutils +maybe-install-shellutils: + +install-shellutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sid maybe-configure-sid +maybe-configure-sid: +configure-sid: + @test ! -f sid/Makefile || exit 0; \ + [ -d sid ] || mkdir sid; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sid; \ + cd sid || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sid maybe-all-sid +maybe-all-sid: +all-sid: configure-sid + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sid maybe-check-sid +maybe-check-sid: + +check-sid: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sid maybe-install-sid +maybe-install-sid: + +install-sid: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sim maybe-configure-sim +maybe-configure-sim: +configure-sim: + @test ! -f sim/Makefile || exit 0; \ + [ -d sim ] || mkdir sim; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sim; \ + cd sim || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sim maybe-all-sim +maybe-all-sim: +all-sim: configure-sim + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sim maybe-check-sim +maybe-check-sim: + +check-sim: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sim maybe-install-sim +maybe-install-sim: + +install-sim: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tar maybe-configure-tar +maybe-configure-tar: +configure-tar: + @test ! -f tar/Makefile || exit 0; \ + [ -d tar ] || mkdir tar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tar; \ + cd tar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tar maybe-all-tar +maybe-all-tar: +all-tar: configure-tar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tar maybe-check-tar +maybe-check-tar: + +check-tar: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tar maybe-install-tar +maybe-install-tar: + +install-tar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-texinfo maybe-configure-texinfo +maybe-configure-texinfo: +configure-texinfo: + @test ! -f texinfo/Makefile || exit 0; \ + [ -d texinfo ] || mkdir texinfo; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in texinfo; \ + cd texinfo || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-texinfo maybe-all-texinfo +maybe-all-texinfo: +all-texinfo: configure-texinfo + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-texinfo maybe-check-texinfo +maybe-check-texinfo: + +check-texinfo: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-texinfo maybe-install-texinfo +maybe-install-texinfo: + +install-texinfo: + + +.PHONY: configure-textutils maybe-configure-textutils +maybe-configure-textutils: +configure-textutils: + @test ! -f textutils/Makefile || exit 0; \ + [ -d textutils ] || mkdir textutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in textutils; \ + cd textutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-textutils maybe-all-textutils +maybe-all-textutils: +all-textutils: configure-textutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-textutils maybe-check-textutils +maybe-check-textutils: + +check-textutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-textutils maybe-install-textutils +maybe-install-textutils: + +install-textutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-time maybe-configure-time +maybe-configure-time: +configure-time: + @test ! -f time/Makefile || exit 0; \ + [ -d time ] || mkdir time; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in time; \ + cd time || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-time maybe-all-time +maybe-all-time: +all-time: configure-time + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-time maybe-check-time +maybe-check-time: + +check-time: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-time maybe-install-time +maybe-install-time: + +install-time: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-uudecode maybe-configure-uudecode +maybe-configure-uudecode: +configure-uudecode: + @test ! -f uudecode/Makefile || exit 0; \ + [ -d uudecode ] || mkdir uudecode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in uudecode; \ + cd uudecode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-uudecode maybe-all-uudecode +maybe-all-uudecode: +all-uudecode: configure-uudecode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-uudecode maybe-check-uudecode +maybe-check-uudecode: + +check-uudecode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-uudecode maybe-install-uudecode +maybe-install-uudecode: + +install-uudecode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-wdiff maybe-configure-wdiff +maybe-configure-wdiff: +configure-wdiff: + @test ! -f wdiff/Makefile || exit 0; \ + [ -d wdiff ] || mkdir wdiff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in wdiff; \ + cd wdiff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-wdiff maybe-all-wdiff +maybe-all-wdiff: +all-wdiff: configure-wdiff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-wdiff maybe-check-wdiff +maybe-check-wdiff: + +check-wdiff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-wdiff maybe-install-wdiff +maybe-install-wdiff: + +install-wdiff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zip maybe-configure-zip +maybe-configure-zip: +configure-zip: + @test ! -f zip/Makefile || exit 0; \ + [ -d zip ] || mkdir zip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zip; \ + cd zip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zip maybe-all-zip +maybe-all-zip: +all-zip: configure-zip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zip maybe-check-zip +maybe-check-zip: + +# This module is only tested in a native toolchain. +check-zip: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-zip maybe-install-zip +maybe-install-zip: + +install-zip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zlib maybe-configure-zlib +maybe-configure-zlib: +configure-zlib: + @test ! -f zlib/Makefile || exit 0; \ + [ -d zlib ] || mkdir zlib; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zlib; \ + cd zlib || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zlib maybe-all-zlib +maybe-all-zlib: +all-zlib: configure-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zlib maybe-check-zlib +maybe-check-zlib: + +check-zlib: + + +.PHONY: install-zlib maybe-install-zlib +maybe-install-zlib: + +install-zlib: + + +.PHONY: configure-gdb maybe-configure-gdb +maybe-configure-gdb: +configure-gdb: + @test ! -f gdb/Makefile || exit 0; \ + [ -d gdb ] || mkdir gdb; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gdb; \ + cd gdb || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gdb maybe-all-gdb +maybe-all-gdb: +all-gdb: configure-gdb + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-gdb maybe-check-gdb +maybe-check-gdb: + +check-gdb: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-gdb maybe-install-gdb +maybe-install-gdb: + +install-gdb: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-expect maybe-configure-expect +maybe-configure-expect: +configure-expect: + @test ! -f expect/Makefile || exit 0; \ + [ -d expect ] || mkdir expect; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in expect; \ + cd expect || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-expect maybe-all-expect +maybe-all-expect: +all-expect: configure-expect + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-expect maybe-check-expect +maybe-check-expect: + +check-expect: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-expect maybe-install-expect +maybe-install-expect: + +install-expect: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-guile maybe-configure-guile +maybe-configure-guile: +configure-guile: + @test ! -f guile/Makefile || exit 0; \ + [ -d guile ] || mkdir guile; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in guile; \ + cd guile || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-guile maybe-all-guile +maybe-all-guile: +all-guile: configure-guile + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-guile maybe-check-guile +maybe-check-guile: + +check-guile: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-guile maybe-install-guile +maybe-install-guile: + +install-guile: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tk maybe-configure-tk +maybe-configure-tk: +configure-tk: + @test ! -f tk/Makefile || exit 0; \ + [ -d tk ] || mkdir tk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tk; \ + cd tk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tk maybe-all-tk +maybe-all-tk: +all-tk: configure-tk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tk maybe-check-tk +maybe-check-tk: + +check-tk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tk maybe-install-tk +maybe-install-tk: + +install-tk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tix maybe-configure-tix +maybe-configure-tix: +configure-tix: + @test ! -f tix/Makefile || exit 0; \ + [ -d tix ] || mkdir tix; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tix; \ + cd tix || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tix maybe-all-tix +maybe-all-tix: +all-tix: configure-tix + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tix maybe-check-tix +maybe-check-tix: + +check-tix: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tix maybe-install-tix +maybe-install-tix: + +install-tix: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-libtermcap maybe-configure-libtermcap +maybe-configure-libtermcap: +configure-libtermcap: + @test ! -f libtermcap/Makefile || exit 0; \ + [ -d libtermcap ] || mkdir libtermcap; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtermcap; \ + cd libtermcap || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtermcap maybe-all-libtermcap +maybe-all-libtermcap: +all-libtermcap: configure-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtermcap maybe-check-libtermcap +maybe-check-libtermcap: + +check-libtermcap: + + +.PHONY: install-libtermcap maybe-install-libtermcap +maybe-install-libtermcap: + +install-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-utils maybe-configure-utils +maybe-configure-utils: +configure-utils: + @test ! -f utils/Makefile || exit 0; \ + [ -d utils ] || mkdir utils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in utils; \ + cd utils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-utils maybe-all-utils +maybe-all-utils: +all-utils: configure-utils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-utils maybe-check-utils +maybe-check-utils: + +check-utils: + + +.PHONY: install-utils maybe-install-utils +maybe-install-utils: + +install-utils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) install) + + + +# --------------------------------------- +# Modules which run on the target machine +# --------------------------------------- + +.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 +maybe-configure-target-libstdc++-v3: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + +configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \ + cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ + libsrcdir="$$s/libstdc++-v3"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3 +maybe-all-target-libstdc++-v3: +all-target-libstdc++-v3: configure-target-libstdc++-v3 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3 +maybe-check-target-libstdc++-v3: + +check-target-libstdc++-v3: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3 +maybe-install-target-libstdc++-v3: + +install-target-libstdc++-v3: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-newlib maybe-configure-target-newlib +maybe-configure-target-newlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out + +configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/newlib; \ + cd "$(TARGET_SUBDIR)/newlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/newlib"; \ + libsrcdir="$$s/newlib"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-newlib maybe-all-target-newlib +maybe-all-target-newlib: +all-target-newlib: configure-target-newlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-newlib maybe-check-target-newlib +maybe-check-target-newlib: + +check-target-newlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-newlib maybe-install-target-newlib +maybe-install-target-newlib: + +install-target-newlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libf2c maybe-configure-target-libf2c +maybe-configure-target-libf2c: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out + +configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out + @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libf2c; \ + cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libf2c"; \ + libsrcdir="$$s/libf2c"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libf2c maybe-all-target-libf2c +maybe-all-target-libf2c: +all-target-libf2c: configure-target-libf2c + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libf2c maybe-check-target-libf2c +maybe-check-target-libf2c: + +check-target-libf2c: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libf2c maybe-install-target-libf2c +maybe-install-target-libf2c: + +install-target-libf2c: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libobjc maybe-configure-target-libobjc +maybe-configure-target-libobjc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out + +configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out + @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libobjc; \ + cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libobjc"; \ + libsrcdir="$$s/libobjc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libobjc maybe-all-target-libobjc +maybe-all-target-libobjc: +all-target-libobjc: configure-target-libobjc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libobjc maybe-check-target-libobjc +maybe-check-target-libobjc: + +check-target-libobjc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libobjc maybe-install-target-libobjc +maybe-install-target-libobjc: + +install-target-libobjc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap +maybe-configure-target-libtermcap: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out + +configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out + @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libtermcap; \ + cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libtermcap"; \ + libsrcdir="$$s/libtermcap"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libtermcap maybe-all-target-libtermcap +maybe-all-target-libtermcap: +all-target-libtermcap: configure-target-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libtermcap maybe-check-target-libtermcap +maybe-check-target-libtermcap: + +# Dummy target for uncheckable module. +check-target-libtermcap: + + +.PHONY: install-target-libtermcap maybe-install-target-libtermcap +maybe-install-target-libtermcap: + +install-target-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-winsup maybe-configure-target-winsup +maybe-configure-target-winsup: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out + +configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out + @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/winsup; \ + cd "$(TARGET_SUBDIR)/winsup" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/winsup"; \ + libsrcdir="$$s/winsup"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-winsup maybe-all-target-winsup +maybe-all-target-winsup: +all-target-winsup: configure-target-winsup + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-winsup maybe-check-target-winsup +maybe-check-target-winsup: + +check-target-winsup: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-winsup maybe-install-target-winsup +maybe-install-target-winsup: + +install-target-winsup: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libgloss maybe-configure-target-libgloss +maybe-configure-target-libgloss: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out + +configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out + @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libgloss; \ + cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libgloss"; \ + libsrcdir="$$s/libgloss"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libgloss maybe-all-target-libgloss +maybe-all-target-libgloss: +all-target-libgloss: configure-target-libgloss + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libgloss maybe-check-target-libgloss +maybe-check-target-libgloss: + +# Dummy target for uncheckable module. +check-target-libgloss: + + +.PHONY: install-target-libgloss maybe-install-target-libgloss +maybe-install-target-libgloss: + +install-target-libgloss: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libiberty maybe-configure-target-libiberty +maybe-configure-target-libiberty: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out + +configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out + @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libiberty; \ + cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libiberty maybe-all-target-libiberty +maybe-all-target-libiberty: +all-target-libiberty: configure-target-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libiberty maybe-check-target-libiberty +maybe-check-target-libiberty: + +check-target-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libiberty maybe-install-target-libiberty +maybe-install-target-libiberty: + +install-target-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-gperf maybe-configure-target-gperf +maybe-configure-target-gperf: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out + +configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out + @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/gperf; \ + cd "$(TARGET_SUBDIR)/gperf" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/gperf"; \ + libsrcdir="$$s/gperf"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-gperf maybe-all-target-gperf +maybe-all-target-gperf: +all-target-gperf: configure-target-gperf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-gperf maybe-check-target-gperf +maybe-check-target-gperf: + +check-target-gperf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-gperf maybe-install-target-gperf +maybe-install-target-gperf: + +install-target-gperf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-examples maybe-configure-target-examples +maybe-configure-target-examples: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/examples/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out + +configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out + @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/examples; \ + cd "$(TARGET_SUBDIR)/examples" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/examples"; \ + libsrcdir="$$s/examples"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-examples maybe-all-target-examples +maybe-all-target-examples: +all-target-examples: configure-target-examples + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-examples maybe-check-target-examples +maybe-check-target-examples: + +# Dummy target for uncheckable module. +check-target-examples: + + +.PHONY: install-target-examples maybe-install-target-examples +maybe-install-target-examples: + +# Dummy target for uninstallable. +install-target-examples: + + +.PHONY: configure-target-libffi maybe-configure-target-libffi +maybe-configure-target-libffi: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out + +configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out + @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libffi; \ + cd "$(TARGET_SUBDIR)/libffi" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libffi"; \ + libsrcdir="$$s/libffi"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libffi maybe-all-target-libffi +maybe-all-target-libffi: +all-target-libffi: configure-target-libffi + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libffi maybe-check-target-libffi +maybe-check-target-libffi: + +check-target-libffi: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libffi maybe-install-target-libffi +maybe-install-target-libffi: + +install-target-libffi: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libjava maybe-configure-target-libjava +maybe-configure-target-libjava: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out + +configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out + @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libjava; \ + cd "$(TARGET_SUBDIR)/libjava" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libjava"; \ + libsrcdir="$$s/libjava"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libjava maybe-all-target-libjava +maybe-all-target-libjava: +all-target-libjava: configure-target-libjava + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libjava maybe-check-target-libjava +maybe-check-target-libjava: + +check-target-libjava: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libjava maybe-install-target-libjava +maybe-install-target-libjava: + +install-target-libjava: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-zlib maybe-configure-target-zlib +maybe-configure-target-zlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out + +configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/zlib; \ + cd "$(TARGET_SUBDIR)/zlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/zlib"; \ + libsrcdir="$$s/zlib"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-zlib maybe-all-target-zlib +maybe-all-target-zlib: +all-target-zlib: configure-target-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-zlib maybe-check-target-zlib +maybe-check-target-zlib: + +check-target-zlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-zlib maybe-install-target-zlib +maybe-install-target-zlib: + +install-target-zlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc +maybe-configure-target-boehm-gc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out + +configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out + @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \ + cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/boehm-gc"; \ + libsrcdir="$$s/boehm-gc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc +maybe-all-target-boehm-gc: +all-target-boehm-gc: configure-target-boehm-gc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc +maybe-check-target-boehm-gc: + +check-target-boehm-gc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc +maybe-install-target-boehm-gc: + +install-target-boehm-gc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-qthreads maybe-configure-target-qthreads +maybe-configure-target-qthreads: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out + +configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out + @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/qthreads; \ + cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/qthreads"; \ + libsrcdir="$$s/qthreads"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-qthreads maybe-all-target-qthreads +maybe-all-target-qthreads: +all-target-qthreads: configure-target-qthreads + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-qthreads maybe-check-target-qthreads +maybe-check-target-qthreads: + +check-target-qthreads: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-qthreads maybe-install-target-qthreads +maybe-install-target-qthreads: + +install-target-qthreads: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-rda maybe-configure-target-rda +maybe-configure-target-rda: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/rda/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out + +configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out + @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/rda; \ + cd "$(TARGET_SUBDIR)/rda" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/rda"; \ + libsrcdir="$$s/rda"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-rda maybe-all-target-rda +maybe-all-target-rda: +all-target-rda: configure-target-rda + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-rda maybe-check-target-rda +maybe-check-target-rda: + +check-target-rda: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-rda maybe-install-target-rda +maybe-install-target-rda: + +install-target-rda: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libada maybe-configure-target-libada +maybe-configure-target-libada: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libada/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out + +configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out + @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libada; \ + cd "$(TARGET_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libada maybe-all-target-libada +maybe-all-target-libada: +all-target-libada: configure-target-libada + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libada maybe-check-target-libada +maybe-check-target-libada: + +check-target-libada: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libada maybe-install-target-libada +maybe-install-target-libada: + +install-target-libada: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + + +# ---------- +# GCC module +# ---------- + +# Unfortunately, while gcc _should_ be a host module, +# libgcc is a target module, and gen* programs are +# build modules. So GCC is a sort of hybrid. + +# gcc is the only module which uses GCC_FLAGS_TO_PASS. +# Don't use shared host config.cache, as it will confuse later +# directories; GCC wants slightly different values for some +# precious variables. *sigh* +.PHONY: configure-gcc maybe-configure-gcc +maybe-configure-gcc: +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that +# causes trouble. This wart will be fixed eventually by moving +# the bootstrap behavior to this file. +.PHONY: all-gcc maybe-all-gcc +maybe-all-gcc: +all-gcc: configure-gcc + @if [ -f gcc/stage_last ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ + else \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ + fi + +# Building GCC uses some tools for rebuilding "source" files +# like texinfo, bison/byacc, etc. So we must depend on those. +# +# While building GCC, it may be necessary to run various target +# programs like the assembler, linker, etc. So we depend on +# those too. +# +# In theory, on an SMP all those dependencies can be resolved +# in parallel. +# +GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap +.PHONY: $(GCC_STRAP_TARGETS) +$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + case "$@" in \ + *bootstrap4-lean ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3-lean ;; \ + *bootstrap4 ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3 ;; \ + *-lean ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare-lean ;; \ + * ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare ;; \ + esac; \ + $(SET_LIB_PATH) \ + echo "$$msg"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + +profiledbootstrap: all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries and training compiler"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building feedback based compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build + +.PHONY: cross +cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building the C and C++ compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all + +.PHONY: check-gcc maybe-check-gcc +maybe-check-gcc: +check-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ + else \ + true; \ + fi + +.PHONY: check-gcc-c++ +check-gcc-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + else \ + true; \ + fi + +.PHONY: check-c++ +check-c++: check-target-libstdc++-v3 check-gcc-c++ + +.PHONY: install-gcc maybe-install-gcc +maybe-install-gcc: +install-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + else \ + true; \ + fi + +# Install the gcc headers files, but not the fixed include files, +# which Cygnus is not allowed to distribute. This rule is very +# dependent on the workings of the gcc Makefile.in. +.PHONY: gcc-no-fixedincludes +gcc-no-fixedincludes: + @if [ -f ./gcc/Makefile ]; then \ + rm -rf gcc/tmp-include; \ + mv gcc/include gcc/tmp-include 2>/dev/null; \ + mkdir gcc/include; \ + cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ + touch gcc/stmp-fixinc gcc/include/fixed; \ + rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + rm -rf gcc/include; \ + mv gcc/tmp-include gcc/include 2>/dev/null; \ + else true; fi + +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- + +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. +# GCC needs to identify certain tools. +# GCC also needs the information exported by the intl configure script. +configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex +all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty +all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. +# GDB needs to know that the simulator is being built. +configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim +GDB_TK = @GDB_TK@ +all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) +install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui +configure-libgui: maybe-configure-tcl maybe-configure-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl + +# Host modules specific to binutils. +configure-bfd: configure-libiberty +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +install-binutils: maybe-install-opcodes +# libopcodes depends on libbfd +install-opcodes: maybe-install-bfd +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty + +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +configure-expect: maybe-configure-tcl maybe-configure-tk +all-expect: maybe-all-tcl maybe-all-tk +configure-itcl: maybe-configure-tcl maybe-configure-tk +all-itcl: maybe-all-tcl maybe-all-tk +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. +install-itcl: maybe-install-tcl +all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb +configure-tk: maybe-configure-tcl +all-tk: maybe-all-tcl +configure-tix: maybe-configure-tcl maybe-configure-tk +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty + +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty maybe-all-intl +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-tar: maybe-all-libiberty +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libada: $(ALL_GCC_C) +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-rda: $(ALL_GCC_C) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) + +# Dependencies of maybe-foo on foo. These are used because, for example, +# all-gcc only depends on all-gas if gas is present and being configured. +@maybe_dependencies@ + +# Serialization dependencies. Host configures don't work well in parallel to +# each other, due to contention over config.cache. Target configures and +# build configures are similar. +@serialization_dependencies@ + +# -------------------------------- +# Regenerating top level configury +# -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# work around various timestamp bugs on some systems. +# We use move-if-change so that it's only considered updated when it +# actually changes, because it has to depend on a phony target. +multilib.out: maybe-all-gcc + @r=`${PWD_COMMAND}`; export r; \ + echo "Checking multilib configuration..."; \ + $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ + $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ + +# Rebuilding Makefile.in, using autogen. +AUTOGEN = autogen +$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def + cd $(srcdir) && $(AUTOGEN) Makefile.def + +# Rebuilding Makefile. +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: configure $(gcc_version_trigger) + CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck + +# Rebuilding configure. +AUTOCONF = autoconf +$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4 + cd $(srcdir) && $(AUTOCONF) + +# ------------------------------ +# Special directives to GNU Make +# ------------------------------ + +# Don't pass command-line variables to submakes. +.NOEXPORT: +MAKEOVERRIDES= + +# end of Makefile.in diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/include/obstack.h /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/include/obstack.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/include/obstack.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/include/obstack.h 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,612 @@ +/* obstack.h - object stack macros + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserve + + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@gnu.org. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Summary: + +All the apparent functions defined here are macros. The idea +is that you would use these pre-tested macros to solve a +very specific set of problems, and they would run fast. +Caution: no side-effects in arguments please!! They may be +evaluated MANY times!! + +These macros operate a stack of objects. Each object starts life +small, and may grow to maturity. (Consider building a word syllable +by syllable.) An object can move while it is growing. Once it has +been "finished" it never changes address again. So the "top of the +stack" is typically an immature growing object, while the rest of the +stack is of mature, fixed size and fixed address objects. + +These routines grab large chunks of memory, using a function you +supply, called `obstack_chunk_alloc'. On occasion, they free chunks, +by calling `obstack_chunk_free'. You must define them and declare +them before using any obstack macros. + +Each independent stack is represented by a `struct obstack'. +Each of the obstack macros expects a pointer to such a structure +as the first argument. + +One motivation for this package is the problem of growing char strings +in symbol tables. Unless you are "fascist pig with a read-only mind" +--Gosper's immortal quote from HAKMEM item 154, out of context--you +would not like to put any arbitrary upper limit on the length of your +symbols. + +In practice this often means you will build many short symbols and a +few long symbols. At the time you are reading a symbol you don't know +how long it is. One traditional method is to read a symbol into a +buffer, realloc()ating the buffer every time you try to read a symbol +that is longer than the buffer. This is beaut, but you still will +want to copy the symbol from the buffer to a more permanent +symbol-table entry say about half the time. + +With obstacks, you can work differently. Use one obstack for all symbol +names. As you read a symbol, grow the name in the obstack gradually. +When the name is complete, finalize it. Then, if the symbol exists already, +free the newly read name. + +The way we do this is to take a large chunk, allocating memory from +low addresses. When you want to build a symbol in the chunk you just +add chars above the current "high water mark" in the chunk. When you +have finished adding chars, because you got to the end of the symbol, +you know how long the chars are, and you can create a new object. +Mostly the chars will not burst over the highest address of the chunk, +because you would typically expect a chunk to be (say) 100 times as +long as an average object. + +In case that isn't clear, when we have enough chars to make up +the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) +so we just point to it where it lies. No moving of chars is +needed and this is the second win: potentially long strings need +never be explicitly shuffled. Once an object is formed, it does not +change its address during its lifetime. + +When the chars burst over a chunk boundary, we allocate a larger +chunk, and then copy the partly formed object from the end of the old +chunk to the beginning of the new larger chunk. We then carry on +accreting characters to the end of the object as we normally would. + +A special macro is provided to add a single char at a time to a +growing object. This allows the use of register variables, which +break the ordinary 'growth' macro. + +Summary: + We allocate large chunks. + We carve out one object at a time from the current chunk. + Once carved, an object never moves. + We are free to append data of any size to the currently + growing object. + Exactly one object is growing in an obstack at any one time. + You can run one obstack per control block. + You may have as many control blocks as you dare. + Because of the way we do it, you can `unwind' an obstack + back to a previous state. (You may remove objects much + as you would with a stack.) +*/ + + +/* Don't do the contents of this file more than once. */ + +#ifndef _OBSTACK_H +#define _OBSTACK_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use subtraction of (char *) 0 instead of casting to int + because on word-addressable machines a simple cast to int + may ignore the byte-within-word field of the pointer. */ + +#ifndef __PTR_TO_INT +# define __PTR_TO_INT(P) ((P) - (char *) 0) +#endif + +#ifndef __INT_TO_PTR +# define __INT_TO_PTR(P) ((P) + (char *) 0) +#endif + +/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is + defined, as with GNU C, use that; that way we don't pollute the + namespace with 's symbols. Otherwise, if is + available, include it and use ptrdiff_t. In traditional C, long is + the best that we can do. */ + +#ifdef __PTRDIFF_TYPE__ +# define PTR_INT_TYPE __PTRDIFF_TYPE__ +#else +# ifdef HAVE_STDDEF_H +# include +# define PTR_INT_TYPE ptrdiff_t +# else +# define PTR_INT_TYPE long +# endif +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +# if defined __STDC__ && __STDC__ +# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) +# else +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# endif +#else +# ifdef memcpy +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# else +# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) +# endif +#endif + +struct _obstack_chunk /* Lives at front of each chunk. */ +{ + char *limit; /* 1 past end of this chunk */ + struct _obstack_chunk *prev; /* address of prior chunk or NULL */ + char contents[4]; /* objects begin here */ +}; + +struct obstack /* control current object in current chunk */ +{ + long chunk_size; /* preferred size to allocate chunks in */ + struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ + char *object_base; /* address of object we are building */ + char *next_free; /* where to add next char to current object */ + char *chunk_limit; /* address of char after current chunk */ + PTR_INT_TYPE temp; /* Temporary for some macros. */ + int alignment_mask; /* Mask of alignment for each object. */ +#if defined __STDC__ && __STDC__ + /* These prototypes vary based on `use_extra_arg', and we use + casts to the prototypeless function type in all assignments, + but having prototypes here quiets -Wstrict-prototypes. */ + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#else + struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ + void (*freefun) (); /* User's function to free a chunk. */ + char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#endif + unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ + unsigned maybe_empty_object:1;/* There is a possibility that the current + chunk contains a zero-length object. This + prevents freeing the chunk if we allocate + a bigger chunk to replace it. */ + unsigned alloc_failed:1; /* No longer used, as we now call the failed + handler on error, but retained for binary + compatibility. */ +}; + +/* Declare the external functions we use; they are in obstack.c. */ + +#if defined __STDC__ && __STDC__ +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); +#else +extern void _obstack_newchunk (); +extern void _obstack_free (); +extern int _obstack_begin (); +extern int _obstack_begin_1 (); +extern int _obstack_memory_used (); +#endif + +#if defined __STDC__ && __STDC__ + +/* Do the function-declarations after the structs + but before defining the macros. */ + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + +#endif /* __STDC__ */ + +/* Non-ANSI C cannot really support alternative functions for these macros, + so we do not declare them. */ + +/* Error handler called when `obstack_chunk_alloc' failed to allocate + more memory. This can be set to a user defined function. The + default action is to print a message and abort. */ +#if defined __STDC__ && __STDC__ +extern void (*obstack_alloc_failed_handler) (void); +#else +extern void (*obstack_alloc_failed_handler) (); +#endif + +/* Exit value used when `print_and_abort' is used. */ +extern int obstack_exit_failure; + +/* Pointer to beginning of object being allocated or to be allocated next. + Note that this might not be the final address of the object + because a new chunk might be needed to hold the final size. */ + +#define obstack_base(h) ((h)->object_base) + +/* Size for allocating ordinary chunks. */ + +#define obstack_chunk_size(h) ((h)->chunk_size) + +/* Pointer to next byte not yet allocated in current chunk. */ + +#define obstack_next_free(h) ((h)->next_free) + +/* Mask specifying low bits that should be clear in address of an object. */ + +#define obstack_alignment_mask(h) ((h)->alignment_mask) + +/* To prevent prototype warnings provide complete argument list in + standard C version. */ +#if defined __STDC__ && __STDC__ + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) (void *, long)) (chunkfun), \ + (void (*) (void *, void *)) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) + +#else + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)()) (newfreefun)) + +#endif + +#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + +#define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +#define obstack_memory_used(h) _obstack_memory_used (h) + +#if defined __GNUC__ && defined __STDC__ && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) +# define __extension__ +# endif + +/* For GNU C, if not -traditional, + we can define these macros to compute all args only once + without using a global variable. + Also, we can avoid using the `temp' slot, to make faster code. */ + +# define obstack_object_size(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->next_free - __o->object_base); }) + +# define obstack_room(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->chunk_limit - __o->next_free); }) + +# define obstack_make_room(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + (void) 0; }) + +# define obstack_empty_p(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + +# define obstack_grow(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len > __o->chunk_limit) \ + _obstack_newchunk (__o, __len); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + (void) 0; }) + +# define obstack_grow0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, __len + 1); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + *(__o->next_free)++ = 0; \ + (void) 0; }) + +# define obstack_1grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ + obstack_1grow_fast (__o, datum); \ + (void) 0; }) + +/* These assume that the obstack alignment is good enough for pointers or ints, + and that the data added so far to the current object + shares that much alignment. */ + +# define obstack_ptr_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + obstack_ptr_grow_fast (__o, datum); }) + +# define obstack_int_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ + obstack_int_grow_fast (__o, datum); }) + +# define obstack_ptr_grow_fast(OBSTACK,aptr) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(const void **) __o1->next_free = (aptr); \ + __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +# define obstack_int_grow_fast(OBSTACK,aint) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(int *) __o1->next_free = (aint); \ + __o1->next_free += sizeof (int); \ + (void) 0; }) + +# define obstack_blank(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + obstack_blank_fast (__o, __len); \ + (void) 0; }) + +# define obstack_alloc(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_blank (__h, (length)); \ + obstack_finish (__h); }) + +# define obstack_copy(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow (__h, (where), (length)); \ + obstack_finish (__h); }) + +# define obstack_copy0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow0 (__h, (where), (length)); \ + obstack_finish (__h); }) + +/* The local variable is named __o1 to avoid a name conflict + when obstack_blank is called. */ +# define obstack_finish(OBSTACK) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + void *value; \ + value = (void *) __o1->object_base; \ + if (__o1->next_free == value) \ + __o1->maybe_empty_object = 1; \ + __o1->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ + & ~ (__o1->alignment_mask)); \ + if (__o1->next_free - (char *)__o1->chunk \ + > __o1->chunk_limit - (char *)__o1->chunk) \ + __o1->next_free = __o1->chunk_limit; \ + __o1->object_base = __o1->next_free; \ + value; }) + +# define obstack_free(OBSTACK, OBJ) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + void *__obj = (void *) (OBJ); \ + if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ + __o->next_free = __o->object_base = (char *) __obj; \ + else (obstack_free) (__o, __obj); }) + +#else /* not __GNUC__ or not __STDC__ */ + +# define obstack_object_size(h) \ + (unsigned) ((h)->next_free - (h)->object_base) + +# define obstack_room(h) \ + (unsigned) ((h)->chunk_limit - (h)->next_free) + +# define obstack_empty_p(h) \ + ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + +/* Note that the call to _obstack_newchunk is enclosed in (..., 0) + so that we can avoid having void expressions + in the arms of the conditional expression. + Casting the third operand to void was tried before, + but some compilers won't accept it. */ + +# define obstack_make_room(h,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) + +# define obstack_grow(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp) + +# define obstack_grow0(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp, \ + *((h)->next_free)++ = 0) + +# define obstack_1grow(h,datum) \ +( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ + obstack_1grow_fast (h, datum)) + +# define obstack_ptr_grow(h,datum) \ +( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ + obstack_ptr_grow_fast (h, datum)) + +# define obstack_int_grow(h,datum) \ +( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ + obstack_int_grow_fast (h, datum)) + +# define obstack_ptr_grow_fast(h,aptr) \ + (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +# define obstack_int_grow_fast(h,aint) \ + (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + +# define obstack_blank(h,length) \ +( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + obstack_blank_fast (h, (h)->temp)) + +# define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) + +# define obstack_copy(h,where,length) \ + (obstack_grow ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_copy0(h,where,length) \ + (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_finish(h) \ +( ((h)->next_free == (h)->object_base \ + ? (((h)->maybe_empty_object = 1), 0) \ + : 0), \ + (h)->temp = __PTR_TO_INT ((h)->object_base), \ + (h)->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ + & ~ ((h)->alignment_mask)), \ + (((h)->next_free - (char *) (h)->chunk \ + > (h)->chunk_limit - (char *) (h)->chunk) \ + ? ((h)->next_free = (h)->chunk_limit) : 0), \ + (h)->object_base = (h)->next_free, \ + __INT_TO_PTR ((h)->temp)) + +# if defined __STDC__ && __STDC__ +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) +# else +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) +# endif + +#endif /* not __GNUC__ or not __STDC__ */ + +#ifdef __cplusplus +} /* C++ */ +#endif + +#endif /* obstack.h */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/gdb-6.1/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/gdb-6.1/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,23927 @@ + +# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. +# +# Makefile for directory with subdirs to build. +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation +# Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# ------------------------------- +# Standard Autoconf-set variables +# ------------------------------- +VPATH=@srcdir@ + +build_alias=@build_alias@ +build=@build@ +host_alias=@host_alias@ +host=@host@ +target_alias=@target_alias@ +target=@target@ + +program_transform_name = @program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +srcdir = @srcdir@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +includedir = @includedir@ +oldincludedir = @oldincludedir@ +infodir = @infodir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +# ------------------------------------------------- +# Miscellaneous non-standard autoconf-set variables +# ------------------------------------------------- + +links=@configlinks@ +# The file containing GCC's version number. +gcc_version_trigger = @gcc_version_trigger@ +gcc_version = @gcc_version@ + +# The gcc driver likes to know the arguments it was configured with. +TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ + +gxx_include_dir = @gxx_include_dir@ +libstdcxx_incdir = @libstdcxx_incdir@ + +tooldir = @tooldir@ +build_tooldir = @build_tooldir@ + +# Directory in which the compiler finds executables, libraries, etc. +libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) +GDB_NLM_DEPS = + +# This is the name of the environment variable used for the path to +# the libraries. +RPATH_ENVVAR = @RPATH_ENVVAR@ + +# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared +# was used. +SET_LIB_PATH = @SET_LIB_PATH@ + +# configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. +REALLY_SET_LIB_PATH = \ + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + +# This is the list of directories to be built for the build system. +BUILD_CONFIGDIRS = libiberty +# Build programs are put under this directory. +BUILD_SUBDIR = @build_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the build system. +BUILD_CONFIGARGS = @build_configargs@ + +# This is the list of directories to built for the host system. +SUBDIRS = @configdirs@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the host system. +HOST_CONFIGARGS = @host_configargs@ + +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = @target_configdirs@ +# Target libraries are put under this directory: +TARGET_SUBDIR = @target_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the target. +TARGET_CONFIGARGS = @target_configargs@ + +# ---------------------------------------------- +# Programs producing files for the BUILD machine +# ---------------------------------------------- + +SHELL = @config_shell@ + +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) + +# compilers to use to create programs which must be run in the build +# environment. +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + +ifeq ($(ARCH), ppc64) +CFLAGS_FOR_BUILD += -m64 -fPIC +endif + +CXX_FOR_BUILD = $(CXX) + +# Special variables passed down in EXTRA_GCC_FLAGS. They are defined +# here so that they can be overridden by Makefile fragments. +BUILD_PREFIX = @BUILD_PREFIX@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + +BISON=@BISON@ +USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -L $$s/bison/ ; \ + else \ + echo bison ; \ + fi` + +DEFAULT_YACC = @DEFAULT_YACC@ +YACC=@YACC@ +USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -y -L $$s/bison/ ; \ + elif [ -f $$r/byacc/byacc ] ; then \ + echo $$r/byacc/byacc ; \ + else \ + echo ${DEFAULT_YACC} ; \ + fi` + +DEFAULT_LEX = @DEFAULT_LEX@ +LEX=@LEX@ +USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ + then echo $$r/flex/flex ; \ + else echo ${DEFAULT_LEX} ; fi` + +DEFAULT_M4 = @DEFAULT_M4@ +M4 = `if [ -f $$r/m4/m4 ] ; \ + then echo $$r/m4/m4 ; \ + else echo ${DEFAULT_M4} ; fi` + +# For an installed makeinfo, we require it to be from texinfo 4.2 or +# higher, else we use the "missing" dummy. +MAKEINFO=@MAKEINFO@ +USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ + then echo $$r/texinfo/makeinfo/makeinfo ; \ + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` + +# This just becomes part of the MAKEINFO definition passed down to +# sub-makes. It lets flags be given on the command line while still +# using the makeinfo from the object tree. +# (Default to avoid splitting info files by setting the threshold high.) +MAKEINFOFLAGS = --split-size=5000000 + +EXPECT = `if [ -f $$r/expect/expect ] ; \ + then echo $$r/expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ + then echo $$s/dejagnu/runtest ; \ + else echo runtest ; fi` + +# --------------------------------------------- +# Programs producing files for the HOST machine +# --------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +AS = @AS@ + +AR = @AR@ +AR_FLAGS = rc + +CC = @CC@ +CFLAGS = @CFLAGS@ +ifeq ($(ARCH), ppc64) +CFLAGS += -m64 -fPIC +endif +LIBCFLAGS = $(CFLAGS) + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + +DLLTOOL = @DLLTOOL@ + +NM = @NM@ + +LD = @LD@ +LDFLAGS = + +RANLIB = @RANLIB@ + +WINDRES = @WINDRES@ + +PICFLAG = + +# ----------------------------------------------- +# Programs producing files for the TARGET machine +# ----------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: + +FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ + +AR_FOR_TARGET=@AR_FOR_TARGET@ +USUAL_AR_FOR_TARGET = ` \ + if [ -f $$r/binutils/ar ] ; then \ + echo $$r/binutils/ar ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AR); \ + else \ + echo ar | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +AS_FOR_TARGET=@AS_FOR_TARGET@ +USUAL_AS_FOR_TARGET = ` \ + if [ -f $$r/gas/as-new ] ; then \ + echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AS); \ + else \ + echo as | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +CC_FOR_TARGET = @CC_FOR_TARGET@ +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +# If GCC_FOR_TARGET is not overriden on the command line, then this +# variable is passed down to the gcc Makefile, where it is used to +# build libgcc2.a. We define it here so that it can itself be +# overridden on the command line. +GCC_FOR_TARGET=@GCC_FOR_TARGET@ +USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + +CXX_FOR_TARGET = @CXX_FOR_TARGET@ +RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ +USUAL_DLLTOOL_FOR_TARGET = ` \ + if [ -f $$r/binutils/dlltool ] ; then \ + echo $$r/binutils/dlltool ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(DLLTOOL); \ + else \ + echo dlltool | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ + +LD_FOR_TARGET=@LD_FOR_TARGET@ +USUAL_LD_FOR_TARGET = ` \ + if [ -f $$r/ld/ld-new ] ; then \ + echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(LD); \ + else \ + echo ld | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +LDFLAGS_FOR_TARGET = + +NM_FOR_TARGET=@NM_FOR_TARGET@ +USUAL_NM_FOR_TARGET = ` \ + if [ -f $$r/binutils/nm-new ] ; then \ + echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(NM); \ + else \ + echo nm | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +USUAL_RANLIB_FOR_TARGET = ` \ + if [ -f $$r/binutils/ranlib ] ; then \ + echo $$r/binutils/ranlib ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + if [ x'$(RANLIB)' != x ]; then \ + echo $(RANLIB); \ + else \ + echo ranlib; \ + fi; \ + else \ + echo ranlib | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ +USUAL_WINDRES_FOR_TARGET = ` \ + if [ -f $$r/binutils/windres ] ; then \ + echo $$r/binutils/windres ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(WINDRES); \ + else \ + echo windres | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +PICFLAG_FOR_TARGET = + +# ------------------------------------ +# Miscellaneous targets and flag lists +# ------------------------------------ + +# The first rule in the file had better be this one. Don't put any above it. +# This lives here to allow makefile fragments to contain dependencies. +all: all.normal +.PHONY: all + +#### host and target specific makefile fragments come in here. +@target_makefile_frag@ +@alphaieee_frag@ +@ospace_frag@ +@host_makefile_frag@ +### + +# Flags to pass down to all sub-makes. +BASE_FLAGS_TO_PASS = \ + "DESTDIR=$(DESTDIR)" \ + "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ + "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ + "bindir=$(bindir)" \ + "datadir=$(datadir)" \ + "exec_prefix=$(exec_prefix)" \ + "includedir=$(includedir)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "libexecdir=$(libexecdir)" \ + "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ + "localstatedir=$(localstatedir)" \ + "mandir=$(mandir)" \ + "oldincludedir=$(oldincludedir)" \ + "prefix=$(prefix)" \ + "sbindir=$(sbindir)" \ + "sharedstatedir=$(sharedstatedir)" \ + "sysconfdir=$(sysconfdir)" \ + "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "gcc_version=$(gcc_version)" \ + "gcc_version_trigger=$(gcc_version_trigger)" \ + "target_alias=$(target_alias)" \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "SHELL=$(SHELL)" \ + "YACC=$(YACC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ + "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ + "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "CONFIG_SHELL=$(SHELL)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + +# Flags to pass down to most sub-makes, in which we're building with +# the host environment. +EXTRA_HOST_FLAGS = \ + 'AR=$(AR)' \ + 'AS=$(AS)' \ + 'CC=$(CC)' \ + 'CXX=$(CXX)' \ + 'DLLTOOL=$(DLLTOOL)' \ + 'LD=$(LD)' \ + 'NM=$(NM)' \ + 'RANLIB=$(RANLIB)' \ + 'WINDRES=$(WINDRES)' + +FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) + +# Flags that are concerned with the location of the X11 include files +# and library files +# +# NOTE: until the top-level is getting the values via autoconf, it only +# causes problems to have this top-level Makefile overriding the autoconf-set +# values in child directories. Only variables that don't conflict with +# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. +# +X11_FLAGS_TO_PASS = \ + 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ + 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' + +# Flags to pass down to makes which are built with the target environment. +# The double $ decreases the length of the command line; the variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +EXTRA_TARGET_FLAGS = \ + 'AR=$$(AR_FOR_TARGET)' \ + 'AS=$$(AS_FOR_TARGET)' \ + 'CC=$$(CC_FOR_TARGET)' \ + 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ + 'CXX=$$(CXX_FOR_TARGET)' \ + 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ + 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ + 'LD=$$(LD_FOR_TARGET)' \ + 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ + 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ + 'NM=$$(NM_FOR_TARGET)' \ + 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'WINDRES=$$(WINDRES_FOR_TARGET)' + +TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) + +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. +# If any variables are added here, they must be added to do-*, below. +# The BUILD_* variables are a special case, which are used for the gcc +# cross-building scheme. +EXTRA_GCC_FLAGS = \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + +GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) + +.PHONY: configure-host +configure-host: maybe-configure-gcc \ + maybe-configure-ash \ + maybe-configure-autoconf \ + maybe-configure-automake \ + maybe-configure-bash \ + maybe-configure-bfd \ + maybe-configure-opcodes \ + maybe-configure-binutils \ + maybe-configure-bison \ + maybe-configure-byacc \ + maybe-configure-bzip2 \ + maybe-configure-dejagnu \ + maybe-configure-diff \ + maybe-configure-dosutils \ + maybe-configure-etc \ + maybe-configure-fastjar \ + maybe-configure-fileutils \ + maybe-configure-findutils \ + maybe-configure-find \ + maybe-configure-flex \ + maybe-configure-gas \ + maybe-configure-gawk \ + maybe-configure-gettext \ + maybe-configure-gnuserv \ + maybe-configure-gprof \ + maybe-configure-gzip \ + maybe-configure-hello \ + maybe-configure-indent \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ + maybe-configure-ld \ + maybe-configure-libgui \ + maybe-configure-libiberty \ + maybe-configure-libtool \ + maybe-configure-m4 \ + maybe-configure-make \ + maybe-configure-mmalloc \ + maybe-configure-patch \ + maybe-configure-perl \ + maybe-configure-prms \ + maybe-configure-rcs \ + maybe-configure-readline \ + maybe-configure-release \ + maybe-configure-recode \ + maybe-configure-sed \ + maybe-configure-send-pr \ + maybe-configure-shellutils \ + maybe-configure-sid \ + maybe-configure-sim \ + maybe-configure-tar \ + maybe-configure-texinfo \ + maybe-configure-textutils \ + maybe-configure-time \ + maybe-configure-uudecode \ + maybe-configure-wdiff \ + maybe-configure-zip \ + maybe-configure-zlib \ + maybe-configure-gdb \ + maybe-configure-expect \ + maybe-configure-guile \ + maybe-configure-tk \ + maybe-configure-tix \ + maybe-configure-libtermcap \ + maybe-configure-utils +.PHONY: configure-target +configure-target: \ + maybe-configure-target-libstdc++-v3 \ + maybe-configure-target-newlib \ + maybe-configure-target-libf2c \ + maybe-configure-target-libobjc \ + maybe-configure-target-libtermcap \ + maybe-configure-target-winsup \ + maybe-configure-target-libgloss \ + maybe-configure-target-libiberty \ + maybe-configure-target-gperf \ + maybe-configure-target-examples \ + maybe-configure-target-libffi \ + maybe-configure-target-libjava \ + maybe-configure-target-zlib \ + maybe-configure-target-boehm-gc \ + maybe-configure-target-qthreads \ + maybe-configure-target-rda \ + maybe-configure-target-libada + +# The target built for a native build. +.PHONY: all.normal +all.normal: @all_build_modules@ all-host all-target + +.PHONY: all-host +all-host: maybe-all-gcc \ + maybe-all-ash \ + maybe-all-autoconf \ + maybe-all-automake \ + maybe-all-bash \ + maybe-all-bfd \ + maybe-all-opcodes \ + maybe-all-binutils \ + maybe-all-bison \ + maybe-all-byacc \ + maybe-all-bzip2 \ + maybe-all-dejagnu \ + maybe-all-diff \ + maybe-all-dosutils \ + maybe-all-etc \ + maybe-all-fastjar \ + maybe-all-fileutils \ + maybe-all-findutils \ + maybe-all-find \ + maybe-all-flex \ + maybe-all-gas \ + maybe-all-gawk \ + maybe-all-gettext \ + maybe-all-gnuserv \ + maybe-all-gprof \ + maybe-all-gzip \ + maybe-all-hello \ + maybe-all-indent \ + maybe-all-intl \ + maybe-all-tcl \ + maybe-all-itcl \ + maybe-all-ld \ + maybe-all-libgui \ + maybe-all-libiberty \ + maybe-all-libtool \ + maybe-all-m4 \ + maybe-all-make \ + maybe-all-mmalloc \ + maybe-all-patch \ + maybe-all-perl \ + maybe-all-prms \ + maybe-all-rcs \ + maybe-all-readline \ + maybe-all-release \ + maybe-all-recode \ + maybe-all-sed \ + maybe-all-send-pr \ + maybe-all-shellutils \ + maybe-all-sid \ + maybe-all-sim \ + maybe-all-tar \ + maybe-all-texinfo \ + maybe-all-textutils \ + maybe-all-time \ + maybe-all-uudecode \ + maybe-all-wdiff \ + maybe-all-zip \ + maybe-all-zlib \ + maybe-all-gdb \ + maybe-all-expect \ + maybe-all-guile \ + maybe-all-tk \ + maybe-all-tix \ + maybe-all-libtermcap +# maybe-all-utils +.PHONY: all-target +all-target: \ + maybe-all-target-libstdc++-v3 \ + maybe-all-target-newlib \ + maybe-all-target-libf2c \ + maybe-all-target-libobjc \ + maybe-all-target-libtermcap \ + maybe-all-target-winsup \ + maybe-all-target-libgloss \ + maybe-all-target-libiberty \ + maybe-all-target-gperf \ + maybe-all-target-examples \ + maybe-all-target-libffi \ + maybe-all-target-libjava \ + maybe-all-target-zlib \ + maybe-all-target-boehm-gc \ + maybe-all-target-qthreads \ + maybe-all-target-rda \ + maybe-all-target-libada + +# Do a target for all the subdirectories. A ``make do-X'' will do a +# ``make X'' in all subdirectories (because, in general, there is a +# dependency (below) of X upon do-X, a ``make X'' will also do this, +# but it may do additional work as well). + +.PHONY: do-info +do-info: info-host info-target + +.PHONY: info-host +info-host: maybe-info-gcc \ + maybe-info-ash \ + maybe-info-autoconf \ + maybe-info-automake \ + maybe-info-bash \ + maybe-info-bfd \ + maybe-info-opcodes \ + maybe-info-binutils \ + maybe-info-bison \ + maybe-info-byacc \ + maybe-info-bzip2 \ + maybe-info-dejagnu \ + maybe-info-diff \ + maybe-info-dosutils \ + maybe-info-etc \ + maybe-info-fastjar \ + maybe-info-fileutils \ + maybe-info-findutils \ + maybe-info-find \ + maybe-info-flex \ + maybe-info-gas \ + maybe-info-gawk \ + maybe-info-gettext \ + maybe-info-gnuserv \ + maybe-info-gprof \ + maybe-info-gzip \ + maybe-info-hello \ + maybe-info-indent \ + maybe-info-intl \ + maybe-info-tcl \ + maybe-info-itcl \ + maybe-info-ld \ + maybe-info-libgui \ + maybe-info-libiberty \ + maybe-info-libtool \ + maybe-info-m4 \ + maybe-info-make \ + maybe-info-mmalloc \ + maybe-info-patch \ + maybe-info-perl \ + maybe-info-prms \ + maybe-info-rcs \ + maybe-info-readline \ + maybe-info-release \ + maybe-info-recode \ + maybe-info-sed \ + maybe-info-send-pr \ + maybe-info-shellutils \ + maybe-info-sid \ + maybe-info-sim \ + maybe-info-tar \ + maybe-info-texinfo \ + maybe-info-textutils \ + maybe-info-time \ + maybe-info-uudecode \ + maybe-info-wdiff \ + maybe-info-zip \ + maybe-info-zlib \ + maybe-info-gdb \ + maybe-info-expect \ + maybe-info-guile \ + maybe-info-tk \ + maybe-info-tix \ + maybe-info-libtermcap \ + maybe-info-utils + +.PHONY: info-target +info-target: \ + maybe-info-target-libstdc++-v3 \ + maybe-info-target-newlib \ + maybe-info-target-libf2c \ + maybe-info-target-libobjc \ + maybe-info-target-libtermcap \ + maybe-info-target-winsup \ + maybe-info-target-libgloss \ + maybe-info-target-libiberty \ + maybe-info-target-gperf \ + maybe-info-target-examples \ + maybe-info-target-libffi \ + maybe-info-target-libjava \ + maybe-info-target-zlib \ + maybe-info-target-boehm-gc \ + maybe-info-target-qthreads \ + maybe-info-target-rda \ + maybe-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-info-gcc info-gcc +maybe-info-gcc: +info-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-info-ash info-ash +maybe-info-ash: + +info-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-autoconf info-autoconf +maybe-info-autoconf: + +info-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-automake info-automake +maybe-info-automake: + +info-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bash info-bash +maybe-info-bash: + +info-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bfd info-bfd +maybe-info-bfd: + +info-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-opcodes info-opcodes +maybe-info-opcodes: + +info-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-binutils info-binutils +maybe-info-binutils: + +info-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bison info-bison +maybe-info-bison: + +info-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-byacc info-byacc +maybe-info-byacc: + +info-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bzip2 info-bzip2 +maybe-info-bzip2: + +info-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dejagnu info-dejagnu +maybe-info-dejagnu: + +info-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-diff info-diff +maybe-info-diff: + +info-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dosutils info-dosutils +maybe-info-dosutils: + +info-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-etc info-etc +maybe-info-etc: + +info-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fastjar info-fastjar +maybe-info-fastjar: + +info-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fileutils info-fileutils +maybe-info-fileutils: + +info-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-findutils info-findutils +maybe-info-findutils: + +info-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-find info-find +maybe-info-find: + +info-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-flex info-flex +maybe-info-flex: + +info-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gas info-gas +maybe-info-gas: + +info-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gawk info-gawk +maybe-info-gawk: + +info-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gettext info-gettext +maybe-info-gettext: + +info-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gnuserv info-gnuserv +maybe-info-gnuserv: + +info-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: + +info-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gzip info-gzip +maybe-info-gzip: + +info-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-hello info-hello +maybe-info-hello: + +info-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-indent info-indent +maybe-info-indent: + +info-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-intl info-intl +maybe-info-intl: + +info-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tcl info-tcl +maybe-info-tcl: + +info-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-itcl info-itcl +maybe-info-itcl: + +info-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-ld info-ld +maybe-info-ld: + +info-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libgui info-libgui +maybe-info-libgui: + +info-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libiberty info-libiberty +maybe-info-libiberty: + +info-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtool info-libtool +maybe-info-libtool: + +info-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-m4 info-m4 +maybe-info-m4: + +info-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-make info-make +maybe-info-make: + +info-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-mmalloc info-mmalloc +maybe-info-mmalloc: + +info-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-patch info-patch +maybe-info-patch: + +info-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-perl info-perl +maybe-info-perl: + +info-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-prms info-prms +maybe-info-prms: + +info-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-rcs info-rcs +maybe-info-rcs: + +info-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-readline info-readline +maybe-info-readline: + +info-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-release info-release +maybe-info-release: + +info-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-recode info-recode +maybe-info-recode: + +info-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sed info-sed +maybe-info-sed: + +info-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-send-pr info-send-pr +maybe-info-send-pr: + +info-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-shellutils info-shellutils +maybe-info-shellutils: + +info-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sid info-sid +maybe-info-sid: + +info-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sim info-sim +maybe-info-sim: + +info-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tar info-tar +maybe-info-tar: + +info-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-texinfo info-texinfo +maybe-info-texinfo: + +info-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-textutils info-textutils +maybe-info-textutils: + +info-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-time info-time +maybe-info-time: + +info-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-uudecode info-uudecode +maybe-info-uudecode: + +info-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-wdiff info-wdiff +maybe-info-wdiff: + +info-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zip info-zip +maybe-info-zip: + +info-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zlib info-zlib +maybe-info-zlib: + +info-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gdb info-gdb +maybe-info-gdb: + +info-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-expect info-expect +maybe-info-expect: + +info-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-guile info-guile +maybe-info-guile: + +info-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tk info-tk +maybe-info-tk: + +info-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tix info-tix +maybe-info-tix: + +info-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtermcap info-libtermcap +maybe-info-libtermcap: + +info-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-utils info-utils +maybe-info-utils: + +info-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3 +maybe-info-target-libstdc++-v3: + +info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-newlib info-target-newlib +maybe-info-target-newlib: + +info-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libf2c info-target-libf2c +maybe-info-target-libf2c: + +info-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libobjc info-target-libobjc +maybe-info-target-libobjc: + +info-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libtermcap info-target-libtermcap +maybe-info-target-libtermcap: + +info-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-winsup info-target-winsup +maybe-info-target-winsup: + +info-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libgloss info-target-libgloss +maybe-info-target-libgloss: + +info-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libiberty info-target-libiberty +maybe-info-target-libiberty: + +info-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-gperf info-target-gperf +maybe-info-target-gperf: + +info-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-examples info-target-examples +maybe-info-target-examples: + +info-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libffi info-target-libffi +maybe-info-target-libffi: + +info-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libjava info-target-libjava +maybe-info-target-libjava: + +info-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-zlib info-target-zlib +maybe-info-target-zlib: + +info-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc +maybe-info-target-boehm-gc: + +info-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-qthreads info-target-qthreads +maybe-info-target-qthreads: + +info-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-rda info-target-rda +maybe-info-target-rda: + +info-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libada info-target-libada +maybe-info-target-libada: + +info-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +.PHONY: do-dvi +do-dvi: dvi-host dvi-target + +.PHONY: dvi-host +dvi-host: maybe-dvi-gcc \ + maybe-dvi-ash \ + maybe-dvi-autoconf \ + maybe-dvi-automake \ + maybe-dvi-bash \ + maybe-dvi-bfd \ + maybe-dvi-opcodes \ + maybe-dvi-binutils \ + maybe-dvi-bison \ + maybe-dvi-byacc \ + maybe-dvi-bzip2 \ + maybe-dvi-dejagnu \ + maybe-dvi-diff \ + maybe-dvi-dosutils \ + maybe-dvi-etc \ + maybe-dvi-fastjar \ + maybe-dvi-fileutils \ + maybe-dvi-findutils \ + maybe-dvi-find \ + maybe-dvi-flex \ + maybe-dvi-gas \ + maybe-dvi-gawk \ + maybe-dvi-gettext \ + maybe-dvi-gnuserv \ + maybe-dvi-gprof \ + maybe-dvi-gzip \ + maybe-dvi-hello \ + maybe-dvi-indent \ + maybe-dvi-intl \ + maybe-dvi-tcl \ + maybe-dvi-itcl \ + maybe-dvi-ld \ + maybe-dvi-libgui \ + maybe-dvi-libiberty \ + maybe-dvi-libtool \ + maybe-dvi-m4 \ + maybe-dvi-make \ + maybe-dvi-mmalloc \ + maybe-dvi-patch \ + maybe-dvi-perl \ + maybe-dvi-prms \ + maybe-dvi-rcs \ + maybe-dvi-readline \ + maybe-dvi-release \ + maybe-dvi-recode \ + maybe-dvi-sed \ + maybe-dvi-send-pr \ + maybe-dvi-shellutils \ + maybe-dvi-sid \ + maybe-dvi-sim \ + maybe-dvi-tar \ + maybe-dvi-texinfo \ + maybe-dvi-textutils \ + maybe-dvi-time \ + maybe-dvi-uudecode \ + maybe-dvi-wdiff \ + maybe-dvi-zip \ + maybe-dvi-zlib \ + maybe-dvi-gdb \ + maybe-dvi-expect \ + maybe-dvi-guile \ + maybe-dvi-tk \ + maybe-dvi-tix \ + maybe-dvi-libtermcap \ + maybe-dvi-utils + +.PHONY: dvi-target +dvi-target: \ + maybe-dvi-target-libstdc++-v3 \ + maybe-dvi-target-newlib \ + maybe-dvi-target-libf2c \ + maybe-dvi-target-libobjc \ + maybe-dvi-target-libtermcap \ + maybe-dvi-target-winsup \ + maybe-dvi-target-libgloss \ + maybe-dvi-target-libiberty \ + maybe-dvi-target-gperf \ + maybe-dvi-target-examples \ + maybe-dvi-target-libffi \ + maybe-dvi-target-libjava \ + maybe-dvi-target-zlib \ + maybe-dvi-target-boehm-gc \ + maybe-dvi-target-qthreads \ + maybe-dvi-target-rda \ + maybe-dvi-target-libada + +# GCC, the eternal special case +.PHONY: maybe-dvi-gcc dvi-gcc +maybe-dvi-gcc: +dvi-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-dvi-ash dvi-ash +maybe-dvi-ash: + +dvi-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-autoconf dvi-autoconf +maybe-dvi-autoconf: + +dvi-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-automake dvi-automake +maybe-dvi-automake: + +dvi-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bash dvi-bash +maybe-dvi-bash: + +dvi-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bfd dvi-bfd +maybe-dvi-bfd: + +dvi-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-opcodes dvi-opcodes +maybe-dvi-opcodes: + +dvi-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-binutils dvi-binutils +maybe-dvi-binutils: + +dvi-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bison dvi-bison +maybe-dvi-bison: + +dvi-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-byacc dvi-byacc +maybe-dvi-byacc: + +dvi-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bzip2 dvi-bzip2 +maybe-dvi-bzip2: + +dvi-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dejagnu dvi-dejagnu +maybe-dvi-dejagnu: + +dvi-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-diff dvi-diff +maybe-dvi-diff: + +dvi-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dosutils dvi-dosutils +maybe-dvi-dosutils: + +dvi-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-etc dvi-etc +maybe-dvi-etc: + +dvi-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fastjar dvi-fastjar +maybe-dvi-fastjar: + +dvi-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fileutils dvi-fileutils +maybe-dvi-fileutils: + +dvi-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-findutils dvi-findutils +maybe-dvi-findutils: + +dvi-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-find dvi-find +maybe-dvi-find: + +dvi-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-flex dvi-flex +maybe-dvi-flex: + +dvi-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gas dvi-gas +maybe-dvi-gas: + +dvi-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gawk dvi-gawk +maybe-dvi-gawk: + +dvi-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gettext dvi-gettext +maybe-dvi-gettext: + +dvi-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gnuserv dvi-gnuserv +maybe-dvi-gnuserv: + +dvi-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: + +dvi-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gzip dvi-gzip +maybe-dvi-gzip: + +dvi-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-hello dvi-hello +maybe-dvi-hello: + +dvi-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-indent dvi-indent +maybe-dvi-indent: + +dvi-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-intl dvi-intl +maybe-dvi-intl: + +dvi-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tcl dvi-tcl +maybe-dvi-tcl: + +dvi-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-itcl dvi-itcl +maybe-dvi-itcl: + +dvi-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-ld dvi-ld +maybe-dvi-ld: + +dvi-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libgui dvi-libgui +maybe-dvi-libgui: + +dvi-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libiberty dvi-libiberty +maybe-dvi-libiberty: + +dvi-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtool dvi-libtool +maybe-dvi-libtool: + +dvi-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-m4 dvi-m4 +maybe-dvi-m4: + +dvi-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-make dvi-make +maybe-dvi-make: + +dvi-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-mmalloc dvi-mmalloc +maybe-dvi-mmalloc: + +dvi-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-patch dvi-patch +maybe-dvi-patch: + +dvi-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-perl dvi-perl +maybe-dvi-perl: + +dvi-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-prms dvi-prms +maybe-dvi-prms: + +dvi-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-rcs dvi-rcs +maybe-dvi-rcs: + +dvi-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-readline dvi-readline +maybe-dvi-readline: + +dvi-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-release dvi-release +maybe-dvi-release: + +dvi-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-recode dvi-recode +maybe-dvi-recode: + +dvi-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sed dvi-sed +maybe-dvi-sed: + +dvi-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-send-pr dvi-send-pr +maybe-dvi-send-pr: + +dvi-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-shellutils dvi-shellutils +maybe-dvi-shellutils: + +dvi-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sid dvi-sid +maybe-dvi-sid: + +dvi-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sim dvi-sim +maybe-dvi-sim: + +dvi-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tar dvi-tar +maybe-dvi-tar: + +dvi-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-texinfo dvi-texinfo +maybe-dvi-texinfo: + +dvi-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-textutils dvi-textutils +maybe-dvi-textutils: + +dvi-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-time dvi-time +maybe-dvi-time: + +dvi-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-uudecode dvi-uudecode +maybe-dvi-uudecode: + +dvi-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-wdiff dvi-wdiff +maybe-dvi-wdiff: + +dvi-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zip dvi-zip +maybe-dvi-zip: + +dvi-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zlib dvi-zlib +maybe-dvi-zlib: + +dvi-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gdb dvi-gdb +maybe-dvi-gdb: + +dvi-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-expect dvi-expect +maybe-dvi-expect: + +dvi-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-guile dvi-guile +maybe-dvi-guile: + +dvi-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tk dvi-tk +maybe-dvi-tk: + +dvi-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tix dvi-tix +maybe-dvi-tix: + +dvi-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtermcap dvi-libtermcap +maybe-dvi-libtermcap: + +dvi-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-utils dvi-utils +maybe-dvi-utils: + +dvi-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3 +maybe-dvi-target-libstdc++-v3: + +dvi-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-newlib dvi-target-newlib +maybe-dvi-target-newlib: + +dvi-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c +maybe-dvi-target-libf2c: + +dvi-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc +maybe-dvi-target-libobjc: + +dvi-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap +maybe-dvi-target-libtermcap: + +dvi-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-winsup dvi-target-winsup +maybe-dvi-target-winsup: + +dvi-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss +maybe-dvi-target-libgloss: + +dvi-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty +maybe-dvi-target-libiberty: + +dvi-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-gperf dvi-target-gperf +maybe-dvi-target-gperf: + +dvi-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-examples dvi-target-examples +maybe-dvi-target-examples: + +dvi-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libffi dvi-target-libffi +maybe-dvi-target-libffi: + +dvi-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libjava dvi-target-libjava +maybe-dvi-target-libjava: + +dvi-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-zlib dvi-target-zlib +maybe-dvi-target-zlib: + +dvi-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc +maybe-dvi-target-boehm-gc: + +dvi-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads +maybe-dvi-target-qthreads: + +dvi-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-rda dvi-target-rda +maybe-dvi-target-rda: + +dvi-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libada dvi-target-libada +maybe-dvi-target-libada: + +dvi-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +.PHONY: do-TAGS +do-TAGS: TAGS-host TAGS-target + +.PHONY: TAGS-host +TAGS-host: maybe-TAGS-gcc \ + maybe-TAGS-ash \ + maybe-TAGS-autoconf \ + maybe-TAGS-automake \ + maybe-TAGS-bash \ + maybe-TAGS-bfd \ + maybe-TAGS-opcodes \ + maybe-TAGS-binutils \ + maybe-TAGS-bison \ + maybe-TAGS-byacc \ + maybe-TAGS-bzip2 \ + maybe-TAGS-dejagnu \ + maybe-TAGS-diff \ + maybe-TAGS-dosutils \ + maybe-TAGS-etc \ + maybe-TAGS-fastjar \ + maybe-TAGS-fileutils \ + maybe-TAGS-findutils \ + maybe-TAGS-find \ + maybe-TAGS-flex \ + maybe-TAGS-gas \ + maybe-TAGS-gawk \ + maybe-TAGS-gettext \ + maybe-TAGS-gnuserv \ + maybe-TAGS-gprof \ + maybe-TAGS-gzip \ + maybe-TAGS-hello \ + maybe-TAGS-indent \ + maybe-TAGS-intl \ + maybe-TAGS-tcl \ + maybe-TAGS-itcl \ + maybe-TAGS-ld \ + maybe-TAGS-libgui \ + maybe-TAGS-libiberty \ + maybe-TAGS-libtool \ + maybe-TAGS-m4 \ + maybe-TAGS-make \ + maybe-TAGS-mmalloc \ + maybe-TAGS-patch \ + maybe-TAGS-perl \ + maybe-TAGS-prms \ + maybe-TAGS-rcs \ + maybe-TAGS-readline \ + maybe-TAGS-release \ + maybe-TAGS-recode \ + maybe-TAGS-sed \ + maybe-TAGS-send-pr \ + maybe-TAGS-shellutils \ + maybe-TAGS-sid \ + maybe-TAGS-sim \ + maybe-TAGS-tar \ + maybe-TAGS-texinfo \ + maybe-TAGS-textutils \ + maybe-TAGS-time \ + maybe-TAGS-uudecode \ + maybe-TAGS-wdiff \ + maybe-TAGS-zip \ + maybe-TAGS-zlib \ + maybe-TAGS-gdb \ + maybe-TAGS-expect \ + maybe-TAGS-guile \ + maybe-TAGS-tk \ + maybe-TAGS-tix \ + maybe-TAGS-libtermcap \ + maybe-TAGS-utils + +.PHONY: TAGS-target +TAGS-target: \ + maybe-TAGS-target-libstdc++-v3 \ + maybe-TAGS-target-newlib \ + maybe-TAGS-target-libf2c \ + maybe-TAGS-target-libobjc \ + maybe-TAGS-target-libtermcap \ + maybe-TAGS-target-winsup \ + maybe-TAGS-target-libgloss \ + maybe-TAGS-target-libiberty \ + maybe-TAGS-target-gperf \ + maybe-TAGS-target-examples \ + maybe-TAGS-target-libffi \ + maybe-TAGS-target-libjava \ + maybe-TAGS-target-zlib \ + maybe-TAGS-target-boehm-gc \ + maybe-TAGS-target-qthreads \ + maybe-TAGS-target-rda \ + maybe-TAGS-target-libada + +# GCC, the eternal special case +.PHONY: maybe-TAGS-gcc TAGS-gcc +maybe-TAGS-gcc: +TAGS-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-TAGS-ash TAGS-ash +maybe-TAGS-ash: + +TAGS-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-autoconf TAGS-autoconf +maybe-TAGS-autoconf: + +TAGS-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-automake TAGS-automake +maybe-TAGS-automake: + +TAGS-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bash TAGS-bash +maybe-TAGS-bash: + +TAGS-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bfd TAGS-bfd +maybe-TAGS-bfd: + +TAGS-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-opcodes TAGS-opcodes +maybe-TAGS-opcodes: + +TAGS-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-binutils TAGS-binutils +maybe-TAGS-binutils: + +TAGS-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bison TAGS-bison +maybe-TAGS-bison: + +TAGS-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-byacc TAGS-byacc +maybe-TAGS-byacc: + +TAGS-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bzip2 TAGS-bzip2 +maybe-TAGS-bzip2: + +TAGS-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu +maybe-TAGS-dejagnu: + +TAGS-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-diff TAGS-diff +maybe-TAGS-diff: + +TAGS-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dosutils TAGS-dosutils +maybe-TAGS-dosutils: + +TAGS-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-etc TAGS-etc +maybe-TAGS-etc: + +TAGS-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fastjar TAGS-fastjar +maybe-TAGS-fastjar: + +TAGS-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fileutils TAGS-fileutils +maybe-TAGS-fileutils: + +TAGS-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-findutils TAGS-findutils +maybe-TAGS-findutils: + +TAGS-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-find TAGS-find +maybe-TAGS-find: + +TAGS-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-flex TAGS-flex +maybe-TAGS-flex: + +TAGS-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gas TAGS-gas +maybe-TAGS-gas: + +TAGS-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gawk TAGS-gawk +maybe-TAGS-gawk: + +TAGS-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gettext TAGS-gettext +maybe-TAGS-gettext: + +TAGS-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv +maybe-TAGS-gnuserv: + +TAGS-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: + +TAGS-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gzip TAGS-gzip +maybe-TAGS-gzip: + +TAGS-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-hello TAGS-hello +maybe-TAGS-hello: + +TAGS-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-indent TAGS-indent +maybe-TAGS-indent: + +TAGS-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-intl TAGS-intl +maybe-TAGS-intl: + +TAGS-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tcl TAGS-tcl +maybe-TAGS-tcl: + +TAGS-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-itcl TAGS-itcl +maybe-TAGS-itcl: + +TAGS-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-ld TAGS-ld +maybe-TAGS-ld: + +TAGS-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libgui TAGS-libgui +maybe-TAGS-libgui: + +TAGS-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libiberty TAGS-libiberty +maybe-TAGS-libiberty: + +TAGS-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtool TAGS-libtool +maybe-TAGS-libtool: + +TAGS-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-m4 TAGS-m4 +maybe-TAGS-m4: + +TAGS-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-make TAGS-make +maybe-TAGS-make: + +TAGS-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc +maybe-TAGS-mmalloc: + +TAGS-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-patch TAGS-patch +maybe-TAGS-patch: + +TAGS-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-perl TAGS-perl +maybe-TAGS-perl: + +TAGS-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-prms TAGS-prms +maybe-TAGS-prms: + +TAGS-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-rcs TAGS-rcs +maybe-TAGS-rcs: + +TAGS-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-readline TAGS-readline +maybe-TAGS-readline: + +TAGS-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-release TAGS-release +maybe-TAGS-release: + +TAGS-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-recode TAGS-recode +maybe-TAGS-recode: + +TAGS-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sed TAGS-sed +maybe-TAGS-sed: + +TAGS-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-send-pr TAGS-send-pr +maybe-TAGS-send-pr: + +TAGS-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-shellutils TAGS-shellutils +maybe-TAGS-shellutils: + +TAGS-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sid TAGS-sid +maybe-TAGS-sid: + +TAGS-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sim TAGS-sim +maybe-TAGS-sim: + +TAGS-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tar TAGS-tar +maybe-TAGS-tar: + +TAGS-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-texinfo TAGS-texinfo +maybe-TAGS-texinfo: + +TAGS-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-textutils TAGS-textutils +maybe-TAGS-textutils: + +TAGS-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-time TAGS-time +maybe-TAGS-time: + +TAGS-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-uudecode TAGS-uudecode +maybe-TAGS-uudecode: + +TAGS-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-wdiff TAGS-wdiff +maybe-TAGS-wdiff: + +TAGS-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zip TAGS-zip +maybe-TAGS-zip: + +TAGS-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zlib TAGS-zlib +maybe-TAGS-zlib: + +TAGS-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gdb TAGS-gdb +maybe-TAGS-gdb: + +TAGS-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-expect TAGS-expect +maybe-TAGS-expect: + +TAGS-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-guile TAGS-guile +maybe-TAGS-guile: + +TAGS-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tk TAGS-tk +maybe-TAGS-tk: + +TAGS-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tix TAGS-tix +maybe-TAGS-tix: + +TAGS-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap +maybe-TAGS-libtermcap: + +TAGS-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-utils TAGS-utils +maybe-TAGS-utils: + +TAGS-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3 +maybe-TAGS-target-libstdc++-v3: + +TAGS-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib +maybe-TAGS-target-newlib: + +TAGS-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c +maybe-TAGS-target-libf2c: + +TAGS-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc +maybe-TAGS-target-libobjc: + +TAGS-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap +maybe-TAGS-target-libtermcap: + +TAGS-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup +maybe-TAGS-target-winsup: + +TAGS-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss +maybe-TAGS-target-libgloss: + +TAGS-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty +maybe-TAGS-target-libiberty: + +TAGS-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf +maybe-TAGS-target-gperf: + +TAGS-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-examples TAGS-target-examples +maybe-TAGS-target-examples: + +TAGS-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi +maybe-TAGS-target-libffi: + +TAGS-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava +maybe-TAGS-target-libjava: + +TAGS-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib +maybe-TAGS-target-zlib: + +TAGS-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc +maybe-TAGS-target-boehm-gc: + +TAGS-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads +maybe-TAGS-target-qthreads: + +TAGS-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-rda TAGS-target-rda +maybe-TAGS-target-rda: + +TAGS-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libada TAGS-target-libada +maybe-TAGS-target-libada: + +TAGS-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +.PHONY: do-install-info +do-install-info: install-info-host install-info-target + +.PHONY: install-info-host +install-info-host: maybe-install-info-gcc \ + maybe-install-info-ash \ + maybe-install-info-autoconf \ + maybe-install-info-automake \ + maybe-install-info-bash \ + maybe-install-info-bfd \ + maybe-install-info-opcodes \ + maybe-install-info-binutils \ + maybe-install-info-bison \ + maybe-install-info-byacc \ + maybe-install-info-bzip2 \ + maybe-install-info-dejagnu \ + maybe-install-info-diff \ + maybe-install-info-dosutils \ + maybe-install-info-etc \ + maybe-install-info-fastjar \ + maybe-install-info-fileutils \ + maybe-install-info-findutils \ + maybe-install-info-find \ + maybe-install-info-flex \ + maybe-install-info-gas \ + maybe-install-info-gawk \ + maybe-install-info-gettext \ + maybe-install-info-gnuserv \ + maybe-install-info-gprof \ + maybe-install-info-gzip \ + maybe-install-info-hello \ + maybe-install-info-indent \ + maybe-install-info-intl \ + maybe-install-info-tcl \ + maybe-install-info-itcl \ + maybe-install-info-ld \ + maybe-install-info-libgui \ + maybe-install-info-libiberty \ + maybe-install-info-libtool \ + maybe-install-info-m4 \ + maybe-install-info-make \ + maybe-install-info-mmalloc \ + maybe-install-info-patch \ + maybe-install-info-perl \ + maybe-install-info-prms \ + maybe-install-info-rcs \ + maybe-install-info-readline \ + maybe-install-info-release \ + maybe-install-info-recode \ + maybe-install-info-sed \ + maybe-install-info-send-pr \ + maybe-install-info-shellutils \ + maybe-install-info-sid \ + maybe-install-info-sim \ + maybe-install-info-tar \ + maybe-install-info-texinfo \ + maybe-install-info-textutils \ + maybe-install-info-time \ + maybe-install-info-uudecode \ + maybe-install-info-wdiff \ + maybe-install-info-zip \ + maybe-install-info-zlib \ + maybe-install-info-gdb \ + maybe-install-info-expect \ + maybe-install-info-guile \ + maybe-install-info-tk \ + maybe-install-info-tix \ + maybe-install-info-libtermcap \ + maybe-install-info-utils + +.PHONY: install-info-target +install-info-target: \ + maybe-install-info-target-libstdc++-v3 \ + maybe-install-info-target-newlib \ + maybe-install-info-target-libf2c \ + maybe-install-info-target-libobjc \ + maybe-install-info-target-libtermcap \ + maybe-install-info-target-winsup \ + maybe-install-info-target-libgloss \ + maybe-install-info-target-libiberty \ + maybe-install-info-target-gperf \ + maybe-install-info-target-examples \ + maybe-install-info-target-libffi \ + maybe-install-info-target-libjava \ + maybe-install-info-target-zlib \ + maybe-install-info-target-boehm-gc \ + maybe-install-info-target-qthreads \ + maybe-install-info-target-rda \ + maybe-install-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-install-info-gcc install-info-gcc +maybe-install-info-gcc: +install-info-gcc: \ + configure-gcc \ + info-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-install-info-ash install-info-ash +maybe-install-info-ash: + +install-info-ash: \ + configure-ash \ + info-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-autoconf install-info-autoconf +maybe-install-info-autoconf: + +install-info-autoconf: \ + configure-autoconf \ + info-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-automake install-info-automake +maybe-install-info-automake: + +install-info-automake: \ + configure-automake \ + info-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bash install-info-bash +maybe-install-info-bash: + +install-info-bash: \ + configure-bash \ + info-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bfd install-info-bfd +maybe-install-info-bfd: + +install-info-bfd: \ + configure-bfd \ + info-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-opcodes install-info-opcodes +maybe-install-info-opcodes: + +install-info-opcodes: \ + configure-opcodes \ + info-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-binutils install-info-binutils +maybe-install-info-binutils: + +install-info-binutils: \ + configure-binutils \ + info-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bison install-info-bison +maybe-install-info-bison: + +install-info-bison: \ + configure-bison \ + info-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-byacc install-info-byacc +maybe-install-info-byacc: + +install-info-byacc: \ + configure-byacc \ + info-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bzip2 install-info-bzip2 +maybe-install-info-bzip2: + +install-info-bzip2: \ + configure-bzip2 \ + info-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dejagnu install-info-dejagnu +maybe-install-info-dejagnu: + +install-info-dejagnu: \ + configure-dejagnu \ + info-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-diff install-info-diff +maybe-install-info-diff: + +install-info-diff: \ + configure-diff \ + info-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dosutils install-info-dosutils +maybe-install-info-dosutils: + +install-info-dosutils: \ + configure-dosutils \ + info-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-etc install-info-etc +maybe-install-info-etc: + +install-info-etc: \ + configure-etc \ + info-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fastjar install-info-fastjar +maybe-install-info-fastjar: + +install-info-fastjar: \ + configure-fastjar \ + info-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fileutils install-info-fileutils +maybe-install-info-fileutils: + +install-info-fileutils: \ + configure-fileutils \ + info-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-findutils install-info-findutils +maybe-install-info-findutils: + +install-info-findutils: \ + configure-findutils \ + info-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-find install-info-find +maybe-install-info-find: + +install-info-find: \ + configure-find \ + info-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-flex install-info-flex +maybe-install-info-flex: + +install-info-flex: \ + configure-flex \ + info-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gas install-info-gas +maybe-install-info-gas: + +install-info-gas: \ + configure-gas \ + info-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gawk install-info-gawk +maybe-install-info-gawk: + +install-info-gawk: \ + configure-gawk \ + info-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gettext install-info-gettext +maybe-install-info-gettext: + +install-info-gettext: \ + configure-gettext \ + info-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gnuserv install-info-gnuserv +maybe-install-info-gnuserv: + +install-info-gnuserv: \ + configure-gnuserv \ + info-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: + +install-info-gprof: \ + configure-gprof \ + info-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gzip install-info-gzip +maybe-install-info-gzip: + +install-info-gzip: \ + configure-gzip \ + info-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-hello install-info-hello +maybe-install-info-hello: + +install-info-hello: \ + configure-hello \ + info-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-indent install-info-indent +maybe-install-info-indent: + +install-info-indent: \ + configure-indent \ + info-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-intl install-info-intl +maybe-install-info-intl: + +install-info-intl: \ + configure-intl \ + info-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tcl install-info-tcl +maybe-install-info-tcl: + +install-info-tcl: \ + configure-tcl \ + info-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-itcl install-info-itcl +maybe-install-info-itcl: + +install-info-itcl: \ + configure-itcl \ + info-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-ld install-info-ld +maybe-install-info-ld: + +install-info-ld: \ + configure-ld \ + info-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libgui install-info-libgui +maybe-install-info-libgui: + +install-info-libgui: \ + configure-libgui \ + info-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libiberty install-info-libiberty +maybe-install-info-libiberty: + +install-info-libiberty: \ + configure-libiberty \ + info-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtool install-info-libtool +maybe-install-info-libtool: + +install-info-libtool: \ + configure-libtool \ + info-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-m4 install-info-m4 +maybe-install-info-m4: + +install-info-m4: \ + configure-m4 \ + info-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-make install-info-make +maybe-install-info-make: + +install-info-make: \ + configure-make \ + info-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-mmalloc install-info-mmalloc +maybe-install-info-mmalloc: + +install-info-mmalloc: \ + configure-mmalloc \ + info-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-patch install-info-patch +maybe-install-info-patch: + +install-info-patch: \ + configure-patch \ + info-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-perl install-info-perl +maybe-install-info-perl: + +install-info-perl: \ + configure-perl \ + info-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-prms install-info-prms +maybe-install-info-prms: + +install-info-prms: \ + configure-prms \ + info-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-rcs install-info-rcs +maybe-install-info-rcs: + +install-info-rcs: \ + configure-rcs \ + info-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-readline install-info-readline +maybe-install-info-readline: + +install-info-readline: \ + configure-readline \ + info-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-release install-info-release +maybe-install-info-release: + +install-info-release: \ + configure-release \ + info-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-recode install-info-recode +maybe-install-info-recode: + +install-info-recode: \ + configure-recode \ + info-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sed install-info-sed +maybe-install-info-sed: + +install-info-sed: \ + configure-sed \ + info-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-send-pr install-info-send-pr +maybe-install-info-send-pr: + +install-info-send-pr: \ + configure-send-pr \ + info-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-shellutils install-info-shellutils +maybe-install-info-shellutils: + +install-info-shellutils: \ + configure-shellutils \ + info-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sid install-info-sid +maybe-install-info-sid: + +install-info-sid: \ + configure-sid \ + info-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sim install-info-sim +maybe-install-info-sim: + +install-info-sim: \ + configure-sim \ + info-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tar install-info-tar +maybe-install-info-tar: + +install-info-tar: \ + configure-tar \ + info-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-texinfo install-info-texinfo +maybe-install-info-texinfo: + +install-info-texinfo: \ + configure-texinfo \ + info-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-textutils install-info-textutils +maybe-install-info-textutils: + +install-info-textutils: \ + configure-textutils \ + info-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-time install-info-time +maybe-install-info-time: + +install-info-time: \ + configure-time \ + info-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-uudecode install-info-uudecode +maybe-install-info-uudecode: + +install-info-uudecode: \ + configure-uudecode \ + info-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-wdiff install-info-wdiff +maybe-install-info-wdiff: + +install-info-wdiff: \ + configure-wdiff \ + info-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zip install-info-zip +maybe-install-info-zip: + +install-info-zip: \ + configure-zip \ + info-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zlib install-info-zlib +maybe-install-info-zlib: + +install-info-zlib: \ + configure-zlib \ + info-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gdb install-info-gdb +maybe-install-info-gdb: + +install-info-gdb: \ + configure-gdb \ + info-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-expect install-info-expect +maybe-install-info-expect: + +install-info-expect: \ + configure-expect \ + info-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-guile install-info-guile +maybe-install-info-guile: + +install-info-guile: \ + configure-guile \ + info-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tk install-info-tk +maybe-install-info-tk: + +install-info-tk: \ + configure-tk \ + info-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tix install-info-tix +maybe-install-info-tix: + +install-info-tix: \ + configure-tix \ + info-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtermcap install-info-libtermcap +maybe-install-info-libtermcap: + +install-info-libtermcap: \ + configure-libtermcap \ + info-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-utils install-info-utils +maybe-install-info-utils: + +install-info-utils: \ + configure-utils \ + info-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3 +maybe-install-info-target-libstdc++-v3: + +install-info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 \ + info-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-newlib install-info-target-newlib +maybe-install-info-target-newlib: + +install-info-target-newlib: \ + configure-target-newlib \ + info-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c +maybe-install-info-target-libf2c: + +install-info-target-libf2c: \ + configure-target-libf2c \ + info-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc +maybe-install-info-target-libobjc: + +install-info-target-libobjc: \ + configure-target-libobjc \ + info-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap +maybe-install-info-target-libtermcap: + +install-info-target-libtermcap: \ + configure-target-libtermcap \ + info-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-winsup install-info-target-winsup +maybe-install-info-target-winsup: + +install-info-target-winsup: \ + configure-target-winsup \ + info-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss +maybe-install-info-target-libgloss: + +install-info-target-libgloss: \ + configure-target-libgloss \ + info-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty +maybe-install-info-target-libiberty: + +install-info-target-libiberty: \ + configure-target-libiberty \ + info-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-gperf install-info-target-gperf +maybe-install-info-target-gperf: + +install-info-target-gperf: \ + configure-target-gperf \ + info-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-examples install-info-target-examples +maybe-install-info-target-examples: + +install-info-target-examples: \ + configure-target-examples \ + info-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libffi install-info-target-libffi +maybe-install-info-target-libffi: + +install-info-target-libffi: \ + configure-target-libffi \ + info-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libjava install-info-target-libjava +maybe-install-info-target-libjava: + +install-info-target-libjava: \ + configure-target-libjava \ + info-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-zlib install-info-target-zlib +maybe-install-info-target-zlib: + +install-info-target-zlib: \ + configure-target-zlib \ + info-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc +maybe-install-info-target-boehm-gc: + +install-info-target-boehm-gc: \ + configure-target-boehm-gc \ + info-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads +maybe-install-info-target-qthreads: + +install-info-target-qthreads: \ + configure-target-qthreads \ + info-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-rda install-info-target-rda +maybe-install-info-target-rda: + +install-info-target-rda: \ + configure-target-rda \ + info-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libada install-info-target-libada +maybe-install-info-target-libada: + +install-info-target-libada: \ + configure-target-libada \ + info-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +.PHONY: do-installcheck +do-installcheck: installcheck-host installcheck-target + +.PHONY: installcheck-host +installcheck-host: maybe-installcheck-gcc \ + maybe-installcheck-ash \ + maybe-installcheck-autoconf \ + maybe-installcheck-automake \ + maybe-installcheck-bash \ + maybe-installcheck-bfd \ + maybe-installcheck-opcodes \ + maybe-installcheck-binutils \ + maybe-installcheck-bison \ + maybe-installcheck-byacc \ + maybe-installcheck-bzip2 \ + maybe-installcheck-dejagnu \ + maybe-installcheck-diff \ + maybe-installcheck-dosutils \ + maybe-installcheck-etc \ + maybe-installcheck-fastjar \ + maybe-installcheck-fileutils \ + maybe-installcheck-findutils \ + maybe-installcheck-find \ + maybe-installcheck-flex \ + maybe-installcheck-gas \ + maybe-installcheck-gawk \ + maybe-installcheck-gettext \ + maybe-installcheck-gnuserv \ + maybe-installcheck-gprof \ + maybe-installcheck-gzip \ + maybe-installcheck-hello \ + maybe-installcheck-indent \ + maybe-installcheck-intl \ + maybe-installcheck-tcl \ + maybe-installcheck-itcl \ + maybe-installcheck-ld \ + maybe-installcheck-libgui \ + maybe-installcheck-libiberty \ + maybe-installcheck-libtool \ + maybe-installcheck-m4 \ + maybe-installcheck-make \ + maybe-installcheck-mmalloc \ + maybe-installcheck-patch \ + maybe-installcheck-perl \ + maybe-installcheck-prms \ + maybe-installcheck-rcs \ + maybe-installcheck-readline \ + maybe-installcheck-release \ + maybe-installcheck-recode \ + maybe-installcheck-sed \ + maybe-installcheck-send-pr \ + maybe-installcheck-shellutils \ + maybe-installcheck-sid \ + maybe-installcheck-sim \ + maybe-installcheck-tar \ + maybe-installcheck-texinfo \ + maybe-installcheck-textutils \ + maybe-installcheck-time \ + maybe-installcheck-uudecode \ + maybe-installcheck-wdiff \ + maybe-installcheck-zip \ + maybe-installcheck-zlib \ + maybe-installcheck-gdb \ + maybe-installcheck-expect \ + maybe-installcheck-guile \ + maybe-installcheck-tk \ + maybe-installcheck-tix \ + maybe-installcheck-libtermcap \ + maybe-installcheck-utils + +.PHONY: installcheck-target +installcheck-target: \ + maybe-installcheck-target-libstdc++-v3 \ + maybe-installcheck-target-newlib \ + maybe-installcheck-target-libf2c \ + maybe-installcheck-target-libobjc \ + maybe-installcheck-target-libtermcap \ + maybe-installcheck-target-winsup \ + maybe-installcheck-target-libgloss \ + maybe-installcheck-target-libiberty \ + maybe-installcheck-target-gperf \ + maybe-installcheck-target-examples \ + maybe-installcheck-target-libffi \ + maybe-installcheck-target-libjava \ + maybe-installcheck-target-zlib \ + maybe-installcheck-target-boehm-gc \ + maybe-installcheck-target-qthreads \ + maybe-installcheck-target-rda \ + maybe-installcheck-target-libada + +# GCC, the eternal special case +.PHONY: maybe-installcheck-gcc installcheck-gcc +maybe-installcheck-gcc: +installcheck-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-installcheck-ash installcheck-ash +maybe-installcheck-ash: + +installcheck-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-autoconf installcheck-autoconf +maybe-installcheck-autoconf: + +installcheck-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-automake installcheck-automake +maybe-installcheck-automake: + +installcheck-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bash installcheck-bash +maybe-installcheck-bash: + +installcheck-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bfd installcheck-bfd +maybe-installcheck-bfd: + +installcheck-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-opcodes installcheck-opcodes +maybe-installcheck-opcodes: + +installcheck-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-binutils installcheck-binutils +maybe-installcheck-binutils: + +installcheck-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bison installcheck-bison +maybe-installcheck-bison: + +installcheck-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-byacc installcheck-byacc +maybe-installcheck-byacc: + +installcheck-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bzip2 installcheck-bzip2 +maybe-installcheck-bzip2: + +installcheck-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu +maybe-installcheck-dejagnu: + +installcheck-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-diff installcheck-diff +maybe-installcheck-diff: + +installcheck-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dosutils installcheck-dosutils +maybe-installcheck-dosutils: + +installcheck-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-etc installcheck-etc +maybe-installcheck-etc: + +installcheck-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fastjar installcheck-fastjar +maybe-installcheck-fastjar: + +installcheck-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fileutils installcheck-fileutils +maybe-installcheck-fileutils: + +installcheck-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-findutils installcheck-findutils +maybe-installcheck-findutils: + +installcheck-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-find installcheck-find +maybe-installcheck-find: + +installcheck-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-flex installcheck-flex +maybe-installcheck-flex: + +installcheck-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gas installcheck-gas +maybe-installcheck-gas: + +installcheck-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gawk installcheck-gawk +maybe-installcheck-gawk: + +installcheck-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gettext installcheck-gettext +maybe-installcheck-gettext: + +installcheck-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv +maybe-installcheck-gnuserv: + +installcheck-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: + +installcheck-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gzip installcheck-gzip +maybe-installcheck-gzip: + +installcheck-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-hello installcheck-hello +maybe-installcheck-hello: + +installcheck-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-indent installcheck-indent +maybe-installcheck-indent: + +installcheck-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-intl installcheck-intl +maybe-installcheck-intl: + +installcheck-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tcl installcheck-tcl +maybe-installcheck-tcl: + +installcheck-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-itcl installcheck-itcl +maybe-installcheck-itcl: + +installcheck-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-ld installcheck-ld +maybe-installcheck-ld: + +installcheck-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libgui installcheck-libgui +maybe-installcheck-libgui: + +installcheck-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libiberty installcheck-libiberty +maybe-installcheck-libiberty: + +installcheck-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtool installcheck-libtool +maybe-installcheck-libtool: + +installcheck-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-m4 installcheck-m4 +maybe-installcheck-m4: + +installcheck-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-make installcheck-make +maybe-installcheck-make: + +installcheck-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc +maybe-installcheck-mmalloc: + +installcheck-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-patch installcheck-patch +maybe-installcheck-patch: + +installcheck-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-perl installcheck-perl +maybe-installcheck-perl: + +installcheck-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-prms installcheck-prms +maybe-installcheck-prms: + +installcheck-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-rcs installcheck-rcs +maybe-installcheck-rcs: + +installcheck-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-readline installcheck-readline +maybe-installcheck-readline: + +installcheck-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-release installcheck-release +maybe-installcheck-release: + +installcheck-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-recode installcheck-recode +maybe-installcheck-recode: + +installcheck-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sed installcheck-sed +maybe-installcheck-sed: + +installcheck-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-send-pr installcheck-send-pr +maybe-installcheck-send-pr: + +installcheck-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-shellutils installcheck-shellutils +maybe-installcheck-shellutils: + +installcheck-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sid installcheck-sid +maybe-installcheck-sid: + +installcheck-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sim installcheck-sim +maybe-installcheck-sim: + +installcheck-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tar installcheck-tar +maybe-installcheck-tar: + +installcheck-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-texinfo installcheck-texinfo +maybe-installcheck-texinfo: + +installcheck-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-textutils installcheck-textutils +maybe-installcheck-textutils: + +installcheck-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-time installcheck-time +maybe-installcheck-time: + +installcheck-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-uudecode installcheck-uudecode +maybe-installcheck-uudecode: + +installcheck-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-wdiff installcheck-wdiff +maybe-installcheck-wdiff: + +installcheck-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zip installcheck-zip +maybe-installcheck-zip: + +installcheck-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zlib installcheck-zlib +maybe-installcheck-zlib: + +installcheck-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gdb installcheck-gdb +maybe-installcheck-gdb: + +installcheck-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-expect installcheck-expect +maybe-installcheck-expect: + +installcheck-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-guile installcheck-guile +maybe-installcheck-guile: + +installcheck-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tk installcheck-tk +maybe-installcheck-tk: + +installcheck-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tix installcheck-tix +maybe-installcheck-tix: + +installcheck-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap +maybe-installcheck-libtermcap: + +installcheck-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-utils installcheck-utils +maybe-installcheck-utils: + +installcheck-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3 +maybe-installcheck-target-libstdc++-v3: + +installcheck-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib +maybe-installcheck-target-newlib: + +installcheck-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c +maybe-installcheck-target-libf2c: + +installcheck-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc +maybe-installcheck-target-libobjc: + +installcheck-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap +maybe-installcheck-target-libtermcap: + +installcheck-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup +maybe-installcheck-target-winsup: + +installcheck-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss +maybe-installcheck-target-libgloss: + +installcheck-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty +maybe-installcheck-target-libiberty: + +installcheck-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf +maybe-installcheck-target-gperf: + +installcheck-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-examples installcheck-target-examples +maybe-installcheck-target-examples: + +installcheck-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi +maybe-installcheck-target-libffi: + +installcheck-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava +maybe-installcheck-target-libjava: + +installcheck-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib +maybe-installcheck-target-zlib: + +installcheck-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc +maybe-installcheck-target-boehm-gc: + +installcheck-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads +maybe-installcheck-target-qthreads: + +installcheck-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-rda installcheck-target-rda +maybe-installcheck-target-rda: + +installcheck-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libada installcheck-target-libada +maybe-installcheck-target-libada: + +installcheck-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +.PHONY: do-mostlyclean +do-mostlyclean: mostlyclean-host mostlyclean-target + +.PHONY: mostlyclean-host +mostlyclean-host: maybe-mostlyclean-gcc \ + maybe-mostlyclean-ash \ + maybe-mostlyclean-autoconf \ + maybe-mostlyclean-automake \ + maybe-mostlyclean-bash \ + maybe-mostlyclean-bfd \ + maybe-mostlyclean-opcodes \ + maybe-mostlyclean-binutils \ + maybe-mostlyclean-bison \ + maybe-mostlyclean-byacc \ + maybe-mostlyclean-bzip2 \ + maybe-mostlyclean-dejagnu \ + maybe-mostlyclean-diff \ + maybe-mostlyclean-dosutils \ + maybe-mostlyclean-etc \ + maybe-mostlyclean-fastjar \ + maybe-mostlyclean-fileutils \ + maybe-mostlyclean-findutils \ + maybe-mostlyclean-find \ + maybe-mostlyclean-flex \ + maybe-mostlyclean-gas \ + maybe-mostlyclean-gawk \ + maybe-mostlyclean-gettext \ + maybe-mostlyclean-gnuserv \ + maybe-mostlyclean-gprof \ + maybe-mostlyclean-gzip \ + maybe-mostlyclean-hello \ + maybe-mostlyclean-indent \ + maybe-mostlyclean-intl \ + maybe-mostlyclean-tcl \ + maybe-mostlyclean-itcl \ + maybe-mostlyclean-ld \ + maybe-mostlyclean-libgui \ + maybe-mostlyclean-libiberty \ + maybe-mostlyclean-libtool \ + maybe-mostlyclean-m4 \ + maybe-mostlyclean-make \ + maybe-mostlyclean-mmalloc \ + maybe-mostlyclean-patch \ + maybe-mostlyclean-perl \ + maybe-mostlyclean-prms \ + maybe-mostlyclean-rcs \ + maybe-mostlyclean-readline \ + maybe-mostlyclean-release \ + maybe-mostlyclean-recode \ + maybe-mostlyclean-sed \ + maybe-mostlyclean-send-pr \ + maybe-mostlyclean-shellutils \ + maybe-mostlyclean-sid \ + maybe-mostlyclean-sim \ + maybe-mostlyclean-tar \ + maybe-mostlyclean-texinfo \ + maybe-mostlyclean-textutils \ + maybe-mostlyclean-time \ + maybe-mostlyclean-uudecode \ + maybe-mostlyclean-wdiff \ + maybe-mostlyclean-zip \ + maybe-mostlyclean-zlib \ + maybe-mostlyclean-gdb \ + maybe-mostlyclean-expect \ + maybe-mostlyclean-guile \ + maybe-mostlyclean-tk \ + maybe-mostlyclean-tix \ + maybe-mostlyclean-libtermcap \ + maybe-mostlyclean-utils + +.PHONY: mostlyclean-target +mostlyclean-target: \ + maybe-mostlyclean-target-libstdc++-v3 \ + maybe-mostlyclean-target-newlib \ + maybe-mostlyclean-target-libf2c \ + maybe-mostlyclean-target-libobjc \ + maybe-mostlyclean-target-libtermcap \ + maybe-mostlyclean-target-winsup \ + maybe-mostlyclean-target-libgloss \ + maybe-mostlyclean-target-libiberty \ + maybe-mostlyclean-target-gperf \ + maybe-mostlyclean-target-examples \ + maybe-mostlyclean-target-libffi \ + maybe-mostlyclean-target-libjava \ + maybe-mostlyclean-target-zlib \ + maybe-mostlyclean-target-boehm-gc \ + maybe-mostlyclean-target-qthreads \ + maybe-mostlyclean-target-rda \ + maybe-mostlyclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc +maybe-mostlyclean-gcc: +mostlyclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-mostlyclean-ash mostlyclean-ash +maybe-mostlyclean-ash: + +mostlyclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf +maybe-mostlyclean-autoconf: + +mostlyclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-automake mostlyclean-automake +maybe-mostlyclean-automake: + +mostlyclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bash mostlyclean-bash +maybe-mostlyclean-bash: + +mostlyclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd +maybe-mostlyclean-bfd: + +mostlyclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes +maybe-mostlyclean-opcodes: + +mostlyclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils +maybe-mostlyclean-binutils: + +mostlyclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bison mostlyclean-bison +maybe-mostlyclean-bison: + +mostlyclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc +maybe-mostlyclean-byacc: + +mostlyclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2 +maybe-mostlyclean-bzip2: + +mostlyclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu +maybe-mostlyclean-dejagnu: + +mostlyclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-diff mostlyclean-diff +maybe-mostlyclean-diff: + +mostlyclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils +maybe-mostlyclean-dosutils: + +mostlyclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-etc mostlyclean-etc +maybe-mostlyclean-etc: + +mostlyclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar +maybe-mostlyclean-fastjar: + +mostlyclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils +maybe-mostlyclean-fileutils: + +mostlyclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils +maybe-mostlyclean-findutils: + +mostlyclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-find mostlyclean-find +maybe-mostlyclean-find: + +mostlyclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-flex mostlyclean-flex +maybe-mostlyclean-flex: + +mostlyclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gas mostlyclean-gas +maybe-mostlyclean-gas: + +mostlyclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk +maybe-mostlyclean-gawk: + +mostlyclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext +maybe-mostlyclean-gettext: + +mostlyclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv +maybe-mostlyclean-gnuserv: + +mostlyclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: + +mostlyclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip +maybe-mostlyclean-gzip: + +mostlyclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-hello mostlyclean-hello +maybe-mostlyclean-hello: + +mostlyclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-indent mostlyclean-indent +maybe-mostlyclean-indent: + +mostlyclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-intl mostlyclean-intl +maybe-mostlyclean-intl: + +mostlyclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl +maybe-mostlyclean-tcl: + +# tcl doesn't support mostlyclean. +mostlyclean-tcl: + + +.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl +maybe-mostlyclean-itcl: + +mostlyclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-ld mostlyclean-ld +maybe-mostlyclean-ld: + +mostlyclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui +maybe-mostlyclean-libgui: + +mostlyclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty +maybe-mostlyclean-libiberty: + +mostlyclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool +maybe-mostlyclean-libtool: + +mostlyclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-m4 mostlyclean-m4 +maybe-mostlyclean-m4: + +mostlyclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-make mostlyclean-make +maybe-mostlyclean-make: + +mostlyclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc +maybe-mostlyclean-mmalloc: + +mostlyclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-patch mostlyclean-patch +maybe-mostlyclean-patch: + +mostlyclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-perl mostlyclean-perl +maybe-mostlyclean-perl: + +mostlyclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-prms mostlyclean-prms +maybe-mostlyclean-prms: + +mostlyclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs +maybe-mostlyclean-rcs: + +mostlyclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-readline mostlyclean-readline +maybe-mostlyclean-readline: + +mostlyclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-release mostlyclean-release +maybe-mostlyclean-release: + +mostlyclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-recode mostlyclean-recode +maybe-mostlyclean-recode: + +mostlyclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sed mostlyclean-sed +maybe-mostlyclean-sed: + +mostlyclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr +maybe-mostlyclean-send-pr: + +mostlyclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils +maybe-mostlyclean-shellutils: + +mostlyclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sid mostlyclean-sid +maybe-mostlyclean-sid: + +mostlyclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sim mostlyclean-sim +maybe-mostlyclean-sim: + +mostlyclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tar mostlyclean-tar +maybe-mostlyclean-tar: + +mostlyclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo +maybe-mostlyclean-texinfo: + +mostlyclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils +maybe-mostlyclean-textutils: + +mostlyclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-time mostlyclean-time +maybe-mostlyclean-time: + +mostlyclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode +maybe-mostlyclean-uudecode: + +mostlyclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff +maybe-mostlyclean-wdiff: + +mostlyclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zip mostlyclean-zip +maybe-mostlyclean-zip: + +mostlyclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib +maybe-mostlyclean-zlib: + +mostlyclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb +maybe-mostlyclean-gdb: + +mostlyclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-expect mostlyclean-expect +maybe-mostlyclean-expect: + +mostlyclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-guile mostlyclean-guile +maybe-mostlyclean-guile: + +mostlyclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tk mostlyclean-tk +maybe-mostlyclean-tk: + +mostlyclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tix mostlyclean-tix +maybe-mostlyclean-tix: + +mostlyclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap +maybe-mostlyclean-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-libtermcap: + + +.PHONY: maybe-mostlyclean-utils mostlyclean-utils +maybe-mostlyclean-utils: + +mostlyclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3 +maybe-mostlyclean-target-libstdc++-v3: + +mostlyclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib +maybe-mostlyclean-target-newlib: + +mostlyclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c +maybe-mostlyclean-target-libf2c: + +mostlyclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc +maybe-mostlyclean-target-libobjc: + +mostlyclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap +maybe-mostlyclean-target-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-target-libtermcap: + + +.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup +maybe-mostlyclean-target-winsup: + +mostlyclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss +maybe-mostlyclean-target-libgloss: + +mostlyclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty +maybe-mostlyclean-target-libiberty: + +mostlyclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf +maybe-mostlyclean-target-gperf: + +mostlyclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples +maybe-mostlyclean-target-examples: + +mostlyclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi +maybe-mostlyclean-target-libffi: + +mostlyclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava +maybe-mostlyclean-target-libjava: + +mostlyclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib +maybe-mostlyclean-target-zlib: + +mostlyclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc +maybe-mostlyclean-target-boehm-gc: + +mostlyclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads +maybe-mostlyclean-target-qthreads: + +mostlyclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda +maybe-mostlyclean-target-rda: + +mostlyclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada +maybe-mostlyclean-target-libada: + +mostlyclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +.PHONY: do-clean +do-clean: clean-host clean-target + +.PHONY: clean-host +clean-host: maybe-clean-gcc \ + maybe-clean-ash \ + maybe-clean-autoconf \ + maybe-clean-automake \ + maybe-clean-bash \ + maybe-clean-bfd \ + maybe-clean-opcodes \ + maybe-clean-binutils \ + maybe-clean-bison \ + maybe-clean-byacc \ + maybe-clean-bzip2 \ + maybe-clean-dejagnu \ + maybe-clean-diff \ + maybe-clean-dosutils \ + maybe-clean-etc \ + maybe-clean-fastjar \ + maybe-clean-fileutils \ + maybe-clean-findutils \ + maybe-clean-find \ + maybe-clean-flex \ + maybe-clean-gas \ + maybe-clean-gawk \ + maybe-clean-gettext \ + maybe-clean-gnuserv \ + maybe-clean-gprof \ + maybe-clean-gzip \ + maybe-clean-hello \ + maybe-clean-indent \ + maybe-clean-intl \ + maybe-clean-tcl \ + maybe-clean-itcl \ + maybe-clean-ld \ + maybe-clean-libgui \ + maybe-clean-libiberty \ + maybe-clean-libtool \ + maybe-clean-m4 \ + maybe-clean-make \ + maybe-clean-mmalloc \ + maybe-clean-patch \ + maybe-clean-perl \ + maybe-clean-prms \ + maybe-clean-rcs \ + maybe-clean-readline \ + maybe-clean-release \ + maybe-clean-recode \ + maybe-clean-sed \ + maybe-clean-send-pr \ + maybe-clean-shellutils \ + maybe-clean-sid \ + maybe-clean-sim \ + maybe-clean-tar \ + maybe-clean-texinfo \ + maybe-clean-textutils \ + maybe-clean-time \ + maybe-clean-uudecode \ + maybe-clean-wdiff \ + maybe-clean-zip \ + maybe-clean-zlib \ + maybe-clean-gdb \ + maybe-clean-expect \ + maybe-clean-guile \ + maybe-clean-tk \ + maybe-clean-tix \ + maybe-clean-libtermcap \ + maybe-clean-utils + +.PHONY: clean-target +clean-target: \ + maybe-clean-target-libstdc++-v3 \ + maybe-clean-target-newlib \ + maybe-clean-target-libf2c \ + maybe-clean-target-libobjc \ + maybe-clean-target-libtermcap \ + maybe-clean-target-winsup \ + maybe-clean-target-libgloss \ + maybe-clean-target-libiberty \ + maybe-clean-target-gperf \ + maybe-clean-target-examples \ + maybe-clean-target-libffi \ + maybe-clean-target-libjava \ + maybe-clean-target-zlib \ + maybe-clean-target-boehm-gc \ + maybe-clean-target-qthreads \ + maybe-clean-target-rda \ + maybe-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-clean-gcc clean-gcc +maybe-clean-gcc: +clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-clean-ash clean-ash +maybe-clean-ash: + +clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-autoconf clean-autoconf +maybe-clean-autoconf: + +clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-automake clean-automake +maybe-clean-automake: + +clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bash clean-bash +maybe-clean-bash: + +clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bfd clean-bfd +maybe-clean-bfd: + +clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-opcodes clean-opcodes +maybe-clean-opcodes: + +clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-binutils clean-binutils +maybe-clean-binutils: + +clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bison clean-bison +maybe-clean-bison: + +clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-byacc clean-byacc +maybe-clean-byacc: + +clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bzip2 clean-bzip2 +maybe-clean-bzip2: + +clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dejagnu clean-dejagnu +maybe-clean-dejagnu: + +clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-diff clean-diff +maybe-clean-diff: + +clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dosutils clean-dosutils +maybe-clean-dosutils: + +clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-etc clean-etc +maybe-clean-etc: + +clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fastjar clean-fastjar +maybe-clean-fastjar: + +clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fileutils clean-fileutils +maybe-clean-fileutils: + +clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-findutils clean-findutils +maybe-clean-findutils: + +clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-find clean-find +maybe-clean-find: + +clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-flex clean-flex +maybe-clean-flex: + +clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gas clean-gas +maybe-clean-gas: + +clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gawk clean-gawk +maybe-clean-gawk: + +clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gettext clean-gettext +maybe-clean-gettext: + +clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gnuserv clean-gnuserv +maybe-clean-gnuserv: + +clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: + +clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gzip clean-gzip +maybe-clean-gzip: + +clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-hello clean-hello +maybe-clean-hello: + +clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-indent clean-indent +maybe-clean-indent: + +clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-intl clean-intl +maybe-clean-intl: + +clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tcl clean-tcl +maybe-clean-tcl: + +clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-itcl clean-itcl +maybe-clean-itcl: + +clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-ld clean-ld +maybe-clean-ld: + +clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libgui clean-libgui +maybe-clean-libgui: + +clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libiberty clean-libiberty +maybe-clean-libiberty: + +clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtool clean-libtool +maybe-clean-libtool: + +clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-m4 clean-m4 +maybe-clean-m4: + +clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-make clean-make +maybe-clean-make: + +clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-mmalloc clean-mmalloc +maybe-clean-mmalloc: + +clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-patch clean-patch +maybe-clean-patch: + +clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-perl clean-perl +maybe-clean-perl: + +clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-prms clean-prms +maybe-clean-prms: + +clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-rcs clean-rcs +maybe-clean-rcs: + +clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-readline clean-readline +maybe-clean-readline: + +clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-release clean-release +maybe-clean-release: + +clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-recode clean-recode +maybe-clean-recode: + +clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sed clean-sed +maybe-clean-sed: + +clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-send-pr clean-send-pr +maybe-clean-send-pr: + +clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-shellutils clean-shellutils +maybe-clean-shellutils: + +clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sid clean-sid +maybe-clean-sid: + +clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sim clean-sim +maybe-clean-sim: + +clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tar clean-tar +maybe-clean-tar: + +clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-texinfo clean-texinfo +maybe-clean-texinfo: + +clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-textutils clean-textutils +maybe-clean-textutils: + +clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-time clean-time +maybe-clean-time: + +clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-uudecode clean-uudecode +maybe-clean-uudecode: + +clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-wdiff clean-wdiff +maybe-clean-wdiff: + +clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zip clean-zip +maybe-clean-zip: + +clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zlib clean-zlib +maybe-clean-zlib: + +clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gdb clean-gdb +maybe-clean-gdb: + +clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-expect clean-expect +maybe-clean-expect: + +clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-guile clean-guile +maybe-clean-guile: + +clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tk clean-tk +maybe-clean-tk: + +clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tix clean-tix +maybe-clean-tix: + +clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtermcap clean-libtermcap +maybe-clean-libtermcap: + +# libtermcap doesn't support clean. +clean-libtermcap: + + +.PHONY: maybe-clean-utils clean-utils +maybe-clean-utils: + +clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3 +maybe-clean-target-libstdc++-v3: + +clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-newlib clean-target-newlib +maybe-clean-target-newlib: + +clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libf2c clean-target-libf2c +maybe-clean-target-libf2c: + +clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libobjc clean-target-libobjc +maybe-clean-target-libobjc: + +clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap +maybe-clean-target-libtermcap: + +# libtermcap doesn't support clean. +clean-target-libtermcap: + + +.PHONY: maybe-clean-target-winsup clean-target-winsup +maybe-clean-target-winsup: + +clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libgloss clean-target-libgloss +maybe-clean-target-libgloss: + +clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libiberty clean-target-libiberty +maybe-clean-target-libiberty: + +clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-gperf clean-target-gperf +maybe-clean-target-gperf: + +clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-examples clean-target-examples +maybe-clean-target-examples: + +clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libffi clean-target-libffi +maybe-clean-target-libffi: + +clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libjava clean-target-libjava +maybe-clean-target-libjava: + +clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-zlib clean-target-zlib +maybe-clean-target-zlib: + +clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc +maybe-clean-target-boehm-gc: + +clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-qthreads clean-target-qthreads +maybe-clean-target-qthreads: + +clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-rda clean-target-rda +maybe-clean-target-rda: + +clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libada clean-target-libada +maybe-clean-target-libada: + +clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +.PHONY: do-distclean +do-distclean: distclean-host distclean-target + +.PHONY: distclean-host +distclean-host: maybe-distclean-gcc \ + maybe-distclean-ash \ + maybe-distclean-autoconf \ + maybe-distclean-automake \ + maybe-distclean-bash \ + maybe-distclean-bfd \ + maybe-distclean-opcodes \ + maybe-distclean-binutils \ + maybe-distclean-bison \ + maybe-distclean-byacc \ + maybe-distclean-bzip2 \ + maybe-distclean-dejagnu \ + maybe-distclean-diff \ + maybe-distclean-dosutils \ + maybe-distclean-etc \ + maybe-distclean-fastjar \ + maybe-distclean-fileutils \ + maybe-distclean-findutils \ + maybe-distclean-find \ + maybe-distclean-flex \ + maybe-distclean-gas \ + maybe-distclean-gawk \ + maybe-distclean-gettext \ + maybe-distclean-gnuserv \ + maybe-distclean-gprof \ + maybe-distclean-gzip \ + maybe-distclean-hello \ + maybe-distclean-indent \ + maybe-distclean-intl \ + maybe-distclean-tcl \ + maybe-distclean-itcl \ + maybe-distclean-ld \ + maybe-distclean-libgui \ + maybe-distclean-libiberty \ + maybe-distclean-libtool \ + maybe-distclean-m4 \ + maybe-distclean-make \ + maybe-distclean-mmalloc \ + maybe-distclean-patch \ + maybe-distclean-perl \ + maybe-distclean-prms \ + maybe-distclean-rcs \ + maybe-distclean-readline \ + maybe-distclean-release \ + maybe-distclean-recode \ + maybe-distclean-sed \ + maybe-distclean-send-pr \ + maybe-distclean-shellutils \ + maybe-distclean-sid \ + maybe-distclean-sim \ + maybe-distclean-tar \ + maybe-distclean-texinfo \ + maybe-distclean-textutils \ + maybe-distclean-time \ + maybe-distclean-uudecode \ + maybe-distclean-wdiff \ + maybe-distclean-zip \ + maybe-distclean-zlib \ + maybe-distclean-gdb \ + maybe-distclean-expect \ + maybe-distclean-guile \ + maybe-distclean-tk \ + maybe-distclean-tix \ + maybe-distclean-libtermcap \ + maybe-distclean-utils + +.PHONY: distclean-target +distclean-target: \ + maybe-distclean-target-libstdc++-v3 \ + maybe-distclean-target-newlib \ + maybe-distclean-target-libf2c \ + maybe-distclean-target-libobjc \ + maybe-distclean-target-libtermcap \ + maybe-distclean-target-winsup \ + maybe-distclean-target-libgloss \ + maybe-distclean-target-libiberty \ + maybe-distclean-target-gperf \ + maybe-distclean-target-examples \ + maybe-distclean-target-libffi \ + maybe-distclean-target-libjava \ + maybe-distclean-target-zlib \ + maybe-distclean-target-boehm-gc \ + maybe-distclean-target-qthreads \ + maybe-distclean-target-rda \ + maybe-distclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-distclean-gcc distclean-gcc +maybe-distclean-gcc: +distclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-distclean-ash distclean-ash +maybe-distclean-ash: + +distclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-autoconf distclean-autoconf +maybe-distclean-autoconf: + +distclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-automake distclean-automake +maybe-distclean-automake: + +distclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bash distclean-bash +maybe-distclean-bash: + +distclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bfd distclean-bfd +maybe-distclean-bfd: + +distclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-opcodes distclean-opcodes +maybe-distclean-opcodes: + +distclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-binutils distclean-binutils +maybe-distclean-binutils: + +distclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bison distclean-bison +maybe-distclean-bison: + +distclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-byacc distclean-byacc +maybe-distclean-byacc: + +distclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bzip2 distclean-bzip2 +maybe-distclean-bzip2: + +distclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dejagnu distclean-dejagnu +maybe-distclean-dejagnu: + +distclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-diff distclean-diff +maybe-distclean-diff: + +distclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dosutils distclean-dosutils +maybe-distclean-dosutils: + +distclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-etc distclean-etc +maybe-distclean-etc: + +distclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fastjar distclean-fastjar +maybe-distclean-fastjar: + +distclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fileutils distclean-fileutils +maybe-distclean-fileutils: + +distclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-findutils distclean-findutils +maybe-distclean-findutils: + +distclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-find distclean-find +maybe-distclean-find: + +distclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-flex distclean-flex +maybe-distclean-flex: + +distclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gas distclean-gas +maybe-distclean-gas: + +distclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gawk distclean-gawk +maybe-distclean-gawk: + +distclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gettext distclean-gettext +maybe-distclean-gettext: + +distclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gnuserv distclean-gnuserv +maybe-distclean-gnuserv: + +distclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: + +distclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gzip distclean-gzip +maybe-distclean-gzip: + +distclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-hello distclean-hello +maybe-distclean-hello: + +distclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-indent distclean-indent +maybe-distclean-indent: + +distclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-intl distclean-intl +maybe-distclean-intl: + +distclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tcl distclean-tcl +maybe-distclean-tcl: + +distclean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-itcl distclean-itcl +maybe-distclean-itcl: + +distclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-ld distclean-ld +maybe-distclean-ld: + +distclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libgui distclean-libgui +maybe-distclean-libgui: + +distclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libiberty distclean-libiberty +maybe-distclean-libiberty: + +distclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtool distclean-libtool +maybe-distclean-libtool: + +distclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-m4 distclean-m4 +maybe-distclean-m4: + +distclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-make distclean-make +maybe-distclean-make: + +distclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-mmalloc distclean-mmalloc +maybe-distclean-mmalloc: + +distclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-patch distclean-patch +maybe-distclean-patch: + +distclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-perl distclean-perl +maybe-distclean-perl: + +distclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-prms distclean-prms +maybe-distclean-prms: + +distclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-rcs distclean-rcs +maybe-distclean-rcs: + +distclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-readline distclean-readline +maybe-distclean-readline: + +distclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-release distclean-release +maybe-distclean-release: + +distclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-recode distclean-recode +maybe-distclean-recode: + +distclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sed distclean-sed +maybe-distclean-sed: + +distclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-send-pr distclean-send-pr +maybe-distclean-send-pr: + +distclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-shellutils distclean-shellutils +maybe-distclean-shellutils: + +distclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sid distclean-sid +maybe-distclean-sid: + +distclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sim distclean-sim +maybe-distclean-sim: + +distclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tar distclean-tar +maybe-distclean-tar: + +distclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-texinfo distclean-texinfo +maybe-distclean-texinfo: + +distclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-textutils distclean-textutils +maybe-distclean-textutils: + +distclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-time distclean-time +maybe-distclean-time: + +distclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-uudecode distclean-uudecode +maybe-distclean-uudecode: + +distclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-wdiff distclean-wdiff +maybe-distclean-wdiff: + +distclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zip distclean-zip +maybe-distclean-zip: + +distclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zlib distclean-zlib +maybe-distclean-zlib: + +distclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gdb distclean-gdb +maybe-distclean-gdb: + +distclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-expect distclean-expect +maybe-distclean-expect: + +distclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-guile distclean-guile +maybe-distclean-guile: + +distclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tk distclean-tk +maybe-distclean-tk: + +distclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tix distclean-tix +maybe-distclean-tix: + +distclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtermcap distclean-libtermcap +maybe-distclean-libtermcap: + +# libtermcap doesn't support distclean. +distclean-libtermcap: + + +.PHONY: maybe-distclean-utils distclean-utils +maybe-distclean-utils: + +distclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3 +maybe-distclean-target-libstdc++-v3: + +distclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-newlib distclean-target-newlib +maybe-distclean-target-newlib: + +distclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c +maybe-distclean-target-libf2c: + +distclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc +maybe-distclean-target-libobjc: + +distclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap +maybe-distclean-target-libtermcap: + +# libtermcap doesn't support distclean. +distclean-target-libtermcap: + + +.PHONY: maybe-distclean-target-winsup distclean-target-winsup +maybe-distclean-target-winsup: + +distclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss +maybe-distclean-target-libgloss: + +distclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty +maybe-distclean-target-libiberty: + +distclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-gperf distclean-target-gperf +maybe-distclean-target-gperf: + +distclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-examples distclean-target-examples +maybe-distclean-target-examples: + +distclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libffi distclean-target-libffi +maybe-distclean-target-libffi: + +distclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libjava distclean-target-libjava +maybe-distclean-target-libjava: + +distclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-zlib distclean-target-zlib +maybe-distclean-target-zlib: + +distclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc +maybe-distclean-target-boehm-gc: + +distclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads +maybe-distclean-target-qthreads: + +distclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-rda distclean-target-rda +maybe-distclean-target-rda: + +distclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libada distclean-target-libada +maybe-distclean-target-libada: + +distclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +.PHONY: do-maintainer-clean +do-maintainer-clean: maintainer-clean-host maintainer-clean-target + +.PHONY: maintainer-clean-host +maintainer-clean-host: maybe-maintainer-clean-gcc \ + maybe-maintainer-clean-ash \ + maybe-maintainer-clean-autoconf \ + maybe-maintainer-clean-automake \ + maybe-maintainer-clean-bash \ + maybe-maintainer-clean-bfd \ + maybe-maintainer-clean-opcodes \ + maybe-maintainer-clean-binutils \ + maybe-maintainer-clean-bison \ + maybe-maintainer-clean-byacc \ + maybe-maintainer-clean-bzip2 \ + maybe-maintainer-clean-dejagnu \ + maybe-maintainer-clean-diff \ + maybe-maintainer-clean-dosutils \ + maybe-maintainer-clean-etc \ + maybe-maintainer-clean-fastjar \ + maybe-maintainer-clean-fileutils \ + maybe-maintainer-clean-findutils \ + maybe-maintainer-clean-find \ + maybe-maintainer-clean-flex \ + maybe-maintainer-clean-gas \ + maybe-maintainer-clean-gawk \ + maybe-maintainer-clean-gettext \ + maybe-maintainer-clean-gnuserv \ + maybe-maintainer-clean-gprof \ + maybe-maintainer-clean-gzip \ + maybe-maintainer-clean-hello \ + maybe-maintainer-clean-indent \ + maybe-maintainer-clean-intl \ + maybe-maintainer-clean-tcl \ + maybe-maintainer-clean-itcl \ + maybe-maintainer-clean-ld \ + maybe-maintainer-clean-libgui \ + maybe-maintainer-clean-libiberty \ + maybe-maintainer-clean-libtool \ + maybe-maintainer-clean-m4 \ + maybe-maintainer-clean-make \ + maybe-maintainer-clean-mmalloc \ + maybe-maintainer-clean-patch \ + maybe-maintainer-clean-perl \ + maybe-maintainer-clean-prms \ + maybe-maintainer-clean-rcs \ + maybe-maintainer-clean-readline \ + maybe-maintainer-clean-release \ + maybe-maintainer-clean-recode \ + maybe-maintainer-clean-sed \ + maybe-maintainer-clean-send-pr \ + maybe-maintainer-clean-shellutils \ + maybe-maintainer-clean-sid \ + maybe-maintainer-clean-sim \ + maybe-maintainer-clean-tar \ + maybe-maintainer-clean-texinfo \ + maybe-maintainer-clean-textutils \ + maybe-maintainer-clean-time \ + maybe-maintainer-clean-uudecode \ + maybe-maintainer-clean-wdiff \ + maybe-maintainer-clean-zip \ + maybe-maintainer-clean-zlib \ + maybe-maintainer-clean-gdb \ + maybe-maintainer-clean-expect \ + maybe-maintainer-clean-guile \ + maybe-maintainer-clean-tk \ + maybe-maintainer-clean-tix \ + maybe-maintainer-clean-libtermcap \ + maybe-maintainer-clean-utils + +.PHONY: maintainer-clean-target +maintainer-clean-target: \ + maybe-maintainer-clean-target-libstdc++-v3 \ + maybe-maintainer-clean-target-newlib \ + maybe-maintainer-clean-target-libf2c \ + maybe-maintainer-clean-target-libobjc \ + maybe-maintainer-clean-target-libtermcap \ + maybe-maintainer-clean-target-winsup \ + maybe-maintainer-clean-target-libgloss \ + maybe-maintainer-clean-target-libiberty \ + maybe-maintainer-clean-target-gperf \ + maybe-maintainer-clean-target-examples \ + maybe-maintainer-clean-target-libffi \ + maybe-maintainer-clean-target-libjava \ + maybe-maintainer-clean-target-zlib \ + maybe-maintainer-clean-target-boehm-gc \ + maybe-maintainer-clean-target-qthreads \ + maybe-maintainer-clean-target-rda \ + maybe-maintainer-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc +maybe-maintainer-clean-gcc: +maintainer-clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash +maybe-maintainer-clean-ash: + +maintainer-clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf +maybe-maintainer-clean-autoconf: + +maintainer-clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake +maybe-maintainer-clean-automake: + +maintainer-clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash +maybe-maintainer-clean-bash: + +maintainer-clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd +maybe-maintainer-clean-bfd: + +maintainer-clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes +maybe-maintainer-clean-opcodes: + +maintainer-clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils +maybe-maintainer-clean-binutils: + +maintainer-clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison +maybe-maintainer-clean-bison: + +maintainer-clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc +maybe-maintainer-clean-byacc: + +maintainer-clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2 +maybe-maintainer-clean-bzip2: + +maintainer-clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu +maybe-maintainer-clean-dejagnu: + +maintainer-clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff +maybe-maintainer-clean-diff: + +maintainer-clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils +maybe-maintainer-clean-dosutils: + +maintainer-clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc +maybe-maintainer-clean-etc: + +maintainer-clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar +maybe-maintainer-clean-fastjar: + +maintainer-clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils +maybe-maintainer-clean-fileutils: + +maintainer-clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils +maybe-maintainer-clean-findutils: + +maintainer-clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-find maintainer-clean-find +maybe-maintainer-clean-find: + +maintainer-clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex +maybe-maintainer-clean-flex: + +maintainer-clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas +maybe-maintainer-clean-gas: + +maintainer-clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk +maybe-maintainer-clean-gawk: + +maintainer-clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext +maybe-maintainer-clean-gettext: + +maintainer-clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv +maybe-maintainer-clean-gnuserv: + +maintainer-clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: + +maintainer-clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip +maybe-maintainer-clean-gzip: + +maintainer-clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello +maybe-maintainer-clean-hello: + +maintainer-clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent +maybe-maintainer-clean-indent: + +maintainer-clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl +maybe-maintainer-clean-intl: + +maintainer-clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl +maybe-maintainer-clean-tcl: + +maintainer-clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl +maybe-maintainer-clean-itcl: + +maintainer-clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld +maybe-maintainer-clean-ld: + +maintainer-clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui +maybe-maintainer-clean-libgui: + +maintainer-clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty +maybe-maintainer-clean-libiberty: + +maintainer-clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool +maybe-maintainer-clean-libtool: + +maintainer-clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4 +maybe-maintainer-clean-m4: + +maintainer-clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-make maintainer-clean-make +maybe-maintainer-clean-make: + +maintainer-clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc +maybe-maintainer-clean-mmalloc: + +maintainer-clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch +maybe-maintainer-clean-patch: + +maintainer-clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl +maybe-maintainer-clean-perl: + +maintainer-clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms +maybe-maintainer-clean-prms: + +maintainer-clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs +maybe-maintainer-clean-rcs: + +maintainer-clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +maybe-maintainer-clean-readline: + +maintainer-clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-release maintainer-clean-release +maybe-maintainer-clean-release: + +maintainer-clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode +maybe-maintainer-clean-recode: + +maintainer-clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed +maybe-maintainer-clean-sed: + +maintainer-clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr +maybe-maintainer-clean-send-pr: + +maintainer-clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils +maybe-maintainer-clean-shellutils: + +maintainer-clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid +maybe-maintainer-clean-sid: + +maintainer-clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim +maybe-maintainer-clean-sim: + +maintainer-clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar +maybe-maintainer-clean-tar: + +maintainer-clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo +maybe-maintainer-clean-texinfo: + +maintainer-clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils +maybe-maintainer-clean-textutils: + +maintainer-clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-time maintainer-clean-time +maybe-maintainer-clean-time: + +maintainer-clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode +maybe-maintainer-clean-uudecode: + +maintainer-clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff +maybe-maintainer-clean-wdiff: + +maintainer-clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip +maybe-maintainer-clean-zip: + +maintainer-clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib +maybe-maintainer-clean-zlib: + +maintainer-clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb +maybe-maintainer-clean-gdb: + +maintainer-clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect +maybe-maintainer-clean-expect: + +maintainer-clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile +maybe-maintainer-clean-guile: + +maintainer-clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk +maybe-maintainer-clean-tk: + +maintainer-clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix +maybe-maintainer-clean-tix: + +maintainer-clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap +maybe-maintainer-clean-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-libtermcap: + + +.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils +maybe-maintainer-clean-utils: + +maintainer-clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3 +maybe-maintainer-clean-target-libstdc++-v3: + +maintainer-clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib +maybe-maintainer-clean-target-newlib: + +maintainer-clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c +maybe-maintainer-clean-target-libf2c: + +maintainer-clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc +maybe-maintainer-clean-target-libobjc: + +maintainer-clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap +maybe-maintainer-clean-target-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-target-libtermcap: + + +.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup +maybe-maintainer-clean-target-winsup: + +maintainer-clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss +maybe-maintainer-clean-target-libgloss: + +maintainer-clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty +maybe-maintainer-clean-target-libiberty: + +maintainer-clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf +maybe-maintainer-clean-target-gperf: + +maintainer-clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples +maybe-maintainer-clean-target-examples: + +maintainer-clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi +maybe-maintainer-clean-target-libffi: + +maintainer-clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava +maybe-maintainer-clean-target-libjava: + +maintainer-clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib +maybe-maintainer-clean-target-zlib: + +maintainer-clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc +maybe-maintainer-clean-target-boehm-gc: + +maintainer-clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads +maybe-maintainer-clean-target-qthreads: + +maintainer-clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda +maybe-maintainer-clean-target-rda: + +maintainer-clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada +maybe-maintainer-clean-target-libada: + +maintainer-clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + + +# Here are the targets which correspond to the do-X targets. + +.PHONY: info installcheck dvi install-info +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean +info: do-info +installcheck: do-installcheck +dvi: do-dvi + +# Make sure makeinfo is built before we do a `make info', if we're +# in fact building texinfo. +do-info: maybe-all-texinfo + +install-info: do-install-info dir.info + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f dir.info ] ; then \ + $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \ + else true ; fi + +local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log + +local-distclean: + -rm -f Makefile config.status config.cache mh-frag mt-frag + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -if [ "$(TARGET_SUBDIR)" != "." ]; then \ + rm -rf $(TARGET_SUBDIR); \ + else true; fi + -rm -rf $(BUILD_SUBDIR) + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +clean: do-clean local-clean +mostlyclean: do-mostlyclean local-clean +distclean: do-distclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean + +# Extra dependency for clean-target, owing to the mixed nature of gcc +clean-target: clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc + +# Check target. + +.PHONY: check do-check +check: do-check + +# Only include modules actually being configured and built. +do-check: maybe-check-gcc \ + maybe-check-ash \ + maybe-check-autoconf \ + maybe-check-automake \ + maybe-check-bash \ + maybe-check-bfd \ + maybe-check-opcodes \ + maybe-check-binutils \ + maybe-check-bison \ + maybe-check-byacc \ + maybe-check-bzip2 \ + maybe-check-dejagnu \ + maybe-check-diff \ + maybe-check-dosutils \ + maybe-check-etc \ + maybe-check-fastjar \ + maybe-check-fileutils \ + maybe-check-findutils \ + maybe-check-find \ + maybe-check-flex \ + maybe-check-gas \ + maybe-check-gawk \ + maybe-check-gettext \ + maybe-check-gnuserv \ + maybe-check-gprof \ + maybe-check-gzip \ + maybe-check-hello \ + maybe-check-indent \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ + maybe-check-ld \ + maybe-check-libgui \ + maybe-check-libiberty \ + maybe-check-libtool \ + maybe-check-m4 \ + maybe-check-make \ + maybe-check-mmalloc \ + maybe-check-patch \ + maybe-check-perl \ + maybe-check-prms \ + maybe-check-rcs \ + maybe-check-readline \ + maybe-check-release \ + maybe-check-recode \ + maybe-check-sed \ + maybe-check-send-pr \ + maybe-check-shellutils \ + maybe-check-sid \ + maybe-check-sim \ + maybe-check-tar \ + maybe-check-texinfo \ + maybe-check-textutils \ + maybe-check-time \ + maybe-check-uudecode \ + maybe-check-wdiff \ + maybe-check-zip \ + maybe-check-zlib \ + maybe-check-gdb \ + maybe-check-expect \ + maybe-check-guile \ + maybe-check-tk \ + maybe-check-tix \ + maybe-check-libtermcap \ + maybe-check-utils \ + maybe-check-target-libstdc++-v3 \ + maybe-check-target-newlib \ + maybe-check-target-libf2c \ + maybe-check-target-libobjc \ + maybe-check-target-libtermcap \ + maybe-check-target-winsup \ + maybe-check-target-libgloss \ + maybe-check-target-libiberty \ + maybe-check-target-gperf \ + maybe-check-target-examples \ + maybe-check-target-libffi \ + maybe-check-target-libjava \ + maybe-check-target-zlib \ + maybe-check-target-boehm-gc \ + maybe-check-target-qthreads \ + maybe-check-target-rda \ + maybe-check-target-libada + +# Automated reporting of test results. + +warning.log: build.log + $(srcdir)/contrib/warn_summary build.log > $@ + +mail-report.log: + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +mail-report-with-warnings.log: warning.log + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t -i warning.log >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +# Installation targets. + +.PHONY: install uninstall +install: installdirs install-host install-target + +.PHONY: install-host-nogcc +install-host-nogcc: \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-host +install-host: maybe-install-gcc \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-target +install-target: \ + maybe-install-target-libstdc++-v3 \ + maybe-install-target-newlib \ + maybe-install-target-libf2c \ + maybe-install-target-libobjc \ + maybe-install-target-libtermcap \ + maybe-install-target-winsup \ + maybe-install-target-libgloss \ + maybe-install-target-libiberty \ + maybe-install-target-gperf \ + maybe-install-target-examples \ + maybe-install-target-libffi \ + maybe-install-target-libjava \ + maybe-install-target-zlib \ + maybe-install-target-boehm-gc \ + maybe-install-target-qthreads \ + maybe-install-target-rda \ + maybe-install-target-libada + +uninstall: + @echo "the uninstall target is not supported in this tree" + +.PHONY: install.all +install.all: install-no-fixedincludes + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}` ; export r ; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ + else \ + true ; \ + fi + +# install-no-fixedincludes is used because Cygnus can not distribute +# the fixed header files. +.PHONY: install-no-fixedincludes +install-no-fixedincludes: installdirs install-host-nogcc \ + install-target gcc-no-fixedincludes + +### other supporting targets + +MAKEDIRS= \ + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) +.PHONY: installdirs +installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) + +dir.info: do-install-info + if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ + $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ + mv -f dir.info.new dir.info ; \ + else true ; \ + fi + +dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" + +etags tags: TAGS + +# Right now this just builds TAGS in each subdirectory. emacs19 has the +# ability to use several tags files at once, so there is probably no need +# to combine them into one big TAGS file (like CVS 1.3 does). We could +# (if we felt like it) have this Makefile write a piece of elisp which +# the user could load to tell emacs19 where all the TAGS files we just +# built are. +TAGS: do-TAGS + +# -------------------------------------- +# Modules which run on the build machine +# -------------------------------------- + +.PHONY: configure-build-libiberty maybe-configure-build-libiberty +maybe-configure-build-libiberty: +configure-build-libiberty: + @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/libiberty; \ + cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 + +.PHONY: all-build-libiberty maybe-all-build-libiberty +maybe-all-build-libiberty: +all-build-libiberty: configure-build-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all) + + +# -------------------------------------- +# Modules which run on the host machine +# -------------------------------------- + +.PHONY: configure-ash maybe-configure-ash +maybe-configure-ash: +configure-ash: + @test ! -f ash/Makefile || exit 0; \ + [ -d ash ] || mkdir ash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ash; \ + cd ash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ash maybe-all-ash +maybe-all-ash: +all-ash: configure-ash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ash maybe-check-ash +maybe-check-ash: + +check-ash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ash maybe-install-ash +maybe-install-ash: + +install-ash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-autoconf maybe-configure-autoconf +maybe-configure-autoconf: +configure-autoconf: + @test ! -f autoconf/Makefile || exit 0; \ + [ -d autoconf ] || mkdir autoconf; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in autoconf; \ + cd autoconf || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-autoconf maybe-all-autoconf +maybe-all-autoconf: +all-autoconf: configure-autoconf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-autoconf maybe-check-autoconf +maybe-check-autoconf: + +check-autoconf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-autoconf maybe-install-autoconf +maybe-install-autoconf: + +install-autoconf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-automake maybe-configure-automake +maybe-configure-automake: +configure-automake: + @test ! -f automake/Makefile || exit 0; \ + [ -d automake ] || mkdir automake; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in automake; \ + cd automake || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-automake maybe-all-automake +maybe-all-automake: +all-automake: configure-automake + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-automake maybe-check-automake +maybe-check-automake: + +check-automake: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-automake maybe-install-automake +maybe-install-automake: + +install-automake: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bash maybe-configure-bash +maybe-configure-bash: +configure-bash: + @test ! -f bash/Makefile || exit 0; \ + [ -d bash ] || mkdir bash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bash; \ + cd bash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bash maybe-all-bash +maybe-all-bash: +all-bash: configure-bash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bash maybe-check-bash +maybe-check-bash: + +check-bash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bash maybe-install-bash +maybe-install-bash: + +install-bash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bfd maybe-configure-bfd +maybe-configure-bfd: +configure-bfd: + @test ! -f bfd/Makefile || exit 0; \ + [ -d bfd ] || mkdir bfd; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bfd; \ + cd bfd || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bfd maybe-all-bfd +maybe-all-bfd: +all-bfd: configure-bfd + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bfd maybe-check-bfd +maybe-check-bfd: + +check-bfd: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bfd maybe-install-bfd +maybe-install-bfd: + +install-bfd: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-opcodes maybe-configure-opcodes +maybe-configure-opcodes: +configure-opcodes: + @test ! -f opcodes/Makefile || exit 0; \ + [ -d opcodes ] || mkdir opcodes; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in opcodes; \ + cd opcodes || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-opcodes maybe-all-opcodes +maybe-all-opcodes: +all-opcodes: configure-opcodes + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-opcodes maybe-check-opcodes +maybe-check-opcodes: + +check-opcodes: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-opcodes maybe-install-opcodes +maybe-install-opcodes: + +install-opcodes: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-binutils maybe-configure-binutils +maybe-configure-binutils: +configure-binutils: + @test ! -f binutils/Makefile || exit 0; \ + [ -d binutils ] || mkdir binutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in binutils; \ + cd binutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-binutils maybe-all-binutils +maybe-all-binutils: +all-binutils: configure-binutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-binutils maybe-check-binutils +maybe-check-binutils: + +check-binutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-binutils maybe-install-binutils +maybe-install-binutils: + +install-binutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bison maybe-configure-bison +maybe-configure-bison: +configure-bison: + @test ! -f bison/Makefile || exit 0; \ + [ -d bison ] || mkdir bison; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bison; \ + cd bison || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bison maybe-all-bison +maybe-all-bison: +all-bison: configure-bison + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bison maybe-check-bison +maybe-check-bison: + +# This module is only tested in a native toolchain. +check-bison: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-bison maybe-install-bison +maybe-install-bison: + +install-bison: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-byacc maybe-configure-byacc +maybe-configure-byacc: +configure-byacc: + @test ! -f byacc/Makefile || exit 0; \ + [ -d byacc ] || mkdir byacc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in byacc; \ + cd byacc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-byacc maybe-all-byacc +maybe-all-byacc: +all-byacc: configure-byacc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-byacc maybe-check-byacc +maybe-check-byacc: + +# This module is only tested in a native toolchain. +check-byacc: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-byacc maybe-install-byacc +maybe-install-byacc: + +install-byacc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bzip2 maybe-configure-bzip2 +maybe-configure-bzip2: +configure-bzip2: + @test ! -f bzip2/Makefile || exit 0; \ + [ -d bzip2 ] || mkdir bzip2; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bzip2; \ + cd bzip2 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bzip2 maybe-all-bzip2 +maybe-all-bzip2: +all-bzip2: configure-bzip2 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bzip2 maybe-check-bzip2 +maybe-check-bzip2: + +check-bzip2: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bzip2 maybe-install-bzip2 +maybe-install-bzip2: + +install-bzip2: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dejagnu maybe-configure-dejagnu +maybe-configure-dejagnu: +configure-dejagnu: + @test ! -f dejagnu/Makefile || exit 0; \ + [ -d dejagnu ] || mkdir dejagnu; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dejagnu; \ + cd dejagnu || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dejagnu maybe-all-dejagnu +maybe-all-dejagnu: +all-dejagnu: configure-dejagnu + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dejagnu maybe-check-dejagnu +maybe-check-dejagnu: + +check-dejagnu: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-dejagnu maybe-install-dejagnu +maybe-install-dejagnu: + +install-dejagnu: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-diff maybe-configure-diff +maybe-configure-diff: +configure-diff: + @test ! -f diff/Makefile || exit 0; \ + [ -d diff ] || mkdir diff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in diff; \ + cd diff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-diff maybe-all-diff +maybe-all-diff: +all-diff: configure-diff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-diff maybe-check-diff +maybe-check-diff: + +check-diff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-diff maybe-install-diff +maybe-install-diff: + +install-diff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dosutils maybe-configure-dosutils +maybe-configure-dosutils: +configure-dosutils: + @test ! -f dosutils/Makefile || exit 0; \ + [ -d dosutils ] || mkdir dosutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dosutils; \ + cd dosutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dosutils maybe-all-dosutils +maybe-all-dosutils: +all-dosutils: configure-dosutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dosutils maybe-check-dosutils +maybe-check-dosutils: + +check-dosutils: + + +.PHONY: install-dosutils maybe-install-dosutils +maybe-install-dosutils: + +install-dosutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-etc maybe-configure-etc +maybe-configure-etc: +configure-etc: + @test ! -f etc/Makefile || exit 0; \ + [ -d etc ] || mkdir etc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in etc; \ + cd etc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-etc maybe-all-etc +maybe-all-etc: +all-etc: configure-etc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-etc maybe-check-etc +maybe-check-etc: + +check-etc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-etc maybe-install-etc +maybe-install-etc: + +install-etc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fastjar maybe-configure-fastjar +maybe-configure-fastjar: +configure-fastjar: + @test ! -f fastjar/Makefile || exit 0; \ + [ -d fastjar ] || mkdir fastjar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fastjar; \ + cd fastjar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fastjar maybe-all-fastjar +maybe-all-fastjar: +all-fastjar: configure-fastjar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fastjar maybe-check-fastjar +maybe-check-fastjar: + +# This module is only tested in a native toolchain. +check-fastjar: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-fastjar maybe-install-fastjar +maybe-install-fastjar: + +install-fastjar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fileutils maybe-configure-fileutils +maybe-configure-fileutils: +configure-fileutils: + @test ! -f fileutils/Makefile || exit 0; \ + [ -d fileutils ] || mkdir fileutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fileutils; \ + cd fileutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fileutils maybe-all-fileutils +maybe-all-fileutils: +all-fileutils: configure-fileutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fileutils maybe-check-fileutils +maybe-check-fileutils: + +check-fileutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-fileutils maybe-install-fileutils +maybe-install-fileutils: + +install-fileutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-findutils maybe-configure-findutils +maybe-configure-findutils: +configure-findutils: + @test ! -f findutils/Makefile || exit 0; \ + [ -d findutils ] || mkdir findutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in findutils; \ + cd findutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-findutils maybe-all-findutils +maybe-all-findutils: +all-findutils: configure-findutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-findutils maybe-check-findutils +maybe-check-findutils: + +check-findutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-findutils maybe-install-findutils +maybe-install-findutils: + +install-findutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-find maybe-configure-find +maybe-configure-find: +configure-find: + @test ! -f find/Makefile || exit 0; \ + [ -d find ] || mkdir find; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in find; \ + cd find || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-find maybe-all-find +maybe-all-find: +all-find: configure-find + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-find maybe-check-find +maybe-check-find: + +check-find: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-find maybe-install-find +maybe-install-find: + +install-find: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-flex maybe-configure-flex +maybe-configure-flex: +configure-flex: + @test ! -f flex/Makefile || exit 0; \ + [ -d flex ] || mkdir flex; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in flex; \ + cd flex || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-flex maybe-all-flex +maybe-all-flex: +all-flex: configure-flex + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-flex maybe-check-flex +maybe-check-flex: + +# This module is only tested in a native toolchain. +check-flex: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-flex maybe-install-flex +maybe-install-flex: + +install-flex: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gas maybe-configure-gas +maybe-configure-gas: +configure-gas: + @test ! -f gas/Makefile || exit 0; \ + [ -d gas ] || mkdir gas; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gas; \ + cd gas || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gas maybe-all-gas +maybe-all-gas: +all-gas: configure-gas + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gas maybe-check-gas +maybe-check-gas: + +check-gas: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gas maybe-install-gas +maybe-install-gas: + +install-gas: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gawk maybe-configure-gawk +maybe-configure-gawk: +configure-gawk: + @test ! -f gawk/Makefile || exit 0; \ + [ -d gawk ] || mkdir gawk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gawk; \ + cd gawk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gawk maybe-all-gawk +maybe-all-gawk: +all-gawk: configure-gawk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gawk maybe-check-gawk +maybe-check-gawk: + +check-gawk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gawk maybe-install-gawk +maybe-install-gawk: + +install-gawk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gettext maybe-configure-gettext +maybe-configure-gettext: +configure-gettext: + @test ! -f gettext/Makefile || exit 0; \ + [ -d gettext ] || mkdir gettext; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gettext; \ + cd gettext || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gettext maybe-all-gettext +maybe-all-gettext: +all-gettext: configure-gettext + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gettext maybe-check-gettext +maybe-check-gettext: + +check-gettext: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gettext maybe-install-gettext +maybe-install-gettext: + +install-gettext: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gnuserv maybe-configure-gnuserv +maybe-configure-gnuserv: +configure-gnuserv: + @test ! -f gnuserv/Makefile || exit 0; \ + [ -d gnuserv ] || mkdir gnuserv; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gnuserv; \ + cd gnuserv || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gnuserv maybe-all-gnuserv +maybe-all-gnuserv: +all-gnuserv: configure-gnuserv + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gnuserv maybe-check-gnuserv +maybe-check-gnuserv: + +check-gnuserv: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gnuserv maybe-install-gnuserv +maybe-install-gnuserv: + +install-gnuserv: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: +configure-gprof: + @test ! -f gprof/Makefile || exit 0; \ + [ -d gprof ] || mkdir gprof; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gprof; \ + cd gprof || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +all-gprof: configure-gprof + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: + +check-gprof: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: + +install-gprof: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gzip maybe-configure-gzip +maybe-configure-gzip: +configure-gzip: + @test ! -f gzip/Makefile || exit 0; \ + [ -d gzip ] || mkdir gzip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gzip; \ + cd gzip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gzip maybe-all-gzip +maybe-all-gzip: +all-gzip: configure-gzip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gzip maybe-check-gzip +maybe-check-gzip: + +check-gzip: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gzip maybe-install-gzip +maybe-install-gzip: + +install-gzip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-hello maybe-configure-hello +maybe-configure-hello: +configure-hello: + @test ! -f hello/Makefile || exit 0; \ + [ -d hello ] || mkdir hello; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in hello; \ + cd hello || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-hello maybe-all-hello +maybe-all-hello: +all-hello: configure-hello + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-hello maybe-check-hello +maybe-check-hello: + +check-hello: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-hello maybe-install-hello +maybe-install-hello: + +install-hello: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-indent maybe-configure-indent +maybe-configure-indent: +configure-indent: + @test ! -f indent/Makefile || exit 0; \ + [ -d indent ] || mkdir indent; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in indent; \ + cd indent || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-indent maybe-all-indent +maybe-all-indent: +all-indent: configure-indent + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-indent maybe-check-indent +maybe-check-indent: + +check-indent: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-indent maybe-install-indent +maybe-install-indent: + +install-indent: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-intl maybe-configure-intl +maybe-configure-intl: +configure-intl: + @test ! -f intl/Makefile || exit 0; \ + [ -d intl ] || mkdir intl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in intl; \ + cd intl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-intl maybe-all-intl +maybe-all-intl: +all-intl: configure-intl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-intl maybe-check-intl +maybe-check-intl: + +check-intl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-intl maybe-install-intl +maybe-install-intl: + +install-intl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tcl maybe-configure-tcl +maybe-configure-tcl: +configure-tcl: + @test ! -f tcl/Makefile || exit 0; \ + [ -d tcl ] || mkdir tcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tcl; \ + cd tcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tcl maybe-all-tcl +maybe-all-tcl: +all-tcl: configure-tcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tcl maybe-check-tcl +maybe-check-tcl: + +check-tcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tcl maybe-install-tcl +maybe-install-tcl: + +install-tcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-itcl maybe-configure-itcl +maybe-configure-itcl: +configure-itcl: + @test ! -f itcl/Makefile || exit 0; \ + [ -d itcl ] || mkdir itcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in itcl; \ + cd itcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-itcl maybe-all-itcl +maybe-all-itcl: +all-itcl: configure-itcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-itcl maybe-check-itcl +maybe-check-itcl: + +check-itcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-itcl maybe-install-itcl +maybe-install-itcl: + +install-itcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-ld maybe-configure-ld +maybe-configure-ld: +configure-ld: + @test ! -f ld/Makefile || exit 0; \ + [ -d ld ] || mkdir ld; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ld; \ + cd ld || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ld maybe-all-ld +maybe-all-ld: +all-ld: configure-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ld maybe-check-ld +maybe-check-ld: + +check-ld: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ld maybe-install-ld +maybe-install-ld: + +install-ld: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libgui maybe-configure-libgui +maybe-configure-libgui: +configure-libgui: + @test ! -f libgui/Makefile || exit 0; \ + [ -d libgui ] || mkdir libgui; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libgui; \ + cd libgui || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libgui maybe-all-libgui +maybe-all-libgui: +all-libgui: configure-libgui + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libgui maybe-check-libgui +maybe-check-libgui: + +check-libgui: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libgui maybe-install-libgui +maybe-install-libgui: + +install-libgui: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libiberty maybe-configure-libiberty +maybe-configure-libiberty: +configure-libiberty: + @test ! -f libiberty/Makefile || exit 0; \ + [ -d libiberty ] || mkdir libiberty; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libiberty; \ + cd libiberty || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libiberty maybe-all-libiberty +maybe-all-libiberty: +all-libiberty: configure-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libiberty maybe-check-libiberty +maybe-check-libiberty: + +check-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libiberty maybe-install-libiberty +maybe-install-libiberty: + +install-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libtool maybe-configure-libtool +maybe-configure-libtool: +configure-libtool: + @test ! -f libtool/Makefile || exit 0; \ + [ -d libtool ] || mkdir libtool; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtool; \ + cd libtool || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtool maybe-all-libtool +maybe-all-libtool: +all-libtool: configure-libtool + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtool maybe-check-libtool +maybe-check-libtool: + +check-libtool: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libtool maybe-install-libtool +maybe-install-libtool: + +install-libtool: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-m4 maybe-configure-m4 +maybe-configure-m4: +configure-m4: + @test ! -f m4/Makefile || exit 0; \ + [ -d m4 ] || mkdir m4; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in m4; \ + cd m4 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-m4 maybe-all-m4 +maybe-all-m4: +all-m4: configure-m4 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-m4 maybe-check-m4 +maybe-check-m4: + +check-m4: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-m4 maybe-install-m4 +maybe-install-m4: + +install-m4: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-make maybe-configure-make +maybe-configure-make: +configure-make: + @test ! -f make/Makefile || exit 0; \ + [ -d make ] || mkdir make; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in make; \ + cd make || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-make maybe-all-make +maybe-all-make: +all-make: configure-make + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-make maybe-check-make +maybe-check-make: + +check-make: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-make maybe-install-make +maybe-install-make: + +install-make: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-mmalloc maybe-configure-mmalloc +maybe-configure-mmalloc: +configure-mmalloc: + @test ! -f mmalloc/Makefile || exit 0; \ + [ -d mmalloc ] || mkdir mmalloc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in mmalloc; \ + cd mmalloc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-mmalloc maybe-all-mmalloc +maybe-all-mmalloc: +all-mmalloc: configure-mmalloc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-mmalloc maybe-check-mmalloc +maybe-check-mmalloc: + +check-mmalloc: + + +.PHONY: install-mmalloc maybe-install-mmalloc +maybe-install-mmalloc: + +install-mmalloc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-patch maybe-configure-patch +maybe-configure-patch: +configure-patch: + @test ! -f patch/Makefile || exit 0; \ + [ -d patch ] || mkdir patch; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in patch; \ + cd patch || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-patch maybe-all-patch +maybe-all-patch: +all-patch: configure-patch + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-patch maybe-check-patch +maybe-check-patch: + +check-patch: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-patch maybe-install-patch +maybe-install-patch: + +install-patch: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-perl maybe-configure-perl +maybe-configure-perl: +configure-perl: + @test ! -f perl/Makefile || exit 0; \ + [ -d perl ] || mkdir perl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in perl; \ + cd perl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-perl maybe-all-perl +maybe-all-perl: +all-perl: configure-perl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-perl maybe-check-perl +maybe-check-perl: + +check-perl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-perl maybe-install-perl +maybe-install-perl: + +install-perl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-prms maybe-configure-prms +maybe-configure-prms: +configure-prms: + @test ! -f prms/Makefile || exit 0; \ + [ -d prms ] || mkdir prms; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in prms; \ + cd prms || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-prms maybe-all-prms +maybe-all-prms: +all-prms: configure-prms + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-prms maybe-check-prms +maybe-check-prms: + +check-prms: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-prms maybe-install-prms +maybe-install-prms: + +install-prms: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-rcs maybe-configure-rcs +maybe-configure-rcs: +configure-rcs: + @test ! -f rcs/Makefile || exit 0; \ + [ -d rcs ] || mkdir rcs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in rcs; \ + cd rcs || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-rcs maybe-all-rcs +maybe-all-rcs: +all-rcs: configure-rcs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-rcs maybe-check-rcs +maybe-check-rcs: + +check-rcs: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-rcs maybe-install-rcs +maybe-install-rcs: + +install-rcs: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-readline maybe-configure-readline +maybe-configure-readline: +configure-readline: + @test ! -f readline/Makefile || exit 0; \ + [ -d readline ] || mkdir readline; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in readline; \ + cd readline || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-readline maybe-all-readline +maybe-all-readline: +all-readline: configure-readline + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-readline maybe-check-readline +maybe-check-readline: + +check-readline: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-readline maybe-install-readline +maybe-install-readline: + +install-readline: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-release maybe-configure-release +maybe-configure-release: +configure-release: + @test ! -f release/Makefile || exit 0; \ + [ -d release ] || mkdir release; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in release; \ + cd release || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-release maybe-all-release +maybe-all-release: +all-release: configure-release + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd release && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-release maybe-check-release +maybe-check-release: + +check-release: + + +.PHONY: install-release maybe-install-release +maybe-install-release: + +install-release: + + +.PHONY: configure-recode maybe-configure-recode +maybe-configure-recode: +configure-recode: + @test ! -f recode/Makefile || exit 0; \ + [ -d recode ] || mkdir recode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in recode; \ + cd recode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-recode maybe-all-recode +maybe-all-recode: +all-recode: configure-recode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-recode maybe-check-recode +maybe-check-recode: + +check-recode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-recode maybe-install-recode +maybe-install-recode: + +install-recode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sed maybe-configure-sed +maybe-configure-sed: +configure-sed: + @test ! -f sed/Makefile || exit 0; \ + [ -d sed ] || mkdir sed; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sed; \ + cd sed || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sed maybe-all-sed +maybe-all-sed: +all-sed: configure-sed + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sed maybe-check-sed +maybe-check-sed: + +check-sed: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sed maybe-install-sed +maybe-install-sed: + +install-sed: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-send-pr maybe-configure-send-pr +maybe-configure-send-pr: +configure-send-pr: + @test ! -f send-pr/Makefile || exit 0; \ + [ -d send-pr ] || mkdir send-pr; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in send-pr; \ + cd send-pr || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-send-pr maybe-all-send-pr +maybe-all-send-pr: +all-send-pr: configure-send-pr + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-send-pr maybe-check-send-pr +maybe-check-send-pr: + +check-send-pr: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-send-pr maybe-install-send-pr +maybe-install-send-pr: + +install-send-pr: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-shellutils maybe-configure-shellutils +maybe-configure-shellutils: +configure-shellutils: + @test ! -f shellutils/Makefile || exit 0; \ + [ -d shellutils ] || mkdir shellutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in shellutils; \ + cd shellutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-shellutils maybe-all-shellutils +maybe-all-shellutils: +all-shellutils: configure-shellutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-shellutils maybe-check-shellutils +maybe-check-shellutils: + +check-shellutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-shellutils maybe-install-shellutils +maybe-install-shellutils: + +install-shellutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sid maybe-configure-sid +maybe-configure-sid: +configure-sid: + @test ! -f sid/Makefile || exit 0; \ + [ -d sid ] || mkdir sid; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sid; \ + cd sid || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sid maybe-all-sid +maybe-all-sid: +all-sid: configure-sid + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sid maybe-check-sid +maybe-check-sid: + +check-sid: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sid maybe-install-sid +maybe-install-sid: + +install-sid: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sim maybe-configure-sim +maybe-configure-sim: +configure-sim: + @test ! -f sim/Makefile || exit 0; \ + [ -d sim ] || mkdir sim; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sim; \ + cd sim || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sim maybe-all-sim +maybe-all-sim: +all-sim: configure-sim + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sim maybe-check-sim +maybe-check-sim: + +check-sim: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sim maybe-install-sim +maybe-install-sim: + +install-sim: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tar maybe-configure-tar +maybe-configure-tar: +configure-tar: + @test ! -f tar/Makefile || exit 0; \ + [ -d tar ] || mkdir tar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tar; \ + cd tar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tar maybe-all-tar +maybe-all-tar: +all-tar: configure-tar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tar maybe-check-tar +maybe-check-tar: + +check-tar: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tar maybe-install-tar +maybe-install-tar: + +install-tar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-texinfo maybe-configure-texinfo +maybe-configure-texinfo: +configure-texinfo: + @test ! -f texinfo/Makefile || exit 0; \ + [ -d texinfo ] || mkdir texinfo; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in texinfo; \ + cd texinfo || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-texinfo maybe-all-texinfo +maybe-all-texinfo: +all-texinfo: configure-texinfo + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-texinfo maybe-check-texinfo +maybe-check-texinfo: + +check-texinfo: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-texinfo maybe-install-texinfo +maybe-install-texinfo: + +install-texinfo: + + +.PHONY: configure-textutils maybe-configure-textutils +maybe-configure-textutils: +configure-textutils: + @test ! -f textutils/Makefile || exit 0; \ + [ -d textutils ] || mkdir textutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in textutils; \ + cd textutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-textutils maybe-all-textutils +maybe-all-textutils: +all-textutils: configure-textutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-textutils maybe-check-textutils +maybe-check-textutils: + +check-textutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-textutils maybe-install-textutils +maybe-install-textutils: + +install-textutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-time maybe-configure-time +maybe-configure-time: +configure-time: + @test ! -f time/Makefile || exit 0; \ + [ -d time ] || mkdir time; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in time; \ + cd time || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-time maybe-all-time +maybe-all-time: +all-time: configure-time + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-time maybe-check-time +maybe-check-time: + +check-time: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-time maybe-install-time +maybe-install-time: + +install-time: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-uudecode maybe-configure-uudecode +maybe-configure-uudecode: +configure-uudecode: + @test ! -f uudecode/Makefile || exit 0; \ + [ -d uudecode ] || mkdir uudecode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in uudecode; \ + cd uudecode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-uudecode maybe-all-uudecode +maybe-all-uudecode: +all-uudecode: configure-uudecode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-uudecode maybe-check-uudecode +maybe-check-uudecode: + +check-uudecode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-uudecode maybe-install-uudecode +maybe-install-uudecode: + +install-uudecode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-wdiff maybe-configure-wdiff +maybe-configure-wdiff: +configure-wdiff: + @test ! -f wdiff/Makefile || exit 0; \ + [ -d wdiff ] || mkdir wdiff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in wdiff; \ + cd wdiff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-wdiff maybe-all-wdiff +maybe-all-wdiff: +all-wdiff: configure-wdiff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-wdiff maybe-check-wdiff +maybe-check-wdiff: + +check-wdiff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-wdiff maybe-install-wdiff +maybe-install-wdiff: + +install-wdiff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zip maybe-configure-zip +maybe-configure-zip: +configure-zip: + @test ! -f zip/Makefile || exit 0; \ + [ -d zip ] || mkdir zip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zip; \ + cd zip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zip maybe-all-zip +maybe-all-zip: +all-zip: configure-zip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zip maybe-check-zip +maybe-check-zip: + +# This module is only tested in a native toolchain. +check-zip: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-zip maybe-install-zip +maybe-install-zip: + +install-zip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zlib maybe-configure-zlib +maybe-configure-zlib: +configure-zlib: + @test ! -f zlib/Makefile || exit 0; \ + [ -d zlib ] || mkdir zlib; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zlib; \ + cd zlib || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zlib maybe-all-zlib +maybe-all-zlib: +all-zlib: configure-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zlib maybe-check-zlib +maybe-check-zlib: + +check-zlib: + + +.PHONY: install-zlib maybe-install-zlib +maybe-install-zlib: + +install-zlib: + + +.PHONY: configure-gdb maybe-configure-gdb +maybe-configure-gdb: +configure-gdb: + @test ! -f gdb/Makefile || exit 0; \ + [ -d gdb ] || mkdir gdb; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gdb; \ + cd gdb || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gdb maybe-all-gdb +maybe-all-gdb: +all-gdb: configure-gdb + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-gdb maybe-check-gdb +maybe-check-gdb: + +check-gdb: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-gdb maybe-install-gdb +maybe-install-gdb: + +install-gdb: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-expect maybe-configure-expect +maybe-configure-expect: +configure-expect: + @test ! -f expect/Makefile || exit 0; \ + [ -d expect ] || mkdir expect; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in expect; \ + cd expect || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-expect maybe-all-expect +maybe-all-expect: +all-expect: configure-expect + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-expect maybe-check-expect +maybe-check-expect: + +check-expect: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-expect maybe-install-expect +maybe-install-expect: + +install-expect: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-guile maybe-configure-guile +maybe-configure-guile: +configure-guile: + @test ! -f guile/Makefile || exit 0; \ + [ -d guile ] || mkdir guile; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in guile; \ + cd guile || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-guile maybe-all-guile +maybe-all-guile: +all-guile: configure-guile + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-guile maybe-check-guile +maybe-check-guile: + +check-guile: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-guile maybe-install-guile +maybe-install-guile: + +install-guile: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tk maybe-configure-tk +maybe-configure-tk: +configure-tk: + @test ! -f tk/Makefile || exit 0; \ + [ -d tk ] || mkdir tk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tk; \ + cd tk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tk maybe-all-tk +maybe-all-tk: +all-tk: configure-tk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tk maybe-check-tk +maybe-check-tk: + +check-tk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tk maybe-install-tk +maybe-install-tk: + +install-tk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tix maybe-configure-tix +maybe-configure-tix: +configure-tix: + @test ! -f tix/Makefile || exit 0; \ + [ -d tix ] || mkdir tix; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tix; \ + cd tix || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tix maybe-all-tix +maybe-all-tix: +all-tix: configure-tix + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tix maybe-check-tix +maybe-check-tix: + +check-tix: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tix maybe-install-tix +maybe-install-tix: + +install-tix: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-libtermcap maybe-configure-libtermcap +maybe-configure-libtermcap: +configure-libtermcap: + @test ! -f libtermcap/Makefile || exit 0; \ + [ -d libtermcap ] || mkdir libtermcap; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtermcap; \ + cd libtermcap || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtermcap maybe-all-libtermcap +maybe-all-libtermcap: +all-libtermcap: configure-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtermcap maybe-check-libtermcap +maybe-check-libtermcap: + +check-libtermcap: + + +.PHONY: install-libtermcap maybe-install-libtermcap +maybe-install-libtermcap: + +install-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-utils maybe-configure-utils +maybe-configure-utils: +configure-utils: + @test ! -f utils/Makefile || exit 0; \ + [ -d utils ] || mkdir utils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in utils; \ + cd utils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-utils maybe-all-utils +maybe-all-utils: +all-utils: configure-utils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-utils maybe-check-utils +maybe-check-utils: + +check-utils: + + +.PHONY: install-utils maybe-install-utils +maybe-install-utils: + +install-utils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) install) + + + +# --------------------------------------- +# Modules which run on the target machine +# --------------------------------------- + +.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 +maybe-configure-target-libstdc++-v3: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + +configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \ + cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ + libsrcdir="$$s/libstdc++-v3"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3 +maybe-all-target-libstdc++-v3: +all-target-libstdc++-v3: configure-target-libstdc++-v3 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3 +maybe-check-target-libstdc++-v3: + +check-target-libstdc++-v3: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3 +maybe-install-target-libstdc++-v3: + +install-target-libstdc++-v3: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-newlib maybe-configure-target-newlib +maybe-configure-target-newlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out + +configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/newlib; \ + cd "$(TARGET_SUBDIR)/newlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/newlib"; \ + libsrcdir="$$s/newlib"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-newlib maybe-all-target-newlib +maybe-all-target-newlib: +all-target-newlib: configure-target-newlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-newlib maybe-check-target-newlib +maybe-check-target-newlib: + +check-target-newlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-newlib maybe-install-target-newlib +maybe-install-target-newlib: + +install-target-newlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libf2c maybe-configure-target-libf2c +maybe-configure-target-libf2c: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out + +configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out + @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libf2c; \ + cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libf2c"; \ + libsrcdir="$$s/libf2c"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libf2c maybe-all-target-libf2c +maybe-all-target-libf2c: +all-target-libf2c: configure-target-libf2c + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libf2c maybe-check-target-libf2c +maybe-check-target-libf2c: + +check-target-libf2c: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libf2c maybe-install-target-libf2c +maybe-install-target-libf2c: + +install-target-libf2c: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libobjc maybe-configure-target-libobjc +maybe-configure-target-libobjc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out + +configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out + @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libobjc; \ + cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libobjc"; \ + libsrcdir="$$s/libobjc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libobjc maybe-all-target-libobjc +maybe-all-target-libobjc: +all-target-libobjc: configure-target-libobjc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libobjc maybe-check-target-libobjc +maybe-check-target-libobjc: + +check-target-libobjc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libobjc maybe-install-target-libobjc +maybe-install-target-libobjc: + +install-target-libobjc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap +maybe-configure-target-libtermcap: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out + +configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out + @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libtermcap; \ + cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libtermcap"; \ + libsrcdir="$$s/libtermcap"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libtermcap maybe-all-target-libtermcap +maybe-all-target-libtermcap: +all-target-libtermcap: configure-target-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libtermcap maybe-check-target-libtermcap +maybe-check-target-libtermcap: + +# Dummy target for uncheckable module. +check-target-libtermcap: + + +.PHONY: install-target-libtermcap maybe-install-target-libtermcap +maybe-install-target-libtermcap: + +install-target-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-winsup maybe-configure-target-winsup +maybe-configure-target-winsup: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out + +configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out + @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/winsup; \ + cd "$(TARGET_SUBDIR)/winsup" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/winsup"; \ + libsrcdir="$$s/winsup"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-winsup maybe-all-target-winsup +maybe-all-target-winsup: +all-target-winsup: configure-target-winsup + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-winsup maybe-check-target-winsup +maybe-check-target-winsup: + +check-target-winsup: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-winsup maybe-install-target-winsup +maybe-install-target-winsup: + +install-target-winsup: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libgloss maybe-configure-target-libgloss +maybe-configure-target-libgloss: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out + +configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out + @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libgloss; \ + cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libgloss"; \ + libsrcdir="$$s/libgloss"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libgloss maybe-all-target-libgloss +maybe-all-target-libgloss: +all-target-libgloss: configure-target-libgloss + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libgloss maybe-check-target-libgloss +maybe-check-target-libgloss: + +# Dummy target for uncheckable module. +check-target-libgloss: + + +.PHONY: install-target-libgloss maybe-install-target-libgloss +maybe-install-target-libgloss: + +install-target-libgloss: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libiberty maybe-configure-target-libiberty +maybe-configure-target-libiberty: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out + +configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out + @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libiberty; \ + cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libiberty maybe-all-target-libiberty +maybe-all-target-libiberty: +all-target-libiberty: configure-target-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libiberty maybe-check-target-libiberty +maybe-check-target-libiberty: + +check-target-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libiberty maybe-install-target-libiberty +maybe-install-target-libiberty: + +install-target-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-gperf maybe-configure-target-gperf +maybe-configure-target-gperf: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out + +configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out + @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/gperf; \ + cd "$(TARGET_SUBDIR)/gperf" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/gperf"; \ + libsrcdir="$$s/gperf"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-gperf maybe-all-target-gperf +maybe-all-target-gperf: +all-target-gperf: configure-target-gperf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-gperf maybe-check-target-gperf +maybe-check-target-gperf: + +check-target-gperf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-gperf maybe-install-target-gperf +maybe-install-target-gperf: + +install-target-gperf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-examples maybe-configure-target-examples +maybe-configure-target-examples: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/examples/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out + +configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out + @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/examples; \ + cd "$(TARGET_SUBDIR)/examples" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/examples"; \ + libsrcdir="$$s/examples"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-examples maybe-all-target-examples +maybe-all-target-examples: +all-target-examples: configure-target-examples + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-examples maybe-check-target-examples +maybe-check-target-examples: + +# Dummy target for uncheckable module. +check-target-examples: + + +.PHONY: install-target-examples maybe-install-target-examples +maybe-install-target-examples: + +# Dummy target for uninstallable. +install-target-examples: + + +.PHONY: configure-target-libffi maybe-configure-target-libffi +maybe-configure-target-libffi: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out + +configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out + @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libffi; \ + cd "$(TARGET_SUBDIR)/libffi" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libffi"; \ + libsrcdir="$$s/libffi"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libffi maybe-all-target-libffi +maybe-all-target-libffi: +all-target-libffi: configure-target-libffi + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libffi maybe-check-target-libffi +maybe-check-target-libffi: + +check-target-libffi: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libffi maybe-install-target-libffi +maybe-install-target-libffi: + +install-target-libffi: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libjava maybe-configure-target-libjava +maybe-configure-target-libjava: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out + +configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out + @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libjava; \ + cd "$(TARGET_SUBDIR)/libjava" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libjava"; \ + libsrcdir="$$s/libjava"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libjava maybe-all-target-libjava +maybe-all-target-libjava: +all-target-libjava: configure-target-libjava + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libjava maybe-check-target-libjava +maybe-check-target-libjava: + +check-target-libjava: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libjava maybe-install-target-libjava +maybe-install-target-libjava: + +install-target-libjava: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-zlib maybe-configure-target-zlib +maybe-configure-target-zlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out + +configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/zlib; \ + cd "$(TARGET_SUBDIR)/zlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/zlib"; \ + libsrcdir="$$s/zlib"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-zlib maybe-all-target-zlib +maybe-all-target-zlib: +all-target-zlib: configure-target-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-zlib maybe-check-target-zlib +maybe-check-target-zlib: + +check-target-zlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-zlib maybe-install-target-zlib +maybe-install-target-zlib: + +install-target-zlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc +maybe-configure-target-boehm-gc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out + +configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out + @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \ + cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/boehm-gc"; \ + libsrcdir="$$s/boehm-gc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc +maybe-all-target-boehm-gc: +all-target-boehm-gc: configure-target-boehm-gc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc +maybe-check-target-boehm-gc: + +check-target-boehm-gc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc +maybe-install-target-boehm-gc: + +install-target-boehm-gc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-qthreads maybe-configure-target-qthreads +maybe-configure-target-qthreads: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out + +configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out + @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/qthreads; \ + cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/qthreads"; \ + libsrcdir="$$s/qthreads"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-qthreads maybe-all-target-qthreads +maybe-all-target-qthreads: +all-target-qthreads: configure-target-qthreads + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-qthreads maybe-check-target-qthreads +maybe-check-target-qthreads: + +check-target-qthreads: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-qthreads maybe-install-target-qthreads +maybe-install-target-qthreads: + +install-target-qthreads: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-rda maybe-configure-target-rda +maybe-configure-target-rda: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/rda/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out + +configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out + @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/rda; \ + cd "$(TARGET_SUBDIR)/rda" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/rda"; \ + libsrcdir="$$s/rda"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-rda maybe-all-target-rda +maybe-all-target-rda: +all-target-rda: configure-target-rda + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-rda maybe-check-target-rda +maybe-check-target-rda: + +check-target-rda: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-rda maybe-install-target-rda +maybe-install-target-rda: + +install-target-rda: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libada maybe-configure-target-libada +maybe-configure-target-libada: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libada/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out + +configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out + @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libada; \ + cd "$(TARGET_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libada maybe-all-target-libada +maybe-all-target-libada: +all-target-libada: configure-target-libada + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libada maybe-check-target-libada +maybe-check-target-libada: + +check-target-libada: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libada maybe-install-target-libada +maybe-install-target-libada: + +install-target-libada: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + + +# ---------- +# GCC module +# ---------- + +# Unfortunately, while gcc _should_ be a host module, +# libgcc is a target module, and gen* programs are +# build modules. So GCC is a sort of hybrid. + +# gcc is the only module which uses GCC_FLAGS_TO_PASS. +# Don't use shared host config.cache, as it will confuse later +# directories; GCC wants slightly different values for some +# precious variables. *sigh* +.PHONY: configure-gcc maybe-configure-gcc +maybe-configure-gcc: +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that +# causes trouble. This wart will be fixed eventually by moving +# the bootstrap behavior to this file. +.PHONY: all-gcc maybe-all-gcc +maybe-all-gcc: +all-gcc: configure-gcc + @if [ -f gcc/stage_last ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ + else \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ + fi + +# Building GCC uses some tools for rebuilding "source" files +# like texinfo, bison/byacc, etc. So we must depend on those. +# +# While building GCC, it may be necessary to run various target +# programs like the assembler, linker, etc. So we depend on +# those too. +# +# In theory, on an SMP all those dependencies can be resolved +# in parallel. +# +GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap +.PHONY: $(GCC_STRAP_TARGETS) +$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + case "$@" in \ + *bootstrap4-lean ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3-lean ;; \ + *bootstrap4 ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3 ;; \ + *-lean ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare-lean ;; \ + * ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare ;; \ + esac; \ + $(SET_LIB_PATH) \ + echo "$$msg"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + +profiledbootstrap: all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries and training compiler"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building feedback based compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build + +.PHONY: cross +cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building the C and C++ compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all + +.PHONY: check-gcc maybe-check-gcc +maybe-check-gcc: +check-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ + else \ + true; \ + fi + +.PHONY: check-gcc-c++ +check-gcc-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + else \ + true; \ + fi + +.PHONY: check-c++ +check-c++: check-target-libstdc++-v3 check-gcc-c++ + +.PHONY: install-gcc maybe-install-gcc +maybe-install-gcc: +install-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + else \ + true; \ + fi + +# Install the gcc headers files, but not the fixed include files, +# which Cygnus is not allowed to distribute. This rule is very +# dependent on the workings of the gcc Makefile.in. +.PHONY: gcc-no-fixedincludes +gcc-no-fixedincludes: + @if [ -f ./gcc/Makefile ]; then \ + rm -rf gcc/tmp-include; \ + mv gcc/include gcc/tmp-include 2>/dev/null; \ + mkdir gcc/include; \ + cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ + touch gcc/stmp-fixinc gcc/include/fixed; \ + rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + rm -rf gcc/include; \ + mv gcc/tmp-include gcc/include 2>/dev/null; \ + else true; fi + +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- + +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. +# GCC needs to identify certain tools. +# GCC also needs the information exported by the intl configure script. +configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex +all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty +all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. +# GDB needs to know that the simulator is being built. +configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim +GDB_TK = @GDB_TK@ +all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) +install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui +configure-libgui: maybe-configure-tcl maybe-configure-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl + +# Host modules specific to binutils. +configure-bfd: configure-libiberty +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +install-binutils: maybe-install-opcodes +# libopcodes depends on libbfd +install-opcodes: maybe-install-bfd +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty + +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +configure-expect: maybe-configure-tcl maybe-configure-tk +all-expect: maybe-all-tcl maybe-all-tk +configure-itcl: maybe-configure-tcl maybe-configure-tk +all-itcl: maybe-all-tcl maybe-all-tk +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. +install-itcl: maybe-install-tcl +all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb +configure-tk: maybe-configure-tcl +all-tk: maybe-all-tcl +configure-tix: maybe-configure-tcl maybe-configure-tk +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty + +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty maybe-all-intl +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-tar: maybe-all-libiberty +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libada: $(ALL_GCC_C) +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-rda: $(ALL_GCC_C) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) + +# Dependencies of maybe-foo on foo. These are used because, for example, +# all-gcc only depends on all-gas if gas is present and being configured. +@maybe_dependencies@ + +# Serialization dependencies. Host configures don't work well in parallel to +# each other, due to contention over config.cache. Target configures and +# build configures are similar. +@serialization_dependencies@ + +# -------------------------------- +# Regenerating top level configury +# -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# work around various timestamp bugs on some systems. +# We use move-if-change so that it's only considered updated when it +# actually changes, because it has to depend on a phony target. +multilib.out: maybe-all-gcc + @r=`${PWD_COMMAND}`; export r; \ + echo "Checking multilib configuration..."; \ + $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ + $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ + +# Rebuilding Makefile.in, using autogen. +AUTOGEN = autogen +$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def + cd $(srcdir) && $(AUTOGEN) Makefile.def + +# Rebuilding Makefile. +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: configure $(gcc_version_trigger) + CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck + +# Rebuilding configure. +AUTOCONF = autoconf +$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4 + cd $(srcdir) && $(AUTOCONF) + +# ------------------------------ +# Special directives to GNU Make +# ------------------------------ + +# Don't pass command-line variables to submakes. +.NOEXPORT: +MAKEOVERRIDES= + +# end of Makefile.in diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/include/obstack.h /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/include/obstack.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/include/obstack.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/include/obstack.h 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,612 @@ +/* obstack.h - object stack macros + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserve + + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@gnu.org. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Summary: + +All the apparent functions defined here are macros. The idea +is that you would use these pre-tested macros to solve a +very specific set of problems, and they would run fast. +Caution: no side-effects in arguments please!! They may be +evaluated MANY times!! + +These macros operate a stack of objects. Each object starts life +small, and may grow to maturity. (Consider building a word syllable +by syllable.) An object can move while it is growing. Once it has +been "finished" it never changes address again. So the "top of the +stack" is typically an immature growing object, while the rest of the +stack is of mature, fixed size and fixed address objects. + +These routines grab large chunks of memory, using a function you +supply, called `obstack_chunk_alloc'. On occasion, they free chunks, +by calling `obstack_chunk_free'. You must define them and declare +them before using any obstack macros. + +Each independent stack is represented by a `struct obstack'. +Each of the obstack macros expects a pointer to such a structure +as the first argument. + +One motivation for this package is the problem of growing char strings +in symbol tables. Unless you are "fascist pig with a read-only mind" +--Gosper's immortal quote from HAKMEM item 154, out of context--you +would not like to put any arbitrary upper limit on the length of your +symbols. + +In practice this often means you will build many short symbols and a +few long symbols. At the time you are reading a symbol you don't know +how long it is. One traditional method is to read a symbol into a +buffer, realloc()ating the buffer every time you try to read a symbol +that is longer than the buffer. This is beaut, but you still will +want to copy the symbol from the buffer to a more permanent +symbol-table entry say about half the time. + +With obstacks, you can work differently. Use one obstack for all symbol +names. As you read a symbol, grow the name in the obstack gradually. +When the name is complete, finalize it. Then, if the symbol exists already, +free the newly read name. + +The way we do this is to take a large chunk, allocating memory from +low addresses. When you want to build a symbol in the chunk you just +add chars above the current "high water mark" in the chunk. When you +have finished adding chars, because you got to the end of the symbol, +you know how long the chars are, and you can create a new object. +Mostly the chars will not burst over the highest address of the chunk, +because you would typically expect a chunk to be (say) 100 times as +long as an average object. + +In case that isn't clear, when we have enough chars to make up +the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) +so we just point to it where it lies. No moving of chars is +needed and this is the second win: potentially long strings need +never be explicitly shuffled. Once an object is formed, it does not +change its address during its lifetime. + +When the chars burst over a chunk boundary, we allocate a larger +chunk, and then copy the partly formed object from the end of the old +chunk to the beginning of the new larger chunk. We then carry on +accreting characters to the end of the object as we normally would. + +A special macro is provided to add a single char at a time to a +growing object. This allows the use of register variables, which +break the ordinary 'growth' macro. + +Summary: + We allocate large chunks. + We carve out one object at a time from the current chunk. + Once carved, an object never moves. + We are free to append data of any size to the currently + growing object. + Exactly one object is growing in an obstack at any one time. + You can run one obstack per control block. + You may have as many control blocks as you dare. + Because of the way we do it, you can `unwind' an obstack + back to a previous state. (You may remove objects much + as you would with a stack.) +*/ + + +/* Don't do the contents of this file more than once. */ + +#ifndef _OBSTACK_H +#define _OBSTACK_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use subtraction of (char *) 0 instead of casting to int + because on word-addressable machines a simple cast to int + may ignore the byte-within-word field of the pointer. */ + +#ifndef __PTR_TO_INT +# define __PTR_TO_INT(P) ((P) - (char *) 0) +#endif + +#ifndef __INT_TO_PTR +# define __INT_TO_PTR(P) ((P) + (char *) 0) +#endif + +/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is + defined, as with GNU C, use that; that way we don't pollute the + namespace with 's symbols. Otherwise, if is + available, include it and use ptrdiff_t. In traditional C, long is + the best that we can do. */ + +#ifdef __PTRDIFF_TYPE__ +# define PTR_INT_TYPE __PTRDIFF_TYPE__ +#else +# ifdef HAVE_STDDEF_H +# include +# define PTR_INT_TYPE ptrdiff_t +# else +# define PTR_INT_TYPE long +# endif +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +# if defined __STDC__ && __STDC__ +# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) +# else +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# endif +#else +# ifdef memcpy +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# else +# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) +# endif +#endif + +struct _obstack_chunk /* Lives at front of each chunk. */ +{ + char *limit; /* 1 past end of this chunk */ + struct _obstack_chunk *prev; /* address of prior chunk or NULL */ + char contents[4]; /* objects begin here */ +}; + +struct obstack /* control current object in current chunk */ +{ + long chunk_size; /* preferred size to allocate chunks in */ + struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ + char *object_base; /* address of object we are building */ + char *next_free; /* where to add next char to current object */ + char *chunk_limit; /* address of char after current chunk */ + PTR_INT_TYPE temp; /* Temporary for some macros. */ + int alignment_mask; /* Mask of alignment for each object. */ +#if defined __STDC__ && __STDC__ + /* These prototypes vary based on `use_extra_arg', and we use + casts to the prototypeless function type in all assignments, + but having prototypes here quiets -Wstrict-prototypes. */ + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#else + struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ + void (*freefun) (); /* User's function to free a chunk. */ + char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#endif + unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ + unsigned maybe_empty_object:1;/* There is a possibility that the current + chunk contains a zero-length object. This + prevents freeing the chunk if we allocate + a bigger chunk to replace it. */ + unsigned alloc_failed:1; /* No longer used, as we now call the failed + handler on error, but retained for binary + compatibility. */ +}; + +/* Declare the external functions we use; they are in obstack.c. */ + +#if defined __STDC__ && __STDC__ +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); +#else +extern void _obstack_newchunk (); +extern void _obstack_free (); +extern int _obstack_begin (); +extern int _obstack_begin_1 (); +extern int _obstack_memory_used (); +#endif + +#if defined __STDC__ && __STDC__ + +/* Do the function-declarations after the structs + but before defining the macros. */ + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + +#endif /* __STDC__ */ + +/* Non-ANSI C cannot really support alternative functions for these macros, + so we do not declare them. */ + +/* Error handler called when `obstack_chunk_alloc' failed to allocate + more memory. This can be set to a user defined function. The + default action is to print a message and abort. */ +#if defined __STDC__ && __STDC__ +extern void (*obstack_alloc_failed_handler) (void); +#else +extern void (*obstack_alloc_failed_handler) (); +#endif + +/* Exit value used when `print_and_abort' is used. */ +extern int obstack_exit_failure; + +/* Pointer to beginning of object being allocated or to be allocated next. + Note that this might not be the final address of the object + because a new chunk might be needed to hold the final size. */ + +#define obstack_base(h) ((h)->object_base) + +/* Size for allocating ordinary chunks. */ + +#define obstack_chunk_size(h) ((h)->chunk_size) + +/* Pointer to next byte not yet allocated in current chunk. */ + +#define obstack_next_free(h) ((h)->next_free) + +/* Mask specifying low bits that should be clear in address of an object. */ + +#define obstack_alignment_mask(h) ((h)->alignment_mask) + +/* To prevent prototype warnings provide complete argument list in + standard C version. */ +#if defined __STDC__ && __STDC__ + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) (void *, long)) (chunkfun), \ + (void (*) (void *, void *)) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) + +#else + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)()) (newfreefun)) + +#endif + +#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + +#define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +#define obstack_memory_used(h) _obstack_memory_used (h) + +#if defined __GNUC__ && defined __STDC__ && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) +# define __extension__ +# endif + +/* For GNU C, if not -traditional, + we can define these macros to compute all args only once + without using a global variable. + Also, we can avoid using the `temp' slot, to make faster code. */ + +# define obstack_object_size(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->next_free - __o->object_base); }) + +# define obstack_room(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->chunk_limit - __o->next_free); }) + +# define obstack_make_room(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + (void) 0; }) + +# define obstack_empty_p(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + +# define obstack_grow(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len > __o->chunk_limit) \ + _obstack_newchunk (__o, __len); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + (void) 0; }) + +# define obstack_grow0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, __len + 1); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + *(__o->next_free)++ = 0; \ + (void) 0; }) + +# define obstack_1grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ + obstack_1grow_fast (__o, datum); \ + (void) 0; }) + +/* These assume that the obstack alignment is good enough for pointers or ints, + and that the data added so far to the current object + shares that much alignment. */ + +# define obstack_ptr_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + obstack_ptr_grow_fast (__o, datum); }) + +# define obstack_int_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ + obstack_int_grow_fast (__o, datum); }) + +# define obstack_ptr_grow_fast(OBSTACK,aptr) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(const void **) __o1->next_free = (aptr); \ + __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +# define obstack_int_grow_fast(OBSTACK,aint) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(int *) __o1->next_free = (aint); \ + __o1->next_free += sizeof (int); \ + (void) 0; }) + +# define obstack_blank(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + obstack_blank_fast (__o, __len); \ + (void) 0; }) + +# define obstack_alloc(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_blank (__h, (length)); \ + obstack_finish (__h); }) + +# define obstack_copy(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow (__h, (where), (length)); \ + obstack_finish (__h); }) + +# define obstack_copy0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow0 (__h, (where), (length)); \ + obstack_finish (__h); }) + +/* The local variable is named __o1 to avoid a name conflict + when obstack_blank is called. */ +# define obstack_finish(OBSTACK) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + void *value; \ + value = (void *) __o1->object_base; \ + if (__o1->next_free == value) \ + __o1->maybe_empty_object = 1; \ + __o1->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ + & ~ (__o1->alignment_mask)); \ + if (__o1->next_free - (char *)__o1->chunk \ + > __o1->chunk_limit - (char *)__o1->chunk) \ + __o1->next_free = __o1->chunk_limit; \ + __o1->object_base = __o1->next_free; \ + value; }) + +# define obstack_free(OBSTACK, OBJ) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + void *__obj = (void *) (OBJ); \ + if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ + __o->next_free = __o->object_base = (char *) __obj; \ + else (obstack_free) (__o, __obj); }) + +#else /* not __GNUC__ or not __STDC__ */ + +# define obstack_object_size(h) \ + (unsigned) ((h)->next_free - (h)->object_base) + +# define obstack_room(h) \ + (unsigned) ((h)->chunk_limit - (h)->next_free) + +# define obstack_empty_p(h) \ + ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + +/* Note that the call to _obstack_newchunk is enclosed in (..., 0) + so that we can avoid having void expressions + in the arms of the conditional expression. + Casting the third operand to void was tried before, + but some compilers won't accept it. */ + +# define obstack_make_room(h,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) + +# define obstack_grow(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp) + +# define obstack_grow0(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp, \ + *((h)->next_free)++ = 0) + +# define obstack_1grow(h,datum) \ +( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ + obstack_1grow_fast (h, datum)) + +# define obstack_ptr_grow(h,datum) \ +( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ + obstack_ptr_grow_fast (h, datum)) + +# define obstack_int_grow(h,datum) \ +( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ + obstack_int_grow_fast (h, datum)) + +# define obstack_ptr_grow_fast(h,aptr) \ + (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +# define obstack_int_grow_fast(h,aint) \ + (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + +# define obstack_blank(h,length) \ +( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + obstack_blank_fast (h, (h)->temp)) + +# define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) + +# define obstack_copy(h,where,length) \ + (obstack_grow ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_copy0(h,where,length) \ + (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_finish(h) \ +( ((h)->next_free == (h)->object_base \ + ? (((h)->maybe_empty_object = 1), 0) \ + : 0), \ + (h)->temp = __PTR_TO_INT ((h)->object_base), \ + (h)->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ + & ~ ((h)->alignment_mask)), \ + (((h)->next_free - (char *) (h)->chunk \ + > (h)->chunk_limit - (char *) (h)->chunk) \ + ? ((h)->next_free = (h)->chunk_limit) : 0), \ + (h)->object_base = (h)->next_free, \ + __INT_TO_PTR ((h)->temp)) + +# if defined __STDC__ && __STDC__ +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) +# else +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) +# endif + +#endif /* not __GNUC__ or not __STDC__ */ + +#ifdef __cplusplus +} /* C++ */ +#endif + +#endif /* obstack.h */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/gdb-6.1.back/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/gdb-6.1.back/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,23927 @@ + +# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. +# +# Makefile for directory with subdirs to build. +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation +# Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# ------------------------------- +# Standard Autoconf-set variables +# ------------------------------- +VPATH=@srcdir@ + +build_alias=@build_alias@ +build=@build@ +host_alias=@host_alias@ +host=@host@ +target_alias=@target_alias@ +target=@target@ + +program_transform_name = @program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +srcdir = @srcdir@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +includedir = @includedir@ +oldincludedir = @oldincludedir@ +infodir = @infodir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +# ------------------------------------------------- +# Miscellaneous non-standard autoconf-set variables +# ------------------------------------------------- + +links=@configlinks@ +# The file containing GCC's version number. +gcc_version_trigger = @gcc_version_trigger@ +gcc_version = @gcc_version@ + +# The gcc driver likes to know the arguments it was configured with. +TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ + +gxx_include_dir = @gxx_include_dir@ +libstdcxx_incdir = @libstdcxx_incdir@ + +tooldir = @tooldir@ +build_tooldir = @build_tooldir@ + +# Directory in which the compiler finds executables, libraries, etc. +libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) +GDB_NLM_DEPS = + +# This is the name of the environment variable used for the path to +# the libraries. +RPATH_ENVVAR = @RPATH_ENVVAR@ + +# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared +# was used. +SET_LIB_PATH = @SET_LIB_PATH@ + +# configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. +REALLY_SET_LIB_PATH = \ + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + +# This is the list of directories to be built for the build system. +BUILD_CONFIGDIRS = libiberty +# Build programs are put under this directory. +BUILD_SUBDIR = @build_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the build system. +BUILD_CONFIGARGS = @build_configargs@ + +# This is the list of directories to built for the host system. +SUBDIRS = @configdirs@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the host system. +HOST_CONFIGARGS = @host_configargs@ + +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = @target_configdirs@ +# Target libraries are put under this directory: +TARGET_SUBDIR = @target_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the target. +TARGET_CONFIGARGS = @target_configargs@ + +# ---------------------------------------------- +# Programs producing files for the BUILD machine +# ---------------------------------------------- + +SHELL = @config_shell@ + +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) + +# compilers to use to create programs which must be run in the build +# environment. +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + +ifeq ($(ARCH), ppc64) +CFLAGS_FOR_BUILD += -m64 -fPIC +endif + +CXX_FOR_BUILD = $(CXX) + +# Special variables passed down in EXTRA_GCC_FLAGS. They are defined +# here so that they can be overridden by Makefile fragments. +BUILD_PREFIX = @BUILD_PREFIX@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + +BISON=@BISON@ +USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -L $$s/bison/ ; \ + else \ + echo bison ; \ + fi` + +DEFAULT_YACC = @DEFAULT_YACC@ +YACC=@YACC@ +USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -y -L $$s/bison/ ; \ + elif [ -f $$r/byacc/byacc ] ; then \ + echo $$r/byacc/byacc ; \ + else \ + echo ${DEFAULT_YACC} ; \ + fi` + +DEFAULT_LEX = @DEFAULT_LEX@ +LEX=@LEX@ +USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ + then echo $$r/flex/flex ; \ + else echo ${DEFAULT_LEX} ; fi` + +DEFAULT_M4 = @DEFAULT_M4@ +M4 = `if [ -f $$r/m4/m4 ] ; \ + then echo $$r/m4/m4 ; \ + else echo ${DEFAULT_M4} ; fi` + +# For an installed makeinfo, we require it to be from texinfo 4.2 or +# higher, else we use the "missing" dummy. +MAKEINFO=@MAKEINFO@ +USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ + then echo $$r/texinfo/makeinfo/makeinfo ; \ + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` + +# This just becomes part of the MAKEINFO definition passed down to +# sub-makes. It lets flags be given on the command line while still +# using the makeinfo from the object tree. +# (Default to avoid splitting info files by setting the threshold high.) +MAKEINFOFLAGS = --split-size=5000000 + +EXPECT = `if [ -f $$r/expect/expect ] ; \ + then echo $$r/expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ + then echo $$s/dejagnu/runtest ; \ + else echo runtest ; fi` + +# --------------------------------------------- +# Programs producing files for the HOST machine +# --------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +AS = @AS@ + +AR = @AR@ +AR_FLAGS = rc + +CC = @CC@ +CFLAGS = @CFLAGS@ +ifeq ($(ARCH), ppc64) +CFLAGS += -m64 -fPIC +endif +LIBCFLAGS = $(CFLAGS) + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + +DLLTOOL = @DLLTOOL@ + +NM = @NM@ + +LD = @LD@ +LDFLAGS = + +RANLIB = @RANLIB@ + +WINDRES = @WINDRES@ + +PICFLAG = + +# ----------------------------------------------- +# Programs producing files for the TARGET machine +# ----------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: + +FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ + +AR_FOR_TARGET=@AR_FOR_TARGET@ +USUAL_AR_FOR_TARGET = ` \ + if [ -f $$r/binutils/ar ] ; then \ + echo $$r/binutils/ar ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AR); \ + else \ + echo ar | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +AS_FOR_TARGET=@AS_FOR_TARGET@ +USUAL_AS_FOR_TARGET = ` \ + if [ -f $$r/gas/as-new ] ; then \ + echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AS); \ + else \ + echo as | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +CC_FOR_TARGET = @CC_FOR_TARGET@ +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +# If GCC_FOR_TARGET is not overriden on the command line, then this +# variable is passed down to the gcc Makefile, where it is used to +# build libgcc2.a. We define it here so that it can itself be +# overridden on the command line. +GCC_FOR_TARGET=@GCC_FOR_TARGET@ +USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + +CXX_FOR_TARGET = @CXX_FOR_TARGET@ +RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ +USUAL_DLLTOOL_FOR_TARGET = ` \ + if [ -f $$r/binutils/dlltool ] ; then \ + echo $$r/binutils/dlltool ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(DLLTOOL); \ + else \ + echo dlltool | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ + +LD_FOR_TARGET=@LD_FOR_TARGET@ +USUAL_LD_FOR_TARGET = ` \ + if [ -f $$r/ld/ld-new ] ; then \ + echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(LD); \ + else \ + echo ld | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +LDFLAGS_FOR_TARGET = + +NM_FOR_TARGET=@NM_FOR_TARGET@ +USUAL_NM_FOR_TARGET = ` \ + if [ -f $$r/binutils/nm-new ] ; then \ + echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(NM); \ + else \ + echo nm | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +USUAL_RANLIB_FOR_TARGET = ` \ + if [ -f $$r/binutils/ranlib ] ; then \ + echo $$r/binutils/ranlib ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + if [ x'$(RANLIB)' != x ]; then \ + echo $(RANLIB); \ + else \ + echo ranlib; \ + fi; \ + else \ + echo ranlib | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ +USUAL_WINDRES_FOR_TARGET = ` \ + if [ -f $$r/binutils/windres ] ; then \ + echo $$r/binutils/windres ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(WINDRES); \ + else \ + echo windres | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +PICFLAG_FOR_TARGET = + +# ------------------------------------ +# Miscellaneous targets and flag lists +# ------------------------------------ + +# The first rule in the file had better be this one. Don't put any above it. +# This lives here to allow makefile fragments to contain dependencies. +all: all.normal +.PHONY: all + +#### host and target specific makefile fragments come in here. +@target_makefile_frag@ +@alphaieee_frag@ +@ospace_frag@ +@host_makefile_frag@ +### + +# Flags to pass down to all sub-makes. +BASE_FLAGS_TO_PASS = \ + "DESTDIR=$(DESTDIR)" \ + "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ + "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ + "bindir=$(bindir)" \ + "datadir=$(datadir)" \ + "exec_prefix=$(exec_prefix)" \ + "includedir=$(includedir)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "libexecdir=$(libexecdir)" \ + "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ + "localstatedir=$(localstatedir)" \ + "mandir=$(mandir)" \ + "oldincludedir=$(oldincludedir)" \ + "prefix=$(prefix)" \ + "sbindir=$(sbindir)" \ + "sharedstatedir=$(sharedstatedir)" \ + "sysconfdir=$(sysconfdir)" \ + "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "gcc_version=$(gcc_version)" \ + "gcc_version_trigger=$(gcc_version_trigger)" \ + "target_alias=$(target_alias)" \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "SHELL=$(SHELL)" \ + "YACC=$(YACC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ + "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ + "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "CONFIG_SHELL=$(SHELL)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + +# Flags to pass down to most sub-makes, in which we're building with +# the host environment. +EXTRA_HOST_FLAGS = \ + 'AR=$(AR)' \ + 'AS=$(AS)' \ + 'CC=$(CC)' \ + 'CXX=$(CXX)' \ + 'DLLTOOL=$(DLLTOOL)' \ + 'LD=$(LD)' \ + 'NM=$(NM)' \ + 'RANLIB=$(RANLIB)' \ + 'WINDRES=$(WINDRES)' + +FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) + +# Flags that are concerned with the location of the X11 include files +# and library files +# +# NOTE: until the top-level is getting the values via autoconf, it only +# causes problems to have this top-level Makefile overriding the autoconf-set +# values in child directories. Only variables that don't conflict with +# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. +# +X11_FLAGS_TO_PASS = \ + 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ + 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' + +# Flags to pass down to makes which are built with the target environment. +# The double $ decreases the length of the command line; the variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +EXTRA_TARGET_FLAGS = \ + 'AR=$$(AR_FOR_TARGET)' \ + 'AS=$$(AS_FOR_TARGET)' \ + 'CC=$$(CC_FOR_TARGET)' \ + 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ + 'CXX=$$(CXX_FOR_TARGET)' \ + 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ + 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ + 'LD=$$(LD_FOR_TARGET)' \ + 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ + 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ + 'NM=$$(NM_FOR_TARGET)' \ + 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'WINDRES=$$(WINDRES_FOR_TARGET)' + +TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) + +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. +# If any variables are added here, they must be added to do-*, below. +# The BUILD_* variables are a special case, which are used for the gcc +# cross-building scheme. +EXTRA_GCC_FLAGS = \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + +GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) + +.PHONY: configure-host +configure-host: maybe-configure-gcc \ + maybe-configure-ash \ + maybe-configure-autoconf \ + maybe-configure-automake \ + maybe-configure-bash \ + maybe-configure-bfd \ + maybe-configure-opcodes \ + maybe-configure-binutils \ + maybe-configure-bison \ + maybe-configure-byacc \ + maybe-configure-bzip2 \ + maybe-configure-dejagnu \ + maybe-configure-diff \ + maybe-configure-dosutils \ + maybe-configure-etc \ + maybe-configure-fastjar \ + maybe-configure-fileutils \ + maybe-configure-findutils \ + maybe-configure-find \ + maybe-configure-flex \ + maybe-configure-gas \ + maybe-configure-gawk \ + maybe-configure-gettext \ + maybe-configure-gnuserv \ + maybe-configure-gprof \ + maybe-configure-gzip \ + maybe-configure-hello \ + maybe-configure-indent \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ + maybe-configure-ld \ + maybe-configure-libgui \ + maybe-configure-libiberty \ + maybe-configure-libtool \ + maybe-configure-m4 \ + maybe-configure-make \ + maybe-configure-mmalloc \ + maybe-configure-patch \ + maybe-configure-perl \ + maybe-configure-prms \ + maybe-configure-rcs \ + maybe-configure-readline \ + maybe-configure-release \ + maybe-configure-recode \ + maybe-configure-sed \ + maybe-configure-send-pr \ + maybe-configure-shellutils \ + maybe-configure-sid \ + maybe-configure-sim \ + maybe-configure-tar \ + maybe-configure-texinfo \ + maybe-configure-textutils \ + maybe-configure-time \ + maybe-configure-uudecode \ + maybe-configure-wdiff \ + maybe-configure-zip \ + maybe-configure-zlib \ + maybe-configure-gdb \ + maybe-configure-expect \ + maybe-configure-guile \ + maybe-configure-tk \ + maybe-configure-tix \ + maybe-configure-libtermcap \ + maybe-configure-utils +.PHONY: configure-target +configure-target: \ + maybe-configure-target-libstdc++-v3 \ + maybe-configure-target-newlib \ + maybe-configure-target-libf2c \ + maybe-configure-target-libobjc \ + maybe-configure-target-libtermcap \ + maybe-configure-target-winsup \ + maybe-configure-target-libgloss \ + maybe-configure-target-libiberty \ + maybe-configure-target-gperf \ + maybe-configure-target-examples \ + maybe-configure-target-libffi \ + maybe-configure-target-libjava \ + maybe-configure-target-zlib \ + maybe-configure-target-boehm-gc \ + maybe-configure-target-qthreads \ + maybe-configure-target-rda \ + maybe-configure-target-libada + +# The target built for a native build. +.PHONY: all.normal +all.normal: @all_build_modules@ all-host all-target + +.PHONY: all-host +all-host: maybe-all-gcc \ + maybe-all-ash \ + maybe-all-autoconf \ + maybe-all-automake \ + maybe-all-bash \ + maybe-all-bfd \ + maybe-all-opcodes \ + maybe-all-binutils \ + maybe-all-bison \ + maybe-all-byacc \ + maybe-all-bzip2 \ + maybe-all-dejagnu \ + maybe-all-diff \ + maybe-all-dosutils \ + maybe-all-etc \ + maybe-all-fastjar \ + maybe-all-fileutils \ + maybe-all-findutils \ + maybe-all-find \ + maybe-all-flex \ + maybe-all-gas \ + maybe-all-gawk \ + maybe-all-gettext \ + maybe-all-gnuserv \ + maybe-all-gprof \ + maybe-all-gzip \ + maybe-all-hello \ + maybe-all-indent \ + maybe-all-intl \ + maybe-all-tcl \ + maybe-all-itcl \ + maybe-all-ld \ + maybe-all-libgui \ + maybe-all-libiberty \ + maybe-all-libtool \ + maybe-all-m4 \ + maybe-all-make \ + maybe-all-mmalloc \ + maybe-all-patch \ + maybe-all-perl \ + maybe-all-prms \ + maybe-all-rcs \ + maybe-all-readline \ + maybe-all-release \ + maybe-all-recode \ + maybe-all-sed \ + maybe-all-send-pr \ + maybe-all-shellutils \ + maybe-all-sid \ + maybe-all-sim \ + maybe-all-tar \ + maybe-all-texinfo \ + maybe-all-textutils \ + maybe-all-time \ + maybe-all-uudecode \ + maybe-all-wdiff \ + maybe-all-zip \ + maybe-all-zlib \ + maybe-all-gdb \ + maybe-all-expect \ + maybe-all-guile \ + maybe-all-tk \ + maybe-all-tix \ + maybe-all-libtermcap +# maybe-all-utils +.PHONY: all-target +all-target: \ + maybe-all-target-libstdc++-v3 \ + maybe-all-target-newlib \ + maybe-all-target-libf2c \ + maybe-all-target-libobjc \ + maybe-all-target-libtermcap \ + maybe-all-target-winsup \ + maybe-all-target-libgloss \ + maybe-all-target-libiberty \ + maybe-all-target-gperf \ + maybe-all-target-examples \ + maybe-all-target-libffi \ + maybe-all-target-libjava \ + maybe-all-target-zlib \ + maybe-all-target-boehm-gc \ + maybe-all-target-qthreads \ + maybe-all-target-rda \ + maybe-all-target-libada + +# Do a target for all the subdirectories. A ``make do-X'' will do a +# ``make X'' in all subdirectories (because, in general, there is a +# dependency (below) of X upon do-X, a ``make X'' will also do this, +# but it may do additional work as well). + +.PHONY: do-info +do-info: info-host info-target + +.PHONY: info-host +info-host: maybe-info-gcc \ + maybe-info-ash \ + maybe-info-autoconf \ + maybe-info-automake \ + maybe-info-bash \ + maybe-info-bfd \ + maybe-info-opcodes \ + maybe-info-binutils \ + maybe-info-bison \ + maybe-info-byacc \ + maybe-info-bzip2 \ + maybe-info-dejagnu \ + maybe-info-diff \ + maybe-info-dosutils \ + maybe-info-etc \ + maybe-info-fastjar \ + maybe-info-fileutils \ + maybe-info-findutils \ + maybe-info-find \ + maybe-info-flex \ + maybe-info-gas \ + maybe-info-gawk \ + maybe-info-gettext \ + maybe-info-gnuserv \ + maybe-info-gprof \ + maybe-info-gzip \ + maybe-info-hello \ + maybe-info-indent \ + maybe-info-intl \ + maybe-info-tcl \ + maybe-info-itcl \ + maybe-info-ld \ + maybe-info-libgui \ + maybe-info-libiberty \ + maybe-info-libtool \ + maybe-info-m4 \ + maybe-info-make \ + maybe-info-mmalloc \ + maybe-info-patch \ + maybe-info-perl \ + maybe-info-prms \ + maybe-info-rcs \ + maybe-info-readline \ + maybe-info-release \ + maybe-info-recode \ + maybe-info-sed \ + maybe-info-send-pr \ + maybe-info-shellutils \ + maybe-info-sid \ + maybe-info-sim \ + maybe-info-tar \ + maybe-info-texinfo \ + maybe-info-textutils \ + maybe-info-time \ + maybe-info-uudecode \ + maybe-info-wdiff \ + maybe-info-zip \ + maybe-info-zlib \ + maybe-info-gdb \ + maybe-info-expect \ + maybe-info-guile \ + maybe-info-tk \ + maybe-info-tix \ + maybe-info-libtermcap \ + maybe-info-utils + +.PHONY: info-target +info-target: \ + maybe-info-target-libstdc++-v3 \ + maybe-info-target-newlib \ + maybe-info-target-libf2c \ + maybe-info-target-libobjc \ + maybe-info-target-libtermcap \ + maybe-info-target-winsup \ + maybe-info-target-libgloss \ + maybe-info-target-libiberty \ + maybe-info-target-gperf \ + maybe-info-target-examples \ + maybe-info-target-libffi \ + maybe-info-target-libjava \ + maybe-info-target-zlib \ + maybe-info-target-boehm-gc \ + maybe-info-target-qthreads \ + maybe-info-target-rda \ + maybe-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-info-gcc info-gcc +maybe-info-gcc: +info-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-info-ash info-ash +maybe-info-ash: + +info-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-autoconf info-autoconf +maybe-info-autoconf: + +info-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-automake info-automake +maybe-info-automake: + +info-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bash info-bash +maybe-info-bash: + +info-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bfd info-bfd +maybe-info-bfd: + +info-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-opcodes info-opcodes +maybe-info-opcodes: + +info-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-binutils info-binutils +maybe-info-binutils: + +info-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bison info-bison +maybe-info-bison: + +info-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-byacc info-byacc +maybe-info-byacc: + +info-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bzip2 info-bzip2 +maybe-info-bzip2: + +info-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dejagnu info-dejagnu +maybe-info-dejagnu: + +info-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-diff info-diff +maybe-info-diff: + +info-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dosutils info-dosutils +maybe-info-dosutils: + +info-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-etc info-etc +maybe-info-etc: + +info-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fastjar info-fastjar +maybe-info-fastjar: + +info-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fileutils info-fileutils +maybe-info-fileutils: + +info-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-findutils info-findutils +maybe-info-findutils: + +info-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-find info-find +maybe-info-find: + +info-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-flex info-flex +maybe-info-flex: + +info-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gas info-gas +maybe-info-gas: + +info-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gawk info-gawk +maybe-info-gawk: + +info-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gettext info-gettext +maybe-info-gettext: + +info-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gnuserv info-gnuserv +maybe-info-gnuserv: + +info-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: + +info-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gzip info-gzip +maybe-info-gzip: + +info-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-hello info-hello +maybe-info-hello: + +info-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-indent info-indent +maybe-info-indent: + +info-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-intl info-intl +maybe-info-intl: + +info-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tcl info-tcl +maybe-info-tcl: + +info-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-itcl info-itcl +maybe-info-itcl: + +info-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-ld info-ld +maybe-info-ld: + +info-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libgui info-libgui +maybe-info-libgui: + +info-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libiberty info-libiberty +maybe-info-libiberty: + +info-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtool info-libtool +maybe-info-libtool: + +info-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-m4 info-m4 +maybe-info-m4: + +info-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-make info-make +maybe-info-make: + +info-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-mmalloc info-mmalloc +maybe-info-mmalloc: + +info-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-patch info-patch +maybe-info-patch: + +info-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-perl info-perl +maybe-info-perl: + +info-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-prms info-prms +maybe-info-prms: + +info-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-rcs info-rcs +maybe-info-rcs: + +info-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-readline info-readline +maybe-info-readline: + +info-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-release info-release +maybe-info-release: + +info-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-recode info-recode +maybe-info-recode: + +info-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sed info-sed +maybe-info-sed: + +info-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-send-pr info-send-pr +maybe-info-send-pr: + +info-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-shellutils info-shellutils +maybe-info-shellutils: + +info-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sid info-sid +maybe-info-sid: + +info-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sim info-sim +maybe-info-sim: + +info-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tar info-tar +maybe-info-tar: + +info-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-texinfo info-texinfo +maybe-info-texinfo: + +info-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-textutils info-textutils +maybe-info-textutils: + +info-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-time info-time +maybe-info-time: + +info-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-uudecode info-uudecode +maybe-info-uudecode: + +info-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-wdiff info-wdiff +maybe-info-wdiff: + +info-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zip info-zip +maybe-info-zip: + +info-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zlib info-zlib +maybe-info-zlib: + +info-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gdb info-gdb +maybe-info-gdb: + +info-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-expect info-expect +maybe-info-expect: + +info-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-guile info-guile +maybe-info-guile: + +info-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tk info-tk +maybe-info-tk: + +info-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tix info-tix +maybe-info-tix: + +info-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtermcap info-libtermcap +maybe-info-libtermcap: + +info-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-utils info-utils +maybe-info-utils: + +info-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3 +maybe-info-target-libstdc++-v3: + +info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-newlib info-target-newlib +maybe-info-target-newlib: + +info-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libf2c info-target-libf2c +maybe-info-target-libf2c: + +info-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libobjc info-target-libobjc +maybe-info-target-libobjc: + +info-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libtermcap info-target-libtermcap +maybe-info-target-libtermcap: + +info-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-winsup info-target-winsup +maybe-info-target-winsup: + +info-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libgloss info-target-libgloss +maybe-info-target-libgloss: + +info-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libiberty info-target-libiberty +maybe-info-target-libiberty: + +info-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-gperf info-target-gperf +maybe-info-target-gperf: + +info-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-examples info-target-examples +maybe-info-target-examples: + +info-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libffi info-target-libffi +maybe-info-target-libffi: + +info-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libjava info-target-libjava +maybe-info-target-libjava: + +info-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-zlib info-target-zlib +maybe-info-target-zlib: + +info-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc +maybe-info-target-boehm-gc: + +info-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-qthreads info-target-qthreads +maybe-info-target-qthreads: + +info-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-rda info-target-rda +maybe-info-target-rda: + +info-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libada info-target-libada +maybe-info-target-libada: + +info-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +.PHONY: do-dvi +do-dvi: dvi-host dvi-target + +.PHONY: dvi-host +dvi-host: maybe-dvi-gcc \ + maybe-dvi-ash \ + maybe-dvi-autoconf \ + maybe-dvi-automake \ + maybe-dvi-bash \ + maybe-dvi-bfd \ + maybe-dvi-opcodes \ + maybe-dvi-binutils \ + maybe-dvi-bison \ + maybe-dvi-byacc \ + maybe-dvi-bzip2 \ + maybe-dvi-dejagnu \ + maybe-dvi-diff \ + maybe-dvi-dosutils \ + maybe-dvi-etc \ + maybe-dvi-fastjar \ + maybe-dvi-fileutils \ + maybe-dvi-findutils \ + maybe-dvi-find \ + maybe-dvi-flex \ + maybe-dvi-gas \ + maybe-dvi-gawk \ + maybe-dvi-gettext \ + maybe-dvi-gnuserv \ + maybe-dvi-gprof \ + maybe-dvi-gzip \ + maybe-dvi-hello \ + maybe-dvi-indent \ + maybe-dvi-intl \ + maybe-dvi-tcl \ + maybe-dvi-itcl \ + maybe-dvi-ld \ + maybe-dvi-libgui \ + maybe-dvi-libiberty \ + maybe-dvi-libtool \ + maybe-dvi-m4 \ + maybe-dvi-make \ + maybe-dvi-mmalloc \ + maybe-dvi-patch \ + maybe-dvi-perl \ + maybe-dvi-prms \ + maybe-dvi-rcs \ + maybe-dvi-readline \ + maybe-dvi-release \ + maybe-dvi-recode \ + maybe-dvi-sed \ + maybe-dvi-send-pr \ + maybe-dvi-shellutils \ + maybe-dvi-sid \ + maybe-dvi-sim \ + maybe-dvi-tar \ + maybe-dvi-texinfo \ + maybe-dvi-textutils \ + maybe-dvi-time \ + maybe-dvi-uudecode \ + maybe-dvi-wdiff \ + maybe-dvi-zip \ + maybe-dvi-zlib \ + maybe-dvi-gdb \ + maybe-dvi-expect \ + maybe-dvi-guile \ + maybe-dvi-tk \ + maybe-dvi-tix \ + maybe-dvi-libtermcap \ + maybe-dvi-utils + +.PHONY: dvi-target +dvi-target: \ + maybe-dvi-target-libstdc++-v3 \ + maybe-dvi-target-newlib \ + maybe-dvi-target-libf2c \ + maybe-dvi-target-libobjc \ + maybe-dvi-target-libtermcap \ + maybe-dvi-target-winsup \ + maybe-dvi-target-libgloss \ + maybe-dvi-target-libiberty \ + maybe-dvi-target-gperf \ + maybe-dvi-target-examples \ + maybe-dvi-target-libffi \ + maybe-dvi-target-libjava \ + maybe-dvi-target-zlib \ + maybe-dvi-target-boehm-gc \ + maybe-dvi-target-qthreads \ + maybe-dvi-target-rda \ + maybe-dvi-target-libada + +# GCC, the eternal special case +.PHONY: maybe-dvi-gcc dvi-gcc +maybe-dvi-gcc: +dvi-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-dvi-ash dvi-ash +maybe-dvi-ash: + +dvi-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-autoconf dvi-autoconf +maybe-dvi-autoconf: + +dvi-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-automake dvi-automake +maybe-dvi-automake: + +dvi-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bash dvi-bash +maybe-dvi-bash: + +dvi-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bfd dvi-bfd +maybe-dvi-bfd: + +dvi-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-opcodes dvi-opcodes +maybe-dvi-opcodes: + +dvi-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-binutils dvi-binutils +maybe-dvi-binutils: + +dvi-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bison dvi-bison +maybe-dvi-bison: + +dvi-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-byacc dvi-byacc +maybe-dvi-byacc: + +dvi-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bzip2 dvi-bzip2 +maybe-dvi-bzip2: + +dvi-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dejagnu dvi-dejagnu +maybe-dvi-dejagnu: + +dvi-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-diff dvi-diff +maybe-dvi-diff: + +dvi-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dosutils dvi-dosutils +maybe-dvi-dosutils: + +dvi-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-etc dvi-etc +maybe-dvi-etc: + +dvi-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fastjar dvi-fastjar +maybe-dvi-fastjar: + +dvi-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fileutils dvi-fileutils +maybe-dvi-fileutils: + +dvi-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-findutils dvi-findutils +maybe-dvi-findutils: + +dvi-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-find dvi-find +maybe-dvi-find: + +dvi-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-flex dvi-flex +maybe-dvi-flex: + +dvi-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gas dvi-gas +maybe-dvi-gas: + +dvi-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gawk dvi-gawk +maybe-dvi-gawk: + +dvi-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gettext dvi-gettext +maybe-dvi-gettext: + +dvi-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gnuserv dvi-gnuserv +maybe-dvi-gnuserv: + +dvi-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: + +dvi-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gzip dvi-gzip +maybe-dvi-gzip: + +dvi-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-hello dvi-hello +maybe-dvi-hello: + +dvi-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-indent dvi-indent +maybe-dvi-indent: + +dvi-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-intl dvi-intl +maybe-dvi-intl: + +dvi-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tcl dvi-tcl +maybe-dvi-tcl: + +dvi-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-itcl dvi-itcl +maybe-dvi-itcl: + +dvi-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-ld dvi-ld +maybe-dvi-ld: + +dvi-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libgui dvi-libgui +maybe-dvi-libgui: + +dvi-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libiberty dvi-libiberty +maybe-dvi-libiberty: + +dvi-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtool dvi-libtool +maybe-dvi-libtool: + +dvi-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-m4 dvi-m4 +maybe-dvi-m4: + +dvi-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-make dvi-make +maybe-dvi-make: + +dvi-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-mmalloc dvi-mmalloc +maybe-dvi-mmalloc: + +dvi-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-patch dvi-patch +maybe-dvi-patch: + +dvi-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-perl dvi-perl +maybe-dvi-perl: + +dvi-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-prms dvi-prms +maybe-dvi-prms: + +dvi-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-rcs dvi-rcs +maybe-dvi-rcs: + +dvi-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-readline dvi-readline +maybe-dvi-readline: + +dvi-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-release dvi-release +maybe-dvi-release: + +dvi-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-recode dvi-recode +maybe-dvi-recode: + +dvi-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sed dvi-sed +maybe-dvi-sed: + +dvi-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-send-pr dvi-send-pr +maybe-dvi-send-pr: + +dvi-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-shellutils dvi-shellutils +maybe-dvi-shellutils: + +dvi-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sid dvi-sid +maybe-dvi-sid: + +dvi-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sim dvi-sim +maybe-dvi-sim: + +dvi-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tar dvi-tar +maybe-dvi-tar: + +dvi-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-texinfo dvi-texinfo +maybe-dvi-texinfo: + +dvi-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-textutils dvi-textutils +maybe-dvi-textutils: + +dvi-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-time dvi-time +maybe-dvi-time: + +dvi-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-uudecode dvi-uudecode +maybe-dvi-uudecode: + +dvi-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-wdiff dvi-wdiff +maybe-dvi-wdiff: + +dvi-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zip dvi-zip +maybe-dvi-zip: + +dvi-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zlib dvi-zlib +maybe-dvi-zlib: + +dvi-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gdb dvi-gdb +maybe-dvi-gdb: + +dvi-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-expect dvi-expect +maybe-dvi-expect: + +dvi-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-guile dvi-guile +maybe-dvi-guile: + +dvi-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tk dvi-tk +maybe-dvi-tk: + +dvi-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tix dvi-tix +maybe-dvi-tix: + +dvi-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtermcap dvi-libtermcap +maybe-dvi-libtermcap: + +dvi-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-utils dvi-utils +maybe-dvi-utils: + +dvi-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3 +maybe-dvi-target-libstdc++-v3: + +dvi-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-newlib dvi-target-newlib +maybe-dvi-target-newlib: + +dvi-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c +maybe-dvi-target-libf2c: + +dvi-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc +maybe-dvi-target-libobjc: + +dvi-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap +maybe-dvi-target-libtermcap: + +dvi-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-winsup dvi-target-winsup +maybe-dvi-target-winsup: + +dvi-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss +maybe-dvi-target-libgloss: + +dvi-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty +maybe-dvi-target-libiberty: + +dvi-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-gperf dvi-target-gperf +maybe-dvi-target-gperf: + +dvi-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-examples dvi-target-examples +maybe-dvi-target-examples: + +dvi-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libffi dvi-target-libffi +maybe-dvi-target-libffi: + +dvi-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libjava dvi-target-libjava +maybe-dvi-target-libjava: + +dvi-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-zlib dvi-target-zlib +maybe-dvi-target-zlib: + +dvi-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc +maybe-dvi-target-boehm-gc: + +dvi-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads +maybe-dvi-target-qthreads: + +dvi-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-rda dvi-target-rda +maybe-dvi-target-rda: + +dvi-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libada dvi-target-libada +maybe-dvi-target-libada: + +dvi-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +.PHONY: do-TAGS +do-TAGS: TAGS-host TAGS-target + +.PHONY: TAGS-host +TAGS-host: maybe-TAGS-gcc \ + maybe-TAGS-ash \ + maybe-TAGS-autoconf \ + maybe-TAGS-automake \ + maybe-TAGS-bash \ + maybe-TAGS-bfd \ + maybe-TAGS-opcodes \ + maybe-TAGS-binutils \ + maybe-TAGS-bison \ + maybe-TAGS-byacc \ + maybe-TAGS-bzip2 \ + maybe-TAGS-dejagnu \ + maybe-TAGS-diff \ + maybe-TAGS-dosutils \ + maybe-TAGS-etc \ + maybe-TAGS-fastjar \ + maybe-TAGS-fileutils \ + maybe-TAGS-findutils \ + maybe-TAGS-find \ + maybe-TAGS-flex \ + maybe-TAGS-gas \ + maybe-TAGS-gawk \ + maybe-TAGS-gettext \ + maybe-TAGS-gnuserv \ + maybe-TAGS-gprof \ + maybe-TAGS-gzip \ + maybe-TAGS-hello \ + maybe-TAGS-indent \ + maybe-TAGS-intl \ + maybe-TAGS-tcl \ + maybe-TAGS-itcl \ + maybe-TAGS-ld \ + maybe-TAGS-libgui \ + maybe-TAGS-libiberty \ + maybe-TAGS-libtool \ + maybe-TAGS-m4 \ + maybe-TAGS-make \ + maybe-TAGS-mmalloc \ + maybe-TAGS-patch \ + maybe-TAGS-perl \ + maybe-TAGS-prms \ + maybe-TAGS-rcs \ + maybe-TAGS-readline \ + maybe-TAGS-release \ + maybe-TAGS-recode \ + maybe-TAGS-sed \ + maybe-TAGS-send-pr \ + maybe-TAGS-shellutils \ + maybe-TAGS-sid \ + maybe-TAGS-sim \ + maybe-TAGS-tar \ + maybe-TAGS-texinfo \ + maybe-TAGS-textutils \ + maybe-TAGS-time \ + maybe-TAGS-uudecode \ + maybe-TAGS-wdiff \ + maybe-TAGS-zip \ + maybe-TAGS-zlib \ + maybe-TAGS-gdb \ + maybe-TAGS-expect \ + maybe-TAGS-guile \ + maybe-TAGS-tk \ + maybe-TAGS-tix \ + maybe-TAGS-libtermcap \ + maybe-TAGS-utils + +.PHONY: TAGS-target +TAGS-target: \ + maybe-TAGS-target-libstdc++-v3 \ + maybe-TAGS-target-newlib \ + maybe-TAGS-target-libf2c \ + maybe-TAGS-target-libobjc \ + maybe-TAGS-target-libtermcap \ + maybe-TAGS-target-winsup \ + maybe-TAGS-target-libgloss \ + maybe-TAGS-target-libiberty \ + maybe-TAGS-target-gperf \ + maybe-TAGS-target-examples \ + maybe-TAGS-target-libffi \ + maybe-TAGS-target-libjava \ + maybe-TAGS-target-zlib \ + maybe-TAGS-target-boehm-gc \ + maybe-TAGS-target-qthreads \ + maybe-TAGS-target-rda \ + maybe-TAGS-target-libada + +# GCC, the eternal special case +.PHONY: maybe-TAGS-gcc TAGS-gcc +maybe-TAGS-gcc: +TAGS-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-TAGS-ash TAGS-ash +maybe-TAGS-ash: + +TAGS-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-autoconf TAGS-autoconf +maybe-TAGS-autoconf: + +TAGS-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-automake TAGS-automake +maybe-TAGS-automake: + +TAGS-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bash TAGS-bash +maybe-TAGS-bash: + +TAGS-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bfd TAGS-bfd +maybe-TAGS-bfd: + +TAGS-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-opcodes TAGS-opcodes +maybe-TAGS-opcodes: + +TAGS-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-binutils TAGS-binutils +maybe-TAGS-binutils: + +TAGS-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bison TAGS-bison +maybe-TAGS-bison: + +TAGS-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-byacc TAGS-byacc +maybe-TAGS-byacc: + +TAGS-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bzip2 TAGS-bzip2 +maybe-TAGS-bzip2: + +TAGS-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu +maybe-TAGS-dejagnu: + +TAGS-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-diff TAGS-diff +maybe-TAGS-diff: + +TAGS-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dosutils TAGS-dosutils +maybe-TAGS-dosutils: + +TAGS-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-etc TAGS-etc +maybe-TAGS-etc: + +TAGS-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fastjar TAGS-fastjar +maybe-TAGS-fastjar: + +TAGS-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fileutils TAGS-fileutils +maybe-TAGS-fileutils: + +TAGS-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-findutils TAGS-findutils +maybe-TAGS-findutils: + +TAGS-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-find TAGS-find +maybe-TAGS-find: + +TAGS-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-flex TAGS-flex +maybe-TAGS-flex: + +TAGS-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gas TAGS-gas +maybe-TAGS-gas: + +TAGS-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gawk TAGS-gawk +maybe-TAGS-gawk: + +TAGS-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gettext TAGS-gettext +maybe-TAGS-gettext: + +TAGS-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv +maybe-TAGS-gnuserv: + +TAGS-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: + +TAGS-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gzip TAGS-gzip +maybe-TAGS-gzip: + +TAGS-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-hello TAGS-hello +maybe-TAGS-hello: + +TAGS-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-indent TAGS-indent +maybe-TAGS-indent: + +TAGS-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-intl TAGS-intl +maybe-TAGS-intl: + +TAGS-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tcl TAGS-tcl +maybe-TAGS-tcl: + +TAGS-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-itcl TAGS-itcl +maybe-TAGS-itcl: + +TAGS-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-ld TAGS-ld +maybe-TAGS-ld: + +TAGS-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libgui TAGS-libgui +maybe-TAGS-libgui: + +TAGS-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libiberty TAGS-libiberty +maybe-TAGS-libiberty: + +TAGS-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtool TAGS-libtool +maybe-TAGS-libtool: + +TAGS-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-m4 TAGS-m4 +maybe-TAGS-m4: + +TAGS-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-make TAGS-make +maybe-TAGS-make: + +TAGS-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc +maybe-TAGS-mmalloc: + +TAGS-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-patch TAGS-patch +maybe-TAGS-patch: + +TAGS-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-perl TAGS-perl +maybe-TAGS-perl: + +TAGS-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-prms TAGS-prms +maybe-TAGS-prms: + +TAGS-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-rcs TAGS-rcs +maybe-TAGS-rcs: + +TAGS-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-readline TAGS-readline +maybe-TAGS-readline: + +TAGS-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-release TAGS-release +maybe-TAGS-release: + +TAGS-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-recode TAGS-recode +maybe-TAGS-recode: + +TAGS-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sed TAGS-sed +maybe-TAGS-sed: + +TAGS-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-send-pr TAGS-send-pr +maybe-TAGS-send-pr: + +TAGS-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-shellutils TAGS-shellutils +maybe-TAGS-shellutils: + +TAGS-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sid TAGS-sid +maybe-TAGS-sid: + +TAGS-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sim TAGS-sim +maybe-TAGS-sim: + +TAGS-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tar TAGS-tar +maybe-TAGS-tar: + +TAGS-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-texinfo TAGS-texinfo +maybe-TAGS-texinfo: + +TAGS-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-textutils TAGS-textutils +maybe-TAGS-textutils: + +TAGS-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-time TAGS-time +maybe-TAGS-time: + +TAGS-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-uudecode TAGS-uudecode +maybe-TAGS-uudecode: + +TAGS-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-wdiff TAGS-wdiff +maybe-TAGS-wdiff: + +TAGS-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zip TAGS-zip +maybe-TAGS-zip: + +TAGS-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zlib TAGS-zlib +maybe-TAGS-zlib: + +TAGS-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gdb TAGS-gdb +maybe-TAGS-gdb: + +TAGS-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-expect TAGS-expect +maybe-TAGS-expect: + +TAGS-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-guile TAGS-guile +maybe-TAGS-guile: + +TAGS-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tk TAGS-tk +maybe-TAGS-tk: + +TAGS-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tix TAGS-tix +maybe-TAGS-tix: + +TAGS-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap +maybe-TAGS-libtermcap: + +TAGS-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-utils TAGS-utils +maybe-TAGS-utils: + +TAGS-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3 +maybe-TAGS-target-libstdc++-v3: + +TAGS-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib +maybe-TAGS-target-newlib: + +TAGS-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c +maybe-TAGS-target-libf2c: + +TAGS-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc +maybe-TAGS-target-libobjc: + +TAGS-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap +maybe-TAGS-target-libtermcap: + +TAGS-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup +maybe-TAGS-target-winsup: + +TAGS-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss +maybe-TAGS-target-libgloss: + +TAGS-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty +maybe-TAGS-target-libiberty: + +TAGS-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf +maybe-TAGS-target-gperf: + +TAGS-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-examples TAGS-target-examples +maybe-TAGS-target-examples: + +TAGS-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi +maybe-TAGS-target-libffi: + +TAGS-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava +maybe-TAGS-target-libjava: + +TAGS-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib +maybe-TAGS-target-zlib: + +TAGS-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc +maybe-TAGS-target-boehm-gc: + +TAGS-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads +maybe-TAGS-target-qthreads: + +TAGS-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-rda TAGS-target-rda +maybe-TAGS-target-rda: + +TAGS-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libada TAGS-target-libada +maybe-TAGS-target-libada: + +TAGS-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +.PHONY: do-install-info +do-install-info: install-info-host install-info-target + +.PHONY: install-info-host +install-info-host: maybe-install-info-gcc \ + maybe-install-info-ash \ + maybe-install-info-autoconf \ + maybe-install-info-automake \ + maybe-install-info-bash \ + maybe-install-info-bfd \ + maybe-install-info-opcodes \ + maybe-install-info-binutils \ + maybe-install-info-bison \ + maybe-install-info-byacc \ + maybe-install-info-bzip2 \ + maybe-install-info-dejagnu \ + maybe-install-info-diff \ + maybe-install-info-dosutils \ + maybe-install-info-etc \ + maybe-install-info-fastjar \ + maybe-install-info-fileutils \ + maybe-install-info-findutils \ + maybe-install-info-find \ + maybe-install-info-flex \ + maybe-install-info-gas \ + maybe-install-info-gawk \ + maybe-install-info-gettext \ + maybe-install-info-gnuserv \ + maybe-install-info-gprof \ + maybe-install-info-gzip \ + maybe-install-info-hello \ + maybe-install-info-indent \ + maybe-install-info-intl \ + maybe-install-info-tcl \ + maybe-install-info-itcl \ + maybe-install-info-ld \ + maybe-install-info-libgui \ + maybe-install-info-libiberty \ + maybe-install-info-libtool \ + maybe-install-info-m4 \ + maybe-install-info-make \ + maybe-install-info-mmalloc \ + maybe-install-info-patch \ + maybe-install-info-perl \ + maybe-install-info-prms \ + maybe-install-info-rcs \ + maybe-install-info-readline \ + maybe-install-info-release \ + maybe-install-info-recode \ + maybe-install-info-sed \ + maybe-install-info-send-pr \ + maybe-install-info-shellutils \ + maybe-install-info-sid \ + maybe-install-info-sim \ + maybe-install-info-tar \ + maybe-install-info-texinfo \ + maybe-install-info-textutils \ + maybe-install-info-time \ + maybe-install-info-uudecode \ + maybe-install-info-wdiff \ + maybe-install-info-zip \ + maybe-install-info-zlib \ + maybe-install-info-gdb \ + maybe-install-info-expect \ + maybe-install-info-guile \ + maybe-install-info-tk \ + maybe-install-info-tix \ + maybe-install-info-libtermcap \ + maybe-install-info-utils + +.PHONY: install-info-target +install-info-target: \ + maybe-install-info-target-libstdc++-v3 \ + maybe-install-info-target-newlib \ + maybe-install-info-target-libf2c \ + maybe-install-info-target-libobjc \ + maybe-install-info-target-libtermcap \ + maybe-install-info-target-winsup \ + maybe-install-info-target-libgloss \ + maybe-install-info-target-libiberty \ + maybe-install-info-target-gperf \ + maybe-install-info-target-examples \ + maybe-install-info-target-libffi \ + maybe-install-info-target-libjava \ + maybe-install-info-target-zlib \ + maybe-install-info-target-boehm-gc \ + maybe-install-info-target-qthreads \ + maybe-install-info-target-rda \ + maybe-install-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-install-info-gcc install-info-gcc +maybe-install-info-gcc: +install-info-gcc: \ + configure-gcc \ + info-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-install-info-ash install-info-ash +maybe-install-info-ash: + +install-info-ash: \ + configure-ash \ + info-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-autoconf install-info-autoconf +maybe-install-info-autoconf: + +install-info-autoconf: \ + configure-autoconf \ + info-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-automake install-info-automake +maybe-install-info-automake: + +install-info-automake: \ + configure-automake \ + info-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bash install-info-bash +maybe-install-info-bash: + +install-info-bash: \ + configure-bash \ + info-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bfd install-info-bfd +maybe-install-info-bfd: + +install-info-bfd: \ + configure-bfd \ + info-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-opcodes install-info-opcodes +maybe-install-info-opcodes: + +install-info-opcodes: \ + configure-opcodes \ + info-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-binutils install-info-binutils +maybe-install-info-binutils: + +install-info-binutils: \ + configure-binutils \ + info-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bison install-info-bison +maybe-install-info-bison: + +install-info-bison: \ + configure-bison \ + info-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-byacc install-info-byacc +maybe-install-info-byacc: + +install-info-byacc: \ + configure-byacc \ + info-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bzip2 install-info-bzip2 +maybe-install-info-bzip2: + +install-info-bzip2: \ + configure-bzip2 \ + info-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dejagnu install-info-dejagnu +maybe-install-info-dejagnu: + +install-info-dejagnu: \ + configure-dejagnu \ + info-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-diff install-info-diff +maybe-install-info-diff: + +install-info-diff: \ + configure-diff \ + info-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dosutils install-info-dosutils +maybe-install-info-dosutils: + +install-info-dosutils: \ + configure-dosutils \ + info-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-etc install-info-etc +maybe-install-info-etc: + +install-info-etc: \ + configure-etc \ + info-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fastjar install-info-fastjar +maybe-install-info-fastjar: + +install-info-fastjar: \ + configure-fastjar \ + info-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fileutils install-info-fileutils +maybe-install-info-fileutils: + +install-info-fileutils: \ + configure-fileutils \ + info-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-findutils install-info-findutils +maybe-install-info-findutils: + +install-info-findutils: \ + configure-findutils \ + info-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-find install-info-find +maybe-install-info-find: + +install-info-find: \ + configure-find \ + info-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-flex install-info-flex +maybe-install-info-flex: + +install-info-flex: \ + configure-flex \ + info-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gas install-info-gas +maybe-install-info-gas: + +install-info-gas: \ + configure-gas \ + info-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gawk install-info-gawk +maybe-install-info-gawk: + +install-info-gawk: \ + configure-gawk \ + info-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gettext install-info-gettext +maybe-install-info-gettext: + +install-info-gettext: \ + configure-gettext \ + info-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gnuserv install-info-gnuserv +maybe-install-info-gnuserv: + +install-info-gnuserv: \ + configure-gnuserv \ + info-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: + +install-info-gprof: \ + configure-gprof \ + info-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gzip install-info-gzip +maybe-install-info-gzip: + +install-info-gzip: \ + configure-gzip \ + info-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-hello install-info-hello +maybe-install-info-hello: + +install-info-hello: \ + configure-hello \ + info-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-indent install-info-indent +maybe-install-info-indent: + +install-info-indent: \ + configure-indent \ + info-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-intl install-info-intl +maybe-install-info-intl: + +install-info-intl: \ + configure-intl \ + info-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tcl install-info-tcl +maybe-install-info-tcl: + +install-info-tcl: \ + configure-tcl \ + info-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-itcl install-info-itcl +maybe-install-info-itcl: + +install-info-itcl: \ + configure-itcl \ + info-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-ld install-info-ld +maybe-install-info-ld: + +install-info-ld: \ + configure-ld \ + info-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libgui install-info-libgui +maybe-install-info-libgui: + +install-info-libgui: \ + configure-libgui \ + info-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libiberty install-info-libiberty +maybe-install-info-libiberty: + +install-info-libiberty: \ + configure-libiberty \ + info-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtool install-info-libtool +maybe-install-info-libtool: + +install-info-libtool: \ + configure-libtool \ + info-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-m4 install-info-m4 +maybe-install-info-m4: + +install-info-m4: \ + configure-m4 \ + info-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-make install-info-make +maybe-install-info-make: + +install-info-make: \ + configure-make \ + info-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-mmalloc install-info-mmalloc +maybe-install-info-mmalloc: + +install-info-mmalloc: \ + configure-mmalloc \ + info-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-patch install-info-patch +maybe-install-info-patch: + +install-info-patch: \ + configure-patch \ + info-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-perl install-info-perl +maybe-install-info-perl: + +install-info-perl: \ + configure-perl \ + info-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-prms install-info-prms +maybe-install-info-prms: + +install-info-prms: \ + configure-prms \ + info-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-rcs install-info-rcs +maybe-install-info-rcs: + +install-info-rcs: \ + configure-rcs \ + info-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-readline install-info-readline +maybe-install-info-readline: + +install-info-readline: \ + configure-readline \ + info-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-release install-info-release +maybe-install-info-release: + +install-info-release: \ + configure-release \ + info-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-recode install-info-recode +maybe-install-info-recode: + +install-info-recode: \ + configure-recode \ + info-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sed install-info-sed +maybe-install-info-sed: + +install-info-sed: \ + configure-sed \ + info-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-send-pr install-info-send-pr +maybe-install-info-send-pr: + +install-info-send-pr: \ + configure-send-pr \ + info-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-shellutils install-info-shellutils +maybe-install-info-shellutils: + +install-info-shellutils: \ + configure-shellutils \ + info-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sid install-info-sid +maybe-install-info-sid: + +install-info-sid: \ + configure-sid \ + info-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sim install-info-sim +maybe-install-info-sim: + +install-info-sim: \ + configure-sim \ + info-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tar install-info-tar +maybe-install-info-tar: + +install-info-tar: \ + configure-tar \ + info-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-texinfo install-info-texinfo +maybe-install-info-texinfo: + +install-info-texinfo: \ + configure-texinfo \ + info-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-textutils install-info-textutils +maybe-install-info-textutils: + +install-info-textutils: \ + configure-textutils \ + info-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-time install-info-time +maybe-install-info-time: + +install-info-time: \ + configure-time \ + info-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-uudecode install-info-uudecode +maybe-install-info-uudecode: + +install-info-uudecode: \ + configure-uudecode \ + info-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-wdiff install-info-wdiff +maybe-install-info-wdiff: + +install-info-wdiff: \ + configure-wdiff \ + info-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zip install-info-zip +maybe-install-info-zip: + +install-info-zip: \ + configure-zip \ + info-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zlib install-info-zlib +maybe-install-info-zlib: + +install-info-zlib: \ + configure-zlib \ + info-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gdb install-info-gdb +maybe-install-info-gdb: + +install-info-gdb: \ + configure-gdb \ + info-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-expect install-info-expect +maybe-install-info-expect: + +install-info-expect: \ + configure-expect \ + info-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-guile install-info-guile +maybe-install-info-guile: + +install-info-guile: \ + configure-guile \ + info-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tk install-info-tk +maybe-install-info-tk: + +install-info-tk: \ + configure-tk \ + info-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tix install-info-tix +maybe-install-info-tix: + +install-info-tix: \ + configure-tix \ + info-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtermcap install-info-libtermcap +maybe-install-info-libtermcap: + +install-info-libtermcap: \ + configure-libtermcap \ + info-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-utils install-info-utils +maybe-install-info-utils: + +install-info-utils: \ + configure-utils \ + info-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3 +maybe-install-info-target-libstdc++-v3: + +install-info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 \ + info-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-newlib install-info-target-newlib +maybe-install-info-target-newlib: + +install-info-target-newlib: \ + configure-target-newlib \ + info-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c +maybe-install-info-target-libf2c: + +install-info-target-libf2c: \ + configure-target-libf2c \ + info-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc +maybe-install-info-target-libobjc: + +install-info-target-libobjc: \ + configure-target-libobjc \ + info-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap +maybe-install-info-target-libtermcap: + +install-info-target-libtermcap: \ + configure-target-libtermcap \ + info-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-winsup install-info-target-winsup +maybe-install-info-target-winsup: + +install-info-target-winsup: \ + configure-target-winsup \ + info-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss +maybe-install-info-target-libgloss: + +install-info-target-libgloss: \ + configure-target-libgloss \ + info-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty +maybe-install-info-target-libiberty: + +install-info-target-libiberty: \ + configure-target-libiberty \ + info-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-gperf install-info-target-gperf +maybe-install-info-target-gperf: + +install-info-target-gperf: \ + configure-target-gperf \ + info-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-examples install-info-target-examples +maybe-install-info-target-examples: + +install-info-target-examples: \ + configure-target-examples \ + info-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libffi install-info-target-libffi +maybe-install-info-target-libffi: + +install-info-target-libffi: \ + configure-target-libffi \ + info-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libjava install-info-target-libjava +maybe-install-info-target-libjava: + +install-info-target-libjava: \ + configure-target-libjava \ + info-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-zlib install-info-target-zlib +maybe-install-info-target-zlib: + +install-info-target-zlib: \ + configure-target-zlib \ + info-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc +maybe-install-info-target-boehm-gc: + +install-info-target-boehm-gc: \ + configure-target-boehm-gc \ + info-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads +maybe-install-info-target-qthreads: + +install-info-target-qthreads: \ + configure-target-qthreads \ + info-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-rda install-info-target-rda +maybe-install-info-target-rda: + +install-info-target-rda: \ + configure-target-rda \ + info-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libada install-info-target-libada +maybe-install-info-target-libada: + +install-info-target-libada: \ + configure-target-libada \ + info-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +.PHONY: do-installcheck +do-installcheck: installcheck-host installcheck-target + +.PHONY: installcheck-host +installcheck-host: maybe-installcheck-gcc \ + maybe-installcheck-ash \ + maybe-installcheck-autoconf \ + maybe-installcheck-automake \ + maybe-installcheck-bash \ + maybe-installcheck-bfd \ + maybe-installcheck-opcodes \ + maybe-installcheck-binutils \ + maybe-installcheck-bison \ + maybe-installcheck-byacc \ + maybe-installcheck-bzip2 \ + maybe-installcheck-dejagnu \ + maybe-installcheck-diff \ + maybe-installcheck-dosutils \ + maybe-installcheck-etc \ + maybe-installcheck-fastjar \ + maybe-installcheck-fileutils \ + maybe-installcheck-findutils \ + maybe-installcheck-find \ + maybe-installcheck-flex \ + maybe-installcheck-gas \ + maybe-installcheck-gawk \ + maybe-installcheck-gettext \ + maybe-installcheck-gnuserv \ + maybe-installcheck-gprof \ + maybe-installcheck-gzip \ + maybe-installcheck-hello \ + maybe-installcheck-indent \ + maybe-installcheck-intl \ + maybe-installcheck-tcl \ + maybe-installcheck-itcl \ + maybe-installcheck-ld \ + maybe-installcheck-libgui \ + maybe-installcheck-libiberty \ + maybe-installcheck-libtool \ + maybe-installcheck-m4 \ + maybe-installcheck-make \ + maybe-installcheck-mmalloc \ + maybe-installcheck-patch \ + maybe-installcheck-perl \ + maybe-installcheck-prms \ + maybe-installcheck-rcs \ + maybe-installcheck-readline \ + maybe-installcheck-release \ + maybe-installcheck-recode \ + maybe-installcheck-sed \ + maybe-installcheck-send-pr \ + maybe-installcheck-shellutils \ + maybe-installcheck-sid \ + maybe-installcheck-sim \ + maybe-installcheck-tar \ + maybe-installcheck-texinfo \ + maybe-installcheck-textutils \ + maybe-installcheck-time \ + maybe-installcheck-uudecode \ + maybe-installcheck-wdiff \ + maybe-installcheck-zip \ + maybe-installcheck-zlib \ + maybe-installcheck-gdb \ + maybe-installcheck-expect \ + maybe-installcheck-guile \ + maybe-installcheck-tk \ + maybe-installcheck-tix \ + maybe-installcheck-libtermcap \ + maybe-installcheck-utils + +.PHONY: installcheck-target +installcheck-target: \ + maybe-installcheck-target-libstdc++-v3 \ + maybe-installcheck-target-newlib \ + maybe-installcheck-target-libf2c \ + maybe-installcheck-target-libobjc \ + maybe-installcheck-target-libtermcap \ + maybe-installcheck-target-winsup \ + maybe-installcheck-target-libgloss \ + maybe-installcheck-target-libiberty \ + maybe-installcheck-target-gperf \ + maybe-installcheck-target-examples \ + maybe-installcheck-target-libffi \ + maybe-installcheck-target-libjava \ + maybe-installcheck-target-zlib \ + maybe-installcheck-target-boehm-gc \ + maybe-installcheck-target-qthreads \ + maybe-installcheck-target-rda \ + maybe-installcheck-target-libada + +# GCC, the eternal special case +.PHONY: maybe-installcheck-gcc installcheck-gcc +maybe-installcheck-gcc: +installcheck-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-installcheck-ash installcheck-ash +maybe-installcheck-ash: + +installcheck-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-autoconf installcheck-autoconf +maybe-installcheck-autoconf: + +installcheck-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-automake installcheck-automake +maybe-installcheck-automake: + +installcheck-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bash installcheck-bash +maybe-installcheck-bash: + +installcheck-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bfd installcheck-bfd +maybe-installcheck-bfd: + +installcheck-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-opcodes installcheck-opcodes +maybe-installcheck-opcodes: + +installcheck-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-binutils installcheck-binutils +maybe-installcheck-binutils: + +installcheck-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bison installcheck-bison +maybe-installcheck-bison: + +installcheck-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-byacc installcheck-byacc +maybe-installcheck-byacc: + +installcheck-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bzip2 installcheck-bzip2 +maybe-installcheck-bzip2: + +installcheck-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu +maybe-installcheck-dejagnu: + +installcheck-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-diff installcheck-diff +maybe-installcheck-diff: + +installcheck-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dosutils installcheck-dosutils +maybe-installcheck-dosutils: + +installcheck-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-etc installcheck-etc +maybe-installcheck-etc: + +installcheck-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fastjar installcheck-fastjar +maybe-installcheck-fastjar: + +installcheck-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fileutils installcheck-fileutils +maybe-installcheck-fileutils: + +installcheck-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-findutils installcheck-findutils +maybe-installcheck-findutils: + +installcheck-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-find installcheck-find +maybe-installcheck-find: + +installcheck-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-flex installcheck-flex +maybe-installcheck-flex: + +installcheck-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gas installcheck-gas +maybe-installcheck-gas: + +installcheck-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gawk installcheck-gawk +maybe-installcheck-gawk: + +installcheck-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gettext installcheck-gettext +maybe-installcheck-gettext: + +installcheck-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv +maybe-installcheck-gnuserv: + +installcheck-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: + +installcheck-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gzip installcheck-gzip +maybe-installcheck-gzip: + +installcheck-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-hello installcheck-hello +maybe-installcheck-hello: + +installcheck-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-indent installcheck-indent +maybe-installcheck-indent: + +installcheck-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-intl installcheck-intl +maybe-installcheck-intl: + +installcheck-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tcl installcheck-tcl +maybe-installcheck-tcl: + +installcheck-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-itcl installcheck-itcl +maybe-installcheck-itcl: + +installcheck-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-ld installcheck-ld +maybe-installcheck-ld: + +installcheck-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libgui installcheck-libgui +maybe-installcheck-libgui: + +installcheck-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libiberty installcheck-libiberty +maybe-installcheck-libiberty: + +installcheck-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtool installcheck-libtool +maybe-installcheck-libtool: + +installcheck-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-m4 installcheck-m4 +maybe-installcheck-m4: + +installcheck-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-make installcheck-make +maybe-installcheck-make: + +installcheck-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc +maybe-installcheck-mmalloc: + +installcheck-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-patch installcheck-patch +maybe-installcheck-patch: + +installcheck-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-perl installcheck-perl +maybe-installcheck-perl: + +installcheck-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-prms installcheck-prms +maybe-installcheck-prms: + +installcheck-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-rcs installcheck-rcs +maybe-installcheck-rcs: + +installcheck-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-readline installcheck-readline +maybe-installcheck-readline: + +installcheck-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-release installcheck-release +maybe-installcheck-release: + +installcheck-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-recode installcheck-recode +maybe-installcheck-recode: + +installcheck-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sed installcheck-sed +maybe-installcheck-sed: + +installcheck-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-send-pr installcheck-send-pr +maybe-installcheck-send-pr: + +installcheck-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-shellutils installcheck-shellutils +maybe-installcheck-shellutils: + +installcheck-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sid installcheck-sid +maybe-installcheck-sid: + +installcheck-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sim installcheck-sim +maybe-installcheck-sim: + +installcheck-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tar installcheck-tar +maybe-installcheck-tar: + +installcheck-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-texinfo installcheck-texinfo +maybe-installcheck-texinfo: + +installcheck-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-textutils installcheck-textutils +maybe-installcheck-textutils: + +installcheck-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-time installcheck-time +maybe-installcheck-time: + +installcheck-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-uudecode installcheck-uudecode +maybe-installcheck-uudecode: + +installcheck-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-wdiff installcheck-wdiff +maybe-installcheck-wdiff: + +installcheck-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zip installcheck-zip +maybe-installcheck-zip: + +installcheck-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zlib installcheck-zlib +maybe-installcheck-zlib: + +installcheck-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gdb installcheck-gdb +maybe-installcheck-gdb: + +installcheck-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-expect installcheck-expect +maybe-installcheck-expect: + +installcheck-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-guile installcheck-guile +maybe-installcheck-guile: + +installcheck-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tk installcheck-tk +maybe-installcheck-tk: + +installcheck-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tix installcheck-tix +maybe-installcheck-tix: + +installcheck-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap +maybe-installcheck-libtermcap: + +installcheck-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-utils installcheck-utils +maybe-installcheck-utils: + +installcheck-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3 +maybe-installcheck-target-libstdc++-v3: + +installcheck-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib +maybe-installcheck-target-newlib: + +installcheck-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c +maybe-installcheck-target-libf2c: + +installcheck-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc +maybe-installcheck-target-libobjc: + +installcheck-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap +maybe-installcheck-target-libtermcap: + +installcheck-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup +maybe-installcheck-target-winsup: + +installcheck-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss +maybe-installcheck-target-libgloss: + +installcheck-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty +maybe-installcheck-target-libiberty: + +installcheck-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf +maybe-installcheck-target-gperf: + +installcheck-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-examples installcheck-target-examples +maybe-installcheck-target-examples: + +installcheck-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi +maybe-installcheck-target-libffi: + +installcheck-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava +maybe-installcheck-target-libjava: + +installcheck-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib +maybe-installcheck-target-zlib: + +installcheck-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc +maybe-installcheck-target-boehm-gc: + +installcheck-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads +maybe-installcheck-target-qthreads: + +installcheck-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-rda installcheck-target-rda +maybe-installcheck-target-rda: + +installcheck-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libada installcheck-target-libada +maybe-installcheck-target-libada: + +installcheck-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +.PHONY: do-mostlyclean +do-mostlyclean: mostlyclean-host mostlyclean-target + +.PHONY: mostlyclean-host +mostlyclean-host: maybe-mostlyclean-gcc \ + maybe-mostlyclean-ash \ + maybe-mostlyclean-autoconf \ + maybe-mostlyclean-automake \ + maybe-mostlyclean-bash \ + maybe-mostlyclean-bfd \ + maybe-mostlyclean-opcodes \ + maybe-mostlyclean-binutils \ + maybe-mostlyclean-bison \ + maybe-mostlyclean-byacc \ + maybe-mostlyclean-bzip2 \ + maybe-mostlyclean-dejagnu \ + maybe-mostlyclean-diff \ + maybe-mostlyclean-dosutils \ + maybe-mostlyclean-etc \ + maybe-mostlyclean-fastjar \ + maybe-mostlyclean-fileutils \ + maybe-mostlyclean-findutils \ + maybe-mostlyclean-find \ + maybe-mostlyclean-flex \ + maybe-mostlyclean-gas \ + maybe-mostlyclean-gawk \ + maybe-mostlyclean-gettext \ + maybe-mostlyclean-gnuserv \ + maybe-mostlyclean-gprof \ + maybe-mostlyclean-gzip \ + maybe-mostlyclean-hello \ + maybe-mostlyclean-indent \ + maybe-mostlyclean-intl \ + maybe-mostlyclean-tcl \ + maybe-mostlyclean-itcl \ + maybe-mostlyclean-ld \ + maybe-mostlyclean-libgui \ + maybe-mostlyclean-libiberty \ + maybe-mostlyclean-libtool \ + maybe-mostlyclean-m4 \ + maybe-mostlyclean-make \ + maybe-mostlyclean-mmalloc \ + maybe-mostlyclean-patch \ + maybe-mostlyclean-perl \ + maybe-mostlyclean-prms \ + maybe-mostlyclean-rcs \ + maybe-mostlyclean-readline \ + maybe-mostlyclean-release \ + maybe-mostlyclean-recode \ + maybe-mostlyclean-sed \ + maybe-mostlyclean-send-pr \ + maybe-mostlyclean-shellutils \ + maybe-mostlyclean-sid \ + maybe-mostlyclean-sim \ + maybe-mostlyclean-tar \ + maybe-mostlyclean-texinfo \ + maybe-mostlyclean-textutils \ + maybe-mostlyclean-time \ + maybe-mostlyclean-uudecode \ + maybe-mostlyclean-wdiff \ + maybe-mostlyclean-zip \ + maybe-mostlyclean-zlib \ + maybe-mostlyclean-gdb \ + maybe-mostlyclean-expect \ + maybe-mostlyclean-guile \ + maybe-mostlyclean-tk \ + maybe-mostlyclean-tix \ + maybe-mostlyclean-libtermcap \ + maybe-mostlyclean-utils + +.PHONY: mostlyclean-target +mostlyclean-target: \ + maybe-mostlyclean-target-libstdc++-v3 \ + maybe-mostlyclean-target-newlib \ + maybe-mostlyclean-target-libf2c \ + maybe-mostlyclean-target-libobjc \ + maybe-mostlyclean-target-libtermcap \ + maybe-mostlyclean-target-winsup \ + maybe-mostlyclean-target-libgloss \ + maybe-mostlyclean-target-libiberty \ + maybe-mostlyclean-target-gperf \ + maybe-mostlyclean-target-examples \ + maybe-mostlyclean-target-libffi \ + maybe-mostlyclean-target-libjava \ + maybe-mostlyclean-target-zlib \ + maybe-mostlyclean-target-boehm-gc \ + maybe-mostlyclean-target-qthreads \ + maybe-mostlyclean-target-rda \ + maybe-mostlyclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc +maybe-mostlyclean-gcc: +mostlyclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-mostlyclean-ash mostlyclean-ash +maybe-mostlyclean-ash: + +mostlyclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf +maybe-mostlyclean-autoconf: + +mostlyclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-automake mostlyclean-automake +maybe-mostlyclean-automake: + +mostlyclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bash mostlyclean-bash +maybe-mostlyclean-bash: + +mostlyclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd +maybe-mostlyclean-bfd: + +mostlyclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes +maybe-mostlyclean-opcodes: + +mostlyclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils +maybe-mostlyclean-binutils: + +mostlyclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bison mostlyclean-bison +maybe-mostlyclean-bison: + +mostlyclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc +maybe-mostlyclean-byacc: + +mostlyclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2 +maybe-mostlyclean-bzip2: + +mostlyclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu +maybe-mostlyclean-dejagnu: + +mostlyclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-diff mostlyclean-diff +maybe-mostlyclean-diff: + +mostlyclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils +maybe-mostlyclean-dosutils: + +mostlyclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-etc mostlyclean-etc +maybe-mostlyclean-etc: + +mostlyclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar +maybe-mostlyclean-fastjar: + +mostlyclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils +maybe-mostlyclean-fileutils: + +mostlyclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils +maybe-mostlyclean-findutils: + +mostlyclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-find mostlyclean-find +maybe-mostlyclean-find: + +mostlyclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-flex mostlyclean-flex +maybe-mostlyclean-flex: + +mostlyclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gas mostlyclean-gas +maybe-mostlyclean-gas: + +mostlyclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk +maybe-mostlyclean-gawk: + +mostlyclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext +maybe-mostlyclean-gettext: + +mostlyclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv +maybe-mostlyclean-gnuserv: + +mostlyclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: + +mostlyclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip +maybe-mostlyclean-gzip: + +mostlyclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-hello mostlyclean-hello +maybe-mostlyclean-hello: + +mostlyclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-indent mostlyclean-indent +maybe-mostlyclean-indent: + +mostlyclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-intl mostlyclean-intl +maybe-mostlyclean-intl: + +mostlyclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl +maybe-mostlyclean-tcl: + +# tcl doesn't support mostlyclean. +mostlyclean-tcl: + + +.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl +maybe-mostlyclean-itcl: + +mostlyclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-ld mostlyclean-ld +maybe-mostlyclean-ld: + +mostlyclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui +maybe-mostlyclean-libgui: + +mostlyclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty +maybe-mostlyclean-libiberty: + +mostlyclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool +maybe-mostlyclean-libtool: + +mostlyclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-m4 mostlyclean-m4 +maybe-mostlyclean-m4: + +mostlyclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-make mostlyclean-make +maybe-mostlyclean-make: + +mostlyclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc +maybe-mostlyclean-mmalloc: + +mostlyclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-patch mostlyclean-patch +maybe-mostlyclean-patch: + +mostlyclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-perl mostlyclean-perl +maybe-mostlyclean-perl: + +mostlyclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-prms mostlyclean-prms +maybe-mostlyclean-prms: + +mostlyclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs +maybe-mostlyclean-rcs: + +mostlyclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-readline mostlyclean-readline +maybe-mostlyclean-readline: + +mostlyclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-release mostlyclean-release +maybe-mostlyclean-release: + +mostlyclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-recode mostlyclean-recode +maybe-mostlyclean-recode: + +mostlyclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sed mostlyclean-sed +maybe-mostlyclean-sed: + +mostlyclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr +maybe-mostlyclean-send-pr: + +mostlyclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils +maybe-mostlyclean-shellutils: + +mostlyclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sid mostlyclean-sid +maybe-mostlyclean-sid: + +mostlyclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sim mostlyclean-sim +maybe-mostlyclean-sim: + +mostlyclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tar mostlyclean-tar +maybe-mostlyclean-tar: + +mostlyclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo +maybe-mostlyclean-texinfo: + +mostlyclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils +maybe-mostlyclean-textutils: + +mostlyclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-time mostlyclean-time +maybe-mostlyclean-time: + +mostlyclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode +maybe-mostlyclean-uudecode: + +mostlyclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff +maybe-mostlyclean-wdiff: + +mostlyclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zip mostlyclean-zip +maybe-mostlyclean-zip: + +mostlyclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib +maybe-mostlyclean-zlib: + +mostlyclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb +maybe-mostlyclean-gdb: + +mostlyclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-expect mostlyclean-expect +maybe-mostlyclean-expect: + +mostlyclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-guile mostlyclean-guile +maybe-mostlyclean-guile: + +mostlyclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tk mostlyclean-tk +maybe-mostlyclean-tk: + +mostlyclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tix mostlyclean-tix +maybe-mostlyclean-tix: + +mostlyclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap +maybe-mostlyclean-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-libtermcap: + + +.PHONY: maybe-mostlyclean-utils mostlyclean-utils +maybe-mostlyclean-utils: + +mostlyclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3 +maybe-mostlyclean-target-libstdc++-v3: + +mostlyclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib +maybe-mostlyclean-target-newlib: + +mostlyclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c +maybe-mostlyclean-target-libf2c: + +mostlyclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc +maybe-mostlyclean-target-libobjc: + +mostlyclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap +maybe-mostlyclean-target-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-target-libtermcap: + + +.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup +maybe-mostlyclean-target-winsup: + +mostlyclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss +maybe-mostlyclean-target-libgloss: + +mostlyclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty +maybe-mostlyclean-target-libiberty: + +mostlyclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf +maybe-mostlyclean-target-gperf: + +mostlyclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples +maybe-mostlyclean-target-examples: + +mostlyclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi +maybe-mostlyclean-target-libffi: + +mostlyclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava +maybe-mostlyclean-target-libjava: + +mostlyclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib +maybe-mostlyclean-target-zlib: + +mostlyclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc +maybe-mostlyclean-target-boehm-gc: + +mostlyclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads +maybe-mostlyclean-target-qthreads: + +mostlyclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda +maybe-mostlyclean-target-rda: + +mostlyclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada +maybe-mostlyclean-target-libada: + +mostlyclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +.PHONY: do-clean +do-clean: clean-host clean-target + +.PHONY: clean-host +clean-host: maybe-clean-gcc \ + maybe-clean-ash \ + maybe-clean-autoconf \ + maybe-clean-automake \ + maybe-clean-bash \ + maybe-clean-bfd \ + maybe-clean-opcodes \ + maybe-clean-binutils \ + maybe-clean-bison \ + maybe-clean-byacc \ + maybe-clean-bzip2 \ + maybe-clean-dejagnu \ + maybe-clean-diff \ + maybe-clean-dosutils \ + maybe-clean-etc \ + maybe-clean-fastjar \ + maybe-clean-fileutils \ + maybe-clean-findutils \ + maybe-clean-find \ + maybe-clean-flex \ + maybe-clean-gas \ + maybe-clean-gawk \ + maybe-clean-gettext \ + maybe-clean-gnuserv \ + maybe-clean-gprof \ + maybe-clean-gzip \ + maybe-clean-hello \ + maybe-clean-indent \ + maybe-clean-intl \ + maybe-clean-tcl \ + maybe-clean-itcl \ + maybe-clean-ld \ + maybe-clean-libgui \ + maybe-clean-libiberty \ + maybe-clean-libtool \ + maybe-clean-m4 \ + maybe-clean-make \ + maybe-clean-mmalloc \ + maybe-clean-patch \ + maybe-clean-perl \ + maybe-clean-prms \ + maybe-clean-rcs \ + maybe-clean-readline \ + maybe-clean-release \ + maybe-clean-recode \ + maybe-clean-sed \ + maybe-clean-send-pr \ + maybe-clean-shellutils \ + maybe-clean-sid \ + maybe-clean-sim \ + maybe-clean-tar \ + maybe-clean-texinfo \ + maybe-clean-textutils \ + maybe-clean-time \ + maybe-clean-uudecode \ + maybe-clean-wdiff \ + maybe-clean-zip \ + maybe-clean-zlib \ + maybe-clean-gdb \ + maybe-clean-expect \ + maybe-clean-guile \ + maybe-clean-tk \ + maybe-clean-tix \ + maybe-clean-libtermcap \ + maybe-clean-utils + +.PHONY: clean-target +clean-target: \ + maybe-clean-target-libstdc++-v3 \ + maybe-clean-target-newlib \ + maybe-clean-target-libf2c \ + maybe-clean-target-libobjc \ + maybe-clean-target-libtermcap \ + maybe-clean-target-winsup \ + maybe-clean-target-libgloss \ + maybe-clean-target-libiberty \ + maybe-clean-target-gperf \ + maybe-clean-target-examples \ + maybe-clean-target-libffi \ + maybe-clean-target-libjava \ + maybe-clean-target-zlib \ + maybe-clean-target-boehm-gc \ + maybe-clean-target-qthreads \ + maybe-clean-target-rda \ + maybe-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-clean-gcc clean-gcc +maybe-clean-gcc: +clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-clean-ash clean-ash +maybe-clean-ash: + +clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-autoconf clean-autoconf +maybe-clean-autoconf: + +clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-automake clean-automake +maybe-clean-automake: + +clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bash clean-bash +maybe-clean-bash: + +clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bfd clean-bfd +maybe-clean-bfd: + +clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-opcodes clean-opcodes +maybe-clean-opcodes: + +clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-binutils clean-binutils +maybe-clean-binutils: + +clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bison clean-bison +maybe-clean-bison: + +clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-byacc clean-byacc +maybe-clean-byacc: + +clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bzip2 clean-bzip2 +maybe-clean-bzip2: + +clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dejagnu clean-dejagnu +maybe-clean-dejagnu: + +clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-diff clean-diff +maybe-clean-diff: + +clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dosutils clean-dosutils +maybe-clean-dosutils: + +clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-etc clean-etc +maybe-clean-etc: + +clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fastjar clean-fastjar +maybe-clean-fastjar: + +clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fileutils clean-fileutils +maybe-clean-fileutils: + +clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-findutils clean-findutils +maybe-clean-findutils: + +clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-find clean-find +maybe-clean-find: + +clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-flex clean-flex +maybe-clean-flex: + +clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gas clean-gas +maybe-clean-gas: + +clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gawk clean-gawk +maybe-clean-gawk: + +clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gettext clean-gettext +maybe-clean-gettext: + +clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gnuserv clean-gnuserv +maybe-clean-gnuserv: + +clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: + +clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gzip clean-gzip +maybe-clean-gzip: + +clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-hello clean-hello +maybe-clean-hello: + +clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-indent clean-indent +maybe-clean-indent: + +clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-intl clean-intl +maybe-clean-intl: + +clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tcl clean-tcl +maybe-clean-tcl: + +clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-itcl clean-itcl +maybe-clean-itcl: + +clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-ld clean-ld +maybe-clean-ld: + +clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libgui clean-libgui +maybe-clean-libgui: + +clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libiberty clean-libiberty +maybe-clean-libiberty: + +clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtool clean-libtool +maybe-clean-libtool: + +clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-m4 clean-m4 +maybe-clean-m4: + +clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-make clean-make +maybe-clean-make: + +clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-mmalloc clean-mmalloc +maybe-clean-mmalloc: + +clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-patch clean-patch +maybe-clean-patch: + +clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-perl clean-perl +maybe-clean-perl: + +clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-prms clean-prms +maybe-clean-prms: + +clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-rcs clean-rcs +maybe-clean-rcs: + +clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-readline clean-readline +maybe-clean-readline: + +clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-release clean-release +maybe-clean-release: + +clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-recode clean-recode +maybe-clean-recode: + +clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sed clean-sed +maybe-clean-sed: + +clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-send-pr clean-send-pr +maybe-clean-send-pr: + +clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-shellutils clean-shellutils +maybe-clean-shellutils: + +clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sid clean-sid +maybe-clean-sid: + +clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sim clean-sim +maybe-clean-sim: + +clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tar clean-tar +maybe-clean-tar: + +clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-texinfo clean-texinfo +maybe-clean-texinfo: + +clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-textutils clean-textutils +maybe-clean-textutils: + +clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-time clean-time +maybe-clean-time: + +clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-uudecode clean-uudecode +maybe-clean-uudecode: + +clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-wdiff clean-wdiff +maybe-clean-wdiff: + +clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zip clean-zip +maybe-clean-zip: + +clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zlib clean-zlib +maybe-clean-zlib: + +clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gdb clean-gdb +maybe-clean-gdb: + +clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-expect clean-expect +maybe-clean-expect: + +clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-guile clean-guile +maybe-clean-guile: + +clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tk clean-tk +maybe-clean-tk: + +clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tix clean-tix +maybe-clean-tix: + +clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtermcap clean-libtermcap +maybe-clean-libtermcap: + +# libtermcap doesn't support clean. +clean-libtermcap: + + +.PHONY: maybe-clean-utils clean-utils +maybe-clean-utils: + +clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3 +maybe-clean-target-libstdc++-v3: + +clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-newlib clean-target-newlib +maybe-clean-target-newlib: + +clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libf2c clean-target-libf2c +maybe-clean-target-libf2c: + +clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libobjc clean-target-libobjc +maybe-clean-target-libobjc: + +clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap +maybe-clean-target-libtermcap: + +# libtermcap doesn't support clean. +clean-target-libtermcap: + + +.PHONY: maybe-clean-target-winsup clean-target-winsup +maybe-clean-target-winsup: + +clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libgloss clean-target-libgloss +maybe-clean-target-libgloss: + +clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libiberty clean-target-libiberty +maybe-clean-target-libiberty: + +clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-gperf clean-target-gperf +maybe-clean-target-gperf: + +clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-examples clean-target-examples +maybe-clean-target-examples: + +clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libffi clean-target-libffi +maybe-clean-target-libffi: + +clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libjava clean-target-libjava +maybe-clean-target-libjava: + +clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-zlib clean-target-zlib +maybe-clean-target-zlib: + +clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc +maybe-clean-target-boehm-gc: + +clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-qthreads clean-target-qthreads +maybe-clean-target-qthreads: + +clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-rda clean-target-rda +maybe-clean-target-rda: + +clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libada clean-target-libada +maybe-clean-target-libada: + +clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +.PHONY: do-distclean +do-distclean: distclean-host distclean-target + +.PHONY: distclean-host +distclean-host: maybe-distclean-gcc \ + maybe-distclean-ash \ + maybe-distclean-autoconf \ + maybe-distclean-automake \ + maybe-distclean-bash \ + maybe-distclean-bfd \ + maybe-distclean-opcodes \ + maybe-distclean-binutils \ + maybe-distclean-bison \ + maybe-distclean-byacc \ + maybe-distclean-bzip2 \ + maybe-distclean-dejagnu \ + maybe-distclean-diff \ + maybe-distclean-dosutils \ + maybe-distclean-etc \ + maybe-distclean-fastjar \ + maybe-distclean-fileutils \ + maybe-distclean-findutils \ + maybe-distclean-find \ + maybe-distclean-flex \ + maybe-distclean-gas \ + maybe-distclean-gawk \ + maybe-distclean-gettext \ + maybe-distclean-gnuserv \ + maybe-distclean-gprof \ + maybe-distclean-gzip \ + maybe-distclean-hello \ + maybe-distclean-indent \ + maybe-distclean-intl \ + maybe-distclean-tcl \ + maybe-distclean-itcl \ + maybe-distclean-ld \ + maybe-distclean-libgui \ + maybe-distclean-libiberty \ + maybe-distclean-libtool \ + maybe-distclean-m4 \ + maybe-distclean-make \ + maybe-distclean-mmalloc \ + maybe-distclean-patch \ + maybe-distclean-perl \ + maybe-distclean-prms \ + maybe-distclean-rcs \ + maybe-distclean-readline \ + maybe-distclean-release \ + maybe-distclean-recode \ + maybe-distclean-sed \ + maybe-distclean-send-pr \ + maybe-distclean-shellutils \ + maybe-distclean-sid \ + maybe-distclean-sim \ + maybe-distclean-tar \ + maybe-distclean-texinfo \ + maybe-distclean-textutils \ + maybe-distclean-time \ + maybe-distclean-uudecode \ + maybe-distclean-wdiff \ + maybe-distclean-zip \ + maybe-distclean-zlib \ + maybe-distclean-gdb \ + maybe-distclean-expect \ + maybe-distclean-guile \ + maybe-distclean-tk \ + maybe-distclean-tix \ + maybe-distclean-libtermcap \ + maybe-distclean-utils + +.PHONY: distclean-target +distclean-target: \ + maybe-distclean-target-libstdc++-v3 \ + maybe-distclean-target-newlib \ + maybe-distclean-target-libf2c \ + maybe-distclean-target-libobjc \ + maybe-distclean-target-libtermcap \ + maybe-distclean-target-winsup \ + maybe-distclean-target-libgloss \ + maybe-distclean-target-libiberty \ + maybe-distclean-target-gperf \ + maybe-distclean-target-examples \ + maybe-distclean-target-libffi \ + maybe-distclean-target-libjava \ + maybe-distclean-target-zlib \ + maybe-distclean-target-boehm-gc \ + maybe-distclean-target-qthreads \ + maybe-distclean-target-rda \ + maybe-distclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-distclean-gcc distclean-gcc +maybe-distclean-gcc: +distclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-distclean-ash distclean-ash +maybe-distclean-ash: + +distclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-autoconf distclean-autoconf +maybe-distclean-autoconf: + +distclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-automake distclean-automake +maybe-distclean-automake: + +distclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bash distclean-bash +maybe-distclean-bash: + +distclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bfd distclean-bfd +maybe-distclean-bfd: + +distclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-opcodes distclean-opcodes +maybe-distclean-opcodes: + +distclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-binutils distclean-binutils +maybe-distclean-binutils: + +distclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bison distclean-bison +maybe-distclean-bison: + +distclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-byacc distclean-byacc +maybe-distclean-byacc: + +distclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bzip2 distclean-bzip2 +maybe-distclean-bzip2: + +distclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dejagnu distclean-dejagnu +maybe-distclean-dejagnu: + +distclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-diff distclean-diff +maybe-distclean-diff: + +distclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dosutils distclean-dosutils +maybe-distclean-dosutils: + +distclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-etc distclean-etc +maybe-distclean-etc: + +distclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fastjar distclean-fastjar +maybe-distclean-fastjar: + +distclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fileutils distclean-fileutils +maybe-distclean-fileutils: + +distclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-findutils distclean-findutils +maybe-distclean-findutils: + +distclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-find distclean-find +maybe-distclean-find: + +distclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-flex distclean-flex +maybe-distclean-flex: + +distclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gas distclean-gas +maybe-distclean-gas: + +distclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gawk distclean-gawk +maybe-distclean-gawk: + +distclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gettext distclean-gettext +maybe-distclean-gettext: + +distclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gnuserv distclean-gnuserv +maybe-distclean-gnuserv: + +distclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: + +distclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gzip distclean-gzip +maybe-distclean-gzip: + +distclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-hello distclean-hello +maybe-distclean-hello: + +distclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-indent distclean-indent +maybe-distclean-indent: + +distclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-intl distclean-intl +maybe-distclean-intl: + +distclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tcl distclean-tcl +maybe-distclean-tcl: + +distclean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-itcl distclean-itcl +maybe-distclean-itcl: + +distclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-ld distclean-ld +maybe-distclean-ld: + +distclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libgui distclean-libgui +maybe-distclean-libgui: + +distclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libiberty distclean-libiberty +maybe-distclean-libiberty: + +distclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtool distclean-libtool +maybe-distclean-libtool: + +distclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-m4 distclean-m4 +maybe-distclean-m4: + +distclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-make distclean-make +maybe-distclean-make: + +distclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-mmalloc distclean-mmalloc +maybe-distclean-mmalloc: + +distclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-patch distclean-patch +maybe-distclean-patch: + +distclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-perl distclean-perl +maybe-distclean-perl: + +distclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-prms distclean-prms +maybe-distclean-prms: + +distclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-rcs distclean-rcs +maybe-distclean-rcs: + +distclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-readline distclean-readline +maybe-distclean-readline: + +distclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-release distclean-release +maybe-distclean-release: + +distclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-recode distclean-recode +maybe-distclean-recode: + +distclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sed distclean-sed +maybe-distclean-sed: + +distclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-send-pr distclean-send-pr +maybe-distclean-send-pr: + +distclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-shellutils distclean-shellutils +maybe-distclean-shellutils: + +distclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sid distclean-sid +maybe-distclean-sid: + +distclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sim distclean-sim +maybe-distclean-sim: + +distclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tar distclean-tar +maybe-distclean-tar: + +distclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-texinfo distclean-texinfo +maybe-distclean-texinfo: + +distclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-textutils distclean-textutils +maybe-distclean-textutils: + +distclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-time distclean-time +maybe-distclean-time: + +distclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-uudecode distclean-uudecode +maybe-distclean-uudecode: + +distclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-wdiff distclean-wdiff +maybe-distclean-wdiff: + +distclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zip distclean-zip +maybe-distclean-zip: + +distclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zlib distclean-zlib +maybe-distclean-zlib: + +distclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gdb distclean-gdb +maybe-distclean-gdb: + +distclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-expect distclean-expect +maybe-distclean-expect: + +distclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-guile distclean-guile +maybe-distclean-guile: + +distclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tk distclean-tk +maybe-distclean-tk: + +distclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tix distclean-tix +maybe-distclean-tix: + +distclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtermcap distclean-libtermcap +maybe-distclean-libtermcap: + +# libtermcap doesn't support distclean. +distclean-libtermcap: + + +.PHONY: maybe-distclean-utils distclean-utils +maybe-distclean-utils: + +distclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3 +maybe-distclean-target-libstdc++-v3: + +distclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-newlib distclean-target-newlib +maybe-distclean-target-newlib: + +distclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c +maybe-distclean-target-libf2c: + +distclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc +maybe-distclean-target-libobjc: + +distclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap +maybe-distclean-target-libtermcap: + +# libtermcap doesn't support distclean. +distclean-target-libtermcap: + + +.PHONY: maybe-distclean-target-winsup distclean-target-winsup +maybe-distclean-target-winsup: + +distclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss +maybe-distclean-target-libgloss: + +distclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty +maybe-distclean-target-libiberty: + +distclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-gperf distclean-target-gperf +maybe-distclean-target-gperf: + +distclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-examples distclean-target-examples +maybe-distclean-target-examples: + +distclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libffi distclean-target-libffi +maybe-distclean-target-libffi: + +distclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libjava distclean-target-libjava +maybe-distclean-target-libjava: + +distclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-zlib distclean-target-zlib +maybe-distclean-target-zlib: + +distclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc +maybe-distclean-target-boehm-gc: + +distclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads +maybe-distclean-target-qthreads: + +distclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-rda distclean-target-rda +maybe-distclean-target-rda: + +distclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libada distclean-target-libada +maybe-distclean-target-libada: + +distclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +.PHONY: do-maintainer-clean +do-maintainer-clean: maintainer-clean-host maintainer-clean-target + +.PHONY: maintainer-clean-host +maintainer-clean-host: maybe-maintainer-clean-gcc \ + maybe-maintainer-clean-ash \ + maybe-maintainer-clean-autoconf \ + maybe-maintainer-clean-automake \ + maybe-maintainer-clean-bash \ + maybe-maintainer-clean-bfd \ + maybe-maintainer-clean-opcodes \ + maybe-maintainer-clean-binutils \ + maybe-maintainer-clean-bison \ + maybe-maintainer-clean-byacc \ + maybe-maintainer-clean-bzip2 \ + maybe-maintainer-clean-dejagnu \ + maybe-maintainer-clean-diff \ + maybe-maintainer-clean-dosutils \ + maybe-maintainer-clean-etc \ + maybe-maintainer-clean-fastjar \ + maybe-maintainer-clean-fileutils \ + maybe-maintainer-clean-findutils \ + maybe-maintainer-clean-find \ + maybe-maintainer-clean-flex \ + maybe-maintainer-clean-gas \ + maybe-maintainer-clean-gawk \ + maybe-maintainer-clean-gettext \ + maybe-maintainer-clean-gnuserv \ + maybe-maintainer-clean-gprof \ + maybe-maintainer-clean-gzip \ + maybe-maintainer-clean-hello \ + maybe-maintainer-clean-indent \ + maybe-maintainer-clean-intl \ + maybe-maintainer-clean-tcl \ + maybe-maintainer-clean-itcl \ + maybe-maintainer-clean-ld \ + maybe-maintainer-clean-libgui \ + maybe-maintainer-clean-libiberty \ + maybe-maintainer-clean-libtool \ + maybe-maintainer-clean-m4 \ + maybe-maintainer-clean-make \ + maybe-maintainer-clean-mmalloc \ + maybe-maintainer-clean-patch \ + maybe-maintainer-clean-perl \ + maybe-maintainer-clean-prms \ + maybe-maintainer-clean-rcs \ + maybe-maintainer-clean-readline \ + maybe-maintainer-clean-release \ + maybe-maintainer-clean-recode \ + maybe-maintainer-clean-sed \ + maybe-maintainer-clean-send-pr \ + maybe-maintainer-clean-shellutils \ + maybe-maintainer-clean-sid \ + maybe-maintainer-clean-sim \ + maybe-maintainer-clean-tar \ + maybe-maintainer-clean-texinfo \ + maybe-maintainer-clean-textutils \ + maybe-maintainer-clean-time \ + maybe-maintainer-clean-uudecode \ + maybe-maintainer-clean-wdiff \ + maybe-maintainer-clean-zip \ + maybe-maintainer-clean-zlib \ + maybe-maintainer-clean-gdb \ + maybe-maintainer-clean-expect \ + maybe-maintainer-clean-guile \ + maybe-maintainer-clean-tk \ + maybe-maintainer-clean-tix \ + maybe-maintainer-clean-libtermcap \ + maybe-maintainer-clean-utils + +.PHONY: maintainer-clean-target +maintainer-clean-target: \ + maybe-maintainer-clean-target-libstdc++-v3 \ + maybe-maintainer-clean-target-newlib \ + maybe-maintainer-clean-target-libf2c \ + maybe-maintainer-clean-target-libobjc \ + maybe-maintainer-clean-target-libtermcap \ + maybe-maintainer-clean-target-winsup \ + maybe-maintainer-clean-target-libgloss \ + maybe-maintainer-clean-target-libiberty \ + maybe-maintainer-clean-target-gperf \ + maybe-maintainer-clean-target-examples \ + maybe-maintainer-clean-target-libffi \ + maybe-maintainer-clean-target-libjava \ + maybe-maintainer-clean-target-zlib \ + maybe-maintainer-clean-target-boehm-gc \ + maybe-maintainer-clean-target-qthreads \ + maybe-maintainer-clean-target-rda \ + maybe-maintainer-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc +maybe-maintainer-clean-gcc: +maintainer-clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash +maybe-maintainer-clean-ash: + +maintainer-clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf +maybe-maintainer-clean-autoconf: + +maintainer-clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake +maybe-maintainer-clean-automake: + +maintainer-clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash +maybe-maintainer-clean-bash: + +maintainer-clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd +maybe-maintainer-clean-bfd: + +maintainer-clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes +maybe-maintainer-clean-opcodes: + +maintainer-clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils +maybe-maintainer-clean-binutils: + +maintainer-clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison +maybe-maintainer-clean-bison: + +maintainer-clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc +maybe-maintainer-clean-byacc: + +maintainer-clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2 +maybe-maintainer-clean-bzip2: + +maintainer-clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu +maybe-maintainer-clean-dejagnu: + +maintainer-clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff +maybe-maintainer-clean-diff: + +maintainer-clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils +maybe-maintainer-clean-dosutils: + +maintainer-clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc +maybe-maintainer-clean-etc: + +maintainer-clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar +maybe-maintainer-clean-fastjar: + +maintainer-clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils +maybe-maintainer-clean-fileutils: + +maintainer-clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils +maybe-maintainer-clean-findutils: + +maintainer-clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-find maintainer-clean-find +maybe-maintainer-clean-find: + +maintainer-clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex +maybe-maintainer-clean-flex: + +maintainer-clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas +maybe-maintainer-clean-gas: + +maintainer-clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk +maybe-maintainer-clean-gawk: + +maintainer-clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext +maybe-maintainer-clean-gettext: + +maintainer-clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv +maybe-maintainer-clean-gnuserv: + +maintainer-clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: + +maintainer-clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip +maybe-maintainer-clean-gzip: + +maintainer-clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello +maybe-maintainer-clean-hello: + +maintainer-clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent +maybe-maintainer-clean-indent: + +maintainer-clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl +maybe-maintainer-clean-intl: + +maintainer-clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl +maybe-maintainer-clean-tcl: + +maintainer-clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl +maybe-maintainer-clean-itcl: + +maintainer-clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld +maybe-maintainer-clean-ld: + +maintainer-clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui +maybe-maintainer-clean-libgui: + +maintainer-clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty +maybe-maintainer-clean-libiberty: + +maintainer-clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool +maybe-maintainer-clean-libtool: + +maintainer-clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4 +maybe-maintainer-clean-m4: + +maintainer-clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-make maintainer-clean-make +maybe-maintainer-clean-make: + +maintainer-clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc +maybe-maintainer-clean-mmalloc: + +maintainer-clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch +maybe-maintainer-clean-patch: + +maintainer-clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl +maybe-maintainer-clean-perl: + +maintainer-clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms +maybe-maintainer-clean-prms: + +maintainer-clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs +maybe-maintainer-clean-rcs: + +maintainer-clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +maybe-maintainer-clean-readline: + +maintainer-clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-release maintainer-clean-release +maybe-maintainer-clean-release: + +maintainer-clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode +maybe-maintainer-clean-recode: + +maintainer-clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed +maybe-maintainer-clean-sed: + +maintainer-clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr +maybe-maintainer-clean-send-pr: + +maintainer-clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils +maybe-maintainer-clean-shellutils: + +maintainer-clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid +maybe-maintainer-clean-sid: + +maintainer-clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim +maybe-maintainer-clean-sim: + +maintainer-clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar +maybe-maintainer-clean-tar: + +maintainer-clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo +maybe-maintainer-clean-texinfo: + +maintainer-clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils +maybe-maintainer-clean-textutils: + +maintainer-clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-time maintainer-clean-time +maybe-maintainer-clean-time: + +maintainer-clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode +maybe-maintainer-clean-uudecode: + +maintainer-clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff +maybe-maintainer-clean-wdiff: + +maintainer-clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip +maybe-maintainer-clean-zip: + +maintainer-clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib +maybe-maintainer-clean-zlib: + +maintainer-clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb +maybe-maintainer-clean-gdb: + +maintainer-clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect +maybe-maintainer-clean-expect: + +maintainer-clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile +maybe-maintainer-clean-guile: + +maintainer-clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk +maybe-maintainer-clean-tk: + +maintainer-clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix +maybe-maintainer-clean-tix: + +maintainer-clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap +maybe-maintainer-clean-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-libtermcap: + + +.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils +maybe-maintainer-clean-utils: + +maintainer-clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3 +maybe-maintainer-clean-target-libstdc++-v3: + +maintainer-clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib +maybe-maintainer-clean-target-newlib: + +maintainer-clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c +maybe-maintainer-clean-target-libf2c: + +maintainer-clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc +maybe-maintainer-clean-target-libobjc: + +maintainer-clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap +maybe-maintainer-clean-target-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-target-libtermcap: + + +.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup +maybe-maintainer-clean-target-winsup: + +maintainer-clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss +maybe-maintainer-clean-target-libgloss: + +maintainer-clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty +maybe-maintainer-clean-target-libiberty: + +maintainer-clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf +maybe-maintainer-clean-target-gperf: + +maintainer-clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples +maybe-maintainer-clean-target-examples: + +maintainer-clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi +maybe-maintainer-clean-target-libffi: + +maintainer-clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava +maybe-maintainer-clean-target-libjava: + +maintainer-clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib +maybe-maintainer-clean-target-zlib: + +maintainer-clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc +maybe-maintainer-clean-target-boehm-gc: + +maintainer-clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads +maybe-maintainer-clean-target-qthreads: + +maintainer-clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda +maybe-maintainer-clean-target-rda: + +maintainer-clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada +maybe-maintainer-clean-target-libada: + +maintainer-clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + + +# Here are the targets which correspond to the do-X targets. + +.PHONY: info installcheck dvi install-info +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean +info: do-info +installcheck: do-installcheck +dvi: do-dvi + +# Make sure makeinfo is built before we do a `make info', if we're +# in fact building texinfo. +do-info: maybe-all-texinfo + +install-info: do-install-info dir.info + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f dir.info ] ; then \ + $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \ + else true ; fi + +local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log + +local-distclean: + -rm -f Makefile config.status config.cache mh-frag mt-frag + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -if [ "$(TARGET_SUBDIR)" != "." ]; then \ + rm -rf $(TARGET_SUBDIR); \ + else true; fi + -rm -rf $(BUILD_SUBDIR) + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +clean: do-clean local-clean +mostlyclean: do-mostlyclean local-clean +distclean: do-distclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean + +# Extra dependency for clean-target, owing to the mixed nature of gcc +clean-target: clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc + +# Check target. + +.PHONY: check do-check +check: do-check + +# Only include modules actually being configured and built. +do-check: maybe-check-gcc \ + maybe-check-ash \ + maybe-check-autoconf \ + maybe-check-automake \ + maybe-check-bash \ + maybe-check-bfd \ + maybe-check-opcodes \ + maybe-check-binutils \ + maybe-check-bison \ + maybe-check-byacc \ + maybe-check-bzip2 \ + maybe-check-dejagnu \ + maybe-check-diff \ + maybe-check-dosutils \ + maybe-check-etc \ + maybe-check-fastjar \ + maybe-check-fileutils \ + maybe-check-findutils \ + maybe-check-find \ + maybe-check-flex \ + maybe-check-gas \ + maybe-check-gawk \ + maybe-check-gettext \ + maybe-check-gnuserv \ + maybe-check-gprof \ + maybe-check-gzip \ + maybe-check-hello \ + maybe-check-indent \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ + maybe-check-ld \ + maybe-check-libgui \ + maybe-check-libiberty \ + maybe-check-libtool \ + maybe-check-m4 \ + maybe-check-make \ + maybe-check-mmalloc \ + maybe-check-patch \ + maybe-check-perl \ + maybe-check-prms \ + maybe-check-rcs \ + maybe-check-readline \ + maybe-check-release \ + maybe-check-recode \ + maybe-check-sed \ + maybe-check-send-pr \ + maybe-check-shellutils \ + maybe-check-sid \ + maybe-check-sim \ + maybe-check-tar \ + maybe-check-texinfo \ + maybe-check-textutils \ + maybe-check-time \ + maybe-check-uudecode \ + maybe-check-wdiff \ + maybe-check-zip \ + maybe-check-zlib \ + maybe-check-gdb \ + maybe-check-expect \ + maybe-check-guile \ + maybe-check-tk \ + maybe-check-tix \ + maybe-check-libtermcap \ + maybe-check-utils \ + maybe-check-target-libstdc++-v3 \ + maybe-check-target-newlib \ + maybe-check-target-libf2c \ + maybe-check-target-libobjc \ + maybe-check-target-libtermcap \ + maybe-check-target-winsup \ + maybe-check-target-libgloss \ + maybe-check-target-libiberty \ + maybe-check-target-gperf \ + maybe-check-target-examples \ + maybe-check-target-libffi \ + maybe-check-target-libjava \ + maybe-check-target-zlib \ + maybe-check-target-boehm-gc \ + maybe-check-target-qthreads \ + maybe-check-target-rda \ + maybe-check-target-libada + +# Automated reporting of test results. + +warning.log: build.log + $(srcdir)/contrib/warn_summary build.log > $@ + +mail-report.log: + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +mail-report-with-warnings.log: warning.log + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t -i warning.log >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +# Installation targets. + +.PHONY: install uninstall +install: installdirs install-host install-target + +.PHONY: install-host-nogcc +install-host-nogcc: \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-host +install-host: maybe-install-gcc \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-target +install-target: \ + maybe-install-target-libstdc++-v3 \ + maybe-install-target-newlib \ + maybe-install-target-libf2c \ + maybe-install-target-libobjc \ + maybe-install-target-libtermcap \ + maybe-install-target-winsup \ + maybe-install-target-libgloss \ + maybe-install-target-libiberty \ + maybe-install-target-gperf \ + maybe-install-target-examples \ + maybe-install-target-libffi \ + maybe-install-target-libjava \ + maybe-install-target-zlib \ + maybe-install-target-boehm-gc \ + maybe-install-target-qthreads \ + maybe-install-target-rda \ + maybe-install-target-libada + +uninstall: + @echo "the uninstall target is not supported in this tree" + +.PHONY: install.all +install.all: install-no-fixedincludes + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}` ; export r ; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ + else \ + true ; \ + fi + +# install-no-fixedincludes is used because Cygnus can not distribute +# the fixed header files. +.PHONY: install-no-fixedincludes +install-no-fixedincludes: installdirs install-host-nogcc \ + install-target gcc-no-fixedincludes + +### other supporting targets + +MAKEDIRS= \ + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) +.PHONY: installdirs +installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) + +dir.info: do-install-info + if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ + $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ + mv -f dir.info.new dir.info ; \ + else true ; \ + fi + +dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" + +etags tags: TAGS + +# Right now this just builds TAGS in each subdirectory. emacs19 has the +# ability to use several tags files at once, so there is probably no need +# to combine them into one big TAGS file (like CVS 1.3 does). We could +# (if we felt like it) have this Makefile write a piece of elisp which +# the user could load to tell emacs19 where all the TAGS files we just +# built are. +TAGS: do-TAGS + +# -------------------------------------- +# Modules which run on the build machine +# -------------------------------------- + +.PHONY: configure-build-libiberty maybe-configure-build-libiberty +maybe-configure-build-libiberty: +configure-build-libiberty: + @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/libiberty; \ + cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 + +.PHONY: all-build-libiberty maybe-all-build-libiberty +maybe-all-build-libiberty: +all-build-libiberty: configure-build-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all) + + +# -------------------------------------- +# Modules which run on the host machine +# -------------------------------------- + +.PHONY: configure-ash maybe-configure-ash +maybe-configure-ash: +configure-ash: + @test ! -f ash/Makefile || exit 0; \ + [ -d ash ] || mkdir ash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ash; \ + cd ash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ash maybe-all-ash +maybe-all-ash: +all-ash: configure-ash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ash maybe-check-ash +maybe-check-ash: + +check-ash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ash maybe-install-ash +maybe-install-ash: + +install-ash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-autoconf maybe-configure-autoconf +maybe-configure-autoconf: +configure-autoconf: + @test ! -f autoconf/Makefile || exit 0; \ + [ -d autoconf ] || mkdir autoconf; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in autoconf; \ + cd autoconf || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-autoconf maybe-all-autoconf +maybe-all-autoconf: +all-autoconf: configure-autoconf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-autoconf maybe-check-autoconf +maybe-check-autoconf: + +check-autoconf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-autoconf maybe-install-autoconf +maybe-install-autoconf: + +install-autoconf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-automake maybe-configure-automake +maybe-configure-automake: +configure-automake: + @test ! -f automake/Makefile || exit 0; \ + [ -d automake ] || mkdir automake; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in automake; \ + cd automake || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-automake maybe-all-automake +maybe-all-automake: +all-automake: configure-automake + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-automake maybe-check-automake +maybe-check-automake: + +check-automake: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-automake maybe-install-automake +maybe-install-automake: + +install-automake: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bash maybe-configure-bash +maybe-configure-bash: +configure-bash: + @test ! -f bash/Makefile || exit 0; \ + [ -d bash ] || mkdir bash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bash; \ + cd bash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bash maybe-all-bash +maybe-all-bash: +all-bash: configure-bash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bash maybe-check-bash +maybe-check-bash: + +check-bash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bash maybe-install-bash +maybe-install-bash: + +install-bash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bfd maybe-configure-bfd +maybe-configure-bfd: +configure-bfd: + @test ! -f bfd/Makefile || exit 0; \ + [ -d bfd ] || mkdir bfd; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bfd; \ + cd bfd || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bfd maybe-all-bfd +maybe-all-bfd: +all-bfd: configure-bfd + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bfd maybe-check-bfd +maybe-check-bfd: + +check-bfd: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bfd maybe-install-bfd +maybe-install-bfd: + +install-bfd: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-opcodes maybe-configure-opcodes +maybe-configure-opcodes: +configure-opcodes: + @test ! -f opcodes/Makefile || exit 0; \ + [ -d opcodes ] || mkdir opcodes; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in opcodes; \ + cd opcodes || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-opcodes maybe-all-opcodes +maybe-all-opcodes: +all-opcodes: configure-opcodes + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-opcodes maybe-check-opcodes +maybe-check-opcodes: + +check-opcodes: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-opcodes maybe-install-opcodes +maybe-install-opcodes: + +install-opcodes: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-binutils maybe-configure-binutils +maybe-configure-binutils: +configure-binutils: + @test ! -f binutils/Makefile || exit 0; \ + [ -d binutils ] || mkdir binutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in binutils; \ + cd binutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-binutils maybe-all-binutils +maybe-all-binutils: +all-binutils: configure-binutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-binutils maybe-check-binutils +maybe-check-binutils: + +check-binutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-binutils maybe-install-binutils +maybe-install-binutils: + +install-binutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bison maybe-configure-bison +maybe-configure-bison: +configure-bison: + @test ! -f bison/Makefile || exit 0; \ + [ -d bison ] || mkdir bison; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bison; \ + cd bison || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bison maybe-all-bison +maybe-all-bison: +all-bison: configure-bison + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bison maybe-check-bison +maybe-check-bison: + +# This module is only tested in a native toolchain. +check-bison: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-bison maybe-install-bison +maybe-install-bison: + +install-bison: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-byacc maybe-configure-byacc +maybe-configure-byacc: +configure-byacc: + @test ! -f byacc/Makefile || exit 0; \ + [ -d byacc ] || mkdir byacc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in byacc; \ + cd byacc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-byacc maybe-all-byacc +maybe-all-byacc: +all-byacc: configure-byacc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-byacc maybe-check-byacc +maybe-check-byacc: + +# This module is only tested in a native toolchain. +check-byacc: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-byacc maybe-install-byacc +maybe-install-byacc: + +install-byacc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bzip2 maybe-configure-bzip2 +maybe-configure-bzip2: +configure-bzip2: + @test ! -f bzip2/Makefile || exit 0; \ + [ -d bzip2 ] || mkdir bzip2; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bzip2; \ + cd bzip2 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bzip2 maybe-all-bzip2 +maybe-all-bzip2: +all-bzip2: configure-bzip2 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bzip2 maybe-check-bzip2 +maybe-check-bzip2: + +check-bzip2: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bzip2 maybe-install-bzip2 +maybe-install-bzip2: + +install-bzip2: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dejagnu maybe-configure-dejagnu +maybe-configure-dejagnu: +configure-dejagnu: + @test ! -f dejagnu/Makefile || exit 0; \ + [ -d dejagnu ] || mkdir dejagnu; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dejagnu; \ + cd dejagnu || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dejagnu maybe-all-dejagnu +maybe-all-dejagnu: +all-dejagnu: configure-dejagnu + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dejagnu maybe-check-dejagnu +maybe-check-dejagnu: + +check-dejagnu: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-dejagnu maybe-install-dejagnu +maybe-install-dejagnu: + +install-dejagnu: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-diff maybe-configure-diff +maybe-configure-diff: +configure-diff: + @test ! -f diff/Makefile || exit 0; \ + [ -d diff ] || mkdir diff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in diff; \ + cd diff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-diff maybe-all-diff +maybe-all-diff: +all-diff: configure-diff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-diff maybe-check-diff +maybe-check-diff: + +check-diff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-diff maybe-install-diff +maybe-install-diff: + +install-diff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dosutils maybe-configure-dosutils +maybe-configure-dosutils: +configure-dosutils: + @test ! -f dosutils/Makefile || exit 0; \ + [ -d dosutils ] || mkdir dosutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dosutils; \ + cd dosutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dosutils maybe-all-dosutils +maybe-all-dosutils: +all-dosutils: configure-dosutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dosutils maybe-check-dosutils +maybe-check-dosutils: + +check-dosutils: + + +.PHONY: install-dosutils maybe-install-dosutils +maybe-install-dosutils: + +install-dosutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-etc maybe-configure-etc +maybe-configure-etc: +configure-etc: + @test ! -f etc/Makefile || exit 0; \ + [ -d etc ] || mkdir etc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in etc; \ + cd etc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-etc maybe-all-etc +maybe-all-etc: +all-etc: configure-etc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-etc maybe-check-etc +maybe-check-etc: + +check-etc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-etc maybe-install-etc +maybe-install-etc: + +install-etc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fastjar maybe-configure-fastjar +maybe-configure-fastjar: +configure-fastjar: + @test ! -f fastjar/Makefile || exit 0; \ + [ -d fastjar ] || mkdir fastjar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fastjar; \ + cd fastjar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fastjar maybe-all-fastjar +maybe-all-fastjar: +all-fastjar: configure-fastjar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fastjar maybe-check-fastjar +maybe-check-fastjar: + +# This module is only tested in a native toolchain. +check-fastjar: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-fastjar maybe-install-fastjar +maybe-install-fastjar: + +install-fastjar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fileutils maybe-configure-fileutils +maybe-configure-fileutils: +configure-fileutils: + @test ! -f fileutils/Makefile || exit 0; \ + [ -d fileutils ] || mkdir fileutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fileutils; \ + cd fileutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fileutils maybe-all-fileutils +maybe-all-fileutils: +all-fileutils: configure-fileutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fileutils maybe-check-fileutils +maybe-check-fileutils: + +check-fileutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-fileutils maybe-install-fileutils +maybe-install-fileutils: + +install-fileutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-findutils maybe-configure-findutils +maybe-configure-findutils: +configure-findutils: + @test ! -f findutils/Makefile || exit 0; \ + [ -d findutils ] || mkdir findutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in findutils; \ + cd findutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-findutils maybe-all-findutils +maybe-all-findutils: +all-findutils: configure-findutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-findutils maybe-check-findutils +maybe-check-findutils: + +check-findutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-findutils maybe-install-findutils +maybe-install-findutils: + +install-findutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-find maybe-configure-find +maybe-configure-find: +configure-find: + @test ! -f find/Makefile || exit 0; \ + [ -d find ] || mkdir find; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in find; \ + cd find || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-find maybe-all-find +maybe-all-find: +all-find: configure-find + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-find maybe-check-find +maybe-check-find: + +check-find: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-find maybe-install-find +maybe-install-find: + +install-find: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-flex maybe-configure-flex +maybe-configure-flex: +configure-flex: + @test ! -f flex/Makefile || exit 0; \ + [ -d flex ] || mkdir flex; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in flex; \ + cd flex || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-flex maybe-all-flex +maybe-all-flex: +all-flex: configure-flex + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-flex maybe-check-flex +maybe-check-flex: + +# This module is only tested in a native toolchain. +check-flex: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-flex maybe-install-flex +maybe-install-flex: + +install-flex: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gas maybe-configure-gas +maybe-configure-gas: +configure-gas: + @test ! -f gas/Makefile || exit 0; \ + [ -d gas ] || mkdir gas; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gas; \ + cd gas || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gas maybe-all-gas +maybe-all-gas: +all-gas: configure-gas + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gas maybe-check-gas +maybe-check-gas: + +check-gas: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gas maybe-install-gas +maybe-install-gas: + +install-gas: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gawk maybe-configure-gawk +maybe-configure-gawk: +configure-gawk: + @test ! -f gawk/Makefile || exit 0; \ + [ -d gawk ] || mkdir gawk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gawk; \ + cd gawk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gawk maybe-all-gawk +maybe-all-gawk: +all-gawk: configure-gawk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gawk maybe-check-gawk +maybe-check-gawk: + +check-gawk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gawk maybe-install-gawk +maybe-install-gawk: + +install-gawk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gettext maybe-configure-gettext +maybe-configure-gettext: +configure-gettext: + @test ! -f gettext/Makefile || exit 0; \ + [ -d gettext ] || mkdir gettext; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gettext; \ + cd gettext || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gettext maybe-all-gettext +maybe-all-gettext: +all-gettext: configure-gettext + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gettext maybe-check-gettext +maybe-check-gettext: + +check-gettext: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gettext maybe-install-gettext +maybe-install-gettext: + +install-gettext: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gnuserv maybe-configure-gnuserv +maybe-configure-gnuserv: +configure-gnuserv: + @test ! -f gnuserv/Makefile || exit 0; \ + [ -d gnuserv ] || mkdir gnuserv; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gnuserv; \ + cd gnuserv || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gnuserv maybe-all-gnuserv +maybe-all-gnuserv: +all-gnuserv: configure-gnuserv + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gnuserv maybe-check-gnuserv +maybe-check-gnuserv: + +check-gnuserv: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gnuserv maybe-install-gnuserv +maybe-install-gnuserv: + +install-gnuserv: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: +configure-gprof: + @test ! -f gprof/Makefile || exit 0; \ + [ -d gprof ] || mkdir gprof; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gprof; \ + cd gprof || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +all-gprof: configure-gprof + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: + +check-gprof: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: + +install-gprof: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gzip maybe-configure-gzip +maybe-configure-gzip: +configure-gzip: + @test ! -f gzip/Makefile || exit 0; \ + [ -d gzip ] || mkdir gzip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gzip; \ + cd gzip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gzip maybe-all-gzip +maybe-all-gzip: +all-gzip: configure-gzip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gzip maybe-check-gzip +maybe-check-gzip: + +check-gzip: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gzip maybe-install-gzip +maybe-install-gzip: + +install-gzip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-hello maybe-configure-hello +maybe-configure-hello: +configure-hello: + @test ! -f hello/Makefile || exit 0; \ + [ -d hello ] || mkdir hello; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in hello; \ + cd hello || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-hello maybe-all-hello +maybe-all-hello: +all-hello: configure-hello + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-hello maybe-check-hello +maybe-check-hello: + +check-hello: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-hello maybe-install-hello +maybe-install-hello: + +install-hello: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-indent maybe-configure-indent +maybe-configure-indent: +configure-indent: + @test ! -f indent/Makefile || exit 0; \ + [ -d indent ] || mkdir indent; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in indent; \ + cd indent || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-indent maybe-all-indent +maybe-all-indent: +all-indent: configure-indent + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-indent maybe-check-indent +maybe-check-indent: + +check-indent: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-indent maybe-install-indent +maybe-install-indent: + +install-indent: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-intl maybe-configure-intl +maybe-configure-intl: +configure-intl: + @test ! -f intl/Makefile || exit 0; \ + [ -d intl ] || mkdir intl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in intl; \ + cd intl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-intl maybe-all-intl +maybe-all-intl: +all-intl: configure-intl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-intl maybe-check-intl +maybe-check-intl: + +check-intl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-intl maybe-install-intl +maybe-install-intl: + +install-intl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tcl maybe-configure-tcl +maybe-configure-tcl: +configure-tcl: + @test ! -f tcl/Makefile || exit 0; \ + [ -d tcl ] || mkdir tcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tcl; \ + cd tcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tcl maybe-all-tcl +maybe-all-tcl: +all-tcl: configure-tcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tcl maybe-check-tcl +maybe-check-tcl: + +check-tcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tcl maybe-install-tcl +maybe-install-tcl: + +install-tcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-itcl maybe-configure-itcl +maybe-configure-itcl: +configure-itcl: + @test ! -f itcl/Makefile || exit 0; \ + [ -d itcl ] || mkdir itcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in itcl; \ + cd itcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-itcl maybe-all-itcl +maybe-all-itcl: +all-itcl: configure-itcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-itcl maybe-check-itcl +maybe-check-itcl: + +check-itcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-itcl maybe-install-itcl +maybe-install-itcl: + +install-itcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-ld maybe-configure-ld +maybe-configure-ld: +configure-ld: + @test ! -f ld/Makefile || exit 0; \ + [ -d ld ] || mkdir ld; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ld; \ + cd ld || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ld maybe-all-ld +maybe-all-ld: +all-ld: configure-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ld maybe-check-ld +maybe-check-ld: + +check-ld: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ld maybe-install-ld +maybe-install-ld: + +install-ld: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libgui maybe-configure-libgui +maybe-configure-libgui: +configure-libgui: + @test ! -f libgui/Makefile || exit 0; \ + [ -d libgui ] || mkdir libgui; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libgui; \ + cd libgui || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libgui maybe-all-libgui +maybe-all-libgui: +all-libgui: configure-libgui + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libgui maybe-check-libgui +maybe-check-libgui: + +check-libgui: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libgui maybe-install-libgui +maybe-install-libgui: + +install-libgui: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libiberty maybe-configure-libiberty +maybe-configure-libiberty: +configure-libiberty: + @test ! -f libiberty/Makefile || exit 0; \ + [ -d libiberty ] || mkdir libiberty; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libiberty; \ + cd libiberty || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libiberty maybe-all-libiberty +maybe-all-libiberty: +all-libiberty: configure-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libiberty maybe-check-libiberty +maybe-check-libiberty: + +check-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libiberty maybe-install-libiberty +maybe-install-libiberty: + +install-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libtool maybe-configure-libtool +maybe-configure-libtool: +configure-libtool: + @test ! -f libtool/Makefile || exit 0; \ + [ -d libtool ] || mkdir libtool; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtool; \ + cd libtool || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtool maybe-all-libtool +maybe-all-libtool: +all-libtool: configure-libtool + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtool maybe-check-libtool +maybe-check-libtool: + +check-libtool: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libtool maybe-install-libtool +maybe-install-libtool: + +install-libtool: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-m4 maybe-configure-m4 +maybe-configure-m4: +configure-m4: + @test ! -f m4/Makefile || exit 0; \ + [ -d m4 ] || mkdir m4; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in m4; \ + cd m4 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-m4 maybe-all-m4 +maybe-all-m4: +all-m4: configure-m4 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-m4 maybe-check-m4 +maybe-check-m4: + +check-m4: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-m4 maybe-install-m4 +maybe-install-m4: + +install-m4: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-make maybe-configure-make +maybe-configure-make: +configure-make: + @test ! -f make/Makefile || exit 0; \ + [ -d make ] || mkdir make; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in make; \ + cd make || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-make maybe-all-make +maybe-all-make: +all-make: configure-make + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-make maybe-check-make +maybe-check-make: + +check-make: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-make maybe-install-make +maybe-install-make: + +install-make: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-mmalloc maybe-configure-mmalloc +maybe-configure-mmalloc: +configure-mmalloc: + @test ! -f mmalloc/Makefile || exit 0; \ + [ -d mmalloc ] || mkdir mmalloc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in mmalloc; \ + cd mmalloc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-mmalloc maybe-all-mmalloc +maybe-all-mmalloc: +all-mmalloc: configure-mmalloc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-mmalloc maybe-check-mmalloc +maybe-check-mmalloc: + +check-mmalloc: + + +.PHONY: install-mmalloc maybe-install-mmalloc +maybe-install-mmalloc: + +install-mmalloc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-patch maybe-configure-patch +maybe-configure-patch: +configure-patch: + @test ! -f patch/Makefile || exit 0; \ + [ -d patch ] || mkdir patch; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in patch; \ + cd patch || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-patch maybe-all-patch +maybe-all-patch: +all-patch: configure-patch + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-patch maybe-check-patch +maybe-check-patch: + +check-patch: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-patch maybe-install-patch +maybe-install-patch: + +install-patch: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-perl maybe-configure-perl +maybe-configure-perl: +configure-perl: + @test ! -f perl/Makefile || exit 0; \ + [ -d perl ] || mkdir perl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in perl; \ + cd perl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-perl maybe-all-perl +maybe-all-perl: +all-perl: configure-perl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-perl maybe-check-perl +maybe-check-perl: + +check-perl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-perl maybe-install-perl +maybe-install-perl: + +install-perl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-prms maybe-configure-prms +maybe-configure-prms: +configure-prms: + @test ! -f prms/Makefile || exit 0; \ + [ -d prms ] || mkdir prms; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in prms; \ + cd prms || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-prms maybe-all-prms +maybe-all-prms: +all-prms: configure-prms + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-prms maybe-check-prms +maybe-check-prms: + +check-prms: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-prms maybe-install-prms +maybe-install-prms: + +install-prms: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-rcs maybe-configure-rcs +maybe-configure-rcs: +configure-rcs: + @test ! -f rcs/Makefile || exit 0; \ + [ -d rcs ] || mkdir rcs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in rcs; \ + cd rcs || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-rcs maybe-all-rcs +maybe-all-rcs: +all-rcs: configure-rcs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-rcs maybe-check-rcs +maybe-check-rcs: + +check-rcs: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-rcs maybe-install-rcs +maybe-install-rcs: + +install-rcs: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-readline maybe-configure-readline +maybe-configure-readline: +configure-readline: + @test ! -f readline/Makefile || exit 0; \ + [ -d readline ] || mkdir readline; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in readline; \ + cd readline || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-readline maybe-all-readline +maybe-all-readline: +all-readline: configure-readline + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-readline maybe-check-readline +maybe-check-readline: + +check-readline: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-readline maybe-install-readline +maybe-install-readline: + +install-readline: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-release maybe-configure-release +maybe-configure-release: +configure-release: + @test ! -f release/Makefile || exit 0; \ + [ -d release ] || mkdir release; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in release; \ + cd release || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-release maybe-all-release +maybe-all-release: +all-release: configure-release + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd release && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-release maybe-check-release +maybe-check-release: + +check-release: + + +.PHONY: install-release maybe-install-release +maybe-install-release: + +install-release: + + +.PHONY: configure-recode maybe-configure-recode +maybe-configure-recode: +configure-recode: + @test ! -f recode/Makefile || exit 0; \ + [ -d recode ] || mkdir recode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in recode; \ + cd recode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-recode maybe-all-recode +maybe-all-recode: +all-recode: configure-recode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-recode maybe-check-recode +maybe-check-recode: + +check-recode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-recode maybe-install-recode +maybe-install-recode: + +install-recode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sed maybe-configure-sed +maybe-configure-sed: +configure-sed: + @test ! -f sed/Makefile || exit 0; \ + [ -d sed ] || mkdir sed; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sed; \ + cd sed || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sed maybe-all-sed +maybe-all-sed: +all-sed: configure-sed + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sed maybe-check-sed +maybe-check-sed: + +check-sed: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sed maybe-install-sed +maybe-install-sed: + +install-sed: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-send-pr maybe-configure-send-pr +maybe-configure-send-pr: +configure-send-pr: + @test ! -f send-pr/Makefile || exit 0; \ + [ -d send-pr ] || mkdir send-pr; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in send-pr; \ + cd send-pr || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-send-pr maybe-all-send-pr +maybe-all-send-pr: +all-send-pr: configure-send-pr + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-send-pr maybe-check-send-pr +maybe-check-send-pr: + +check-send-pr: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-send-pr maybe-install-send-pr +maybe-install-send-pr: + +install-send-pr: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-shellutils maybe-configure-shellutils +maybe-configure-shellutils: +configure-shellutils: + @test ! -f shellutils/Makefile || exit 0; \ + [ -d shellutils ] || mkdir shellutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in shellutils; \ + cd shellutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-shellutils maybe-all-shellutils +maybe-all-shellutils: +all-shellutils: configure-shellutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-shellutils maybe-check-shellutils +maybe-check-shellutils: + +check-shellutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-shellutils maybe-install-shellutils +maybe-install-shellutils: + +install-shellutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sid maybe-configure-sid +maybe-configure-sid: +configure-sid: + @test ! -f sid/Makefile || exit 0; \ + [ -d sid ] || mkdir sid; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sid; \ + cd sid || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sid maybe-all-sid +maybe-all-sid: +all-sid: configure-sid + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sid maybe-check-sid +maybe-check-sid: + +check-sid: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sid maybe-install-sid +maybe-install-sid: + +install-sid: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sim maybe-configure-sim +maybe-configure-sim: +configure-sim: + @test ! -f sim/Makefile || exit 0; \ + [ -d sim ] || mkdir sim; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sim; \ + cd sim || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sim maybe-all-sim +maybe-all-sim: +all-sim: configure-sim + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sim maybe-check-sim +maybe-check-sim: + +check-sim: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sim maybe-install-sim +maybe-install-sim: + +install-sim: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tar maybe-configure-tar +maybe-configure-tar: +configure-tar: + @test ! -f tar/Makefile || exit 0; \ + [ -d tar ] || mkdir tar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tar; \ + cd tar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tar maybe-all-tar +maybe-all-tar: +all-tar: configure-tar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tar maybe-check-tar +maybe-check-tar: + +check-tar: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tar maybe-install-tar +maybe-install-tar: + +install-tar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-texinfo maybe-configure-texinfo +maybe-configure-texinfo: +configure-texinfo: + @test ! -f texinfo/Makefile || exit 0; \ + [ -d texinfo ] || mkdir texinfo; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in texinfo; \ + cd texinfo || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-texinfo maybe-all-texinfo +maybe-all-texinfo: +all-texinfo: configure-texinfo + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-texinfo maybe-check-texinfo +maybe-check-texinfo: + +check-texinfo: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-texinfo maybe-install-texinfo +maybe-install-texinfo: + +install-texinfo: + + +.PHONY: configure-textutils maybe-configure-textutils +maybe-configure-textutils: +configure-textutils: + @test ! -f textutils/Makefile || exit 0; \ + [ -d textutils ] || mkdir textutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in textutils; \ + cd textutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-textutils maybe-all-textutils +maybe-all-textutils: +all-textutils: configure-textutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-textutils maybe-check-textutils +maybe-check-textutils: + +check-textutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-textutils maybe-install-textutils +maybe-install-textutils: + +install-textutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-time maybe-configure-time +maybe-configure-time: +configure-time: + @test ! -f time/Makefile || exit 0; \ + [ -d time ] || mkdir time; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in time; \ + cd time || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-time maybe-all-time +maybe-all-time: +all-time: configure-time + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-time maybe-check-time +maybe-check-time: + +check-time: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-time maybe-install-time +maybe-install-time: + +install-time: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-uudecode maybe-configure-uudecode +maybe-configure-uudecode: +configure-uudecode: + @test ! -f uudecode/Makefile || exit 0; \ + [ -d uudecode ] || mkdir uudecode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in uudecode; \ + cd uudecode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-uudecode maybe-all-uudecode +maybe-all-uudecode: +all-uudecode: configure-uudecode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-uudecode maybe-check-uudecode +maybe-check-uudecode: + +check-uudecode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-uudecode maybe-install-uudecode +maybe-install-uudecode: + +install-uudecode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-wdiff maybe-configure-wdiff +maybe-configure-wdiff: +configure-wdiff: + @test ! -f wdiff/Makefile || exit 0; \ + [ -d wdiff ] || mkdir wdiff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in wdiff; \ + cd wdiff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-wdiff maybe-all-wdiff +maybe-all-wdiff: +all-wdiff: configure-wdiff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-wdiff maybe-check-wdiff +maybe-check-wdiff: + +check-wdiff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-wdiff maybe-install-wdiff +maybe-install-wdiff: + +install-wdiff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zip maybe-configure-zip +maybe-configure-zip: +configure-zip: + @test ! -f zip/Makefile || exit 0; \ + [ -d zip ] || mkdir zip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zip; \ + cd zip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zip maybe-all-zip +maybe-all-zip: +all-zip: configure-zip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zip maybe-check-zip +maybe-check-zip: + +# This module is only tested in a native toolchain. +check-zip: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-zip maybe-install-zip +maybe-install-zip: + +install-zip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zlib maybe-configure-zlib +maybe-configure-zlib: +configure-zlib: + @test ! -f zlib/Makefile || exit 0; \ + [ -d zlib ] || mkdir zlib; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zlib; \ + cd zlib || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zlib maybe-all-zlib +maybe-all-zlib: +all-zlib: configure-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zlib maybe-check-zlib +maybe-check-zlib: + +check-zlib: + + +.PHONY: install-zlib maybe-install-zlib +maybe-install-zlib: + +install-zlib: + + +.PHONY: configure-gdb maybe-configure-gdb +maybe-configure-gdb: +configure-gdb: + @test ! -f gdb/Makefile || exit 0; \ + [ -d gdb ] || mkdir gdb; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gdb; \ + cd gdb || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gdb maybe-all-gdb +maybe-all-gdb: +all-gdb: configure-gdb + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-gdb maybe-check-gdb +maybe-check-gdb: + +check-gdb: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-gdb maybe-install-gdb +maybe-install-gdb: + +install-gdb: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-expect maybe-configure-expect +maybe-configure-expect: +configure-expect: + @test ! -f expect/Makefile || exit 0; \ + [ -d expect ] || mkdir expect; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in expect; \ + cd expect || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-expect maybe-all-expect +maybe-all-expect: +all-expect: configure-expect + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-expect maybe-check-expect +maybe-check-expect: + +check-expect: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-expect maybe-install-expect +maybe-install-expect: + +install-expect: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-guile maybe-configure-guile +maybe-configure-guile: +configure-guile: + @test ! -f guile/Makefile || exit 0; \ + [ -d guile ] || mkdir guile; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in guile; \ + cd guile || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-guile maybe-all-guile +maybe-all-guile: +all-guile: configure-guile + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-guile maybe-check-guile +maybe-check-guile: + +check-guile: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-guile maybe-install-guile +maybe-install-guile: + +install-guile: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tk maybe-configure-tk +maybe-configure-tk: +configure-tk: + @test ! -f tk/Makefile || exit 0; \ + [ -d tk ] || mkdir tk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tk; \ + cd tk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tk maybe-all-tk +maybe-all-tk: +all-tk: configure-tk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tk maybe-check-tk +maybe-check-tk: + +check-tk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tk maybe-install-tk +maybe-install-tk: + +install-tk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tix maybe-configure-tix +maybe-configure-tix: +configure-tix: + @test ! -f tix/Makefile || exit 0; \ + [ -d tix ] || mkdir tix; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tix; \ + cd tix || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tix maybe-all-tix +maybe-all-tix: +all-tix: configure-tix + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tix maybe-check-tix +maybe-check-tix: + +check-tix: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tix maybe-install-tix +maybe-install-tix: + +install-tix: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-libtermcap maybe-configure-libtermcap +maybe-configure-libtermcap: +configure-libtermcap: + @test ! -f libtermcap/Makefile || exit 0; \ + [ -d libtermcap ] || mkdir libtermcap; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtermcap; \ + cd libtermcap || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtermcap maybe-all-libtermcap +maybe-all-libtermcap: +all-libtermcap: configure-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtermcap maybe-check-libtermcap +maybe-check-libtermcap: + +check-libtermcap: + + +.PHONY: install-libtermcap maybe-install-libtermcap +maybe-install-libtermcap: + +install-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-utils maybe-configure-utils +maybe-configure-utils: +configure-utils: + @test ! -f utils/Makefile || exit 0; \ + [ -d utils ] || mkdir utils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in utils; \ + cd utils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-utils maybe-all-utils +maybe-all-utils: +all-utils: configure-utils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-utils maybe-check-utils +maybe-check-utils: + +check-utils: + + +.PHONY: install-utils maybe-install-utils +maybe-install-utils: + +install-utils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) install) + + + +# --------------------------------------- +# Modules which run on the target machine +# --------------------------------------- + +.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 +maybe-configure-target-libstdc++-v3: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + +configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \ + cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ + libsrcdir="$$s/libstdc++-v3"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3 +maybe-all-target-libstdc++-v3: +all-target-libstdc++-v3: configure-target-libstdc++-v3 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3 +maybe-check-target-libstdc++-v3: + +check-target-libstdc++-v3: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3 +maybe-install-target-libstdc++-v3: + +install-target-libstdc++-v3: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-newlib maybe-configure-target-newlib +maybe-configure-target-newlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out + +configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/newlib; \ + cd "$(TARGET_SUBDIR)/newlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/newlib"; \ + libsrcdir="$$s/newlib"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-newlib maybe-all-target-newlib +maybe-all-target-newlib: +all-target-newlib: configure-target-newlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-newlib maybe-check-target-newlib +maybe-check-target-newlib: + +check-target-newlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-newlib maybe-install-target-newlib +maybe-install-target-newlib: + +install-target-newlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libf2c maybe-configure-target-libf2c +maybe-configure-target-libf2c: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out + +configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out + @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libf2c; \ + cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libf2c"; \ + libsrcdir="$$s/libf2c"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libf2c maybe-all-target-libf2c +maybe-all-target-libf2c: +all-target-libf2c: configure-target-libf2c + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libf2c maybe-check-target-libf2c +maybe-check-target-libf2c: + +check-target-libf2c: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libf2c maybe-install-target-libf2c +maybe-install-target-libf2c: + +install-target-libf2c: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libobjc maybe-configure-target-libobjc +maybe-configure-target-libobjc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out + +configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out + @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libobjc; \ + cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libobjc"; \ + libsrcdir="$$s/libobjc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libobjc maybe-all-target-libobjc +maybe-all-target-libobjc: +all-target-libobjc: configure-target-libobjc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libobjc maybe-check-target-libobjc +maybe-check-target-libobjc: + +check-target-libobjc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libobjc maybe-install-target-libobjc +maybe-install-target-libobjc: + +install-target-libobjc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap +maybe-configure-target-libtermcap: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out + +configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out + @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libtermcap; \ + cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libtermcap"; \ + libsrcdir="$$s/libtermcap"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libtermcap maybe-all-target-libtermcap +maybe-all-target-libtermcap: +all-target-libtermcap: configure-target-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libtermcap maybe-check-target-libtermcap +maybe-check-target-libtermcap: + +# Dummy target for uncheckable module. +check-target-libtermcap: + + +.PHONY: install-target-libtermcap maybe-install-target-libtermcap +maybe-install-target-libtermcap: + +install-target-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-winsup maybe-configure-target-winsup +maybe-configure-target-winsup: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out + +configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out + @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/winsup; \ + cd "$(TARGET_SUBDIR)/winsup" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/winsup"; \ + libsrcdir="$$s/winsup"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-winsup maybe-all-target-winsup +maybe-all-target-winsup: +all-target-winsup: configure-target-winsup + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-winsup maybe-check-target-winsup +maybe-check-target-winsup: + +check-target-winsup: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-winsup maybe-install-target-winsup +maybe-install-target-winsup: + +install-target-winsup: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libgloss maybe-configure-target-libgloss +maybe-configure-target-libgloss: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out + +configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out + @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libgloss; \ + cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libgloss"; \ + libsrcdir="$$s/libgloss"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libgloss maybe-all-target-libgloss +maybe-all-target-libgloss: +all-target-libgloss: configure-target-libgloss + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libgloss maybe-check-target-libgloss +maybe-check-target-libgloss: + +# Dummy target for uncheckable module. +check-target-libgloss: + + +.PHONY: install-target-libgloss maybe-install-target-libgloss +maybe-install-target-libgloss: + +install-target-libgloss: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libiberty maybe-configure-target-libiberty +maybe-configure-target-libiberty: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out + +configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out + @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libiberty; \ + cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libiberty maybe-all-target-libiberty +maybe-all-target-libiberty: +all-target-libiberty: configure-target-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libiberty maybe-check-target-libiberty +maybe-check-target-libiberty: + +check-target-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libiberty maybe-install-target-libiberty +maybe-install-target-libiberty: + +install-target-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-gperf maybe-configure-target-gperf +maybe-configure-target-gperf: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out + +configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out + @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/gperf; \ + cd "$(TARGET_SUBDIR)/gperf" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/gperf"; \ + libsrcdir="$$s/gperf"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-gperf maybe-all-target-gperf +maybe-all-target-gperf: +all-target-gperf: configure-target-gperf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-gperf maybe-check-target-gperf +maybe-check-target-gperf: + +check-target-gperf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-gperf maybe-install-target-gperf +maybe-install-target-gperf: + +install-target-gperf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-examples maybe-configure-target-examples +maybe-configure-target-examples: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/examples/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out + +configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out + @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/examples; \ + cd "$(TARGET_SUBDIR)/examples" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/examples"; \ + libsrcdir="$$s/examples"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-examples maybe-all-target-examples +maybe-all-target-examples: +all-target-examples: configure-target-examples + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-examples maybe-check-target-examples +maybe-check-target-examples: + +# Dummy target for uncheckable module. +check-target-examples: + + +.PHONY: install-target-examples maybe-install-target-examples +maybe-install-target-examples: + +# Dummy target for uninstallable. +install-target-examples: + + +.PHONY: configure-target-libffi maybe-configure-target-libffi +maybe-configure-target-libffi: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out + +configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out + @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libffi; \ + cd "$(TARGET_SUBDIR)/libffi" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libffi"; \ + libsrcdir="$$s/libffi"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libffi maybe-all-target-libffi +maybe-all-target-libffi: +all-target-libffi: configure-target-libffi + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libffi maybe-check-target-libffi +maybe-check-target-libffi: + +check-target-libffi: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libffi maybe-install-target-libffi +maybe-install-target-libffi: + +install-target-libffi: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libjava maybe-configure-target-libjava +maybe-configure-target-libjava: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out + +configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out + @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libjava; \ + cd "$(TARGET_SUBDIR)/libjava" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libjava"; \ + libsrcdir="$$s/libjava"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libjava maybe-all-target-libjava +maybe-all-target-libjava: +all-target-libjava: configure-target-libjava + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libjava maybe-check-target-libjava +maybe-check-target-libjava: + +check-target-libjava: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libjava maybe-install-target-libjava +maybe-install-target-libjava: + +install-target-libjava: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-zlib maybe-configure-target-zlib +maybe-configure-target-zlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out + +configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/zlib; \ + cd "$(TARGET_SUBDIR)/zlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/zlib"; \ + libsrcdir="$$s/zlib"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-zlib maybe-all-target-zlib +maybe-all-target-zlib: +all-target-zlib: configure-target-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-zlib maybe-check-target-zlib +maybe-check-target-zlib: + +check-target-zlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-zlib maybe-install-target-zlib +maybe-install-target-zlib: + +install-target-zlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc +maybe-configure-target-boehm-gc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out + +configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out + @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \ + cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/boehm-gc"; \ + libsrcdir="$$s/boehm-gc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc +maybe-all-target-boehm-gc: +all-target-boehm-gc: configure-target-boehm-gc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc +maybe-check-target-boehm-gc: + +check-target-boehm-gc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc +maybe-install-target-boehm-gc: + +install-target-boehm-gc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-qthreads maybe-configure-target-qthreads +maybe-configure-target-qthreads: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out + +configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out + @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/qthreads; \ + cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/qthreads"; \ + libsrcdir="$$s/qthreads"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-qthreads maybe-all-target-qthreads +maybe-all-target-qthreads: +all-target-qthreads: configure-target-qthreads + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-qthreads maybe-check-target-qthreads +maybe-check-target-qthreads: + +check-target-qthreads: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-qthreads maybe-install-target-qthreads +maybe-install-target-qthreads: + +install-target-qthreads: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-rda maybe-configure-target-rda +maybe-configure-target-rda: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/rda/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out + +configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out + @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/rda; \ + cd "$(TARGET_SUBDIR)/rda" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/rda"; \ + libsrcdir="$$s/rda"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-rda maybe-all-target-rda +maybe-all-target-rda: +all-target-rda: configure-target-rda + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-rda maybe-check-target-rda +maybe-check-target-rda: + +check-target-rda: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-rda maybe-install-target-rda +maybe-install-target-rda: + +install-target-rda: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libada maybe-configure-target-libada +maybe-configure-target-libada: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libada/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out + +configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out + @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libada; \ + cd "$(TARGET_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libada maybe-all-target-libada +maybe-all-target-libada: +all-target-libada: configure-target-libada + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libada maybe-check-target-libada +maybe-check-target-libada: + +check-target-libada: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libada maybe-install-target-libada +maybe-install-target-libada: + +install-target-libada: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + + +# ---------- +# GCC module +# ---------- + +# Unfortunately, while gcc _should_ be a host module, +# libgcc is a target module, and gen* programs are +# build modules. So GCC is a sort of hybrid. + +# gcc is the only module which uses GCC_FLAGS_TO_PASS. +# Don't use shared host config.cache, as it will confuse later +# directories; GCC wants slightly different values for some +# precious variables. *sigh* +.PHONY: configure-gcc maybe-configure-gcc +maybe-configure-gcc: +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that +# causes trouble. This wart will be fixed eventually by moving +# the bootstrap behavior to this file. +.PHONY: all-gcc maybe-all-gcc +maybe-all-gcc: +all-gcc: configure-gcc + @if [ -f gcc/stage_last ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ + else \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ + fi + +# Building GCC uses some tools for rebuilding "source" files +# like texinfo, bison/byacc, etc. So we must depend on those. +# +# While building GCC, it may be necessary to run various target +# programs like the assembler, linker, etc. So we depend on +# those too. +# +# In theory, on an SMP all those dependencies can be resolved +# in parallel. +# +GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap +.PHONY: $(GCC_STRAP_TARGETS) +$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + case "$@" in \ + *bootstrap4-lean ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3-lean ;; \ + *bootstrap4 ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3 ;; \ + *-lean ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare-lean ;; \ + * ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare ;; \ + esac; \ + $(SET_LIB_PATH) \ + echo "$$msg"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + +profiledbootstrap: all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries and training compiler"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building feedback based compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build + +.PHONY: cross +cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building the C and C++ compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all + +.PHONY: check-gcc maybe-check-gcc +maybe-check-gcc: +check-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ + else \ + true; \ + fi + +.PHONY: check-gcc-c++ +check-gcc-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + else \ + true; \ + fi + +.PHONY: check-c++ +check-c++: check-target-libstdc++-v3 check-gcc-c++ + +.PHONY: install-gcc maybe-install-gcc +maybe-install-gcc: +install-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + else \ + true; \ + fi + +# Install the gcc headers files, but not the fixed include files, +# which Cygnus is not allowed to distribute. This rule is very +# dependent on the workings of the gcc Makefile.in. +.PHONY: gcc-no-fixedincludes +gcc-no-fixedincludes: + @if [ -f ./gcc/Makefile ]; then \ + rm -rf gcc/tmp-include; \ + mv gcc/include gcc/tmp-include 2>/dev/null; \ + mkdir gcc/include; \ + cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ + touch gcc/stmp-fixinc gcc/include/fixed; \ + rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + rm -rf gcc/include; \ + mv gcc/tmp-include gcc/include 2>/dev/null; \ + else true; fi + +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- + +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. +# GCC needs to identify certain tools. +# GCC also needs the information exported by the intl configure script. +configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex +all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty +all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. +# GDB needs to know that the simulator is being built. +configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim +GDB_TK = @GDB_TK@ +all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) +install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui +configure-libgui: maybe-configure-tcl maybe-configure-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl + +# Host modules specific to binutils. +configure-bfd: configure-libiberty +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +install-binutils: maybe-install-opcodes +# libopcodes depends on libbfd +install-opcodes: maybe-install-bfd +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty + +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +configure-expect: maybe-configure-tcl maybe-configure-tk +all-expect: maybe-all-tcl maybe-all-tk +configure-itcl: maybe-configure-tcl maybe-configure-tk +all-itcl: maybe-all-tcl maybe-all-tk +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. +install-itcl: maybe-install-tcl +all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb +configure-tk: maybe-configure-tcl +all-tk: maybe-all-tcl +configure-tix: maybe-configure-tcl maybe-configure-tk +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty + +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty maybe-all-intl +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-tar: maybe-all-libiberty +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libada: $(ALL_GCC_C) +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-rda: $(ALL_GCC_C) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) + +# Dependencies of maybe-foo on foo. These are used because, for example, +# all-gcc only depends on all-gas if gas is present and being configured. +@maybe_dependencies@ + +# Serialization dependencies. Host configures don't work well in parallel to +# each other, due to contention over config.cache. Target configures and +# build configures are similar. +@serialization_dependencies@ + +# -------------------------------- +# Regenerating top level configury +# -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# work around various timestamp bugs on some systems. +# We use move-if-change so that it's only considered updated when it +# actually changes, because it has to depend on a phony target. +multilib.out: maybe-all-gcc + @r=`${PWD_COMMAND}`; export r; \ + echo "Checking multilib configuration..."; \ + $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ + $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ + +# Rebuilding Makefile.in, using autogen. +AUTOGEN = autogen +$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def + cd $(srcdir) && $(AUTOGEN) Makefile.def + +# Rebuilding Makefile. +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: configure $(gcc_version_trigger) + CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck + +# Rebuilding configure. +AUTOCONF = autoconf +$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4 + cd $(srcdir) && $(AUTOCONF) + +# ------------------------------ +# Special directives to GNU Make +# ------------------------------ + +# Don't pass command-line variables to submakes. +.NOEXPORT: +MAKEOVERRIDES= + +# end of Makefile.in diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/00list /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/00list --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/00list 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/00list 2007-11-20 19:29:52.000000000 -0600 @@ -1,2 +1 @@ -01_task_info_to_stack.dpatch -02_spu_commands.dpatch +01_spu_commands.dpatch diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/01_spu_commands.dpatch /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/01_spu_commands.dpatch --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/01_spu_commands.dpatch 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/01_spu_commands.dpatch 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1046 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_spu_commands.dpatch by Kenneth Drake +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad crash-4.0-4.9-1ubuntu1~/Makefile crash-4.0-4.9-1ubuntu1/Makefile +--- crash-4.0-4.9-1ubuntu1~/Makefile 2007-11-20 18:53:17.000000000 -0600 ++++ crash-4.0-4.9-1ubuntu1/Makefile 2007-11-20 19:06:57.000000000 -0600 +@@ -136,7 +136,8 @@ + ${EXTENSIONS}/libsial/sial_var.c \ + ${EXTENSIONS}/libsial/sial.y \ + ${EXTENSIONS}/sial.c \ +- ${EXTENSIONS}/sial.mk ++ ${EXTENSIONS}/sial.mk \ ++ ${EXTENSIONS}/spu.c + + DAEMON_OBJECT_FILES=remote_daemon.o va_server.o va_server_v1.o \ + lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ +diff -urNad crash-4.0-4.9-1ubuntu1~/extensions/Makefile crash-4.0-4.9-1ubuntu1/extensions/Makefile +--- crash-4.0-4.9-1ubuntu1~/extensions/Makefile 2007-11-20 18:53:17.000000000 -0600 ++++ crash-4.0-4.9-1ubuntu1/extensions/Makefile 2007-11-20 19:02:42.000000000 -0600 +@@ -45,3 +45,7 @@ + @for MAKEFILE in `grep -sl "^clean:" *.mk`; \ + do make --no-print-directory -f $$MAKEFILE clean; \ + done ++ ++spu.so: ../defs.h spu.c ++ gcc -nostartfiles -shared -rdynamic -o spu.so spu.c -fPIC \ ++ -D$(TARGET) $(TARGET_CFLAGS) +diff -urNad crash-4.0-4.9-1ubuntu1~/extensions/spu.c crash-4.0-4.9-1ubuntu1/extensions/spu.c +--- crash-4.0-4.9-1ubuntu1~/extensions/spu.c 1969-12-31 18:00:00.000000000 -0600 ++++ crash-4.0-4.9-1ubuntu1/extensions/spu.c 2007-11-20 19:11:43.000000000 -0600 +@@ -0,0 +1,1011 @@ ++/* spu.c - commands for viewing Cell/B.E. SPUs data ++ * ++ * (C) Copyright 2007 IBM Corp. ++ * ++ * Author: Lucio Correia ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#include "defs.h" ++ ++#define NR_SPUS (16) /* Enough for current hardware */ ++#define MAX_PRIO (140) ++#define MAX_PROPERTY_NAME (64) ++#define STR_SPU_INVALID (0x0) ++#define STR_SPU_ID (0x1) ++#define STR_SPU_PID (0x2) ++#define STR_SPU_CTX_ADDR (0x8) ++ ++#define SPUCTX_CMD_NAME "spuctx" ++#define SPUS_CMD_NAME "spus" ++#define SPURQ_CMD_NAME "spurq" ++ ++struct cbe_size_table; ++struct cbe_offset_table; ++void init_cbe_size_table(void); ++void init_cbe_offset_table(void); ++ulong get_spu_addr(ulong spu_info); ++ ++void cmd_spus(void); ++void cmd_spurq(void); ++void cmd_spuctx(void); ++char *help_spus[]; ++char *help_spurq[]; ++void show_spu_state(ulong spu); ++void dump_spu_runq(ulong k_prio_array); ++char *help_spuctx[]; ++void show_ctx_info(ulong ctx_addr); ++void print_ctx_info(char *ctx_data, char *spu_data, int info); ++void show_ctx_info_all(void); ++ ++ ++static struct command_table_entry command_table[] = { ++ SPUCTX_CMD_NAME, cmd_spuctx, help_spuctx, 0, ++ SPUS_CMD_NAME, cmd_spus, help_spus, 0, ++ SPURQ_CMD_NAME, cmd_spurq, help_spurq, 0, ++ NULL ++}; ++ ++struct cbe_size_table { ++ long crash_spu_info; ++ long spu; ++ long spu_context; ++ long spu_prio_array; ++ long list_head; ++} cbe_size_table; ++ ++struct cbe_offset_table { ++ long crash_spu_info_spu; ++ long crash_spu_info_saved_mfc_sr1_RW; ++ long crash_spu_info_saved_mfc_dar; ++ long crash_spu_info_saved_mfc_dsisr; ++ long crash_spu_info_saved_spu_runcntl_RW; ++ long crash_spu_info_saved_spu_status_R; ++ long crash_spu_info_saved_spu_npc_RW; ++ ++ long spu_node; ++ long spu_number; ++ long spu_ctx; ++ long spu_pid; ++ long spu_name; ++ long spu_slb_replace; ++ long spu_mm; ++ long spu_timestamp; ++ long spu_class_0_pending; ++ long spu_problem; ++ long spu_priv2; ++ long spu_flags; ++ ++ long spu_context_spu; ++ long spu_context_state; ++ long spu_context_prio; ++ long spu_context_local_store; ++ long spu_context_rq; ++ ++ long spu_prio_array_runq; ++} cbe_offset_table; ++ ++#define CBE_SIZE(X) (cbe_size_table.X) ++#define CBE_OFFSET(X, Y) (cbe_offset_table.X##_##Y) ++ ++#define CBE_SIZE_INIT(X, Y) \ ++do { \ ++ cbe_size_table.X = STRUCT_SIZE(Y); \ ++ if (cbe_size_table.X == -1) \ ++ error(FATAL, "Couldn't get %s size.\n", Y); \ ++} while(0) ++ ++#define CBE_OFFSET_INIT(X, Y, Z) \ ++do { \ ++ cbe_offset_table.X = MEMBER_OFFSET(Y, Z); \ ++ if (cbe_offset_table.X == -1) \ ++ error(FATAL, "Couldn't get %s.%s offset.\n", Y, Z); \ ++} while(0) ++ ++ulong spu[NR_SPUS]; ++ ++/***************************************************************************** ++ * INIT FUNCTIONS ++ */ ++ ++/* ++ * Read kernel virtual addresses of crash_spu_info data stored by kdump ++ */ ++ ++void init_cbe_size_table(void) ++{ ++ CBE_SIZE_INIT(crash_spu_info, "crash_spu_info"); ++ CBE_SIZE_INIT(spu, "spu"); ++ CBE_SIZE_INIT(spu_context, "spu_context"); ++ CBE_SIZE_INIT(spu_prio_array, "spu_prio_array"); ++ CBE_SIZE_INIT(list_head, "list_head"); ++} ++ ++void init_cbe_offset_table(void) ++{ ++ CBE_OFFSET_INIT(crash_spu_info_spu, "crash_spu_info", "spu"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_mfc_sr1_RW, "crash_spu_info", ++ "saved_mfc_sr1_RW"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_mfc_dar, "crash_spu_info", ++ "saved_mfc_dar"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_mfc_dsisr, "crash_spu_info", ++ "saved_mfc_dsisr"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_spu_runcntl_RW, "crash_spu_info", ++ "saved_spu_runcntl_RW"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_spu_status_R, "crash_spu_info", ++ "saved_spu_status_R"); ++ CBE_OFFSET_INIT(crash_spu_info_saved_spu_npc_RW, "crash_spu_info", ++ "saved_spu_npc_RW"); ++ ++ CBE_OFFSET_INIT(spu_node, "spu", "node"); ++ CBE_OFFSET_INIT(spu_number, "spu", "number"); ++ CBE_OFFSET_INIT(spu_ctx, "spu", "ctx"); ++ CBE_OFFSET_INIT(spu_pid, "spu", "pid"); ++ CBE_OFFSET_INIT(spu_name, "spu", "name"); ++ CBE_OFFSET_INIT(spu_slb_replace, "spu", "slb_replace"); ++ CBE_OFFSET_INIT(spu_mm, "spu", "mm"); ++ CBE_OFFSET_INIT(spu_timestamp, "spu", "timestamp"); ++ CBE_OFFSET_INIT(spu_class_0_pending, "spu", "class_0_pending"); ++ CBE_OFFSET_INIT(spu_problem, "spu", "problem"); ++ CBE_OFFSET_INIT(spu_priv2, "spu", "priv2"); ++ CBE_OFFSET_INIT(spu_flags, "spu", "flags"); ++ ++ CBE_OFFSET_INIT(spu_context_spu, "spu_context", "spu"); ++ CBE_OFFSET_INIT(spu_context_state, "spu_context", "state"); ++ CBE_OFFSET_INIT(spu_context_prio, "spu_context", "prio"); ++ CBE_OFFSET_INIT(spu_context_local_store, "spu_context", "local_store"); ++ CBE_OFFSET_INIT(spu_context_rq, "spu_context", "rq"); ++ ++ CBE_OFFSET_INIT(spu_prio_array_runq, "spu_prio_array", "runq"); ++} ++ ++void get_crash_spu_info(void) ++{ ++ int i; ++ ulong addr; ++ long struct_size; ++ ++ addr = symbol_value("crash_spu_info"); ++ struct_size = CBE_SIZE(crash_spu_info); ++ ++ for (i = 0; i < NR_SPUS; i++) ++ spu[i] = addr + (i * struct_size); ++} ++ ++_init() ++{ ++ int i, n_registered; ++ struct command_table_entry *cte; ++ ++ init_cbe_size_table(); ++ init_cbe_offset_table(); ++ ++ for (i = 0; i < NR_SPUS; i++) ++ spu[i] = 0; ++ ++ register_extension(command_table); ++ ++ get_crash_spu_info(); ++} ++ ++ ++_fini() { } ++ ++ ++ ++/***************************************************************************** ++ * BASIC FUNCTIONS ++ */ ++ ++ ++/* ++ * Returns a pointer to the requested SPU field ++ */ ++ulong get_spu_addr(ulong spu_info) ++{ ++ ulong spu_addr; ++ ++ readmem(spu_info + CBE_OFFSET(crash_spu_info, spu), KVADDR, &spu_addr, ++ sizeof(spu_addr), "get_spu_addr", FAULT_ON_ERROR); ++ ++ return spu_addr; ++} ++ ++ ++/***************************************************************************** ++ * SPUCTX COMMAND ++ */ ++ ++#define DUMP_WIDTH 23 ++#define DUMP_SPU_NAME \ ++do { \ ++ fprintf(fp, " %-*s = %s\n", DUMP_WIDTH, "name", name_str); \ ++} while(0) ++ ++#define DUMP_SPU_FIELD(format, field, cast) \ ++do { \ ++ offset = CBE_OFFSET(spu, field); \ ++ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ ++ cast(spu_data + offset)); \ ++} while(0) ++ ++#define DUMP_CTX_FIELD(format, field, cast) \ ++do { \ ++ offset = CBE_OFFSET(spu_context, field); \ ++ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ ++ cast(ctx_data + offset)); \ ++} while(0) ++ ++#define DUMP_DBG_FIELD(format, field, cast) \ ++do { \ ++ offset = CBE_OFFSET(crash_spu_info, field); \ ++ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ ++ cast(debug_data + offset)); \ ++} while(0) ++ ++/* ++ * Print the spu and spu_context structs fields. Some SPU memory-mapped IO ++ * registers are taken directly from crash_spu_info. ++ */ ++void print_ctx_info(char *ctx_data, char *spu_data, int info) ++{ ++ long offset, size; ++ char *name_str, *debug_data; ++ ++ DUMP_CTX_FIELD("%d", state, *(int *)); ++ DUMP_CTX_FIELD("%d", prio, *(int *)); ++ DUMP_CTX_FIELD("%p", local_store, *(ulong *)); ++ DUMP_CTX_FIELD("%p", rq, *(ulong *)); ++ ++ if (spu_data) { ++ offset = CBE_OFFSET(spu, name); ++ size = MAX_PROPERTY_NAME * sizeof(char); ++ name_str = (char *)GETBUF(size); ++ readmem(*(ulong *)(spu_data + offset), KVADDR, name_str, size, ++ "name_str", FAULT_ON_ERROR); ++ DUMP_SPU_NAME; ++ FREEBUF(name_str); ++ ++ DUMP_SPU_FIELD("%d", node, *(int *)); ++ DUMP_SPU_FIELD("%d", number, *(int *)); ++ DUMP_SPU_FIELD("%d", pid, *(int *)); ++ DUMP_SPU_FIELD("0x%x", slb_replace, *(unsigned int *)); ++ DUMP_SPU_FIELD("%p", mm, *(ulong *)); ++ DUMP_SPU_FIELD("%p", timestamp, *(long long *)); ++ DUMP_SPU_FIELD("%d", class_0_pending, *(int *)); ++ DUMP_SPU_FIELD("%p", problem, *(ulong *)); ++ DUMP_SPU_FIELD("%p", priv2, *(ulong *)); ++ DUMP_SPU_FIELD("0x%lx", flags, *(ulong *)); ++ ++ size = CBE_SIZE(crash_spu_info); ++ debug_data = (char *)GETBUF(size); ++ readmem(spu[info], KVADDR, debug_data, size, "debug_data", ++ FAULT_ON_ERROR); ++ ++ DUMP_DBG_FIELD("0x%lx", saved_mfc_sr1_RW, *(ulong *)); ++ DUMP_DBG_FIELD("0x%lx", saved_mfc_dar, *(ulong *)); ++ DUMP_DBG_FIELD("0x%lx", saved_mfc_dsisr, *(ulong *)); ++ DUMP_DBG_FIELD("0x%x", saved_spu_runcntl_RW, *(uint *)); ++ DUMP_DBG_FIELD("0x%x", saved_spu_status_R, *(uint *)); ++ DUMP_DBG_FIELD("0x%x", saved_spu_npc_RW, *(uint *)); ++ ++ FREEBUF(debug_data); ++ } ++} ++ ++ ++/* ++ * Pass ctx and respective spu data to print_ctx_info for the contexts in ++ * ctx_addr list (chosen contexts). ++ */ ++void show_ctx_info(ulong ctx_addr) ++{ ++ int number, info, i; ++ char *ctx_data, *spu_data; ++ long size, offset; ++ ulong spu_addr, addr; ++ ++ spu_data = NULL; ++ info = 0; ++ ++ size = CBE_SIZE(spu_context); ++ ctx_data = GETBUF(size); ++ if (!ctx_data) ++ error(FATAL, "Couldn't allocate memory for ctx.\n"); ++ readmem(ctx_addr, KVADDR, ctx_data, size, "show_ctx_info ctx", ++ FAULT_ON_ERROR); ++ ++ spu_addr = *(ulong *)(ctx_data + CBE_OFFSET(spu_context, spu)); ++ ++ if (spu_addr) { ++ size = CBE_SIZE(spu); ++ spu_data = GETBUF(size); ++ if (!spu_data) ++ error(FATAL, "Couldn't allocate memory for spu.\n"); ++ readmem(spu_addr, KVADDR, spu_data, size, "show_ctx_info spu", ++ FAULT_ON_ERROR); ++ ++ for (i = 0; i < NR_SPUS; i++) { ++ readmem(spu[i], KVADDR, &addr, sizeof(addr), "spu addr", ++ FAULT_ON_ERROR); ++ if (addr == spu_addr) ++ info = i; ++ } ++ } ++ ++ fprintf(fp,"\nDumping context fields for spu_context %lx:\n", ctx_addr); ++ print_ctx_info(ctx_data, spu_data, info); ++ ++ FREEBUF(ctx_data); ++ if (spu_addr) ++ FREEBUF(spu_data); ++} ++ ++/* ++ * Pass ctx and respective spu data to show_ctx_info for all the contexts ++ * running and on the runqueue. ++ */ ++void show_ctx_info_all(void) ++{ ++ int i, j, cnt; ++ long prio_size, prio_runq_off, ctx_rq_off, jump, offset, ctxs_size; ++ char *u_spu_prio; ++ ulong spu_prio_addr, k_spu_prio, kvaddr, uvaddr, addr, ctx; ++ ulong *ctxs; ++ ulong list_head[2]; ++ struct list_data list_data, *ld; ++ ++ /* Walking SPUs */ ++ for (i = 0; i < NR_SPUS; i++) { ++ addr = get_spu_addr(spu[i]) + CBE_OFFSET(spu, ctx); ++ readmem(addr, KVADDR, &ctx, sizeof(ctx), "show_ctx_info_all", ++ FAULT_ON_ERROR); ++ show_ctx_info(ctx); ++ } ++ ++ /* Walking SPU runqueue */ ++ if (symbol_exists("spu_prio")) { ++ spu_prio_addr = symbol_value("spu_prio"); ++ readmem(spu_prio_addr, KVADDR, &k_spu_prio, sizeof(k_spu_prio), ++ "runq_array", FAULT_ON_ERROR); ++ } ++ else ++ error(FATAL, "Could not get SPU run queue data.\n"); ++ ++ jump = CBE_SIZE(list_head); ++ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); ++ ctx_rq_off = CBE_OFFSET(spu_context, rq); ++ prio_size = CBE_SIZE(spu_prio_array); ++ ++ u_spu_prio = (char *)GETBUF(prio_size); ++ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, "get_runq_ctxs", ++ FAULT_ON_ERROR); ++ ++ for (i = 0; i < MAX_PRIO; i++) { ++ offset = prio_runq_off + i * jump; ++ kvaddr = k_spu_prio + offset; ++ uvaddr = (ulong)u_spu_prio + offset; ++ ++ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); ++ ++ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) ++ continue; ++ ++ ld = &list_data; ++ ++ BZERO(ld, sizeof(struct list_data)); ++ ld->start = list_head[0]; ++ ld->list_head_offset = ctx_rq_off; ++ ld->flags |= RETURN_ON_LIST_ERROR; ++ ld->end = kvaddr; ++ ++ hq_open(); ++ cnt = do_list(ld); ++ if (cnt == -1) { ++ hq_close(); ++ FREEBUF(u_spu_prio); ++ error(FATAL, "Couldn't walk the list.\n"); ++ } ++ ++ ctxs_size = cnt * sizeof(ulong); ++ ctxs = (ulong *)GETBUF(ctxs_size); ++ ++ BZERO(ctxs, ctxs_size); ++ cnt = retrieve_list(ctxs, cnt); ++ hq_close(); ++ ++ for (j = 0; j < cnt; j++) ++ show_ctx_info(ctxs[j]); ++ ++ FREEBUF(ctxs); ++ } ++ ++ FREEBUF(u_spu_prio); ++} ++ ++/* ++ * Tries to discover the meaning of string and to find the referred context ++ */ ++int str_to_spuctx(char *string, ulong *value, ulong *spu_ctx) ++{ ++ char *s, *u_spu_prio; ++ ulong dvalue, hvalue, addr, ctx; ++ ulong k_spu_prio, spu_prio_addr, kvaddr, uvaddr; ++ int type, pid, i, j, cnt; ++ long prio_size, prio_runq_off, ctx_rq_off, jump, offset, ctxs_size; ++ ulong *ctxs; ++ ulong list_head[2]; ++ struct list_data list_data, *ld; ++ ++ if (string == NULL) { ++ error(INFO, "%s: received NULL string.\n", __FUNCTION__); ++ return STR_SPU_INVALID; ++ } ++ ++ s = string; ++ dvalue = hvalue = BADADDR; ++ ++ if (decimal(s, 0)) ++ dvalue = dtol(s, RETURN_ON_ERROR, NULL); ++ ++ if (hexadecimal(s, 0)) { ++ if (STRNEQ(s, "0x") || STRNEQ(s, "0X")) ++ s += 2; ++ if (strlen(s) <= MAX_HEXADDR_STRLEN) ++ hvalue = htol(s, RETURN_ON_ERROR, NULL); ++ } ++ ++ type = STR_SPU_INVALID; ++ ++ if (dvalue != BADADDR) { ++ /* Testing for SPU ID */ ++ if ((dvalue >= 0) && (dvalue < NR_SPUS)) { ++ addr = get_spu_addr(spu[dvalue]) + CBE_OFFSET(spu, ctx); ++ readmem(addr, KVADDR, &ctx, sizeof(ctx), ++ "str_to_spuctx ID", FAULT_ON_ERROR); ++ ++ type = STR_SPU_ID; ++ *value = dvalue; ++ *spu_ctx = ctx; ++ return type; ++ } ++ else { ++ /* Testing for PID */ ++ for (i = 0; i < NR_SPUS; i++) { ++ addr = get_spu_addr(spu[i]) + ++ CBE_OFFSET(spu, pid); ++ readmem(addr, KVADDR, &pid, sizeof(pid), ++ "str_to_spuctx PID", FAULT_ON_ERROR); ++ ++ if (dvalue == pid) { ++ addr = get_spu_addr(spu[i]) + ++ CBE_OFFSET(spu, ctx); ++ readmem(addr, KVADDR, &ctx, sizeof(ctx), ++ "str_to_spuctx PID ctx", ++ FAULT_ON_ERROR); ++ ++ type = STR_SPU_PID; ++ *value = dvalue; ++ *spu_ctx = ctx; ++ return type; ++ } ++ } ++ } ++ } ++ ++ if (hvalue != BADADDR) { ++ /* Testing for spuctx address on SPUs */ ++ for (i = 0; i < NR_SPUS; i++) { ++ addr = get_spu_addr(spu[i]) + CBE_OFFSET(spu, ctx); ++ readmem(addr, KVADDR, &ctx, sizeof(ctx), ++ "str_to_spuctx CTX", FAULT_ON_ERROR); ++ ++ if (hvalue == ctx) { ++ type = STR_SPU_CTX_ADDR; ++ *value = hvalue; ++ *spu_ctx = ctx; ++ return type; ++ } ++ } ++ ++ /* Testing for spuctx address on SPU runqueue */ ++ if (symbol_exists("spu_prio")) { ++ spu_prio_addr = symbol_value("spu_prio"); ++ readmem(spu_prio_addr, KVADDR, &k_spu_prio, ++ sizeof(k_spu_prio), "runq_array", FAULT_ON_ERROR); ++ } ++ else ++ error(FATAL, "Could not get SPU run queue data.\n"); ++ ++ jump = CBE_SIZE(list_head); ++ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); ++ ctx_rq_off = CBE_OFFSET(spu_context, rq); ++ prio_size = CBE_SIZE(spu_prio_array); ++ ++ u_spu_prio = (char *)GETBUF(prio_size); ++ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, ++ "get_runq_ctxs", FAULT_ON_ERROR); ++ ++ for (i = 0; i < MAX_PRIO; i++) { ++ offset = prio_runq_off + i * jump; ++ kvaddr = k_spu_prio + offset; ++ uvaddr = (ulong)u_spu_prio + offset; ++ ++ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); ++ ++ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) ++ continue; ++ ++ ld = &list_data; ++ ++ BZERO(ld, sizeof(struct list_data)); ++ ld->start = list_head[0]; ++ ld->list_head_offset = ctx_rq_off; ++ ld->flags |= RETURN_ON_LIST_ERROR; ++ ld->end = kvaddr; ++ ++ hq_open(); ++ cnt = do_list(ld); ++ if (cnt == -1) { ++ hq_close(); ++ FREEBUF(u_spu_prio); ++ error(FATAL, "Couldn't walk the list.\n"); ++ } ++ ++ ctxs_size = cnt * sizeof(ulong); ++ ctxs = (ulong *)GETBUF(ctxs_size); ++ ++ BZERO(ctxs, ctxs_size); ++ cnt = retrieve_list(ctxs, cnt); ++ hq_close(); ++ ++ for (j = 0; j < cnt; j++) ++ if (hvalue == ctxs[j]) { ++ type = STR_SPU_CTX_ADDR; ++ *value = hvalue; ++ *spu_ctx = ctxs[j]; ++ FREEBUF(u_spu_prio); ++ FREEBUF(ctxs); ++ return type; ++ } ++ ++ FREEBUF(ctxs); ++ } ++ ++ FREEBUF(u_spu_prio); ++ } ++ ++ return type; ++} ++ ++/* ++ * spuctx command stands for "spu context" and shows the context fields ++ * for the spu or respective struct address passed as an argument ++ */ ++void cmd_spuctx() ++{ ++ int i, c, cnt; ++ ulong value, ctx; ++ ulong *ctxlist; ++ ++ while ((c = getopt(argcnt, args, "")) != EOF) { ++ switch(c) ++ { ++ default: ++ argerrs++; ++ break; ++ } ++ } ++ ++ if (argerrs) ++ cmd_usage(pc->curcmd, SYNOPSIS); ++ ++ if (!args[optind]) { ++ show_ctx_info_all(); ++ return; ++ } ++ ++ cnt = 0; ++ ctxlist = (ulong *)GETBUF((MAXARGS+NR_CPUS)*sizeof(ctx)); ++ ++ while (args[optind]) { ++ if (IS_A_NUMBER(args[optind])) { ++ switch (str_to_spuctx(args[optind], &value, &ctx)) ++ { ++ case STR_SPU_ID: ++ case STR_SPU_PID: ++ case STR_SPU_CTX_ADDR: ++ ctxlist[cnt++] = ctx; ++ break; ++ ++ case STR_SPU_INVALID: ++ error(INFO, "Invalid SPU reference: %s\n", ++ args[optind]); ++ break; ++ } ++ } ++ else ++ error(INFO, "Invalid SPU reference: %s\n", ++ args[optind]); ++ optind++; ++ } ++ ++ if (cnt == 0) ++ error(INFO, "No valid ID, PID or context address.\n"); ++ else ++ for (i = 0; i < cnt; i++) ++ show_ctx_info(ctxlist[i]); ++ ++ FREEBUF(ctxlist); ++} ++ ++ ++/***************************************************************************** ++ * SPUS COMMAND ++ */ ++ ++void print_spu_header(ulong spu_info) ++{ ++ int id, pid, size, state; ++ uint status; ++ ulong ctx_addr, spu_addr; ++ char *spu_data; ++ const char *state_str; ++ ++ if (spu_info) { ++ readmem(spu_info + CBE_OFFSET(crash_spu_info, ++ saved_spu_status_R), KVADDR, &status, sizeof(status), ++ "print_spu_header: get status", FAULT_ON_ERROR); ++ ++ size = CBE_SIZE(spu); ++ spu_data = GETBUF(size); ++ spu_addr = get_spu_addr(spu_info); ++ readmem(spu_addr, KVADDR, spu_data, size, "SPU struct", ++ FAULT_ON_ERROR); ++ ++ id = *(int *)(spu_data + CBE_OFFSET(spu, number)); ++ ctx_addr = *(ulong *)(spu_data + CBE_OFFSET(spu, ctx)); ++ pid = *(int *)(spu_data + CBE_OFFSET(spu, pid)); ++ ++ readmem(ctx_addr + CBE_OFFSET(spu_context, state), KVADDR, ++ &state, sizeof(state), "print_spu_header get ctxstate", ++ FAULT_ON_ERROR); ++ ++ switch (state) { ++ case 0: /* SPU_STATE_RUNNABLE */ ++ state_str = "RUNNABLE"; ++ break; ++ ++ case 1: /* SPU_STATE_SAVED */ ++ state_str = " SAVED "; ++ break; ++ ++ default: ++ state_str = "UNKNOWN "; ++ } ++ ++ fprintf(fp, "%2d %16lx %s %16lx %s %5d\n", id, ++ spu_addr, ++ status % 2 ? "RUNNING" : (ctx_addr ? "STOPPED" : " IDLE "), ++ ctx_addr, state_str, pid); ++ ++ FREEBUF(spu_data); ++ } ++} ++ ++void print_node_header(int node) ++{ ++ fprintf(fp, "\n"); ++ fprintf(fp, "NODE %i:\n", node); ++ fprintf(fp, "ID SPUADDR SPUSTATUS CTXADDR \ ++CTXSTATE PID \n"); ++} ++ ++void show_spus() ++{ ++ int i, j, nr_cpus, show_header, node; ++ ulong spu_addr, addr; ++ long offset; ++ ++ nr_cpus = kt->kernel_NR_CPUS ? kt->kernel_NR_CPUS : NR_CPUS; ++ ++ for (i = 0; i < nr_cpus; i++) { ++ show_header = TRUE; ++ ++ for (j = 0; j < NR_SPUS; j++) { ++ addr = spu[j] + CBE_OFFSET(crash_spu_info, spu); ++ readmem(addr, KVADDR, &spu_addr, sizeof(spu_addr), ++ "show_spus spu_addr", FAULT_ON_ERROR); ++ ++ offset = CBE_OFFSET(spu, node); ++ if (offset == -1) ++ error(FATAL, "Couldn't get spu.node offset.\n"); ++ ++ spu_addr += offset; ++ readmem(spu_addr, KVADDR, &node, sizeof(node), ++ "show_spus node", FAULT_ON_ERROR); ++ ++ if (node == i) { ++ if (show_header) { ++ print_node_header(node); ++ show_header = FALSE; ++ } ++ ++ print_spu_header(spu[j]); ++ } ++ } ++ } ++} ++ ++/* ++ * spus stands for "spu state" and shows what contexts are running in what ++ * SPU. ++ */ ++void cmd_spus() ++{ ++ int c; ++ ++ while ((c = getopt(argcnt, args, "")) != EOF) { ++ switch(c) ++ { ++ default: ++ argerrs++; ++ break; ++ } ++ } ++ ++ if (argerrs || args[optind]) ++ cmd_usage(pc->curcmd, SYNOPSIS); ++ else ++ show_spus(); ++} ++ ++ ++/***************************************************************************** ++ * SPURQ COMMAND ++ */ ++ ++/* ++ * Prints the addresses of SPU contexts on the SPU runqueue. ++ */ ++void dump_spu_runq(ulong k_spu_prio) ++{ ++ int i, cnt; ++ long prio_size, prio_runq_off, ctx_rq_off, jump, offset; ++ char *u_spu_prio; ++ ulong kvaddr, uvaddr; ++ ulong list_head[2]; ++ struct list_data list_data, *ld; ++ ++ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); ++ jump = CBE_SIZE(list_head); ++ ctx_rq_off = CBE_OFFSET(spu_context, rq); ++ prio_size = CBE_SIZE(spu_prio_array); ++ ++ u_spu_prio = (char *)GETBUF(prio_size); ++ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, "get_runq_ctxs", ++ FAULT_ON_ERROR); ++ ++ for (i = 0; i < MAX_PRIO; i++) { ++ offset = prio_runq_off + (i * jump); ++ kvaddr = k_spu_prio + offset; ++ uvaddr = (ulong)u_spu_prio + offset; ++ ++ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); ++ ++ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) ++ continue; ++ ++ fprintf(fp, "PRIO[%i]:\n", i); ++ ++ ld = &list_data; ++ ++ BZERO(ld, sizeof(struct list_data)); ++ ld->start = list_head[0]; ++ ld->list_head_offset = ctx_rq_off; ++ ld->flags |= VERBOSE; ++ ld->end = kvaddr; ++ ++ hq_open(); ++ cnt = do_list(ld); ++ hq_close(); ++ ++ if (cnt == -1) { ++ FREEBUF(u_spu_prio); ++ error(FATAL, "Couldn't walk runqueue[%i].\n", i); ++ } ++ } ++ ++ FREEBUF(u_spu_prio); ++} ++ ++/* ++ * spurq stands for "spu run queue" and shows info about the contexts ++ * that are on the SPU run queue ++ */ ++void cmd_spurq() ++{ ++ int c; ++ ulong spu_prio_addr, spu_prio; ++ long size; ++ ++ while ((c = getopt(argcnt, args, "")) != EOF) { ++ switch(c) ++ { ++ default: ++ argerrs++; ++ break; ++ } ++ } ++ ++ if (argerrs || args[optind]) ++ cmd_usage(pc->curcmd, SYNOPSIS); ++ else { ++ if (symbol_exists("spu_prio")) { ++ spu_prio_addr = symbol_value("spu_prio"); ++ readmem(spu_prio_addr, KVADDR, &spu_prio, ++ sizeof(spu_prio), "runq_array", FAULT_ON_ERROR); ++ dump_spu_runq(spu_prio); ++ } else ++ error(FATAL, "Could not get SPU run queue data.\n"); ++ } ++} ++ ++/********************************************************************************** ++ * HELP TEXTS ++ */ ++ ++char *help_spuctx[] = { ++ SPUCTX_CMD_NAME, ++ "shows complete info about a SPU context", ++ "[ID | PID | CTXADDR] ...", ++ ++ " This command shows the fields of spu and spu_context structs for a ", ++ "SPU context, including debug info specially saved by kdump after a ", ++ "crash.", ++ " By default, it shows info about all the contexts created by the ", ++ "system, including ones in the runqueue. To specify the contexts of ", ++ "interest, the PID of the controller task, ID of the SPU which the ", ++ "context is bound to or the address of spu_context struct can be used ", ++ "as parameters.", ++ "\nEXAMPLES", ++ "\n Show info about contexts bound to SPUs 0 and 7, and the one ", ++ "controlled by thread whose PID is 1524:", ++ "\n crash> spuctx 0 7 1524", ++ "\n Dumping context fields for spu_context c00000003dcbdd80:", ++ " state = 0", ++ " prio = 120", ++ " local_store = 0xc000000039055840", ++ " rq = 0xc00000003dcbe720", ++ " node = 0", ++ " number = 0", ++ " pid = 1524", ++ " name = spe", ++ " slb_replace = 0", ++ " mm = 0xc0000000005dd700", ++ " timestamp = 0x10000566f", ++ " class_0_pending = 0", ++ " problem = 0xd000080080210000", ++ " priv2 = 0xd000080080230000", ++ " flags = 0", ++ " saved_mfc_sr1_RW = 59", ++ " saved_mfc_dar = 14987979559889612800", ++ " saved_mfc_dsisr = 0", ++ " saved_spu_runcntl_RW = 1", ++ " saved_spu_status_R = 1", ++ " saved_spu_npc_RW = 0", ++ "\n Dumping context fields for spu_context c00000003dec4e80:", ++ " state = 0", ++ " prio = 120", ++ " local_store = 0xc00000003b1cea40", ++ " rq = 0xc00000003dec5820", ++ " node = 0", ++ " number = 7", ++ " pid = 1538", ++ " name = spe", ++ " slb_replace = 0", ++ " mm = 0xc0000000005d2b80", ++ " timestamp = 0x10000566f", ++ " class_0_pending = 0", ++ " problem = 0xd000080080600000", ++ " priv2 = 0xd000080080620000", ++ " flags = 0", ++ " saved_mfc_sr1_RW = 59", ++ " saved_mfc_dar = 14987979559896297472", ++ " saved_mfc_dsisr = 0", ++ " saved_spu_runcntl_RW = 1", ++ " saved_spu_status_R = 1", ++ " saved_spu_npc_RW = 0", ++ "\n Dumping context fields for spu_context c00000003dcbdd80:", ++ " state = 0", ++ " prio = 120", ++ " local_store = 0xc000000039055840", ++ " rq = 0xc00000003dcbe720", ++ " node = 0", ++ " number = 0", ++ " pid = 1524", ++ " name = spe", ++ " slb_replace = 0", ++ " mm = 0xc0000000005dd700", ++ " timestamp = 0x10000566f", ++ " class_0_pending = 0", ++ " problem = 0xd000080080210000", ++ " priv2 = 0xd000080080230000", ++ " flags = 0", ++ " saved_mfc_sr1_RW = 59", ++ " saved_mfc_dar = 14987979559889612800", ++ " saved_mfc_dsisr = 0", ++ " saved_spu_runcntl_RW = 1", ++ " saved_spu_status_R = 1", ++ " saved_spu_npc_RW = 0", ++ ++ "\n Show info about the context whose struct spu_context address is ", ++ "0xc00000003dcbed80:\n", ++ "crash> spuctx 0x00000003dcbed80", ++ " ...", ++ NULL ++}; ++ ++ ++char *help_spus[] = { ++ SPUS_CMD_NAME, ++ "shows how contexts are scheduled in the SPUs", ++ " ", ++ " This command shows how the contexts are scheduled in the SPUs of ", ++ "each node. It provides info about the spu address, SPU status, the ", ++ "spu_context address, context state and spu_context addresses and the ", ++ "PID of controller thread for each SPU.", ++ "\nEXAMPLE", ++ " Show SPU contexts:", ++ "\n crash> spus", ++ " NODE 0:", ++ " ID SPUADDR SPUSTATUS CTXADDR CTXSTATE PID ", ++ " 0 c000000001fac880 RUNNING c00000003dcbdd80 RUNNABLE 1524", ++ " 1 c000000001faca80 RUNNING c00000003bf34e00 RUNNABLE 1528", ++ " 2 c000000001facc80 RUNNING c00000003bf30e00 RUNNABLE 1525", ++ " 3 c000000001face80 RUNNING c000000039421d00 RUNNABLE 1533", ++ " 4 c00000003ee29080 RUNNING c00000003dec3e80 RUNNABLE 1534", ++ " 5 c00000003ee28e80 RUNNING c00000003bf32e00 RUNNABLE 1526", ++ " 6 c00000003ee28c80 STOPPED c000000039e5e700 SAVED 1522", ++ " 7 c00000003ee2e080 RUNNING c00000003dec4e80 RUNNABLE 1538", ++ "\n NODE 1:", ++ " ID SPUADDR SPUSTATUS CTXADDR CTXSTATE PID ", ++ " 8 c00000003ee2de80 RUNNING c00000003dcbed80 RUNNABLE 1529", ++ " 9 c00000003ee2dc80 RUNNING c00000003bf39e00 RUNNABLE 1535", ++ " 10 c00000003ee2da80 RUNNING c00000003bf3be00 RUNNABLE 1521", ++ " 11 c000000001fad080 RUNNING c000000039420d00 RUNNABLE 1532", ++ " 12 c000000001fad280 RUNNING c00000003bf3ee00 RUNNABLE 1536", ++ " 13 c000000001fad480 RUNNING c00000003dec2e80 RUNNABLE 1539", ++ " 14 c000000001fad680 RUNNING c00000003bf3ce00 RUNNABLE 1537", ++ " 15 c000000001fad880 RUNNING c00000003dec6e80 RUNNABLE 1540", ++ NULL ++}; ++ ++ ++char *help_spurq[] = { ++ SPURQ_CMD_NAME, ++ "shows contexts on the SPU runqueue", ++ " ", ++ " This command shows info about all contexts waiting for execution ", ++ "in the SPU runqueue. No parameter is needed.", ++ "\nEXAMPLE", ++ " Show SPU runqueue:", ++ "\n crash> spurq", ++ " PRIO[120]:", ++ " c000000000fd7380", ++ " c00000003bf31e00", ++ " PRIO[125]:", ++ " c000000039422d00", ++ " c00000000181eb80", ++ NULL ++}; ++ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/01_task_info_to_stack.dpatch /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/01_task_info_to_stack.dpatch --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/01_task_info_to_stack.dpatch 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/01_task_info_to_stack.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,29 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 01_task_info_to_stack.dpatch by Troy Heber -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad crash-4.0-4.1~/task.c crash-4.0-4.1/task.c ---- crash-4.0-4.1~/task.c 2007-04-26 14:45:59.000000000 -0600 -+++ crash-4.0-4.1/task.c 2007-05-24 13:01:56.000000000 -0600 -@@ -160,8 +160,16 @@ - get_idle_threads(&tt->idle_threads[0], kt->cpus); - } - -- MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", -- "thread_info"); -+ -+ if (MEMBER_EXISTS("task_struct", "thread_info")) -+ MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", -+ "thread_info"); -+ else if (MEMBER_EXISTS("task_struct", "stack")) -+ MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", -+ "stack"); -+ else -+ ASSIGN_OFFSET(task_struct_thread_info) = INVALID_OFFSET; -+ - if (VALID_MEMBER(task_struct_thread_info)) { - MEMBER_OFFSET_INIT(thread_info_task, "thread_info", "task"); - MEMBER_OFFSET_INIT(thread_info_cpu, "thread_info", "cpu"); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/02_spu_commands.dpatch /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/02_spu_commands.dpatch --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/patches/02_spu_commands.dpatch 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/patches/02_spu_commands.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,1047 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 02_spu_commands.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -Nurp crash-4.0-4.3.orig/extensions/Makefile crash-4.0-4.3/extensions/Makefile ---- crash-4.0-4.3.orig/extensions/Makefile 2007-06-22 15:49:16.000000000 -0300 -+++ crash-4.0-4.3/extensions/Makefile 2007-06-28 13:37:27.000000000 -0300 -@@ -41,3 +41,6 @@ dminfo.so: ../defs.h dminfo.c - gcc -nostartfiles -shared -rdynamic -o dminfo.so dminfo.c -fPIC \ - -D$(TARGET) $(TARGET_CFLAGS) - -+spu.so: ../defs.h spu.c -+ gcc -nostartfiles -shared -rdynamic -o spu.so spu.c -fPIC \ -+ -D$(TARGET) $(TARGET_CFLAGS) -diff -Nurp crash-4.0-4.3.orig/extensions/spu.c crash-4.0-4.3/extensions/spu.c ---- crash-4.0-4.3.orig/extensions/spu.c 1969-12-31 21:00:00.000000000 -0300 -+++ crash-4.0-4.3/extensions/spu.c 2007-06-29 17:18:32.000000000 -0300 -@@ -0,0 +1,1011 @@ -+/* spu.c - commands for viewing Cell/B.E. SPUs data -+ * -+ * (C) Copyright 2007 IBM Corp. -+ * -+ * Author: Lucio Correia -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+ -+#include "defs.h" -+ -+#define NR_SPUS (16) /* Enough for current hardware */ -+#define MAX_PRIO (140) -+#define MAX_PROPERTY_NAME (64) -+#define STR_SPU_INVALID (0x0) -+#define STR_SPU_ID (0x1) -+#define STR_SPU_PID (0x2) -+#define STR_SPU_CTX_ADDR (0x8) -+ -+#define SPUCTX_CMD_NAME "spuctx" -+#define SPUS_CMD_NAME "spus" -+#define SPURQ_CMD_NAME "spurq" -+ -+struct cbe_size_table; -+struct cbe_offset_table; -+void init_cbe_size_table(void); -+void init_cbe_offset_table(void); -+ulong get_spu_addr(ulong spu_info); -+ -+void cmd_spus(void); -+void cmd_spurq(void); -+void cmd_spuctx(void); -+char *help_spus[]; -+char *help_spurq[]; -+void show_spu_state(ulong spu); -+void dump_spu_runq(ulong k_prio_array); -+char *help_spuctx[]; -+void show_ctx_info(ulong ctx_addr); -+void print_ctx_info(char *ctx_data, char *spu_data, int info); -+void show_ctx_info_all(void); -+ -+ -+static struct command_table_entry command_table[] = { -+ SPUCTX_CMD_NAME, cmd_spuctx, help_spuctx, 0, -+ SPUS_CMD_NAME, cmd_spus, help_spus, 0, -+ SPURQ_CMD_NAME, cmd_spurq, help_spurq, 0, -+ NULL -+}; -+ -+struct cbe_size_table { -+ long debug_spu_info; -+ long spu; -+ long spu_context; -+ long spu_prio_array; -+ long list_head; -+} cbe_size_table; -+ -+struct cbe_offset_table { -+ long debug_spu_info_spu; -+ long debug_spu_info_saved_mfc_sr1_RW; -+ long debug_spu_info_saved_mfc_dar; -+ long debug_spu_info_saved_mfc_dsisr; -+ long debug_spu_info_saved_spu_runcntl_RW; -+ long debug_spu_info_saved_spu_status_R; -+ long debug_spu_info_saved_spu_npc_RW; -+ -+ long spu_node; -+ long spu_number; -+ long spu_ctx; -+ long spu_pid; -+ long spu_name; -+ long spu_slb_replace; -+ long spu_mm; -+ long spu_timestamp; -+ long spu_class_0_pending; -+ long spu_problem; -+ long spu_priv2; -+ long spu_flags; -+ -+ long spu_context_spu; -+ long spu_context_state; -+ long spu_context_prio; -+ long spu_context_local_store; -+ long spu_context_rq; -+ -+ long spu_prio_array_runq; -+} cbe_offset_table; -+ -+#define CBE_SIZE(X) (cbe_size_table.X) -+#define CBE_OFFSET(X, Y) (cbe_offset_table.X##_##Y) -+ -+#define CBE_SIZE_INIT(X, Y) \ -+do { \ -+ cbe_size_table.X = STRUCT_SIZE(Y); \ -+ if (cbe_size_table.X == -1) \ -+ error(FATAL, "Couldn't get %s size.\n", Y); \ -+} while(0) -+ -+#define CBE_OFFSET_INIT(X, Y, Z) \ -+do { \ -+ cbe_offset_table.X = MEMBER_OFFSET(Y, Z); \ -+ if (cbe_offset_table.X == -1) \ -+ error(FATAL, "Couldn't get %s.%s offset.\n", Y, Z); \ -+} while(0) -+ -+ulong spu[NR_SPUS]; -+ -+/***************************************************************************** -+ * INIT FUNCTIONS -+ */ -+ -+/* -+ * Read kernel virtual addresses of debug_spu_info data stored by kdump -+ */ -+ -+void init_cbe_size_table(void) -+{ -+ CBE_SIZE_INIT(debug_spu_info, "debug_spu_info"); -+ CBE_SIZE_INIT(spu, "spu"); -+ CBE_SIZE_INIT(spu_context, "spu_context"); -+ CBE_SIZE_INIT(spu_prio_array, "spu_prio_array"); -+ CBE_SIZE_INIT(list_head, "list_head"); -+} -+ -+void init_cbe_offset_table(void) -+{ -+ CBE_OFFSET_INIT(debug_spu_info_spu, "debug_spu_info", "spu"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_mfc_sr1_RW, "debug_spu_info", -+ "saved_mfc_sr1_RW"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_mfc_dar, "debug_spu_info", -+ "saved_mfc_dar"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_mfc_dsisr, "debug_spu_info", -+ "saved_mfc_dsisr"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_spu_runcntl_RW, "debug_spu_info", -+ "saved_spu_runcntl_RW"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_spu_status_R, "debug_spu_info", -+ "saved_spu_status_R"); -+ CBE_OFFSET_INIT(debug_spu_info_saved_spu_npc_RW, "debug_spu_info", -+ "saved_spu_npc_RW"); -+ -+ CBE_OFFSET_INIT(spu_node, "spu", "node"); -+ CBE_OFFSET_INIT(spu_number, "spu", "number"); -+ CBE_OFFSET_INIT(spu_ctx, "spu", "ctx"); -+ CBE_OFFSET_INIT(spu_pid, "spu", "pid"); -+ CBE_OFFSET_INIT(spu_name, "spu", "name"); -+ CBE_OFFSET_INIT(spu_slb_replace, "spu", "slb_replace"); -+ CBE_OFFSET_INIT(spu_mm, "spu", "mm"); -+ CBE_OFFSET_INIT(spu_timestamp, "spu", "timestamp"); -+ CBE_OFFSET_INIT(spu_class_0_pending, "spu", "class_0_pending"); -+ CBE_OFFSET_INIT(spu_problem, "spu", "problem"); -+ CBE_OFFSET_INIT(spu_priv2, "spu", "priv2"); -+ CBE_OFFSET_INIT(spu_flags, "spu", "flags"); -+ -+ CBE_OFFSET_INIT(spu_context_spu, "spu_context", "spu"); -+ CBE_OFFSET_INIT(spu_context_state, "spu_context", "state"); -+ CBE_OFFSET_INIT(spu_context_prio, "spu_context", "prio"); -+ CBE_OFFSET_INIT(spu_context_local_store, "spu_context", "local_store"); -+ CBE_OFFSET_INIT(spu_context_rq, "spu_context", "rq"); -+ -+ CBE_OFFSET_INIT(spu_prio_array_runq, "spu_prio_array", "runq"); -+} -+ -+void get_debug_spu_info(void) -+{ -+ int i; -+ ulong addr; -+ long struct_size; -+ -+ addr = symbol_value("debug_spu_info"); -+ struct_size = CBE_SIZE(debug_spu_info); -+ -+ for (i = 0; i < NR_SPUS; i++) -+ spu[i] = addr + (i * struct_size); -+} -+ -+_init() -+{ -+ int i, n_registered; -+ struct command_table_entry *cte; -+ -+ init_cbe_size_table(); -+ init_cbe_offset_table(); -+ -+ for (i = 0; i < NR_SPUS; i++) -+ spu[i] = 0; -+ -+ register_extension(command_table); -+ -+ get_debug_spu_info(); -+} -+ -+ -+_fini() { } -+ -+ -+ -+/***************************************************************************** -+ * BASIC FUNCTIONS -+ */ -+ -+ -+/* -+ * Returns a pointer to the requested SPU field -+ */ -+ulong get_spu_addr(ulong spu_info) -+{ -+ ulong spu_addr; -+ -+ readmem(spu_info + CBE_OFFSET(debug_spu_info, spu), KVADDR, &spu_addr, -+ sizeof(spu_addr), "get_spu_addr", FAULT_ON_ERROR); -+ -+ return spu_addr; -+} -+ -+ -+/***************************************************************************** -+ * SPUCTX COMMAND -+ */ -+ -+#define DUMP_WIDTH 23 -+#define DUMP_SPU_NAME \ -+do { \ -+ fprintf(fp, " %-*s = %s\n", DUMP_WIDTH, "name", name_str); \ -+} while(0) -+ -+#define DUMP_SPU_FIELD(format, field, cast) \ -+do { \ -+ offset = CBE_OFFSET(spu, field); \ -+ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ -+ cast(spu_data + offset)); \ -+} while(0) -+ -+#define DUMP_CTX_FIELD(format, field, cast) \ -+do { \ -+ offset = CBE_OFFSET(spu_context, field); \ -+ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ -+ cast(ctx_data + offset)); \ -+} while(0) -+ -+#define DUMP_DBG_FIELD(format, field, cast) \ -+do { \ -+ offset = CBE_OFFSET(debug_spu_info, field); \ -+ fprintf(fp, " %-*s = "format"\n", DUMP_WIDTH, #field, \ -+ cast(debug_data + offset)); \ -+} while(0) -+ -+/* -+ * Print the spu and spu_context structs fields. Some SPU memory-mapped IO -+ * registers are taken directly from debug_spu_info. -+ */ -+void print_ctx_info(char *ctx_data, char *spu_data, int info) -+{ -+ long offset, size; -+ char *name_str, *debug_data; -+ -+ DUMP_CTX_FIELD("%d", state, *(int *)); -+ DUMP_CTX_FIELD("%d", prio, *(int *)); -+ DUMP_CTX_FIELD("%p", local_store, *(ulong *)); -+ DUMP_CTX_FIELD("%p", rq, *(ulong *)); -+ -+ if (spu_data) { -+ offset = CBE_OFFSET(spu, name); -+ size = MAX_PROPERTY_NAME * sizeof(char); -+ name_str = (char *)GETBUF(size); -+ readmem(*(ulong *)(spu_data + offset), KVADDR, name_str, size, -+ "name_str", FAULT_ON_ERROR); -+ DUMP_SPU_NAME; -+ FREEBUF(name_str); -+ -+ DUMP_SPU_FIELD("%d", node, *(int *)); -+ DUMP_SPU_FIELD("%d", number, *(int *)); -+ DUMP_SPU_FIELD("%d", pid, *(int *)); -+ DUMP_SPU_FIELD("0x%x", slb_replace, *(unsigned int *)); -+ DUMP_SPU_FIELD("%p", mm, *(ulong *)); -+ DUMP_SPU_FIELD("%p", timestamp, *(long long *)); -+ DUMP_SPU_FIELD("%d", class_0_pending, *(int *)); -+ DUMP_SPU_FIELD("%p", problem, *(ulong *)); -+ DUMP_SPU_FIELD("%p", priv2, *(ulong *)); -+ DUMP_SPU_FIELD("0x%lx", flags, *(ulong *)); -+ -+ size = CBE_SIZE(debug_spu_info); -+ debug_data = (char *)GETBUF(size); -+ readmem(spu[info], KVADDR, debug_data, size, "debug_data", -+ FAULT_ON_ERROR); -+ -+ DUMP_DBG_FIELD("0x%lx", saved_mfc_sr1_RW, *(ulong *)); -+ DUMP_DBG_FIELD("0x%lx", saved_mfc_dar, *(ulong *)); -+ DUMP_DBG_FIELD("0x%lx", saved_mfc_dsisr, *(ulong *)); -+ DUMP_DBG_FIELD("0x%x", saved_spu_runcntl_RW, *(uint *)); -+ DUMP_DBG_FIELD("0x%x", saved_spu_status_R, *(uint *)); -+ DUMP_DBG_FIELD("0x%x", saved_spu_npc_RW, *(uint *)); -+ -+ FREEBUF(debug_data); -+ } -+} -+ -+ -+/* -+ * Pass ctx and respective spu data to print_ctx_info for the contexts in -+ * ctx_addr list (chosen contexts). -+ */ -+void show_ctx_info(ulong ctx_addr) -+{ -+ int number, info, i; -+ char *ctx_data, *spu_data; -+ long size, offset; -+ ulong spu_addr, addr; -+ -+ spu_data = NULL; -+ info = 0; -+ -+ size = CBE_SIZE(spu_context); -+ ctx_data = GETBUF(size); -+ if (!ctx_data) -+ error(FATAL, "Couldn't allocate memory for ctx.\n"); -+ readmem(ctx_addr, KVADDR, ctx_data, size, "show_ctx_info ctx", -+ FAULT_ON_ERROR); -+ -+ spu_addr = *(ulong *)(ctx_data + CBE_OFFSET(spu_context, spu)); -+ -+ if (spu_addr) { -+ size = CBE_SIZE(spu); -+ spu_data = GETBUF(size); -+ if (!spu_data) -+ error(FATAL, "Couldn't allocate memory for spu.\n"); -+ readmem(spu_addr, KVADDR, spu_data, size, "show_ctx_info spu", -+ FAULT_ON_ERROR); -+ -+ for (i = 0; i < NR_SPUS; i++) { -+ readmem(spu[i], KVADDR, &addr, sizeof(addr), "spu addr", -+ FAULT_ON_ERROR); -+ if (addr == spu_addr) -+ info = i; -+ } -+ } -+ -+ fprintf(fp,"\nDumping context fields for spu_context %lx:\n", ctx_addr); -+ print_ctx_info(ctx_data, spu_data, info); -+ -+ FREEBUF(ctx_data); -+ if (spu_addr) -+ FREEBUF(spu_data); -+} -+ -+/* -+ * Pass ctx and respective spu data to show_ctx_info for all the contexts -+ * running and on the runqueue. -+ */ -+void show_ctx_info_all(void) -+{ -+ int i, j, cnt; -+ long prio_size, prio_runq_off, ctx_rq_off, jump, offset, ctxs_size; -+ char *u_spu_prio; -+ ulong spu_prio_addr, k_spu_prio, kvaddr, uvaddr, addr, ctx; -+ ulong *ctxs; -+ ulong list_head[2]; -+ struct list_data list_data, *ld; -+ -+ /* Walking SPUs */ -+ for (i = 0; i < NR_SPUS; i++) { -+ addr = get_spu_addr(spu[i]) + CBE_OFFSET(spu, ctx); -+ readmem(addr, KVADDR, &ctx, sizeof(ctx), "show_ctx_info_all", -+ FAULT_ON_ERROR); -+ show_ctx_info(ctx); -+ } -+ -+ /* Walking SPU runqueue */ -+ if (symbol_exists("spu_prio")) { -+ spu_prio_addr = symbol_value("spu_prio"); -+ readmem(spu_prio_addr, KVADDR, &k_spu_prio, sizeof(k_spu_prio), -+ "runq_array", FAULT_ON_ERROR); -+ } -+ else -+ error(FATAL, "Could not get SPU run queue data.\n"); -+ -+ jump = CBE_SIZE(list_head); -+ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); -+ ctx_rq_off = CBE_OFFSET(spu_context, rq); -+ prio_size = CBE_SIZE(spu_prio_array); -+ -+ u_spu_prio = (char *)GETBUF(prio_size); -+ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, "get_runq_ctxs", -+ FAULT_ON_ERROR); -+ -+ for (i = 0; i < MAX_PRIO; i++) { -+ offset = prio_runq_off + i * jump; -+ kvaddr = k_spu_prio + offset; -+ uvaddr = (ulong)u_spu_prio + offset; -+ -+ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); -+ -+ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) -+ continue; -+ -+ ld = &list_data; -+ -+ BZERO(ld, sizeof(struct list_data)); -+ ld->start = list_head[0]; -+ ld->list_head_offset = ctx_rq_off; -+ ld->flags |= RETURN_ON_LIST_ERROR; -+ ld->end = kvaddr; -+ -+ hq_open(); -+ cnt = do_list(ld); -+ if (cnt == -1) { -+ hq_close(); -+ FREEBUF(u_spu_prio); -+ error(FATAL, "Couldn't walk the list.\n"); -+ } -+ -+ ctxs_size = cnt * sizeof(ulong); -+ ctxs = (ulong *)GETBUF(ctxs_size); -+ -+ BZERO(ctxs, ctxs_size); -+ cnt = retrieve_list(ctxs, cnt); -+ hq_close(); -+ -+ for (j = 0; j < cnt; j++) -+ show_ctx_info(ctxs[j]); -+ -+ FREEBUF(ctxs); -+ } -+ -+ FREEBUF(u_spu_prio); -+} -+ -+/* -+ * Tries to discover the meaning of string and to find the referred context -+ */ -+int str_to_spuctx(char *string, ulong *value, ulong *spu_ctx) -+{ -+ char *s, *u_spu_prio; -+ ulong dvalue, hvalue, addr, ctx; -+ ulong k_spu_prio, spu_prio_addr, kvaddr, uvaddr; -+ int type, pid, i, j, cnt; -+ long prio_size, prio_runq_off, ctx_rq_off, jump, offset, ctxs_size; -+ ulong *ctxs; -+ ulong list_head[2]; -+ struct list_data list_data, *ld; -+ -+ if (string == NULL) { -+ error(INFO, "%s: received NULL string.\n", __FUNCTION__); -+ return STR_SPU_INVALID; -+ } -+ -+ s = string; -+ dvalue = hvalue = BADADDR; -+ -+ if (decimal(s, 0)) -+ dvalue = dtol(s, RETURN_ON_ERROR, NULL); -+ -+ if (hexadecimal(s, 0)) { -+ if (STRNEQ(s, "0x") || STRNEQ(s, "0X")) -+ s += 2; -+ if (strlen(s) <= MAX_HEXADDR_STRLEN) -+ hvalue = htol(s, RETURN_ON_ERROR, NULL); -+ } -+ -+ type = STR_SPU_INVALID; -+ -+ if (dvalue != BADADDR) { -+ /* Testing for SPU ID */ -+ if ((dvalue >= 0) && (dvalue < NR_SPUS)) { -+ addr = get_spu_addr(spu[dvalue]) + CBE_OFFSET(spu, ctx); -+ readmem(addr, KVADDR, &ctx, sizeof(ctx), -+ "str_to_spuctx ID", FAULT_ON_ERROR); -+ -+ type = STR_SPU_ID; -+ *value = dvalue; -+ *spu_ctx = ctx; -+ return type; -+ } -+ else { -+ /* Testing for PID */ -+ for (i = 0; i < NR_SPUS; i++) { -+ addr = get_spu_addr(spu[i]) + -+ CBE_OFFSET(spu, pid); -+ readmem(addr, KVADDR, &pid, sizeof(pid), -+ "str_to_spuctx PID", FAULT_ON_ERROR); -+ -+ if (dvalue == pid) { -+ addr = get_spu_addr(spu[i]) + -+ CBE_OFFSET(spu, ctx); -+ readmem(addr, KVADDR, &ctx, sizeof(ctx), -+ "str_to_spuctx PID ctx", -+ FAULT_ON_ERROR); -+ -+ type = STR_SPU_PID; -+ *value = dvalue; -+ *spu_ctx = ctx; -+ return type; -+ } -+ } -+ } -+ } -+ -+ if (hvalue != BADADDR) { -+ /* Testing for spuctx address on SPUs */ -+ for (i = 0; i < NR_SPUS; i++) { -+ addr = get_spu_addr(spu[i]) + CBE_OFFSET(spu, ctx); -+ readmem(addr, KVADDR, &ctx, sizeof(ctx), -+ "str_to_spuctx CTX", FAULT_ON_ERROR); -+ -+ if (hvalue == ctx) { -+ type = STR_SPU_CTX_ADDR; -+ *value = hvalue; -+ *spu_ctx = ctx; -+ return type; -+ } -+ } -+ -+ /* Testing for spuctx address on SPU runqueue */ -+ if (symbol_exists("spu_prio")) { -+ spu_prio_addr = symbol_value("spu_prio"); -+ readmem(spu_prio_addr, KVADDR, &k_spu_prio, -+ sizeof(k_spu_prio), "runq_array", FAULT_ON_ERROR); -+ } -+ else -+ error(FATAL, "Could not get SPU run queue data.\n"); -+ -+ jump = CBE_SIZE(list_head); -+ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); -+ ctx_rq_off = CBE_OFFSET(spu_context, rq); -+ prio_size = CBE_SIZE(spu_prio_array); -+ -+ u_spu_prio = (char *)GETBUF(prio_size); -+ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, -+ "get_runq_ctxs", FAULT_ON_ERROR); -+ -+ for (i = 0; i < MAX_PRIO; i++) { -+ offset = prio_runq_off + i * jump; -+ kvaddr = k_spu_prio + offset; -+ uvaddr = (ulong)u_spu_prio + offset; -+ -+ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); -+ -+ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) -+ continue; -+ -+ ld = &list_data; -+ -+ BZERO(ld, sizeof(struct list_data)); -+ ld->start = list_head[0]; -+ ld->list_head_offset = ctx_rq_off; -+ ld->flags |= RETURN_ON_LIST_ERROR; -+ ld->end = kvaddr; -+ -+ hq_open(); -+ cnt = do_list(ld); -+ if (cnt == -1) { -+ hq_close(); -+ FREEBUF(u_spu_prio); -+ error(FATAL, "Couldn't walk the list.\n"); -+ } -+ -+ ctxs_size = cnt * sizeof(ulong); -+ ctxs = (ulong *)GETBUF(ctxs_size); -+ -+ BZERO(ctxs, ctxs_size); -+ cnt = retrieve_list(ctxs, cnt); -+ hq_close(); -+ -+ for (j = 0; j < cnt; j++) -+ if (hvalue == ctxs[j]) { -+ type = STR_SPU_CTX_ADDR; -+ *value = hvalue; -+ *spu_ctx = ctxs[j]; -+ FREEBUF(u_spu_prio); -+ FREEBUF(ctxs); -+ return type; -+ } -+ -+ FREEBUF(ctxs); -+ } -+ -+ FREEBUF(u_spu_prio); -+ } -+ -+ return type; -+} -+ -+/* -+ * spuctx command stands for "spu context" and shows the context fields -+ * for the spu or respective struct address passed as an argument -+ */ -+void cmd_spuctx() -+{ -+ int i, c, cnt; -+ ulong value, ctx; -+ ulong *ctxlist; -+ -+ while ((c = getopt(argcnt, args, "")) != EOF) { -+ switch(c) -+ { -+ default: -+ argerrs++; -+ break; -+ } -+ } -+ -+ if (argerrs) -+ cmd_usage(pc->curcmd, SYNOPSIS); -+ -+ if (!args[optind]) { -+ show_ctx_info_all(); -+ return; -+ } -+ -+ cnt = 0; -+ ctxlist = (ulong *)GETBUF((MAXARGS+NR_CPUS)*sizeof(ctx)); -+ -+ while (args[optind]) { -+ if (IS_A_NUMBER(args[optind])) { -+ switch (str_to_spuctx(args[optind], &value, &ctx)) -+ { -+ case STR_SPU_ID: -+ case STR_SPU_PID: -+ case STR_SPU_CTX_ADDR: -+ ctxlist[cnt++] = ctx; -+ break; -+ -+ case STR_SPU_INVALID: -+ error(INFO, "Invalid SPU reference: %s\n", -+ args[optind]); -+ break; -+ } -+ } -+ else -+ error(INFO, "Invalid SPU reference: %s\n", -+ args[optind]); -+ optind++; -+ } -+ -+ if (cnt == 0) -+ error(INFO, "No valid ID, PID or context address.\n"); -+ else -+ for (i = 0; i < cnt; i++) -+ show_ctx_info(ctxlist[i]); -+ -+ FREEBUF(ctxlist); -+} -+ -+ -+/***************************************************************************** -+ * SPUS COMMAND -+ */ -+ -+void print_spu_header(ulong spu_info) -+{ -+ int id, pid, size, state; -+ uint status; -+ ulong ctx_addr, spu_addr; -+ char *spu_data; -+ const char *state_str; -+ -+ if (spu_info) { -+ readmem(spu_info + CBE_OFFSET(debug_spu_info, -+ saved_spu_status_R), KVADDR, &status, sizeof(status), -+ "print_spu_header: get status", FAULT_ON_ERROR); -+ -+ size = CBE_SIZE(spu); -+ spu_data = GETBUF(size); -+ spu_addr = get_spu_addr(spu_info); -+ readmem(spu_addr, KVADDR, spu_data, size, "SPU struct", -+ FAULT_ON_ERROR); -+ -+ id = *(int *)(spu_data + CBE_OFFSET(spu, number)); -+ ctx_addr = *(ulong *)(spu_data + CBE_OFFSET(spu, ctx)); -+ pid = *(int *)(spu_data + CBE_OFFSET(spu, pid)); -+ -+ readmem(ctx_addr + CBE_OFFSET(spu_context, state), KVADDR, -+ &state, sizeof(state), "print_spu_header get ctxstate", -+ FAULT_ON_ERROR); -+ -+ switch (state) { -+ case 0: /* SPU_STATE_RUNNABLE */ -+ state_str = "RUNNABLE"; -+ break; -+ -+ case 1: /* SPU_STATE_SAVED */ -+ state_str = " SAVED "; -+ break; -+ -+ default: -+ state_str = "UNKNOWN "; -+ } -+ -+ fprintf(fp, "%2d %16lx %s %16lx %s %5d\n", id, -+ spu_addr, -+ status % 2 ? "RUNNING" : (ctx_addr ? "STOPPED" : " IDLE "), -+ ctx_addr, state_str, pid); -+ -+ FREEBUF(spu_data); -+ } -+} -+ -+void print_node_header(int node) -+{ -+ fprintf(fp, "\n"); -+ fprintf(fp, "NODE %i:\n", node); -+ fprintf(fp, "ID SPUADDR SPUSTATUS CTXADDR \ -+CTXSTATE PID \n"); -+} -+ -+void show_spus() -+{ -+ int i, j, nr_cpus, show_header, node; -+ ulong spu_addr, addr; -+ long offset; -+ -+ nr_cpus = kt->kernel_NR_CPUS ? kt->kernel_NR_CPUS : NR_CPUS; -+ -+ for (i = 0; i < nr_cpus; i++) { -+ show_header = TRUE; -+ -+ for (j = 0; j < NR_SPUS; j++) { -+ addr = spu[j] + CBE_OFFSET(debug_spu_info, spu); -+ readmem(addr, KVADDR, &spu_addr, sizeof(spu_addr), -+ "show_spus spu_addr", FAULT_ON_ERROR); -+ -+ offset = CBE_OFFSET(spu, node); -+ if (offset == -1) -+ error(FATAL, "Couldn't get spu.node offset.\n"); -+ -+ spu_addr += offset; -+ readmem(spu_addr, KVADDR, &node, sizeof(node), -+ "show_spus node", FAULT_ON_ERROR); -+ -+ if (node == i) { -+ if (show_header) { -+ print_node_header(node); -+ show_header = FALSE; -+ } -+ -+ print_spu_header(spu[j]); -+ } -+ } -+ } -+} -+ -+/* -+ * spus stands for "spu state" and shows what contexts are running in what -+ * SPU. -+ */ -+void cmd_spus() -+{ -+ int c; -+ -+ while ((c = getopt(argcnt, args, "")) != EOF) { -+ switch(c) -+ { -+ default: -+ argerrs++; -+ break; -+ } -+ } -+ -+ if (argerrs || args[optind]) -+ cmd_usage(pc->curcmd, SYNOPSIS); -+ else -+ show_spus(); -+} -+ -+ -+/***************************************************************************** -+ * SPURQ COMMAND -+ */ -+ -+/* -+ * Prints the addresses of SPU contexts on the SPU runqueue. -+ */ -+void dump_spu_runq(ulong k_spu_prio) -+{ -+ int i, cnt; -+ long prio_size, prio_runq_off, ctx_rq_off, jump, offset; -+ char *u_spu_prio; -+ ulong kvaddr, uvaddr; -+ ulong list_head[2]; -+ struct list_data list_data, *ld; -+ -+ prio_runq_off = CBE_OFFSET(spu_prio_array, runq); -+ jump = CBE_SIZE(list_head); -+ ctx_rq_off = CBE_OFFSET(spu_context, rq); -+ prio_size = CBE_SIZE(spu_prio_array); -+ -+ u_spu_prio = (char *)GETBUF(prio_size); -+ readmem(k_spu_prio, KVADDR, u_spu_prio, prio_size, "get_runq_ctxs", -+ FAULT_ON_ERROR); -+ -+ for (i = 0; i < MAX_PRIO; i++) { -+ offset = prio_runq_off + (i * jump); -+ kvaddr = k_spu_prio + offset; -+ uvaddr = (ulong)u_spu_prio + offset; -+ -+ BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); -+ -+ if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) -+ continue; -+ -+ fprintf(fp, "PRIO[%i]:\n", i); -+ -+ ld = &list_data; -+ -+ BZERO(ld, sizeof(struct list_data)); -+ ld->start = list_head[0]; -+ ld->list_head_offset = ctx_rq_off; -+ ld->flags |= VERBOSE; -+ ld->end = kvaddr; -+ -+ hq_open(); -+ cnt = do_list(ld); -+ hq_close(); -+ -+ if (cnt == -1) { -+ FREEBUF(u_spu_prio); -+ error(FATAL, "Couldn't walk runqueue[%i].\n", i); -+ } -+ } -+ -+ FREEBUF(u_spu_prio); -+} -+ -+/* -+ * spurq stands for "spu run queue" and shows info about the contexts -+ * that are on the SPU run queue -+ */ -+void cmd_spurq() -+{ -+ int c; -+ ulong spu_prio_addr, spu_prio; -+ long size; -+ -+ while ((c = getopt(argcnt, args, "")) != EOF) { -+ switch(c) -+ { -+ default: -+ argerrs++; -+ break; -+ } -+ } -+ -+ if (argerrs || args[optind]) -+ cmd_usage(pc->curcmd, SYNOPSIS); -+ else { -+ if (symbol_exists("spu_prio")) { -+ spu_prio_addr = symbol_value("spu_prio"); -+ readmem(spu_prio_addr, KVADDR, &spu_prio, -+ sizeof(spu_prio), "runq_array", FAULT_ON_ERROR); -+ dump_spu_runq(spu_prio); -+ } else -+ error(FATAL, "Could not get SPU run queue data.\n"); -+ } -+} -+ -+/********************************************************************************** -+ * HELP TEXTS -+ */ -+ -+char *help_spuctx[] = { -+ SPUCTX_CMD_NAME, -+ "shows complete info about a SPU context", -+ "[ID | PID | CTXADDR] ...", -+ -+ " This command shows the fields of spu and spu_context structs for a ", -+ "SPU context, including debug info specially saved by kdump after a ", -+ "crash.", -+ " By default, it shows info about all the contexts created by the ", -+ "system, including ones in the runqueue. To specify the contexts of ", -+ "interest, the PID of the controller task, ID of the SPU which the ", -+ "context is bound to or the address of spu_context struct can be used ", -+ "as parameters.", -+ "\nEXAMPLES", -+ "\n Show info about contexts bound to SPUs 0 and 7, and the one ", -+ "controlled by thread whose PID is 1524:", -+ "\n crash> spuctx 0 7 1524", -+ "\n Dumping context fields for spu_context c00000003dcbdd80:", -+ " state = 0", -+ " prio = 120", -+ " local_store = 0xc000000039055840", -+ " rq = 0xc00000003dcbe720", -+ " node = 0", -+ " number = 0", -+ " pid = 1524", -+ " name = spe", -+ " slb_replace = 0", -+ " mm = 0xc0000000005dd700", -+ " timestamp = 0x10000566f", -+ " class_0_pending = 0", -+ " problem = 0xd000080080210000", -+ " priv2 = 0xd000080080230000", -+ " flags = 0", -+ " saved_mfc_sr1_RW = 59", -+ " saved_mfc_dar = 14987979559889612800", -+ " saved_mfc_dsisr = 0", -+ " saved_spu_runcntl_RW = 1", -+ " saved_spu_status_R = 1", -+ " saved_spu_npc_RW = 0", -+ "\n Dumping context fields for spu_context c00000003dec4e80:", -+ " state = 0", -+ " prio = 120", -+ " local_store = 0xc00000003b1cea40", -+ " rq = 0xc00000003dec5820", -+ " node = 0", -+ " number = 7", -+ " pid = 1538", -+ " name = spe", -+ " slb_replace = 0", -+ " mm = 0xc0000000005d2b80", -+ " timestamp = 0x10000566f", -+ " class_0_pending = 0", -+ " problem = 0xd000080080600000", -+ " priv2 = 0xd000080080620000", -+ " flags = 0", -+ " saved_mfc_sr1_RW = 59", -+ " saved_mfc_dar = 14987979559896297472", -+ " saved_mfc_dsisr = 0", -+ " saved_spu_runcntl_RW = 1", -+ " saved_spu_status_R = 1", -+ " saved_spu_npc_RW = 0", -+ "\n Dumping context fields for spu_context c00000003dcbdd80:", -+ " state = 0", -+ " prio = 120", -+ " local_store = 0xc000000039055840", -+ " rq = 0xc00000003dcbe720", -+ " node = 0", -+ " number = 0", -+ " pid = 1524", -+ " name = spe", -+ " slb_replace = 0", -+ " mm = 0xc0000000005dd700", -+ " timestamp = 0x10000566f", -+ " class_0_pending = 0", -+ " problem = 0xd000080080210000", -+ " priv2 = 0xd000080080230000", -+ " flags = 0", -+ " saved_mfc_sr1_RW = 59", -+ " saved_mfc_dar = 14987979559889612800", -+ " saved_mfc_dsisr = 0", -+ " saved_spu_runcntl_RW = 1", -+ " saved_spu_status_R = 1", -+ " saved_spu_npc_RW = 0", -+ -+ "\n Show info about the context whose struct spu_context address is ", -+ "0xc00000003dcbed80:\n", -+ "crash> spuctx 0x00000003dcbed80", -+ " ...", -+ NULL -+}; -+ -+ -+char *help_spus[] = { -+ SPUS_CMD_NAME, -+ "shows how contexts are scheduled in the SPUs", -+ " ", -+ " This command shows how the contexts are scheduled in the SPUs of ", -+ "each node. It provides info about the spu address, SPU status, the ", -+ "spu_context address, context state and spu_context addresses and the ", -+ "PID of controller thread for each SPU.", -+ "\nEXAMPLE", -+ " Show SPU contexts:", -+ "\n crash> spus", -+ " NODE 0:", -+ " ID SPUADDR SPUSTATUS CTXADDR CTXSTATE PID ", -+ " 0 c000000001fac880 RUNNING c00000003dcbdd80 RUNNABLE 1524", -+ " 1 c000000001faca80 RUNNING c00000003bf34e00 RUNNABLE 1528", -+ " 2 c000000001facc80 RUNNING c00000003bf30e00 RUNNABLE 1525", -+ " 3 c000000001face80 RUNNING c000000039421d00 RUNNABLE 1533", -+ " 4 c00000003ee29080 RUNNING c00000003dec3e80 RUNNABLE 1534", -+ " 5 c00000003ee28e80 RUNNING c00000003bf32e00 RUNNABLE 1526", -+ " 6 c00000003ee28c80 STOPPED c000000039e5e700 SAVED 1522", -+ " 7 c00000003ee2e080 RUNNING c00000003dec4e80 RUNNABLE 1538", -+ "\n NODE 1:", -+ " ID SPUADDR SPUSTATUS CTXADDR CTXSTATE PID ", -+ " 8 c00000003ee2de80 RUNNING c00000003dcbed80 RUNNABLE 1529", -+ " 9 c00000003ee2dc80 RUNNING c00000003bf39e00 RUNNABLE 1535", -+ " 10 c00000003ee2da80 RUNNING c00000003bf3be00 RUNNABLE 1521", -+ " 11 c000000001fad080 RUNNING c000000039420d00 RUNNABLE 1532", -+ " 12 c000000001fad280 RUNNING c00000003bf3ee00 RUNNABLE 1536", -+ " 13 c000000001fad480 RUNNING c00000003dec2e80 RUNNABLE 1539", -+ " 14 c000000001fad680 RUNNING c00000003bf3ce00 RUNNABLE 1537", -+ " 15 c000000001fad880 RUNNING c00000003dec6e80 RUNNABLE 1540", -+ NULL -+}; -+ -+ -+char *help_spurq[] = { -+ SPURQ_CMD_NAME, -+ "shows contexts on the SPU runqueue", -+ " ", -+ " This command shows info about all contexts waiting for execution ", -+ "in the SPU runqueue. No parameter is needed.", -+ "\nEXAMPLE", -+ " Show SPU runqueue:", -+ "\n crash> spurq", -+ " PRIO[120]:", -+ " c000000000fd7380", -+ " c00000003bf31e00", -+ " PRIO[125]:", -+ " c000000039422d00", -+ " c00000000181eb80", -+ NULL -+}; -+ -diff -Nurp crash-4.0-4.3.orig/Makefile crash-4.0-4.3/Makefile ---- crash-4.0-4.3.orig/Makefile 2007-06-22 15:49:16.000000000 -0300 -+++ crash-4.0-4.3/Makefile 2007-06-28 14:06:08.000000000 -0300 -@@ -103,8 +103,9 @@ OBJECT_FILES=main.o tools.o global_data. - # directory. - - EXTENSIONS=extensions --EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c ${EXTENSIONS}/dminfo.c --EXTENSION_OBJECT_FILES=echo.so dminfo.so -+EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c \ -+ ${EXTENSIONS}/dminfo.c ${EXTENSIONS}/spu.c -+EXTENSION_OBJECT_FILES=echo.so dminfo.so spu.so - - DAEMON_OBJECT_FILES=remote_daemon.o va_server.o va_server_v1.o \ - lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/rules /tmp/e3X06Fy51n/crash-4.0-4.9/debian/rules --- /tmp/9GqrqL2m5z/crash-4.0-4.1/debian/rules 2007-11-20 19:29:51.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/debian/rules 2007-11-20 19:29:52.000000000 -0600 @@ -11,11 +11,17 @@ build: patch build-stamp -clean: unpatch +pre-stamp: + cp -a $(CURDIR)/gdb-6.1 $(CURDIR)/debian/gdb-6.1.back + touch pre-stamp + +clean: pre-stamp unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp - -$(MAKE) clean + rm -Rf $(CURDIR)/gdb-6.1 configure + cp -a $(CURDIR)/debian/gdb-6.1.back $(CURDIR)/gdb-6.1 + $(MAKE) clean find . -name "*~" -exec rm {} \; dh_clean diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/defs.h /tmp/e3X06Fy51n/crash-4.0-4.9/defs.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/defs.h 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/defs.h 2007-11-19 15:01:37.000000000 -0600 @@ -54,6 +54,10 @@ #define TRUE (1) #define FALSE (0) +#define STR(x) #x +#ifndef offsetof +# define offsetof(TYPE, MEMBER) ((ulong)&((TYPE *)0)->MEMBER) +#endif #ifdef X86 #define NR_CPUS (256) @@ -68,7 +72,7 @@ #define NR_CPUS (32) #endif #ifdef IA64 -#define NR_CPUS (1024) +#define NR_CPUS (4096) #endif #ifdef PPC64 #define NR_CPUS (128) @@ -177,6 +181,8 @@ #define XEN_HYPER (0x80000000000000ULL) #define XEN_CORE (0x100000000000000ULL) #define PLEASE_WAIT (0x200000000000000ULL) +#define IFILE_ERROR (0x400000000000000ULL) +#define KERNTYPES (0x800000000000000ULL) #define ACTIVE() (pc->flags & LIVE_SYSTEM) #define DUMPFILE() (!(pc->flags & LIVE_SYSTEM)) @@ -195,6 +201,7 @@ #define XEN_HYPER_MODE() (pc->flags & XEN_HYPER) #define SYSRQ_TASK(X) ((pc->flags & SYSRQ) && is_task_active(X)) #define XEN_CORE_DUMPFILE() (pc->flags & XEN_CORE) +#define LKCD_KERNTYPES() (pc->flags & KERNTYPES) #define NETDUMP_LOCAL (0x1) /* netdump_data flags */ #define NETDUMP_REMOTE (0x2) @@ -346,6 +353,7 @@ #define SCROLL_NONE 0 #define SCROLL_LESS 1 #define SCROLL_MORE 2 +#define SCROLL_CRASHPAGER 3 ulong redirect; /* per-cmd origin and output flags */ pid_t stdpipe_pid; /* per-cmd standard output pipe's pid */ pid_t pipe_pid; /* per-cmd output pipe's pid */ @@ -365,6 +373,7 @@ #define HEADER_PRINTED (0x40) #define BAD_INSTRUCTION (0x80) #define UD2A_INSTRUCTION (0x100) +#define IRQ_IN_USE (0x200) ulonglong curcmd_private; /* general purpose per-command info */ int cur_gdb_cmd; /* current gdb command */ int last_gdb_cmd; /* previously-executed gdb command */ @@ -385,6 +394,9 @@ struct extension_table *curext; /* extension being loaded */ int (*readmem)(int, void *, int, ulong, physaddr_t); /* memory access */ int (*writemem)(int, void *, int, ulong, physaddr_t);/* memory access */ + ulong ifile_in_progress; /* original xxx_IFILE flags */ + off_t ifile_offset; /* current offset into input file */ + char *runtime_ifile_cmd; /* runtime command using input file */ }; #define READMEM pc->readmem @@ -400,6 +412,7 @@ #define REFRESH_TASK_TABLE (0x1) /* command_table_entry flags */ #define HIDDEN_COMMAND (0x2) +#define CLEANUP (0x4) /* for extensions only */ /* * A linked list of extension table structures keeps track of the current @@ -452,6 +465,8 @@ #define DWARF_UNWIND_CAPABLE (DWARF_UNWIND_MEMORY|DWARF_UNWIND_EH_FRAME) #define DWARF_UNWIND_MODULES (0x800000) #define BUGVERBOSE_OFF (0x1000000) +#define RELOC_SET (0x2000000) +#define RELOC_FORCE (0x4000000) #define GCC_VERSION_DEPRECATED (GCC_3_2|GCC_3_2_3|GCC_2_96|GCC_3_3_2|GCC_3_3_3) @@ -516,6 +531,7 @@ ulong p2m_pages_searched; ulong p2m_mfn_cache_hits; ulong p2m_page_cache_hits; + ulong relocate; }; /* @@ -921,6 +937,7 @@ long task_struct_timestamp; long task_struct_thread_info; long task_struct_nsproxy; + long task_struct_rlim; long thread_info_task; long thread_info_cpu; long thread_info_previous_esp; @@ -945,6 +962,7 @@ long signal_struct_count; long signal_struct_action; long signal_struct_shared_pending; + long signal_struct_rlim; long k_sigaction_sa; long sigaction_sa_handler; long sigaction_sa_flags; @@ -1372,6 +1390,37 @@ long unwind_table_size; long unwind_table_link; long unwind_table_name; + long rq_cfs; + long rq_rt; + long rq_nr_running; + long cfs_rq_rb_leftmost; + long cfs_rq_nr_running; + long cfs_rq_tasks_timeline; + long task_struct_se; + long sched_entity_run_node; + long rt_rq_active; + long kmem_cache_size; + long kmem_cache_objsize; + long kmem_cache_offset; + long kmem_cache_order; + long kmem_cache_local_node; + long kmem_cache_objects; + long kmem_cache_inuse; + long kmem_cache_align; + long kmem_cache_name; + long kmem_cache_list; + long kmem_cache_node; + long kmem_cache_cpu_slab; + long page_inuse; +/* long page_offset; use "old" page->offset */ + long page_lockless_freelist; + long page_slab; + long page_first_page; + long page_freelist; + long kmem_cache_node_nr_partial; + long kmem_cache_node_nr_slabs; + long kmem_cache_node_partial; + long kmem_cache_node_full; }; struct size_table { /* stash of commonly-used sizes */ @@ -1469,6 +1518,9 @@ long mem_section; long pid_link; long unwind_table; + long rlimit; + long kmem_cache; + long kmem_cache_node; }; struct array_table { @@ -1495,6 +1547,9 @@ int free_area_DIMENSION; int prio_array_queue; int height_to_maxindex; + int pid_hash; + int kmem_cache_node; + int kmem_cache_cpu_slab; }; /* @@ -1512,6 +1567,9 @@ #define MEMBER_SIZE_REQUEST ((struct datatype_member *)(-1)) #define MEMBER_SIZE(X,Y) datatype_info((X), (Y), MEMBER_SIZE_REQUEST) +#define ANON_MEMBER_OFFSET_REQUEST ((struct datatype_member *)(-2)) +#define ANON_MEMBER_OFFSET(X,Y) datatype_info((X), (Y), ANON_MEMBER_OFFSET_REQUEST) + /* * The following set of macros can only be used with pre-intialized fields * in the offset table, size table or array_table. @@ -1533,7 +1591,9 @@ #define MEMBER_OFFSET_INIT(X, Y, Z) (ASSIGN_OFFSET(X) = MEMBER_OFFSET(Y, Z)) #define STRUCT_SIZE_INIT(X, Y) (ASSIGN_SIZE(X) = STRUCT_SIZE(Y)) #define ARRAY_LENGTH_INIT(A, B, C, D, E) ((A) = get_array_length(C, D, E)) +#define ARRAY_LENGTH_INIT_ALT(A, B, C, D, E) ((A) = get_array_length_alt(B, C, D, E)) #define MEMBER_SIZE_INIT(X, Y, Z) (ASSIGN_SIZE(X) = MEMBER_SIZE(Y, Z)) +#define ANON_MEMBER_OFFSET_INIT(X, Y, Z) (ASSIGN_OFFSET(X) = ANON_MEMBER_OFFSET(Y, Z)) /* * For use with non-debug kernels. @@ -1593,6 +1653,7 @@ ulong kmem_cache_len_nodes; ulong PG_reserved; ulong PG_slab; + ulong PG_head_tail_mask; int kmem_cache_namelen; ulong page_hash_table; int page_hash_table_len; @@ -1613,6 +1674,7 @@ int vma_cache_index; ulong vma_cache_fills; void *mem_sec; + char *mem_section; int ZONE_HIGHMEM; ulong *node_online_map; int node_online_map_len; @@ -1636,6 +1698,8 @@ #define KMEM_CACHE_DELAY (0x2000) #define NODES_ONLINE (0x4000) #define VM_STAT (0x8000) +#define KMALLOC_SLUB (0x10000) +#define CONFIG_NUMA (0x20000) #define IS_FLATMEM() (vt->flags & FLATMEM) #define IS_DISCONTIGMEM() (vt->flags & DISCONTIGMEM) @@ -2462,7 +2526,8 @@ #define PMD_INDEX_SIZE_L4_64K 12 #define PUD_INDEX_SIZE_L4_64K 0 #define PGD_INDEX_SIZE_L4_64K 4 -#define PTE_SHIFT_L4_64K 32 +#define PTE_SHIFT_L4_64K_V1 32 +#define PTE_SHIFT_L4_64K_V2 30 #define PMD_MASKED_BITS_64K 0x1ff #define L4_OFFSET(vaddr) ((vaddr >> (machdep->machspec->l4_shift)) & 0x1ff) @@ -2602,6 +2667,8 @@ #define BADVAL ((ulong)(-1)) #define UNUSED (-1) +#define UNINITIALIZED (BADVAL) + #define BITS_PER_BYTE (8) #define BITS_PER_LONG (BITS_PER_BYTE * sizeof(long)) @@ -2617,9 +2684,10 @@ #define MINSPACE (-100) -#define SYNOPSIS (0x1) -#define COMPLETE_HELP (0x2) -#define PIPE_TO_LESS (0x4) +#define SYNOPSIS (0x1) +#define COMPLETE_HELP (0x2) +#define PIPE_TO_SCROLL (0x4) +#define MUST_HELP (0x8) #define LEFT_JUSTIFY (1) #define RIGHT_JUSTIFY (2) @@ -2850,8 +2918,9 @@ #define PS_LAST_RUN (0x400) #define PS_ARGV_ENVP (0x800) #define PS_TGID_LIST (0x1000) +#define PS_RLIMIT (0x2000) -#define PS_EXCLUSIVE (PS_TGID_LIST|PS_ARGV_ENVP|PS_TIMES|PS_CHILD_LIST|PS_PPID_LIST|PS_LAST_RUN) +#define PS_EXCLUSIVE (PS_TGID_LIST|PS_ARGV_ENVP|PS_TIMES|PS_CHILD_LIST|PS_PPID_LIST|PS_LAST_RUN|PS_RLIMIT) #define MAX_PS_ARGS (100) /* maximum command-line specific requests */ @@ -3016,6 +3085,8 @@ int interruptible(void); int received_SIGINT(void); void debug_redirect(char *); +int CRASHPAGER_valid(void); +char *setup_scroll_command(void); /* * tools.c @@ -3114,6 +3185,7 @@ void please_wait(char *); void please_wait_done(void); int pathcmp(char *, char *); +int calculate(char *, ulong *, ulonglong *, ulong); /* @@ -3154,6 +3226,7 @@ char *value_to_symstr(ulong, char *, ulong); char *value_symbol(ulong); ulong symbol_value(char *); +ulong symbol_value_module(char *, char *); int symbol_exists(char *s); int kernel_symbol_exists(char *s); int get_syment_array(char *, struct syment **, int); @@ -3168,9 +3241,11 @@ void dump_struct_table(ulong); void dump_offset_table(char *, ulong); int is_elf_file(char *); +int file_elf_version(char *); int is_system_map(char *); int select_namelist(char *); int get_array_length(char *, int *, long); +int get_array_length_alt(char *, char *, int *, long); int builtin_array_length(char *, int, int *); char *get_line_number(ulong, char *, int); char *get_build_directory(char *); @@ -3401,6 +3476,7 @@ ulong task_mm(ulong, int); ulong task_tgid(ulong); ulonglong task_last_run(ulong); +ulong vaddr_in_task_struct(ulong); int comm_exists(char *); struct task_context *task_to_context(ulong); struct task_context *pid_to_context(ulong); @@ -3446,6 +3522,10 @@ void dump_extension_table(int); void load_extension(char *); void unload_extension(char *); +/* Hooks for sial */ +unsigned long get_curtask(void); +char *crash_global_cmd(void); +struct command_table_entry *crash_cmd_table(void); /* * kernel.c @@ -3471,6 +3551,7 @@ void clear_machdep_cache(void); struct stack_hook *gather_text_list(struct bt_info *); int get_cpus_online(void); +int get_cpus_possible(void); void print_stack_text_syms(struct bt_info *, ulong, ulong); void back_trace(struct bt_info *); #define BT_RAW (0x1ULL) @@ -3685,8 +3766,6 @@ #define _2MB_PAGE_MASK (~((MEGABYTES(2))-1)) -#define UNINITIALIZED (BADVAL) - #endif #if defined(X86) || defined(X86_64) @@ -3789,9 +3868,19 @@ * lkcd_fix_mem.c */ +struct _dump_header_asm_s; +struct _dump_header_s; ulong get_lkcd_switch_stack(ulong); -int fix_addr_v8(int); +int fix_addr_v8(struct _dump_header_asm_s *); +int lkcd_dump_init_v8_arch(struct _dump_header_s *dh); int fix_addr_v7(int); +int get_lkcd_regs_for_cpu_arch(int cpu, ulong *eip, ulong *esp); +int lkcd_get_kernel_start_v8(ulong *addr); + +/* + * lkcd_v8.c + */ +int get_lkcd_regs_for_cpu_v8(struct bt_info *bt, ulong *eip, ulong *esp); /* * ia64.c @@ -3809,6 +3898,7 @@ error(FATAL, "-d option TBD on ia64 architecture\n"); int ia64_in_init_stack(ulong addr); int ia64_in_mca_stack_hyper(ulong addr, struct bt_info *bt); +physaddr_t ia64_xen_kdump_p2m(struct xen_kdump_data *xkd, physaddr_t pseudo); #define OLD_UNWIND (0x1) /* CONFIG_IA64_NEW_UNWIND not turned on */ #define NEW_UNWIND (0x2) /* CONFIG_IA64_NEW_UNWIND turned on */ @@ -3941,6 +4031,7 @@ int kdump_memory_dump(FILE *); void get_kdump_regs(struct bt_info *, ulong *, ulong *); void xen_kdump_p2m_mfn(char *); +int is_sadump_xen(void); /* * diskdump.c @@ -4055,6 +4146,8 @@ void lkcd_dumpfile_complaint(uint32_t, uint32_t, int); int set_mb_benchmark(ulong); ulonglong fix_lkcd_address(ulonglong); +int lkcd_get_kernel_start(ulong *addr); +int get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp); /* * lkcd_v1.c diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/dminfo.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/dminfo.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/dminfo.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/dminfo.c 2007-11-19 15:01:37.000000000 -0600 @@ -16,6 +16,9 @@ #include "defs.h" /* From the crash source top-level directory */ +int _init(void); +int _fini(void); + /* * Indices of size-offset array (Used by GET_xxx macros) * @@ -1508,7 +1511,7 @@ {NULL, NULL, NULL, 0}, }; -int _init() +int _init(void) { register_extension(command_table); @@ -1525,7 +1528,7 @@ return 0; } -int _fini() +int _fini(void) { return 0; } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/echo.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/echo.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/echo.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/echo.c 2007-11-19 15:01:37.000000000 -0600 @@ -17,25 +17,34 @@ #include "defs.h" /* From the crash source top-level directory */ -void cmd_echo(); /* Declare the commands and their help data. */ +int _init(void); +int _fini(void); + +void cmd_echo(void); /* Declare the commands and their help data. */ char *help_echo[]; static struct command_table_entry command_table[] = { - "echo", cmd_echo, help_echo, 0, /* One or more commands, */ - NULL, /* terminated by NULL, */ + { "echo", cmd_echo, help_echo, 0 }, /* One or more commands, */ + { NULL } /* terminated by NULL, */ }; -_init() /* Register the command set. */ +int +_init(void) /* Register the command set. */ { register_extension(command_table); + return 1; } /* * The _fini() function is called if the shared object is unloaded. * If desired, perform any cleanups here. */ -_fini() { } +int +_fini(void) +{ + return 1; +} /* @@ -45,7 +54,7 @@ * to accomplish what your task. */ void -cmd_echo() +cmd_echo(void) { int c; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/Makefile /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/Makefile --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/Makefile 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/Makefile 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,94 @@ +# +# Copyright 2001 Silicon Graphics, Inc. All rights reserved. +# +# +# Makefile for LIBSIAL +# + +# Must be berkeley yacc. Bison will not cut it +YACC = bison + +LDIRT = lex.sial.c lex.sialpp.c sial.tab.c sial.tab.h sialpp.tab.c \ + sialpp.tab.h y.output mkbaseop baseops.c y.tab.c y.tab.h \ + libsial.so* *.output + +LIBDIR = /usr/lib +TARGETS = libsial.a + +CFLAGS += -O3 -g -fPIC +ifeq ($(TARGET), PPC64) + CFLAGS += -m64 +endif + +CFILES = sial_util.c sial_node.c sial_var.c sial_func.c sial_str.c \ + sial_op.c sial_num.c sial_stat.c sial_builtin.c sial_type.c \ + sial_case.c sial_api.c sial_member.c sial_alloc.c sial_define.c \ + sial_input.c sial_print.c + +OFILES = $(CFILES:.c=.o) sialpp.tab.o sial.tab.o lex.sial.o lex.sialpp.o \ + baseops.o + +HFILES = sial.h sial_api.h + +LSOURCES = sial-lsed sialpp-lsed sial.l sialpp.l sial.y sialpp.y mkbaseop.c + +all: default + +showfiles: + @echo $(RELDIR)/$(CFILES) $(RELDIR)/$(HFILES) $(RELDIR)/$(LSOURCES) + +exports: all + install $(TARGETS) $(ROOT)$(LIBDIR) + +headers: + install -m 644 $(HFILES) $(ROOT)/usr/include + +install: headers exports + (cd scripts ; $(MAKE) install ) + +baseops.o: mkbaseop.c + $(CC) $(CFLAGS) -o mkbaseop mkbaseop.c + ./mkbaseop > baseops.c + $(CC) $(CFLAGS) -c baseops.c + +mkbaseop.c sial_member.o sial_op.o sial_stat.o sial_type.o y.tab.o : sial.tab.h + +lex.sial.o: lex.sial.c sial.tab.c sial.h + $(CC) $(CFLAGS) -c lex.sial.c + +lex.sial.c: sial.l + flex -L -Psial -t sial.l > lex.sial.c + +sial.tab.c: sial.tab.h + +sialpp.tab.o: sialpp.tab.c + $(CC) $(CFLAGS) -c sialpp.tab.c + +sial.tab.o: sial.tab.c + $(CC) $(CFLAGS) -c sial.tab.c + +sial.tab.h : sial.y + $(YACC) -psial -v -t -d sial.y + +lex.sialpp.o: lex.sialpp.c sialpp.tab.c sial.h + $(CC) $(CFLAGS) -c lex.sialpp.c + +lex.sialpp.c: sialpp.l + flex -Psialpp -t sialpp.l > lex.sialpp.c + +sialpp.tab.c: sialpp.tab.h sial.tab.h + +sialpp.tab.h : sialpp.y sial.tab.h + $(YACC) -psialpp -v -t -d sialpp.y + +default: $(TARGETS) + +$(CFILES): $(HFILES) sial.tab.h + +$(TARGETS): $(OFILES) + $(AR) ccurl $(TARGETS) $(OFILES) + +clean: + -/bin/rm -f *.o $(TARGETS) $(LDIRT) + +clobber: clean diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/mkbaseop.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/mkbaseop.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/mkbaseop.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/mkbaseop.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,169 @@ +/* + * Copyright 2000 Silicon Graphics, Inc. All rights reserved. + */ + +#include +#include +#include "sial.h" +#include "sial.tab.h" +/* + This utility generates a operator function table for the base type. + Each combinaison of operand type and operation needs a dedicated + function. We use a table defined here in to generate an indirect table + that if indexed (from within sial_op.c) using : + + value_t * (func)(value_t *v1, value_t *v2) = table[type1][type2][op]; +*/ +static struct opss { + char *str; + char *acro; + int code; +} opstbl[] = { + { "+", "ADD", ADD }, + { "-", "SUB", SUB }, + { "/", "DIV", DIV }, + { "*", "MUL", MUL }, + { "^", "XOR", XOR }, + { "%", "MOD", MOD }, + { "|", "OR", OR }, + { "&", "AND", AND }, + { "<<", "SHL", SHL }, + { ">>", "SHR", SHR }, + { "==", "EQ", EQ }, /* most be first bool */ + { ">", "GT", GT }, + { "<", "LT", LT }, + { ">=", "GE", GE }, + { "<=", "LE", LE }, + { "!=", "NE", NE }, +}; + +static char *typtbl[] = { "sc", "uc", "ss", "us", "sl", "ul", "sll", "ull" }; + +#define NOPS (sizeof(opstbl)/sizeof(opstbl[0])) +#define NTYPS (sizeof(typtbl)/sizeof(typtbl[0])) + +int +main() +{ +int i,j,k; + + printf("\ +#include \"sial.h\"\n\ +#include \"sial.tab.h\"\n\ +/**************************************************************\n\ + This file is generated by a program.\n\ + Check out and modify libsial/mkbaseop.c instead !\n\ +***************************************************************/\n"); + + + /* create all the functions for all combinaison */ + for(i=0;iv.%s = v1->v.%s %s v2->v.%s;\n" +" ret->type.type=%s->type.type;\n" +" ret->type.idx=%s->type.idx;\n" +" ret->type.size=%s->type.size;\n" +"}\n", + opstbl[k].acro, + typtbl[i], + typtbl[j], + j>=i?typtbl[j]:typtbl[i], + typtbl[i], + opstbl[k].str, + typtbl[j], + j>=i?"v2":"v1", + j>=i?"v2":"v1", + j>=i?"v2":"v1"); + + } else { + + printf("" +"static void \n" +"op_%s_%s_%s(value_t *v1,value_t *v2,value_t *ret)\n" +"{\n" +" ret->v.%s = ( v1->v.%s %s v2->v.%s );\n" +" ret->type.type=V_BASE;\n" +" ret->type.idx=B_UL;\n" +" ret->type.size=4;\n" +"}\n", + opstbl[k].acro, + typtbl[i], + typtbl[j], + "ul", + typtbl[i], + opstbl[k].str, + typtbl[j]); + } + + } + + } + + } + + /* create the array from within which the runtime functions + will indexed to get a function pointer */ + + printf("void (*opfuncs[%d][%d][%d])()={\n", NTYPS, NTYPS, NOPS); + + for(i=0;itype.idx][v2->type.idx][i])(v1,v2,ret);\n\ +}\n", NOPS, NOPS); + exit(0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/README /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/README --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/README 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/README 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,1024 @@ + + SIAL : Simple Image Access Language + =================================== + + Sial is a C interpreter that permits easy access to the symbol +and type information stored in a executable image like a coredump or live +memory interfaces (e.g. /dev/kmem, /dev/mem). It support a FULL C +syntax and the same variable and function scope and type. Symbols and +type information in the image become standard variables and types in +the sial scripts's context. + + This README focuses on the differences between sial and a C compiler +so, for C syntax information, please refer to a C reference manual. I +also explain the mechanisms of the API that allow sial to be inserted +into any debugging tool that deals with objects and can furnish symbol +and type information to sial through the API. The more specific lcrash +sial implementation is described and a howto on creating commands is +also given here. + +Preprocessor commands +--------------------- + + All preprocessor commands I knew of are supported. #define, + #undef, #ifdef, #if, #ifndef, #else, #elif, #endif and #include. + + This one is ignored: #ident #pragma + + Sial has a builtin secondary parser for preprocessor expression + evaluation. + +Symbols +------- + + The symbols from the system image and their associated value + are available from within sial. Since, most of the time, no + type information is associated with the symbols, a reference to + a symbol return the actual address of the symbol within the + system image. So you might say that sial adds a level of + reference for symbol information. Let's say there is a (int) + symbol called "nproc" that contains the number of processes + currently running on the system. To get the value of nproc from + sial one would have to write something like this: + + void + showprocs() + { + int i; + int np; + + np=*(int*)nproc; + + for(i=0;ip_next) + + do something... + } + } + +Variable Initialization +-------------------- + + Variable assignment at the time of declaration is supported. + Also, the function __init() will be executed, if it is defined, + right after the macro file as been compiled. + + Using an uinitialized variable will generate a run time error. + +Variable types +-------------- + + All types made available from the API can be used. + These are the types already defined in the executable image. + + Floating point types are not supported at this time. I have no + plan to support it. + + Declaration of arrays is not supported. To access a array from + the image, use a pointer. + + Unions and structures type declarations are supported and can be + used to create additional types that become available within + the same macro file. + + Typedef are supported. + + Function pointers are not supported (use 'string' type instead, + see "Operators" below) + + Sial defines a 'string' types to handle ansi C strings within + the interpreter. This string type also support some of the + operator (+, ==, =, !=, etc... see below) + +Variable Scope +-------------- + + All symbols available in the system image become global + variable in the sial context. + + Variable declared within sial can be given one of 3 different + scopes like in normal C. + + GLOBAL: A variable that is declared outside a + function that is not marked as static. this variable if + available to all macros that have been load into the + interpreter. + + Ex: file1: + + int global; int func() { } + + file2: + + func2() + { + int i; + + i=global; + } + + NB: since sial currently validates variable existence only at + run time there is no need to declare a 'global' as an 'extern' + variable. At run time, if none of the currently loaded macros + define a global variable called 'global' then 'i=global' will + fail with a 'unknown variable' error. + + FILE: A Variable that is declared outside any + functions that is tagged with the static keyword. This + variables is available to all functions defined in the + same macro file. + + Ex: + + file1: + + static int maxproc=100; + sraruc int array; + + __init() + { + int i; + + for(i=0;i<10;i++) array[i]=-1; + + } + + void func1() + { + int i; + + for(i=0;i, <=, >=. + + examples: + + s = "hello" + "World"; + + if("hello" == "world" ) { ... } + + The 'in' operator is supported on dynamic arrays. + + if(i in array) { ... } + str=i in array ? "yes" : "no"; + + Function callbacks + ------------------ + + Function calls through function pointers is not possible + currently. Instead, use a 'string' type to achieve the same + result. When sial is about to perform a call, it will look at + the type of the variable used to name the function. If the type + is 'string' it will use the value that string and call that + function instead. + + func0(int i, int j) + { + printf("i=%d j=%d\n", i,j); + } + func1(string func) + { + func(1,2); + } + main() + { + func1("func0"); + } + + In the above example, func1() ends up calling func0() not + func. This can be used as a callback mechanism, specially + useful for creating generating function that call s linked list + of objects and calls a variable function for each object. Like + a function that walks tasks or procs. + + The sizeof() operator is evaluated at execution time. So you + can supply a type, a variable, or any valid expression and the + appropriate size will be returned. The expression *will* be + executed, so be careful. + +Statements +---------- + + All C statements except 'goto' are supported. + + The 'for(i in array)' is supported on dynamic arrays. + +Dynamic arrays +------------------------------- + + When indexing through a non pointer variable you end up + creating a dynamic array. + + Example: + + int func() + { + char *cp, c; + int array, i; + + cp=(char *)symbol; + c=cp[10]; + + array[0]="one string"; + array[12]="second string"; + + for(i in array) { + + printf("array[%d]=%s\n", i, array[i]); + } + + } + + In the 'c=cp[10]' statement, sial goes to the system image to + get one 'char' at the address symbol+10. + + In the second case, 'array' is not a pointer, it's a 'int'. So + sial threats all indexing through it as dynamic. + + Additionally, sial supports multi levels of dynamic index, + which makes possible to create random trees of indexed values: + + int func() + { + int array, i, j; + + array[10]="array10"; + array[10][3]="array10,3"; + array[20]="array20"; + array[20][99]="array20,99"; + + for(i in array) { + + printf("array[%d]=%s\n", i, array[i]); + + for(j in array[i]) { + + printf("array[%d][%d]=%s\n", i, j, array[i][j]); + + } + + } + } + + I think it is a good thing to have, since system image access + and analysis require frequent lists search. So for example, + with dynamic arrays, one can walk the proc list taking note of + the proc*, then walking a user thread list taking note of the + thread* and gathering some metrics for each of these threads. + In order to get to these metrics at some later point in the + execution, something like this could be used: + + func() + { + proc *p; + + for(p in procs) { + + thread *t; + + for(t in procs[p]) { + + int rss, size; + + /* we use index 0 for rss and 1 for size */ + printf("proc %p, thread %p, rss:size = %d:%d\n" + , p, t, procs[p][t][0], procs[p][t][1]); + } + } + } + + Arrays are always passed by reference. On creation the + reference count is set to one. So this array will exist + untill the variable it's assigned to dies. + + Arrays can be created by dso's. See the DSo section below for more + information and examples of this. + + +Sial API +-------- + + Sial can be integrated into any tool that needs to access + symbol and type information from some object. Currently it is + integrated in lcrash and icrash (tools that access Linux and + Irix kernel images respectively), but it should be possible to + use it, for example, in dbx or gdb. The API gives a simple + interface through which the host application sends symbol and + type (including member) information and gives access to the + image itself so that sial can read random blocks of data from + the image. + + >> sial_builtin(bt *bt) + + Install some set of builtin function. See below + (builtin api). + + + >> sial_chkfname(char *fname, int silent); + + Will check for the exsistance of a function in sial. + Typically used to check xtra entry points before the + application registers a new command (see sial_setcallback). + + >> sial_open(): + + The first function that should be called is sial_open(). + sial_open() will return a value of 1 if everything is ok or 0 + in case of some problem. This call initializes internal date + for the sial package. + + >> sial_setapi(apiops* ops, int nbytes): + + This function will setup the callbacks that sial will use + to get information from the application. + + See 'callback interface' below. + + >> sial_load(char *name); + + To have sial load and compile a macro or a set of macro + use sial_load(). Parameter name gives the name of the + file to compile. If name points to a directory instead, + then all the files in this directory will be load. So + an application would call sial_load() when it first + starts up specifying some well known files or + directories to load. For example $HOME/.xxx and + /etc/xxx would be loaded, ~/.xxx containing user + defined macros, and /etc/xxx containing system macros. + + >> sial_unload(char *funcname) + + To unload the a macro file use this function. + "funcname" is the name of any global function in the + file you want to unload. + + >> void sial_setcallback(void (*scb)(char *)); + + To be called prior to any load calls. + After each loads, sial will call this function + back with the name of each functions compiled. + Typicly, the application will then perform checks + and potencially install a new command for this + function. + + ex: + void + reg_callback(char *name) + { + char fname[MAX_SYMNAMELEN+sizeof("_usage")+1]; + _command_t cmds[2]; + + snprintf(fname, sizeof(fname), "%s_help", name); + if(!sial_chkfname(fname, 0)) return; + snprintf(fname, sizeof(fname), "%s_usage", name); + if(!sial_chkfname(fname, 0)) return; + + cmds[0].cmd=strdup(name); + cmds[0].real_cmd=0; + cmds[0].cmdfunc=run_callback; + cmds[0].cmdparse=parse_callback; + cmds[0].cmdusage=usage_callback; + cmds[0].cmdhelp=help_callback; + cmds[1].cmd=0; + unregister_cmd(cmds[0].cmd); + (void)register_cmds(cmds); + } + + >> sial_setipath(char *path) + + When sial processes a #include directive it will use + the specified path as a search path. + The usual PATH format is supported ex: + "/etc/include:/usr/include". + + >> sial_setmpath(char *path) + + When sial_load() is called with a relative path name or + just the name of a file, it will use a search PATH to + locate it. The path parameter to sial_set,path() sets + this path. The usual PATH format is supported ex: + "/etc/xxx:/usr/lib/xxx". + + >> sial_setofile(FILE *ofile) + + All output of sial commands will be send to file ofile. + + >> sial_cmd(char *cmd, char **argv, int nargs) + + This is the way to execute a sial command that as been + loaded. 'cmd' is the name of function to call. 'argv' + are the argument to this function. 'nargs' is the + number of argument in array 'argv'. + + Sial_cmd() will process argv and make the corresponding + values available to the function by creating global + variables that the function can test and use. + + >> sial_showallhelp() + + This command will send a complete list of the commands + long with the usage and help for each one of them. This + function should be called when the user request + something like 'help all'. + + >> sial_showhelp(char *func) + + This will display the help information for a particular + function loaded in sial. + +The callback interface +---------------------- + + Everytime sial needs some piece of information, it will call + the application back for it. THe sial_apiset() function is used + to install this callback interface into sial. Here is the list + of callback functions: + + typedef unsigned long long ull; + + Sial_apiset() passes this structure to sial: + + typedef struct { + + int (*getmem)(ull, void *, int); + int (*putmem)(ull, void *, int); + int (*member)(char *, ull, type * , member *); + int (*getctype)(int ctype, char * , type*); + char* (*getrtype)(ull, type *); + int (*alignment)(ull); + int (*getval)(char *, ull *); + enum_t* (*getenum)(char *name); + def_t* (*getdefs)(); + uint8_t (*get_uint8)(void*); + uint16_t (*get_uint16)(void*); + uint32_t (*get_uint32)(void*); + uint64_t (*get_uint64)(void*); + } apiops; + + + The apiops* struct defines the following member and function pointers: + + -getmem(ull addr, void *buffer, int nbytes) + + Read nbytes from image at virtual address addr (32 or + 64 bit) to buffer. + + -putmem(ull addr, void *buffer, int nbytes) + + Write nbytes from buffer to image at virtual address + addr (32 or 64 bit). + + -member(char *name, ull pidx, type *tm, member *m); + + Get information on a structure member called name. + Pidx is a unique type index for the parent structure. + The getctype() function should fill in this index in + it's type*. The dwarf model uses unique indexes (die + offsets) that can be used here. 'tm' will hold + information on the type of the member. 'm' will hold + information on the member specific stuff (bit sizes, + bit offset etc.). + + Use the sial_member_...() functions to setup m. + Use the sial_type_...() functions to setup t. + + -getctype(int ctype, char *name, type *tout) + + Get type information for a complex type. Ctype + specifies that name is a type of type struct/union or + enum. tout contain the returned type information. + + -getrtype(ull idx, type *t) + + Gets the type string linked to a typedef. For example, + the gettdeftype() would return + "unsigned long long". This enables sial to drill down a + typedef (a typedef can be build from a typedef + itself) in order to perform proper type validation for + assignment or function parameters or return values. + + -getval(char *sname, ull *value) + + Returns the value of symbol "sname" from the image. The + value is returned in 'value'. On any image this is + address of the symbol within the image itself, not the + value of the symbol itself. See explanation of this + above. + + -getenum(char *name); + + Return a list of enum values. + Sial will make these available as symbol for the duration + of the compile. + + -getdefs() + + Return a list of #defines to be active througout the + sial session. + + -get_uint8/16/32/64() + + Return converted unsigned integers. As parameters are passed pointers + to unsigned int values in dump representation. The return values are + the corresponding unsigned int values in the representation of the + host architecture, where sial is running. + +The builtin API +--------------- + + Sometime it is necessary to create a C function that will + handle some piece of the work, that a macro cannot do. Sial's + builtin function are implemented this way. Generic function + like 'printf' or 'getstr' can get some parameter input from the + macros and do something (printf) or they get some information, + map it to a sial value and return it to a macro (getstr). + + + Sial can load new functiosn from DSOs. If the extension of + a file name is ".so" then sial opens it and gets a list + of function specs from it. Unload of that file will + uninstall these functions. + + The API between the dso and sial is quite simple at this time. + It has not been exercised as must as it would need to, so it + might get more flexible and thus complex in the future. + + Here are two examples of simple extensions. + + This is an example of a simple extension. An equivalent + os the "hello world" C program, but this one gets 2 parameters + , one int and one string and returns the received int. + + #include "sial_api.h" + + value * + helloworld(value *vi, value *vs) + { + int i=sial_getval(vi); + char *s=(char*)sial_getval(vs); + + sial_msg("Hello to the world![%d] s=[%s]\n", i, s); + return sial_makebtype(1); + } + + BT_SPEC_TABLE = { + { "int hello(int i, string s)", helloworld}, + { 0, 0} + }; + + static char *buf; + + BT_INIDSO_FUNC() + { + sial_msg("Hello world being initialized\n"); + buf=sial_alloc(1000); + return 1; + } + + BT_ENDDSO_FUNC() + { + sial_msg("Hello world being shutdown\n"); + sial_free(buf); + } + + The BT_SPEC_TABLE is scanned. It's a simple table + with 2 entries per functions and terminated with + a NULL prototype. + + The DSO initializer function is called. + If it returns 0 then installtion is terminates. + If it returns 1 we proceed forward. + + The prototype is compiled and a syntax error + will send the error message to the application + output file (stdout usually). + + When the prototype as compiled with no errors + the function is installed and ready to be used from + sial macros. + + Type checking is performed by sial at + execution time on both, the function parameters + andthe function return. + + DSO's can also receive, create and manipulate dynamic arrays. + Here is an example of this: + + #include "sial_api.h" + + #ifdef ARRAY_STATIC + static value *v; + #endif + + value * + mkarray(value* vi) + { + int i=sial_getval(vi); + #ifndef ARRAY_STATIC + value *v=sial_makebtype(0); + #endif + + sial_msg("Received value [%d]\n", i); + /* build an array indexed w/ int w/ 2 string values */ + sial_addvalarray(v, sial_makebtype(0) + , sial_makestr("Value of index 0")); + sial_addvalarray(v, sial_makebtype(2) + , sial_makestr("Value of index 2")); + #if ARRAY_STATIC + /* + For a static array use : + Then the array will persist until you Free it. + */ + sial_refarray(v, 1); + #endif + return v; + } + + value * + showstrarray(value* va) + { + value *v1=sial_strindex(va, "foo"); + value *v2=sial_strindex(va, "goo"); + + printf("array[1]=%d\n", sial_getval(v1)); + printf("array[2]=%d\n", sial_getval(v2)); + sial_addvalarray(va, sial_makestr("gaa"), sial_makebtype(3)); + sial_addvalarray(va, sial_makestr("doo"), sial_makebtype(4)); + sial_freeval(v1); + sial_freeval(v2); + return sial_makebtype(0); + } + + value * + showintarray(value* va) + { + value *v1=sial_intindex(va, 1); + value *v2=sial_intindex(va, 2); + + printf("array[1]=%d\n", sial_getval(v1)); + printf("array[2]=%d\n", sial_getval(v2)); + sial_freeval(v1); + sial_freeval(v2); + return sial_makebtype(0); + } + + BT_SPEC_TABLE = { + { "int mkarray(int i)", mkarray}, + { "void showintarray(int i)",showintarray}, + { "void showstrarray(int i)",showstrarray}, + { 0, 0} + }; + + static char *buf; + + BT_INIDSO_FUNC() + { + sial_msg("mkarray initialized\n"); + #ifdef ARRAY_STATIC + /* we will need a static value to attach the + array too */ + v=sial_makebtype(0); + #endif + return 1; + } + + BT_ENDDSO_FUNC() + { + sial_msg("mkarray being shutdown\n"); + #ifdef ARRAY_STATIC + sial_freeval(v); + /* freing the value decrements the reference + count by one. So, if none of the calling + macros copied the value to a static + sial variable, it will free the array */ + #endif + } + +Macro Construction +------------------ + + When sial as been integrated into an application and a basic + set of builtin command as been created, it is time to start + creating the macro themselves. Some basic rules and conventions + apply to macro construction that make the coding and + documenting steps of macro definition easy. + + I will use the function foo as an example. Function foo is + defined in file /usr/tmp/sial/foo. Function foo is a user + callable function, meaning that it can be executed by the + sial_cmd() function. The command input section of the + application can thus call sial_cmd("foo", char *argv, int + nargs) to execute the foo macro. + + ------------ file foo ------------- + + foo_opt(){ return "ab:c"; } + + foo_usage(){ return "[-a] [-b barg] [-c] addr [addr [addr...]]"; } + + foo_help(){ return "This is an example function"; } + + static int + doproc(proc_t *p) + { + printf("p=0x%p\n", p); + } + + int foo() + { + int all, i; + string barg; + + if(exists(aflag)) all=1; + else all=0; + + if(exists("bflag")) bval=barg; + + for(i in argv) { + + proc_t *p; + + p=(proc_t*)atoi(argv[i], 16); + + doproc(p); + + } + } + + ------------ end of file foo -------------- + + The application calls sial_load() to load foo. Sial calls + back the application with the names of all fucntions declared + in that file. The aplication can then register commands for + the user to type according to this list of functions. + In this case 'foo'. + + The application then uses sial_cmd() to run a specific + command 'foo'. + + Before executing the command, sial checks if a foo_opt() + function exists and if so, calls it. This function returns the + proper getopt() argument specification string. If this function + does not exists then all arguments are passed down to the foo() + function directly. + + If the arguments supplied by the user do not follow the proper + syntax then the function foo_usage() will be called, if it + exists. If the foo_usage() function does not exists, a generic + error message is generated by sial. + + If the command 'help foo' is issued, the application should be + calling sial_exefunc("help_foo", 0) whish will return a VALUE_S + for the help for foo. Or whatever foo_help() returns. + + Each option, their associated value and addition arguments are + made available to the foo funtion by creating the following + global variables before the actual call. + + Each option, if specified, will trigger the existence of flag + variable. In the foo() case, this means that variables aflag, + bflag and cflag can possibly exist. The function + exists("variable name") can then be used to test for this + option presence. + + If an option has an associated value (getopt's ':' is specified + on the string foo_opt() returns) this value is made available + as a string type variable called Xarg, where X is the option + letter. In the case of foo() variable 'string barg' would exist + if the -b option was supplied by the user. + + The rest of the arguments supplied by the user are made + available in an array of 'string' called argv. argv[0] is + set to the name of the function 'foo' and argc is a global + that defines how many argv their are. + +Builtin functions +================= + + Here is a description of the current set of builtin functions. + + unsigned long long + atoi(string value [, int base]) + + Convert a string value to a long long. Base is the base + that should be used to process the string e.g. 8, 10 or + 16. If not specified, then the standard numeric format + will be scnanned for ex: + + 0x[0-9a-fA-F]+ : hexadecimal + 0[0-7]+ : octal + [1-9]+[0-9]* : decimal + + This function is used when converting command line + arguments to pointers. + + Example: + + void + mycommand() + { + int i; + + for(i=1;i> mycommand 0xa80000004ab14578 + + int exists(string name) + + Checks for the existance of a variable. Returns 1 if + the variables does exist and 0 otherwise. This function + is mostly used to test if some options were specified + on when the macro was executed from command line. + + It can also be used to test for image variable. + + example: + + void + mycommand() + { + if(exists("aflag")) { + + // user has specified -a option + } + } + + void exit() + + Terminate macro excution now. + + int getchar() + + Get a single character from tty. + + string gets() + + Get a line of input from tty. + + string getstr(void *) + + Gets a null terminated string from the image at the + address specified. Sial will read a series of 16 byte + values from the image untill it find the \0 character. + Up to 4000 bytes will be read this way. + + string getnstr(void *, int n) + + Gets n characters from the image at the specified + address and returns the corresponding string. + + string itoa(unsigned long long) + + Convert a unsigned long long to a decimal string. + + void printf(char *fmt, ...); + + Send a formatted message to the screen or output file. + For proper allignment of output on 32 and 64 bit systems + one can use the %> sequence along with the %p format. + + On a 32 bit system %p will print a 8 character hexadecimal + value and on a 64 bit system it will print a 16 character + value. So, to get proper alignment on both type of systems + use the %> format which will print nothing on a 64 bit system + but will print 8 times the following character on a 32 bit + system. + + example: + + struct proc *p; + + printf("Proc %> uid pid\n"); + printf("0x%p %8d %8d\n" + , p, p->p_uid,p_p_pid); + + int sial_depend(string file) + + Loads a macro or directory of macros called + 'file'. Contrary to sial_load() it will not + give any error messages. Returns 1 on success + 0 otherwise. + + int sial_load(string file) + + Loads and compiles a sial macro file. + returns 1 if successful or 0 otherwise. + + void sial_unload(string file) + + Unload's a sial macro file + + string sprintf(string format, ...) + + Creates a string from the result of a sprintf. + Example: + + void + mycommand() + { + + string msg; + + msg=sprintf("i=%d\n", i); + } + The result will be truncated to maxbytes if it would be + longer. + + int strlen(string s) + + Return the length of string s. + + string substr(string s, int start, int len) + + Creates a string from the substring starting a charcater + 'start' of 's' for 'len' characters. + example: + + s=substr("this is the original", 6, 2); + + So 's' will become "is". + + + -------------------------------------------------------- + +Questions/Comments +Luc Chouinard, lucchouina@yahoo.com diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/README.sial /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/README.sial --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/README.sial 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/README.sial 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,97 @@ + + This file (README.sial) gives some information specific to the crash(1) + integration of sial. + + Please refer to the README file generic libsial informations. + + An example script can be found as ../scripts/sial.c + + PATHS and ENVIRONMENT + ===================== + + The default location to look for macros and include files are + /usr/share/sial/.sial and ~/..sial + + The default 'root' for #include location are thus: + + /usr/share/sial/crash/include and ~/.sial/include. + + There are two environment variables that control these locations. + + SIAL_IPATH : path to use for include files. + ex: setenv SIAL_IPATH /usr/include:$(ROOT)/usr/include:~/.lcrash/include + + SIAL_MPATH : path to use for finding macro files. + ex: setenv SIAL_MPATH /usr/tmp/macs:~/.sial + + #define's + ===================== + + The current independent #define's are: + + Name Value/format + ==== ===== + linux 1 + __linux 1 + __linux__ 1 + unix 1 + __unix 1 + __unix 1 + LINUX_RELEASE 0x%08x + LINUX_2_2_16 (LINUX_RELEASE==0x020210) + LINUX_2_2_17 (LINUX_RELEASE==0x020211) + LINUX_2_4_0 (LINUX_RELEASE==0x020400) + LINUX_2_2_X (((LINUX_RELEASE) & 0xffff00) == 0x020200) + LINUX_2_4_X (((LINUX_RELEASE) & 0xffff00) == 0x020400) + + For i386 images/cores only. + + Name Value + ==== ==== + i386 1 + __i386 1 + __i386__ 1 + + For ia64 images/cores only. + + Name Value + ==== ===== + ia64 1 + __ia64 1 + __ia64__ 1 + __LP64__ 1 + _LONGLONG 1 + __LONG_MAX__ 9223372036854775807L + + If you feel there should be more standard defined pushed + there, let me know. + + + Loading/Unloading + ===================== + + crash defines two new commands for loading and unloading sial + macros called "sload" and "sunload", respectively. + + Using "sload" should be enough, since sial automaticly "sunload's" + the previous copy after successfully compiling the new one. + + DSO's must be unload'ed before you can reload them. + + Editing + ===================== + + To facilitate macro editing, crash makes a "edit" command available. + edit will get you directly in the macro file that + defines function "funcname" at the line where "funcname" starts. + + edit -f /somedir/somefile, will start editing a new/old file. + + edit -l will get you position on the "l"ast compile or runtime error. + + Macro integration into the crash framework + ============================================= + + Refer to the README file on writing a user level command. + Also look at the 'sial.c' example in the scripts directory + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_alloc.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_alloc.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_alloc.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_alloc.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,430 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ + +#define MEMDEBUG 1 +/* +*/ +#include "sial.h" +#include +#include +#include +#include +#include +#include +#include + +#ifdef __GNUC__ +# if __LP64__ +# define NKPC 16 +# else +# define NKPC 4 +# endif +#else +// must be the SGI Mips compiler. +# if (_MIPS_SZLONG == 64) +# define NKPC 16 +# else +# define NKPC 4 +# endif +#endif +#define PAGESIZE (NKPC*1024) + + +/* + Jump defines +*/ +#define MAXJMPS (S_MAXDEEP*3) +int njmps=0; + +typedef struct blklist { + + struct blklist *next; /* root based doubly chained */ + struct blklist *prev; + int size; /* size of the allocation */ + int istmp; /* was flaged as temp ? */ + int level; /* coresponding level */ + void *caller; /* __return_address of caller */ + void *freer; /* __return_address of freer */ + +} blist; + +#define SIZEBL (((sizeof(blist)+8)/8)*8) + +void pbl(void *p) +{ +blist *bl=(blist*)(((char*)p)-SIZEBL); + sial_msg("struct blklist *%p {", bl); + sial_msg(" next=%p", bl->next); + sial_msg(" prev=%p", bl->prev); + sial_msg(" size=%d", bl->size); + sial_msg(" istmp=%d", bl->istmp); + sial_msg(" level=%d", bl->level); + sial_msg(" caller=%p", bl->caller); + sial_msg(" freer=%p", bl->freer); +} + +static blist temp={ &temp, &temp, 0, 0, 0, 0, 0 }; + +value_t* +sial_findsym(value_t *vadr) +{ + char *addr=sial_getptr(vadr, char); + char *p = API_FINDSYM(addr); + + if(p) { + return sial_setstrval(sial_newval(), p); + } else { + return sial_setstrval(sial_newval(),""); + } +} + +value_t* +sial_showaddr(value_t *vadr) +{ +void *addr=sial_getptr(vadr, void); +blist *bl; +int n=0; + + for(bl=temp.next; bl != &temp; bl=bl->next) { + + if(bl->caller==addr) { + + if(!(n%8)) sial_msg("\n"); + sial_msg("0x%08x ", ((char *)bl) + SIZEBL); + n++; + } + } + return sial_makebtype(0); +} + +static int memdebug=0; + +/* these two functions must *not* receive any values */ +value_t* sial_memdebugon() { memdebug=1; return sial_makebtype(0); } +value_t* sial_memdebugoff() { memdebug=0; return sial_makebtype(0); } +int sial_ismemdebug() { return memdebug; } + +value_t* +sial_showtemp() +{ +blist *bl; +int i, totsiz, totbl; +static int ncallers=0; +static void *callers[1000]; +static int count[1000]; +static int sizes[1000]; +static int dir=0; + + if(!dir) { + + memset(callers, 0, sizeof(void*)*1000); + memset(count, 0, sizeof(int)*1000); + memset(sizes, 0, sizeof(int)*1000); + ncallers=0; + } + + if(dir==1) dir=0; + else dir=1; + + for(bl=temp.next; bl != &temp; bl=bl->next) { + + int i; + + for(i=0;icaller) { + if(dir) { count[i]++; sizes[i]+=bl->size; } + else { count[i]--; sizes[i]-=bl->size; } + break; + } + + if(i==ncallers) { + callers[ncallers]=bl->caller; + count[ncallers]=1; + sizes[ncallers]=bl->size; + ncallers++; + } + + } + totbl=totsiz=0; + for(i=0;icaller=retaddr; +} + +#define PAGEMASK 0xfffffffffffff000ll +#define MAGIC 0xdeadbabe +void * +sial_alloc(int size) +{ +char *m; +blist *bl; + +#ifdef MEMDEBUG +unsigned long p, pp; +int npages; +#endif + + size=size+SIZEBL; + +#if MEMDEBUG + + if(memdebug) { + + npages=((size+PAGESIZE+4)/PAGESIZE)+2; + p=(unsigned long)malloc(npages*PAGESIZE); + p=(p+PAGESIZE)&PAGEMASK; + pp=p+((npages-2)*PAGESIZE); + p=pp-size; + p = p ^ (p & 0x0fll); + *((int*)(p-4))=MAGIC; + mprotect((void*)pp, PAGESIZE, PROT_READ); + m=(char*)p; + + } else { + + m=malloc(size); + } + +#else + + m=malloc(size); + +#endif + + + bl=(blist*)m; + bl->size=size; + bl->level=njmps; + bl->prev=bl->next=bl; + bl->istmp=0; + TAG(m+SIZEBL); + return m+SIZEBL; +} + +void +sial_maketemp(void *p) +{ +blist *bl; + + if(!p) return; + + bl=(blist*)(((char*)p)-SIZEBL); + bl->prev=&temp; + bl->next=temp.next; + bl->istmp=1; + temp.next->prev=bl; + temp.next=bl; +} + +void * +sial_calloc(int size) +{ +char *p=sial_alloc(size); + + TAG(p); + memset(p, 0, size); + return p; +} + +static void +sial_free_bl(blist *bl, void *ra) +{ + bl->freer=ra; + bl->prev->next=bl->next; + bl->next->prev=bl->prev; + +#ifdef MEMDEBUG + + if(memdebug) { + + /* help out dbx/gdb when they're watching the allocated area + by writing over it */ + { + int i, ni=bl->size/sizeof(void*); + char *p=(char*)bl; + unsigned long up; + + for(i=0;inext; + sial_free_bl(bl, __return_address); + bl=next; + } +} + +int +sial_istemp(void *p) +{ + return ((blist*)(((char*)p)-SIZEBL))->istmp; +} + +char * +sial_strdup(char *s) +{ +char *ns=sial_alloc(strlen(s)+1); + + strcpy(ns, s); + TAG(ns); + return ns; +} + +void * +sial_dupblock(void *p) +{ +void *p2; +int size=((blist*)(((char*)p)-SIZEBL))->size-SIZEBL; + + if(!p) return 0; + + p2=sial_alloc(size); + memcpy(p2, p, size); + return p2; +} + +/* cheap realloc. we drop the original + This function is only used ones in configmon(1) code */ +void * +sial_realloc(void *p, int size) +{ +int cursize=((blist*)(((char*)p)-SIZEBL))->size-SIZEBL; +void *p2; + + p2=sial_calloc(size); + memcpy(p2, p, cursize 1) { + + jmp_buf *env; + + while(njmps && jmps[--njmps].type!=type); + if(jmps[njmps].val) *(jmps[njmps].val)=val; + env=jmps[njmps].env; + + /* reset the variable level too... */ + sial_setsvlev(jmps[njmps].svlev); + + longjmp(*env, 1); + /* NOT REACHED */ + + } else sial_parseback(); /* we use the same code for initializing + static and automatic variables. In the case of statiuc variables + is the initizer expression throws an error then there's no J_EXIT + jump context and njmps is null. It's treated as a parsing error */ +} + +void +sial_popjmp(int type) +{ + if(!njmps) { + + sial_error("Pop underflow!"); + } + njmps--; + if(jmps[njmps].type != type) { + + sial_error("Wrong pop! %d vs %d", jmps[njmps].type, type); + } + sial_setsvlev(jmps[njmps].svlev); +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_api.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_api.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_api.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_api.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,1516 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial.h" +#include "sial.tab.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* here we do some caching of the information. This can have a speedup effect + since it limits the number of accesses we do the dwarf (or whatever type) db that + drives the type and symbols information + */ + +static stinfo_t slist={"root"}; + +/* running key to new structures */ +static ull nextidx=0, abitype=ABI_MIPS; +#define LOCALTYPESBASE 0x8000000000000000ll +static ull sial_nextidx(void) { return LOCALTYPESBASE+nextidx++; } + +/* this set of function is used to cleanup tdefs after their use. + Trailing tdefs can be combersome. Trailing struct/union/enum get new idx + each time and are not a trouble */ +static stinfo_t*tag=0; +void +sial_tagst(void) +{ + tag=slist.next; +} + +void +sial_flushtdefs(void) +{ +stinfo_t*st=slist.next; +stinfo_t*last=&slist; + + while(st != tag) { + + stinfo_t*next=st->next; + + if(st->ctype.type==V_TYPEDEF && st->idx & LOCALTYPESBASE) { + + sial_free(st->name); + sial_free(st); + last->next=next; + + } else last=st; + + st=next; + + } + tag=0; +} + +static stinfo_t* +sial_getst(char *name, int type) +{ +stinfo_t*tst; + + for(tst=slist.next; tst; tst=tst->next) { + + if(tst->ctype.type == type && tst->name && ! strcmp(tst->name, name)) { + + return tst; + } + } + return 0; +} + +#if 0 +Not used yet. +static void +sial_rmst(stinfo_t*rst) +{ +stinfo_t*st=slist.next; +stinfo_t*last=&slist; + + while(st) { + + if(st==rst) { + + last->next=st->next; + sial_free(st->name); + sial_free(st); + + return; + + } + + last=st; + st=st->next; + } +} +#endif + +stinfo_t* +sial_getstbyindex(ull idx, int type) +{ +stinfo_t*tst; + + for(tst=slist.next; tst; tst=tst->next) { + + if(tst->ctype.type == type && tst->idx == idx) { + + return tst; + } + } + return 0; +} + +static void +sial_addst(stinfo_t*st) +{ +stinfo_t*tst; + + tst=slist.next; + slist.next=st; + st->next=tst; +} + +typedef struct neg_s { + struct neg_s *next; + char *name; +} neg_t; + +static neg_t *nlist=0; + +void +sial_addneg(char *name) +{ +neg_t *neg; + + neg=sial_alloc(sizeof *neg); + neg->name=sial_strdup(name); + neg->next=nlist; + nlist=neg; +} + +int +sial_isneg(char *name) +{ +neg_t *neg; + + for(neg=nlist; neg; neg=neg->next) + if(!strcmp(neg->name, name)) return 1; + return 0; +} + +/* + This function is called by sial_vardecl() when the typedef storage class + as been specified. In which case we need to create new typedefs not variables. +*/ +void +sial_tdef_decl(dvar_t*dv, type_t*t) +{ + while(dv) { + + dvar_t*next; + + stinfo_t*st=sial_calloc(sizeof(stinfo_t)); + + if(dv->nbits) sial_error("No bits fields for typedefs"); + if(dv->idx) { + + /* we change a 'typedef type var[n];' into a 'typedef type_t*var;' */ + sial_freeidx(dv->idx); + dv->idx=0; + dv->ref++; + } +#if 0 +At this time we do not give any error messages or warnings. +If a type is redefined within a single file that will means +problem for the user put this is not a full blown C compiler. + + { + type_t*t=sial_newtype(); + + if(API_GETCTYPE(V_TYPEDEF, dv->name, t)) { + + sial_warning("Typedef %s already defined in image, redefinition ignored", + dv->name); + } + sial_freetype(t); + } +#endif + t->typattr &= ~sial_istdef(t->typattr); + sial_duptype(&st->rtype, t); + sial_pushref(&st->rtype, dv->ref); + st->name=dv->name; + dv->name=0; + st->idx=sial_nextidx(); + st->ctype.type=V_TYPEDEF; + + sial_addst(st); + + next=dv->next; + dv->next=0; + sial_freedvar(dv); + dv=next; + } +} + +int +sial_ispartial(type_t*t) +{ +stinfo_t*st=sial_getstbyindex(t->idx, t->type); + + if(!st) { + + sial_error("Oops sial_ispartial"); + } + return !st->all; +} + +char * +sial_gettdefname(ull idx) +{ +stinfo_t*tst=sial_getstbyindex(idx, V_TYPEDEF); + + if(tst) return tst->name; + else return 0; +} + +static int init=0; +static void +sial_chkinit(void) +{ + if(!init) { + + sial_error("Sial Package not initialized"); + + } +} + +void +sial_getmem(ull kp, void *p, int n) +{ + sial_chkinit(); + if(!API_GETMEM(kp, p, n)) { + + sial_error("Error on read from 0x%llx for %d", kp, n); + + } +} + +void +sial_putmem(ull kp, char *p, int n) +{ + sial_chkinit(); + if(!API_PUTMEM(kp, p,n)) { + + sial_error("Error on write at 0x%llx for %d", kp, n); + + } +} + +void +sial_partialctype(int type, char *name) +{ +stinfo_t*st; + + /* check first if we have a partial of that type + already in progress (after a forward declaration) */ + if((st=sial_getst(name, type))) { + + /* if it's complete we need to start a new one */ + if(!st->all) return; + + } + st=sial_calloc(sizeof(stinfo_t)); + st->name=sial_strdup(name); + st->ctype.type=type; + st->all=0; + st->ctype.idx=st->idx=sial_nextidx(); + sial_addst(st); +} + +void +sial_startctype_named(int type, char *name) +{ +stinfo_t*st; + + /* if no partial yet start one */ + if(!(st=sial_getst(name, type)) || st->all) + sial_partialctype(type, name); +} + +void +sial_startctype(int type, node_t*namen) +{ + sial_startctype_named(type, NODE_NAME(namen)); +} + +int +sial_samectypename(int type, ull idx1, ull idx2) +{ +stinfo_t*st1, *st2; + + if((st1=sial_getstbyindex(idx1, type)) && + (st2=sial_getstbyindex(idx2, type))) { + + // check names + if(!strcmp(st1->name, st2->name)) return 1; + + // check all members and sizes in order + // unamed ctypes can end up here too... + if(st1->stm) { + stmember_t *m1=st1->stm, *m2=st2->stm; + while(m1 && m2) { + if(strcmp(m1->m.name, m2->m.name)) break; + if(m1->m.offset != m2->m.offset ) break; + if(m1->m.size != m2->m.size ) break; + m1=m1->next; + m2=m2->next; + } + if(!m1 && !m2) return 1; + } + else if(st1->enums) { + + enum_t *e1=st1->enums, *e2=st2->enums; + while(e1 && e2) { + if(strcmp(e1->name, e2->name)) break; + if(e1->value != e2->value ) break; + e1=e1->next; + e2=e2->next; + } + if(!e1 && !e2) return 1; + } + + } + return 0; +} + +#define VOIDIDX 0xbabebabell +type_t* +sial_getvoidstruct(int ctype) +{ +type_t*bt=sial_newtype(); + + bt->type=ctype; + bt->idx=VOIDIDX; + bt->size=0; + bt->ref=0; + return bt; +} + +void sial_fillst(stinfo_t *st); + +/* Just in case this is an unnamed structure member then we need + to add it to the slist ourselves using the index. sial_getctype() would + not found it. +*/ +static void +sial_memstinfo(stmember_t *stm, char *pname) +{ +int type=stm->type.ref?stm->type.rtype:stm->type.type; + + if(is_ctype(type)) { + + if(!sial_getstbyindex(stm->type.idx, type)) { + + stinfo_t*st=sial_calloc(sizeof(stinfo_t)); + + sial_duptype(&st->ctype, &stm->type); + st->ctype.type=type; + // dereference level is attached (wrongly) to type... + // zap it + st->ctype.ref=0; + st->idx=st->ctype.idx; + st->name=sial_strdup(pname); + sial_addst(st); + } + } +} + +void +sial_fillst(stinfo_t *st) +{ +char *mname=0; +ull idx=st->ctype.idx, lidx=0; +stmember_t *stm=sial_calloc(sizeof(stmember_t)), **last=&st->stm; +char *pname; + + sial_dbg_named(DBG_STRUCT, st->name, 2, "Fill St started [local=%d].\n", (idx & LOCALTYPESBASE) ? 1 : 0); + /* bail out if this is local type */ + if(idx & LOCALTYPESBASE) return; + + if(st->stm) sial_error("Oops sial_fillst!"); + + while((pname=API_MEMBER(mname, idx, &stm->type, &stm->m, &lidx))) { + + sial_dbg_named(DBG_STRUCT, st->name, 2, "member '%s'\n", pname); + sial_memstinfo(stm, pname); + stm->next=0; + *last=stm; + last=&stm->next; + mname=""; + stm=sial_calloc(sizeof(stmember_t)); + if(pname[0]) sial_free(pname); + } + st->all=1; + sial_free(stm); +} + +type_t* +sial_getctype(int ctype, char *name, int silent) +{ +stinfo_t *st; +type_t *t=sial_newtype(); + + sial_chkinit(); + sial_dbg_named(DBG_TYPE, name, 2, "getctype [%d] [%s] [s=%d]\n", ctype, name, silent); + if(!(st=sial_getst(name, ctype))) { + + sial_dbg_named(DBG_TYPE, name, 2, "getctype [%s] not found in cache\n", name); + if(silent && sial_isneg(name)) return 0; + + st=sial_calloc(sizeof(stinfo_t)); + if(!API_GETCTYPE(ctype, name, &st->ctype)) { + + sial_dbg_named(DBG_TYPE, name, 2, "[%s] not found in image\n", name); + sial_free(st); + sial_freetype(t); + // add any tdef to the neg list + if(ctype == V_TYPEDEF) sial_addneg(name); + if(silent) return 0; + /* we fill a partial structure for this one + assuming it will be defined later. This is to permit cross + referencing of structures, self referencing of structure, and + undefined structure (opaque structures) irix: see types.c : + __pasid_opaque + */ + sial_dbg_named(DBG_TYPE, name, 2, "[%s] creating partial type\n", name); + sial_partialctype(ctype, name); + return sial_getctype(ctype, name, silent); + } + sial_dbg_named(DBG_TYPE, name, 2, "getctype [%s] found in image\n", name); + st->name=sial_alloc(strlen(name)+1); + strcpy(st->name, name); + st->stm=0; + st->idx=st->ctype.idx; + st->all=1; + sial_addst(st); + /* + if this is a typedef then drill down to the real type + and make sure it is in the cache. That's what we return + + Bug cure: this would fail: + + struct sv { + int i; + }; + struct foo { + sv_t ms_sv; + }; + + Because the rtype index returned by API_GETRTYPE() is the die offset + in the image. If We already have redefine the real type locally the + call to sial_getctype() will not have a matching index later when we + don't find the index in the type cache. + + So we track the real index with ridx. This also ensures that + redefining a struct locally and using a typetef from the image will actualy + end up pointing to the local struct and not the image struct. + */ + if(ctype == V_TYPEDEF) { + + char *tname; + int itype; + + tname=API_GETRTYPE(st->idx, t); + + if(t->type==V_REF) itype=t->rtype; + else itype=t->type; + + /* if it's a named struct, enum or union then make sure we have it in the cache */ + if(is_ctype(itype) && tname && tname[0] && + (strcmp(tname,"struct ") != 0 + && strcmp(tname,"union ") != 0 + && strcmp(tname,"enum ") != 0)) { + + sial_freetype(t); + t=sial_getctype(itype, tname, silent); + + /* in IRIX we have a typedef struct __pasid_opaque* aspasid_t; + w/ no struct __pasid_opaque defined. The aspasid_t ends + up being used as a "named" void *. So we force a void * here */ + /* XXX: This should at least generate a warning */ + if(!t) { + sial_warning("voidstruct created (%s)\n", tname); + t=sial_getvoidstruct(itype); + } + } else if (is_ctype(itype) || itype == V_ENUM) { + + /* for unnamed structs, unions and enums create an entry */ + stinfo_t*st=sial_calloc(sizeof(stinfo_t)); + + sial_duptype(&st->ctype, t); + st->idx=t->idx; + st->name=sial_strdup(""); + sial_fillst(st); + sial_addst(st); + } + sial_duptype(&st->rtype, t); + + } else if(is_ctype(ctype)) { + + /* get all member info now ! */ + sial_fillst(st); + } + } + else sial_dbg_named(DBG_TYPE, name, 2, "getctype [%s] found in cache\n", name); + + if(ctype == V_ENUM || (ctype == V_TYPEDEF && st->rtype.type == V_ENUM)) { + st->enums=API_GETENUM(name); + sial_pushenums(st->enums); + } + if(ctype==V_TYPEDEF) sial_duptype(t, &st->rtype); + else sial_duptype(t, &st->ctype); + + return t; +} + +type_t* +sial_newctype(int ctype, node_t*n) +{ +type_t*t; +char *name; + + t=sial_getctype(ctype, name=NODE_NAME(n), 0); + NODE_FREE(n); + sial_free(name); + return t; +} + +/* + We don't use the type to point back to get the typedef name. + The type is now the real type not the type for the typedef. + So we keep a running sting of the last name variable name + the parser found and use that. + 5/23/00 +*/ +node_t* +sial_tdeftovar(type_t*td) +{ +char *sial_lastvar(void); +char *name=sial_lastvar(); + + sial_free(td); + return sial_newvnode(name); +} + +/* + Check to see if a cached member info is available +*/ +static stmember_t* +sial_getm(char *name, type_t*tp, stinfo_t**sti) +{ +ull idx=tp->idx; +stinfo_t*st; +stmember_t*stm; + + for(st=slist.next; st; st=st->next) { + + if(st->idx == idx) { + + *sti=st; + + if(!st->stm) sial_fillst(st); + + for(stm=st->stm; stm; stm=stm->next) { + + + if(!strcmp(stm->m.name, name)) { + + return stm; + + } + } + } + } + return 0; +} + +value_t * +sial_ismember(value_t*vp, value_t*vm) +{ +char *name=sial_getptr(vm, char); +int ret=0; +stinfo_t*st; + + if(sial_getm(name, &vp->type, &st)) ret=1; + + return sial_defbtype(sial_newval(), ret); +} + +/* XXX this entire stuff could very well be machine specific ... */ +static int +sial_getalign(type_t*t) +{ + /* this is a custome type deal w/ it */ + if(t->type == V_BASE) { + + int n; + + /* Intel 386 ABI says that double values align on 4 bytes */ + if(abitype==ABI_INTEL_X86) n=((t->size>4)?4:t->size); + else n=t->size; + return n*8; + } + if(t->type == V_REF) { + /* + * This is an array but if there are additional references + * (>1) it is an array of pointers. In that case the pointer + * alignment has to be used. + */ + if(t->idxlst && t->ref == 1) { + int ret; + + sial_popref(t, 1); + ret=sial_getalign(t); + sial_pushref(t, 1); + return ret; + } + return sial_defbsize()*8; + } + /* alignment of a struct/union is on the largest of it's member or + largest allignment of sub structures */ + if(is_ctype(t->type)) { + + stinfo_t*st; + stmember_t*sm; + int maxallign=0; + + /* if this is a image type then let the api tell us */ + if(!(t->idx & LOCALTYPESBASE)) { + + return API_ALIGNMENT(t->idx)*8; + + } + + if(!(st=sial_getstbyindex(t->idx, t->type))) { + + sial_error("Oops sial_getalign"); + } + + for(sm=st->stm; sm; sm=sm->next) { + + int a=sial_getalign(&sm->type); + + if(a > maxallign) maxallign=a; + + } + + return maxallign; + + } + /* other types shoudl not be part of a ctype declaration ... */ + sial_error("Oops sial_getalign2!"); + return 0; +} + +static stinfo_t* +sial_chkctype(int ctype, char *name) +{ +stinfo_t*sti; + + if(name) { + + /* we should already have a partial structure on the stack */ + sti=sial_getst(name, ctype); + +#if 0 +At this time I choose not to give any warning. +Structure redefinition is a normal part of include files... + + /* We give a warning message for redefined types */ + { + type_t*t=sial_newtype(); + + if(API_GETCTYPE(ctype, name, t)) { + + sial_warning("%s %s redefinition", sial_ctypename(ctype), name); + } + sial_freetype(t); + } +#endif + + if(sti->all) { + + sial_error("Oops sial_ctype_decl"); + } + + sial_free(name); + + } else { + + sti=sial_alloc(sizeof(stinfo_t)); + sti->name=0; + sti->idx=sial_nextidx(); + sial_addst(sti); + } + return sti; +} + +/* + This function is used to create new enum types. + The syntax for enum is: + enum ident { + ident [= int], + [ident [= int] ] ... + }; + So we check for an assign value and is it exists then + we reset the counter to it. + This is the way the mips compiler does it. Which migt be + the right way or not, although I fail to see why it's done + that way. + + So enum foo { + a, + b, + c=0, + d + }; + + Wil yield values : + + a=0 + b=1 + c=0 + c=1 +*/ +enum_t* +sial_add_enum(enum_t*ep, char *name, int val) +{ +enum_t *epi, *nep=sial_alloc(sizeof(enum_t)); + + nep->name=name; + nep->value=val; + nep->next=0; + if(!ep) return nep; + epi=ep; + while(ep->next) ep=ep->next; + ep->next=nep; + return epi; +} + +type_t* +sial_enum_decl(int ctype, node_t*n, dvar_t*dvl) +{ +dvar_t*dv=dvl, *next; +int counter=0; +stinfo_t*sti; +enum_t *ep=0; +char *name=n?NODE_NAME(n):0; +type_t *t; + + if(n) sial_startctype(ctype, n); + sti=sial_chkctype(ctype, name); + + while(dv) { + + int val; + + /* evaluate an assignment ? */ + if(dv->init) { + + value_t *v=sial_exenode(dv->init); + + if(!v) { + + sial_rerror(&dv->pos, "Syntax error in enum expression"); + + } else if(v->type.type != V_BASE) { + + sial_rerror(&dv->pos, "Integer expression needed"); + } + + val=sial_getval(v); + counter=val+1; + sial_freeval(v); + + } else { + + val=counter++; + } + + ep=sial_add_enum(ep, dv->name, val); + + next=dv->next; + dv->next=0; + dv->name=0; + sial_freedvar(dv); + dv=next; + } + sti->enums=ep; + + /* now we push the values in the defines */ + sial_pushenums(sti->enums); + + /* we return a simple basetype_t*/ + /* after stahing the idx in rtype */ + t=sial_newbtype(INT); + t->rtype=sti->idx; + t->typattr |= sial_isenum(-1); + + return t; + +} + +/* + The next functions are used to produce a new type + and make it available throught the local cache. + This enables custom type definitions on top of the + ctypes defined in the object symbol tables. + + There is one function per suported architechture. + +*/ +/* macro for alignment to a log2 boundary */ +#define Alignto(v, a) (((v) + (a) -1) & ~((a)-1)) +/* + The algorith complies with the SysV mips ABI +*/ +type_t* +sial_ctype_decl(int ctype, node_t*n, var_t*list) +{ +type_t*t; +stinfo_t*sti; +stmember_t **mpp; +var_t*v; +int bits_left, bit_alignment; +int maxbytes, alignment, nextbit; +char *name=n?NODE_NAME(n):0; + + if(list->next==list) { + + sial_error("Empty struct/union/enum declaration"); + } + + t=sial_newbtype(0); + sti=sial_chkctype(ctype, name); + t->type=sti->ctype.type=ctype; + t->idx=sti->ctype.idx=sti->idx; + sti->stm=0; + mpp=&sti->stm; + +#if LDEBUG +printf("\n%s %s\n", ctype==V_STRUCT?"Structure":"Union", name ? name : ""); +#endif + + /* these are the running position in the structure/union */ + nextbit=0; /* next bit open for business */ + alignment=0; /* keeps track of the structure alignment + Mips ABI says align to bigest alignment of + all members of the struct/union. Also + unamed bit fields do not participate here. */ + maxbytes=0; /* tracking of the maximum member size for union */ + + for(v=list->next; v!=list; v=v->next) { + + stmember_t*stm=sial_calloc(sizeof(stmember_t)); + dvar_t*dv=v->dv; + int nbits; + + stm->m.name=sial_strdup(v->name); + sial_duptype(&stm->type, &v->v->type); + + /* if this member is a bit filed simply use that */ + if(dv->bitfield) { + + nbits=dv->nbits; + + /* aligment is the size of the declared base type size */ + bit_alignment=v->v->type.size*8; + + if(nbits > bit_alignment) { + + sial_error("Too many bits for specified type"); + } + + /* For unamed bit field align to smallest entity */ + /* except for 0 bit bit fields */ + if(!dv->name[0] && nbits) { + + bit_alignment=((nbits+7)/8)*8; + + } + + /* We compute the number of bits left in this entity */ + bits_left = bit_alignment - (nextbit%bit_alignment); + + /* 0 bits means, jump to next alignement unit anyway + if not already on such a boundary */ + if(!nbits && (bits_left != bit_alignment)) nbits=bits_left; + + /* Not enough space ? */ + if(nbits > bits_left) { + + /* jump to next start of entity */ + nextbit += bits_left; + + } + + /* update member information */ + stm->m.offset=(nextbit/bit_alignment)*v->v->type.size; + stm->m.fbit=nextbit % bit_alignment; + stm->m.nbits=nbits; + stm->m.size=v->v->type.size; +#if LDEBUG + printf(" [%s] Bit member offset=%d, fbit=%d, nbits=%d\n", stm->m.name, stm->m.offset, stm->m.fbit, stm->m.nbits); +#endif + /* an unamed bit field does not participate in the alignment value */ + if(!dv->name[0]) { + + bit_alignment=0; + + /* reset size so that it does not have affect in sial_getalign() */ + stm->type.size=1; + } + + } else { + + int nidx=1; + + if(dv->idx) { + + int i; + + /* flag it */ + stm->type.idxlst=sial_calloc(sizeof(int)*(dv->idx->nidx+1)); + + /* multiply all the [n][m][o]'s */ + for(i=0;iidx->nidx;i++) { + + value_t *vidx; + ull idxv; + + vidx=sial_exenode(dv->idx->idxs[i]); + if(!vidx) { + + sial_error("Error while evaluating array size"); + } + if(vidx->type.type != V_BASE) { + + sial_freeval(vidx); + sial_error("Invalid index type"); + + } + + idxv=sial_getval(vidx); + sial_freeval(vidx); + + stm->type.idxlst[i]=idxv; + + nidx *= idxv; + } + + + } + + /* the number of bits on which this item aligns itself */ + bit_alignment=sial_getalign(&stm->type); + + /* jump to this boundary */ + nextbit = Alignto(nextbit,bit_alignment); + + + if(stm->type.ref - (dv->idx?1:0)) { + + nbits=nidx*sial_defbsize()*8; + + } else { + + nbits=nidx*stm->type.size*8; + } + + if(abitype==ABI_INTEL_X86) { + + int pos=nextbit/8; + + pos = (pos & 0xfffffffc) + 3 - (pos & 0x2); + stm->m.offset=pos; + + } else { + + stm->m.offset=nextbit/8; + } + stm->m.nbits=0; + stm->m.size=nbits/8; +#if LDEBUG +printf(" [%s] Mmember offset=%d, size=%d size1=%d nidx=%d\n", stm->m.name, stm->m.offset, stm->m.size, stm->type.size, nidx); +#endif + + } + + if(ctype==V_STRUCT) nextbit+=nbits; + /* Union members overlap */ + else nextbit=0; + + /* keep track of the maximum alignment */ + if(bit_alignment>alignment) alignment=bit_alignment; + + /* keep track of maximum size for unions */ + if(stm->m.size > maxbytes) maxbytes=stm->m.size; + + stm->next=0; + *mpp=stm; + mpp=&stm->next; + } + + /* pad the final structure according to it's most stricly aligned member */ + if(nextbit) nextbit = Alignto(nextbit, alignment); + else nextbit=Alignto(maxbytes*8, alignment); /* --> it's the case for a union */ + + t->size=sti->ctype.size=nextbit/8; + +#if LDEBUG +printf("Final size = %d\n", t->size); +#endif + + sti->all=1; + sial_addfunc_ctype(sti->idx); + return t; +} + +/* + member access and caching. + If the member name is empty then the caller wants us + to populate the entire engregate. The apimember() should + support a getfirst() (member name == "") and getnext() + (member name != "") for this perpose. + */ +stmember_t* +sial_member(char *mname, type_t*tp) +{ +stinfo_t *sti; +stmember_t *stm; + + if(!is_ctype(tp->type) && ! (tp->type==V_REF && is_ctype(tp->rtype))) { + + sial_error("Expression for member '%s' is not a struct/union", mname); + + + } + + if(tp->idx == VOIDIDX) { + + sial_error("Reference to member (%s) from unknown structure type", mname); + } + + if(!(stm=sial_getm(mname, tp, &sti))) { + + sial_error("Unknown member name [%s]", mname); + } + return stm; +} + +int +sial_open() +{ + sial_setofile(stdout); + /* push an empty level for parsing allocation */ + sial_pushjmp(0, 0, 0); + sial_setapiglobs(); + init=1; + sial_setbuiltins(); + return 1; +} + +/* here is a set of api function that do nothing */ +static int apigetmem(ull iaddr, void *p, int nbytes) { return 1; } +static int apiputmem(ull iaddr, void *p, int nbytes) { return 1; } +static char* apimember(char *mname, ull pidx, type_t*tm, member_t *m, ull *lidx) { return 0; } +static int apigetctype(int ctype, char *name, type_t*tout) { return 0; } +static char * apigetrtype(ull idx, type_t*t) { return ""; } +static int apialignment(ull idx) { return 0; } +static int apigetval(char *name, ull *val) { return 0; } +static enum_t* apigetenum(char *name) { return 0; } +static def_t *apigetdefs(void) { return 0; } +static char* apifindsym(char *p) { return 0; } + +static apiops nullops= { + apigetmem, apiputmem, apimember, apigetctype, apigetrtype, apialignment, + apigetval, apigetenum, apigetdefs, 0, 0, 0, 0, apifindsym +}; + +apiops *sial_ops=&nullops;; + +void +sial_apiset(apiops *o, int abi, int nbpw, int sign) +{ +def_t *dt; + + sial_ops=o?o:&nullops; + sial_setdefbtype(nbpw, sign); + /* get the pre defines and push them. */ + dt=API_GETDEFS(); + while(dt) { + + sial_newmac(dt->name, dt->val, 0, 0, 1); + dt=dt->next; + } + /* add the sial define */ + sial_newmac(sial_strdup("sial"), sial_strdup("1"), 0, 0, 1); +} + +/* + Get and set path function. + ipath is include file search path. + mpath is macro search path +*/ +static char *mpath=""; +static char *ipath=""; +void sial_setmpath(char *p) { mpath=p; } +void sial_setipath(char *p) { ipath=p; } +char *sial_getmpath(void) { return mpath; } +char *sial_getipath(void) { return ipath; } + +static char *curp=0; +char *sial_curp(char *p) { char *op=curp; p?(curp=p):(op=curp); return op; } + +static char* +sial_cattry(char *first, char *second) +{ +struct stat stats; +char *buf=sial_alloc(strlen(first)+strlen(second)+2); + + strcpy(buf, first); + strcat(buf, "/"); + strcat(buf, second); + if(!stat(buf, &stats)) return buf; + sial_free(buf); + return 0; +} + +char * +sial_filepath(char *fname, char *path) +{ + struct stat buf; + /* valid file path, return immediatly */ + if(stat(fname,&buf) == 0) { + /* must return a free'able name */ + char *name=sial_strdup(fname); + TAG(name); + return name; + + } else if(fname[0]=='~') { + + if(strlen(fname)>1) { + + char *rname, *start; + struct passwd *pwd; + + if(fname[1]=='/') { + + /* current user name */ + pwd=getpwuid(getuid()); + + if(!pwd) { + sial_msg("Who are you : uid=%d \n?", getuid()); + return 0; + } + + start=fname+1; + + } else { + + char *p, s; + + for(p=fname+1;*p;p++) if(*p=='/') break; + s=*p; + *p='\0'; + + /* other user */ + pwd=getpwnam(fname+1); + if(!pwd) { + + sial_msg("Who is this : %s ?\n", fname+1); + return 0; + } + if(s) *p=s; + start=p; + } + rname=sial_alloc(strlen(start+1)+strlen(pwd->pw_dir)+2); + strcpy(rname, pwd->pw_dir); + strcat(rname, start); + return rname; + } + + } else { + + char *p=sial_strdup(path); + char *tok, *curp; + + /* we check if the file is found relatively to the current + position. I.e. the position of the running script */ + if((curp=sial_curp(0)) && (curp=sial_cattry(curp, fname))) { + + sial_free(p); + return curp; + } + + tok=strtok(p, ":"); + while(tok) { + + if((curp=sial_cattry(tok, fname))) { + + sial_free(p); + return curp; + } + tok=strtok(NULL, ":"); + + } + sial_free(p); + } + return 0; +} + +char* +sial_filempath(char *fname) +{ + return sial_filepath(fname, mpath); +} + +char * +sial_fileipath(char *fname) +{ + return sial_filepath(fname, ipath); +} + +/* load a file or a set of file */ +int +sial_loadunload(int load, char *name, int silent) +{ +DIR *dirp; +int ret=1; +char *fname=sial_filempath(name); + + if(!fname) { + + if(!silent) sial_msg("File not found : %s\n", name); + return 0; + } + + if((dirp=opendir(fname))) { + + struct dirent *dp; + char *buf; + + while ((dp = readdir(dirp)) != NULL) { + + if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) + continue; + + buf=sial_alloc(strlen(fname)+dp->d_reclen+2); + sprintf(buf, "%s/%s", fname, dp->d_name); + if(load) { + ret &= sial_newfile(buf, silent); + }else{ + sial_deletefile(buf); + } + sial_free(buf); + } + closedir(dirp); + } + else { + + if(load) { + ret=sial_newfile(fname, silent); + }else{ + sial_deletefile(fname); + } + } + sial_free(fname); + return ret; +} + +/* + Load conditionaly. + If it's already load, return. +*/ +ull +sial_depend(char *name) +{ +char *fname=sial_filempath(name); +int ret=1 ; +void *fp; + + if(!fname) ret=0; + else if(!(fp=sial_findfile(fname,0)) || sial_isnew(fp)) { + + ret=sial_loadunload(1, name, 1); + sial_free(fname); + } + return ret; +} + +value_t * +sial_bdepend(value_t *vname) +{ + return sial_makebtype(sial_depend(sial_getptr(vname, char))); +} + +ull +sial_load(char *fname) +{ + return sial_loadunload(1, fname, 0); +} + +value_t* +sial_bload(value_t *vfname) +{ +char *fname=sial_getptr(vfname, char); +value_t *v; + + v=sial_makebtype(sial_load(fname)); + return v; +} + +ull +sial_unload(char *fname) +{ + return sial_loadunload(0, fname, 0); +} + +value_t* +sial_bunload(value_t *vfname) +{ +char *fname=sial_getptr(vfname, char); + + return sial_defbtype(sial_newval(), sial_unload(fname)); +} + +void +sial_loadall() +{ +char *path=sial_strdup(sial_getmpath()); +char *p, *pn; + + p=pn=path; + while(*pn) { + + if(*pn == ':') { + + *pn++='\0'; + sial_loadunload(1, p, 1); + p=pn; + + } else pn++; + } + if(p!=pn) sial_loadunload(1, p, 1); + /* sial_free(path); */ +} + +static void +add_flag(var_t*flags, int c) +{ +char s[20]; +var_t *v; + + sprintf(s, "%cflag", c); + v=sial_newvar(s); + sial_defbtype(v->v, (ull)0); + v->ini=1; + sial_enqueue(flags, v); +} + +int +sial_cmd(char *fname, char **argv, int argc) +{ +value_t *idx, *val; + + sial_chkinit(); + + if(sial_chkfname(fname, 0)) { + + var_t*flags, *args, *narg; + char *opts, *newn=sial_alloc(strlen(fname)+sizeof("_usage")+1); + int c, i; + extern char *optarg; + extern int optind; + int dou; + char *f=sial_strdup("Xflag"); + + flags=(var_t*)sial_newvlist(); + + /* build a complete list of option variables */ + for(c='a';c<='z';c++) add_flag(flags, c); + for(c='A';c<='Z';c++) add_flag(flags, c); + + /* check if there is a getopt string associated with this command */ + /* there needs to be a fname_opt() and a fname_usage() function */ + sprintf(newn, "%s_opt", fname); + + if(sial_chkfname(newn, 0)) opts=(char*)(unsigned long)sial_exefunc(newn, 0); + else opts=""; + + sprintf(newn, "%s_usage", fname); + dou=sial_chkfname(newn, 0); + + /* build a set of variable from the given list of arguments */ + /* each options generate a conrresponding flag ex: -X sets Xflag to one + end the corresponding argument of a ":" option is in ex. Xarg + each additional arguments is keaped in the array args[] */ + + if(opts[0]) { + +#ifdef linux + optind=0; +#else + getoptreset(); +#endif + while ((c = getopt(argc, argv, opts)) != -1) { + + var_t*flag, *opt; + char *a=sial_strdup("Xarg");; + + if(c==':') { + + sial_warning("Missing argument(s)"); + if(dou) sial_exefunc(newn, 0); + sial_free(a); + goto out; + + } else if(c=='?') { + + if(dou) { + + char *u=(char*)(unsigned long)sial_exefunc(newn, 0); + + if(u) sial_msg("usage: %s %s\n", fname, u); + } + sial_free(a); + goto out; + } + + + /* set the Xflag variable to 1 */ + f[0]=c; + flag=sial_inlist(f, flags); + sial_defbtype(flag->v, (ull)1); + flag->ini=1; + + /* create the Xarg variable */ + if(optarg && optarg[0]) { + + char *p=sial_alloc(strlen(optarg)+1); + + a[0]=c; + strcpy(p, optarg); + opt=(var_t*)sial_newvar(a); + sial_setstrval(opt->v, p); + opt->ini=1; + sial_enqueue(flags, opt); + } + sial_free(a); + } + sial_free(f); + } + else optind=1; + + /* put every other args into the argv[] array_t*/ + args=(var_t*)sial_newvar("argv"); + args->ini=1; + + /* create a argv[0] with the name of the command */ + { + + val=sial_makestr(fname); + idx=sial_makebtype(0); + + /* create the value's value */ + sial_addarrelem(&args->v->arr, idx, val); + sial_freeval(idx); + } + + for ( i=1; optind < argc; optind++, i++) { + + val=sial_makestr(argv[optind]); + idx=sial_makebtype(i); + + /* create the value's value */ + sial_addarrelem(&args->v->arr, idx, val); + sial_freeval(idx); + } + + narg=(var_t*)sial_newvar("argc"); + sial_defbtype(narg->v, i); + narg->ini=1; + + sial_enqueue(flags, narg); + + /* add the args variable to the flags queue */ + sial_enqueue(flags, args); + + /* now execute */ + sial_runcmd(fname, flags); + +out: + /* free all arguments variables Xflag Xarg and argv[] */ + sial_freesvs(flags); + + sial_free(newn); + return 0; + } + return 1; +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_api.h /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_api.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_api.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_api.h 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,267 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ + +/* minor and major version number */ +#define S_MAJOR 3 +#define S_MINOR 0 + +#define MAX_SYMNAMELEN 100 +#define MAXIDX 20 + +/* abi values */ +#define ABI_MIPS 1 +#define ABI_INTEL_X86 2 +#define ABI_INTEL_IA 3 +#define ABI_S390 4 +#define ABI_S390X 5 +#define ABI_PPC64 6 + +/* types of variables */ +#define V_BASE 1 +#define V_STRING 2 +#define V_REF 3 +#define V_ENUM 4 +#define V_UNION 5 +#define V_STRUCT 6 +#define V_TYPEDEF 7 +#define V_ARRAY 8 + +#define ENUM_S struct enum_s +#define DEF_S struct def_s +#define MEMBER_S struct member_s +#define TYPE_S struct type_s +#define VALUE_S struct value_s +#define ARRAY_S struct array_s +#define NODE_S struct node_s +#define IDX_S struct idx_s +#define VAR_S struct var_s + +ENUM_S; +DEF_S; +MEMBER_S; +TYPE_S; +VALUE_S; +ARRAY_S; +NODE_S; +IDX_S; +VAR_S; + +#if linux +#include +typedef uint64_t ull; +typedef uint32_t ul; +#else +typedef unsigned long long ull; +typedef unsigned long ul; +#endif + +/* THe API function calls numbers */ +typedef struct { + + int (*getmem)(ull, void *, int); /* write to system image */ + int (*putmem)(ull, void *, int); /* read from system image */ + char* (*member)(char *, ull, TYPE_S * /* get type and positional information ... */ + , MEMBER_S *, ull *lidx); /* ... about the member of a structure */ + int (*getctype)(int ctype, char * /* get struct/union type information */ + , TYPE_S*); + char* (*getrtype)(ull, TYPE_S *); /* get complex type information */ + int (*alignment)(ull); /* get alignment value for a type */ + int (*getval)(char *, ull *); /* get the value of a system variable */ + ENUM_S* (*getenum)(char *name); /* get the list of symbols for an enum type */ + DEF_S* (*getdefs)(void); /* get the list of compiler pre-defined macros */ + uint8_t (*get_uint8)(void*); + uint16_t (*get_uint16)(void*); + uint32_t (*get_uint32)(void*); + uint64_t (*get_uint64)(void*); + char* (*findsym)(char*); +} apiops; + +/* + Builtin API defines.... +*/ +/* call this function to install a new builtin + + proto is the function prototype ex: + struct proc* mybuiltin(int flag, char *str); + + "mybuiltin" will be the sial name for the function. + "fp" is the pointer to the builtin function code. + +*/ +typedef VALUE_S* bf_t(VALUE_S*, ...); +typedef struct btspec { + char *proto; + bf_t *fp; +} btspec_t; + +/* dso entry points */ +#define BT_SPEC_TABLE btspec_t bttlb[] +#define BT_SPEC_SYM "bttlb" +#define BT_INIDSO_FUNC int btinit +#define BT_INIDSO_SYM "btinit" +#define BT_ENDDSO_FUNC void btend +#define BT_ENDDSO_SYM "btend" + +/* maximum number of parameters that can be passed to a builtin */ +#define BT_MAXARGS 20 + +extern apiops *sial_ops; +#define API_GETMEM(i, p, n) ((sial_ops->getmem)((i), (p), (n))) +#define API_PUTMEM(i, p, n) ((sial_ops->putmem)((i), (p), (n))) +#define API_MEMBER(n, i, tm, m, l) ((sial_ops->member)((n), (i), (tm), (m), (l))) +#define API_GETCTYPE(i, n, t) ((sial_ops->getctype)((i), (n), (t))) +#define API_GETRTYPE(i, t) ((sial_ops->getrtype)((i), (t))) +#define API_ALIGNMENT(i) ((sial_ops->alignment)((i))) +#define API_GETVAL(n, v) ((sial_ops->getval)((n), (v))) +#define API_GETENUM(n) ((sial_ops->getenum)(n)) +#define API_GETDEFS() ((sial_ops->getdefs)()) +#define API_GET_UINT8(ptr) ((sial_ops->get_uint8)(ptr)) +#define API_GET_UINT16(ptr) ((sial_ops->get_uint16)(ptr)) +#define API_GET_UINT32(ptr) ((sial_ops->get_uint32)(ptr)) +#define API_GET_UINT64(ptr) ((sial_ops->get_uint64)(ptr)) +#define API_FINDSYM(p) ((sial_ops->findsym)(p)) + +#if linux +# if __LP64__ +# define sial_getptr(v, t) ((t*)sial_getval(v)) +# else +# define sial_getptr(v, t) ((t*)(ul)sial_getval(v)) +# endif +#else +# if (_MIPS_SZLONG == 64) +# define sial_getptr(v, t) ((t*)sial_getval(v)) +# else +# define sial_getptr(v, t) ((t*)(ul)sial_getval(v)) +# endif +#endif + +/* startup function */ +int sial_open(void); /* initialize a session with sial */ +void sial_apiset(apiops *, int, int, int);/* define the API for a connection */ +void sial_setofile(void *); /* sial should output messages to this file */ +void *sial_getofile(void); /* where is sial currently outputing */ +void sial_setmpath(char *p); /* set the search path for sial scripts */ +void sial_setipath(char *p); /* set the search path for sial include files */ +VAR_S *sial_builtin(char *proto, bf_t);/* install a builtin function */ +int sial_cmd(char *name, char **argv, int argc); /* execute a command w/ args */ + +/* load/unload of script files and directories */ +ull sial_load(char *); /* load/parse a file */ +ull sial_unload(char *); /* load/parse a file */ +void sial_loadall(void); /* load all files found in set path */ + +/* variables associated functions */ +VAR_S *sial_newvar(char *); /* create a new static/auto variable */ +void *sial_add_globals(VAR_S*); /* add a set of variable to the globals context */ +VAR_S *sial_newvlist(void); /* create a root for a list of variables */ + +int sial_tryexe(char *, char**, int);/* try to execute a function */ +int sial_parsetype(char*, TYPE_S *, int);/* parse a typedef line */ +ull sial_exefunc(char *, VALUE_S **);/* to execute a function defined in sial */ + +/* help related function */ +void sial_showallhelp(void); /* display help info for all commands */ +int sial_showhelp(char *); /* display help info for a single command */ + +/* allocation related function */ +void *sial_alloc(int); /* allocate some memory */ +void *sial_calloc(int); /* allocate some 0 filed memory */ +void sial_free(void*); /* free it */ +char *sial_strdup(char*); /* equivalent of strdup() returns sial_free'able char */ +void *sial_dupblock(void *p); /* duplicate the contain of a block of allocated memory */ +void *sial_realloc(void *p, int size); /* reallocate a block */ +void sial_maketemp(void *p); /* put a block on the temp list */ +void sial_freetemp(void); /* free the temp list */ +VALUE_S *sial_makebtype(ull); /* create a default base type value (int) */ + +/* handle values */ +VALUE_S *sial_newval(void); /* get a new placeholder for a value */ +void sial_freeval(VALUE_S *); /* free a value* and associated structs */ +VALUE_S *sial_makestr(char *); /* create a string value */ +ull sial_getval(VALUE_S*); /* transform a random value to a ull */ +VALUE_S *sial_cloneval(VALUE_S *); /* make a clone of a value */ + +/* array related */ +/* add a new array element to a value */ +void sial_addvalarray(VALUE_S*v, VALUE_S*idx, VALUE_S*val); +/* return the value associated with a int index */ +VALUE_S *sial_intindex(VALUE_S *, int); +/* return the value associated with a 'string' index */ +VALUE_S *sial_strindex(VALUE_S *, char *); +/* set the value of an array element */ +void sial_setarrbval(ARRAY_S*, int); +/* get the array element coresponding to index */ +ARRAY_S *sial_getarrval(ARRAY_S**, VALUE_S*); +/* get the initiale array for a variable */ +ARRAY_S *sial_addarrelem(ARRAY_S**, VALUE_S*, VALUE_S*); + +/* type manipulation */ +int sial_is_struct(int); +int sial_is_enum(int); +int sial_is_union(int); +int sial_is_typedef(int); +int sial_type_gettype(TYPE_S*t); +int sial_chkfname(char *fname, void *vfd); +int sial_loadunload(int load, char *name, int silent); + +void sial_type_settype(TYPE_S*t, int type); +void sial_setcallback(void (*scb)(char *, int)); +void sial_vilast(void); +void sial_vi(char *fname, int file); +void sial_type_setsize(TYPE_S*t, int size); +int sial_type_getsize(TYPE_S*t); +void sial_type_setidx(TYPE_S*t, ull idx); +ull sial_type_getidx(TYPE_S*t); +void sial_type_setidxlst(TYPE_S*t, int *idxlst); +void sial_type_setref(TYPE_S*t, int ref, int type); +void sial_type_setfct(TYPE_S*t, int val); +void sial_type_mkunion(TYPE_S*t); +void sial_type_mkenum(TYPE_S*t); +void sial_type_mkstruct(TYPE_S*t); +void sial_type_mktypedef(TYPE_S*t); +TYPE_S*sial_newtype(void); +void sial_freetype(TYPE_S*t); +TYPE_S*sial_getctype(int ctype_t, char *name, int silent); +void sial_type_free(TYPE_S* t); +void sial_pushref(TYPE_S*t, int ref); +void sial_duptype(TYPE_S*to, TYPE_S*from); +int sial_defbsize(void); +TYPE_S*sial_newbtype(int token); +void sial_setdbg(unsigned int lvl); +unsigned int sial_getdbg(void); +void sial_setname(char *name); +char *sial_getname(void); +void sial_setclass(char *class); +char **sial_getclass(void); + +/* struct member functions */ +void sial_member_soffset(MEMBER_S*m, int offset); +void sial_member_ssize(MEMBER_S*m, int size); +void sial_member_sfbit(MEMBER_S*m, int fbit); +void sial_member_snbits(MEMBER_S*m, int nbits); +void sial_member_sname(MEMBER_S*m, char *name); + +/* enums */ +ENUM_S* sial_add_enum(ENUM_S* e, char* name, int val); +/* defines */ +DEF_S* sial_add_def(DEF_S* d, char *name, char *val); + +/* error handling */ +/* display error w/ file/line coordinates */ +/* does not return */ +void sial_error(char *, ...); +/* display warning w/ file/line coordinates */ +void sial_warning(char *, ...); +/* display a message and continue */ +void sial_msg(char *, ...); +/* display a debug message */ +#define DBG_TYPE 0x00000001 +#define DBG_STRUCT 0x00000002 +#define DBG_NAME 0x10000000 // +#define DBG_ALL 0x0fffffff +void sial_dbg(int class, int level, char *, ...); +void sial_dbg_named(int class, char *name, int level, char *, ...); + +/* parsers debug flags */ +extern int sialdebug, sialppdebug; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_builtin.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_builtin.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_builtin.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_builtin.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,434 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include +#include +#include +#include "sial.h" + +/* information necessary for a builtin function */ +typedef struct builtin { + + var_t*v; /* resulting variable declaration after parsing */ + bf_t *fp; /* pointer to actual function */ + char *proto; /* associated prototype_t*/ + struct builtin *next; /* to chain them */ + +} builtin; + +#define BT_EINVAL 1 /* Something is wrong and it's not ... */ +value_t* +sial_exit(int v) +{ + /* Were we compiling ? */ + sial_parseback(); + + /* we were running... exit () */ + sial_dojmp(J_EXIT, &v); + + /* NOT REACHED */ + return 0; +} + +value_t* +sial_bexit(value_t *vv) +{ +int v=sial_getval(vv); + + /* we're not going back to the he caller so free + the input value_t */ + sial_freeval(vv); + sial_exit(v); + /* NOT REACHED */ + return 0; +} + +#define MAXBYTES 4000 +#define INCREMENT 16 +value_t * +sial_getstr(value_t *vmadr) +{ +ull madr=sial_getval(vmadr); +char *buf=sial_alloc(MAXBYTES+1); +char *p=buf; +value_t *v; + + /* sial as already verified that this is a V_REF */ + /* since this is reading from a unkown size pool + we have to do an exponential reduction on the number of bytes + read ... */ + buf[0]=0; + while(1) { + + int i; + + if(!API_GETMEM(madr, p, INCREMENT)) break; + + /* have we found the '\0' yet ? */ + for(i=0;i= MAXBYTES) { + buf[MAXBYTES]='\0'; + break; + } + + } + v=sial_setstrval(sial_newval(), buf); + sial_free(buf); + return v; +} + +value_t * +sial_substr(value_t *vp, value_t *vi, value_t *vj) +{ +char *p=sial_getptr(vp, char); +ul i=sial_getval(vi); +int l=strlen(p); +int j=(vj?sial_getval(vj):(l-i+1)); +char *s; +value_t *v; + + if((i+j-1)>l || !i) { + + sial_error("Valid positions are [1..%d]\n", l); + + } + + s=sial_alloc(j+1); + strncpy(s, p+i-1, j); + s[j]='\0'; + v=sial_setstrval(sial_newval(), s); + sial_free(s); + return v; +} + +value_t * +sial_getnstr(value_t* vmadr, value_t* vl) +{ +ull madr=sial_getval(vmadr); +ul l=sial_getval(vl); +char *buf=sial_alloc(l+1); +value_t *v; + + if(!API_GETMEM(madr, buf, l)) buf[0]='\0'; + else buf[l]='\0'; + v=sial_setstrval(sial_newval(), buf); + sial_free(buf); + return v; +} + +value_t * +sial_atoi(value_t *vs, value_t* vbase) +{ +char *s=sial_getptr(vs, char); +int base=vbase ? sial_getval(vbase) : 0; + + strtoull(s, 0, (int) base); + return sial_defbtypesize(sial_newval(), strtoull(s, 0, base), B_ULL); +} + +value_t * +sial_itoa(value_t* vi) +{ +ull i=sial_getval(vi); +char p[40]; + + sprintf(p, "%llu", (unsigned long long)i); + return sial_setstrval(sial_newval(), p); +} + +value_t * +sial_strlen(value_t *vs) +{ +char *s=sial_getptr(vs, char); +ull l; + if(!s) l=0; + else l=strlen(s); + + return sial_defbtype(sial_newval(), l); +} + +value_t * +sial_getchar(void) +{ +char c; +struct termio tio, stio; +int in=fileno(stdin); + + if(ioctl(in, TCGETA, &tio)) c=255; + else { + stio=tio; + tio.c_lflag &= ~(ICANON | ECHO); + tio.c_iflag &= ~(ICRNL | INLCR); + tio.c_cc[VMIN] = 1; + tio.c_cc[VTIME] = 0; + ioctl(in, TCSETA, &tio); + c=getc(stdin); + ioctl(in, TCSETA, &stio); + } + return sial_defbtype(sial_newval(), (ull)c); +} + +value_t * +sial_gets(void) +{ +char p[1024]; + + if(!fgets(p, sizeof(p)-1, stdin)) p[0]='\0'; + else p[strlen(p)-1]='\0'; + return sial_setstrval(sial_newval(), p); +} + +static builtin *bfuncs=0; + +/* + Check for the existance of a bt function +*/ +void * +sial_chkbuiltin(char *name) +{ +builtin *bf; + + for(bf=bfuncs; bf; bf=bf->next) { + + if(!strcmp(name, bf->v->name)) { + + return bf; + } + } + return 0; +} + +/* + Remove a builtin. + This is done when we 'unload' a *.so file. +*/ +void +sial_rmbuiltin(var_t*v) +{ +builtin *bf; +builtin *last=0; + + for(bf=bfuncs; bf; bf=bf->next) { + + if(!strcmp(v->name, bf->v->name)) { + + if(!last) bfuncs=bf->next; + else { + + last->next=bf->next; + } + sial_free(bf->proto); + sial_free(bf); + } + last=bf; + } +} + +/* + Install a new builtin function. +*/ +var_t* +sial_builtin(char *proto, bf_t* fp) +{ +var_t*v; + + /* parse the prototype_t*/ + if((v=sial_parsexpr(proto))) { + + builtin *bt; + int nargs=0; + + /* check name */ + if(!v->name || !v->name[0]) { + + sial_freevar(v); + sial_msg("Syntax error: no function name specified [%s]\n", proto); + return 0; + } + + /* check for function with same name */ + if(sial_chkfname(v->name, 0)) { + + sial_freevar(v); + sial_msg("Function already defined [%s]\n", proto); + return 0; + } + + if(v->dv->fargs) { + + var_t*vn=v->dv->fargs->next; + + while(vn!=v->dv->fargs) { + + nargs++; + vn=vn->next; + } + } + /* check number of args */ + if(nargs > BT_MAXARGS) { + + sial_freevar(v); + sial_msg("Too many parameters to function (max=%d) [%s]\n", BT_MAXARGS, proto); + return 0; + } + + + bt=sial_alloc(sizeof(builtin)); + bt->proto=sial_strdup(proto); + bt->fp=fp; + bt->v=v; + bt->next=0; + + /* install it */ + if(!bfuncs) bfuncs=bt; + else { + builtin *btp; + + for(btp=bfuncs; ; btp=btp->next) if(!btp->next) break; + btp->next=bt; + } + return v; + } + + sial_msg("Builtin [%s] not loaded.", proto); + + return 0; +} + +#define bcast(f) ((bf_t*)f) + +static btspec_t sialbfuncs[] = { + { "unsigned long long atoi(string, ...)",bcast(sial_atoi)}, + { "int exists(string)", bcast(sial_exists)}, + { "void exit(int)", bcast(sial_bexit)}, + { "int getchar()", bcast(sial_getchar)}, + { "string gets()", bcast(sial_gets)}, + { "string getstr(char *)", bcast(sial_getstr)}, + { "string getnstr(char *, int)", bcast(sial_getnstr)}, + { "string itoa(int)", bcast(sial_itoa)}, + { "void printf(string, ...)", bcast(sial_printf)}, + { "void showtemp()", bcast(sial_showtemp)}, + { "void showaddr(char *)", bcast(sial_showaddr)}, + { "void memdebugon()", bcast(sial_memdebugon)}, + { "void memdebugoff()", bcast(sial_memdebugoff)}, + { "int sial_load(string)", bcast(sial_bload)}, + { "int sial_unload(string)", bcast(sial_bunload)}, + { "int depend(string)", bcast(sial_bdepend)}, + { "int strlen(string)", bcast(sial_strlen)}, + { "string sprintf(string, ...)", bcast(sial_sprintf)}, + { "string substr(string, int, ...)", bcast(sial_substr)}, + { "void prarr(string name, int i)", bcast(sial_prarr)}, + { "int member(void*, string name)", bcast(sial_ismember)}, + { "string findsym(string)", bcast(sial_findsym)}, +}; + + +/* + Install the sial builtins. +*/ +void +sial_setbuiltins() +{ +int i; + + for(i=0;iv->dv->fargs) { + + var_t*vv=bf->v->dv->fargs->next; + + while(vv != bf->v->dv->fargs) { + + if(vv->name && !strcmp(vv->name, S_VARARG)) { + while(nargsv); + sial_chkandconvert(lvals[nargs], vals[nargs]); + } + nargs++; + vv=vv->next; + } + } + + /* check parameters number */ + if(iv->dv->pos, "Too few parameters to '%s'", bf->proto); + + } else if(i>nargs){ + + sial_rerror(&bf->v->dv->pos, "Too many parameters to '%s'", bf->proto); + + } + + if(vals) { + /* the actual call */ + v=(bf->fp) ( + lvals[0], lvals[1], + lvals[2], lvals[3], + lvals[4], lvals[5], + lvals[6], lvals[7], + lvals[8], lvals[9], + lvals[10], lvals[11], + lvals[12], lvals[13], + lvals[14], lvals[15], + lvals[16], lvals[17], + lvals[18], lvals[19] + ); + } else { + + v=(bf->fp) ((value_t*)0); + } + + while(i) { + + --i; + sial_freeval(vals[i]); + sial_freeval(lvals[i]); + } + + /* make a copy of the return value_t info */ + vr=sial_cloneval(bf->v->v); + sial_chkandconvert(vr, v); + sial_freeval(v); + + return vr; + } + + sial_error("Oops. sial_exebfunc()"); + return 0; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_case.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_case.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_case.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_case.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,125 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +/* + Set of functions to handle the case construct. +*/ +#include "sial.h" + +void +sial_freecaseval(caseval_t*cv) +{ + sial_free(cv); +} + +node_t* +sial_caseval(int isdef, node_t*val) +{ +caseval_t*cv=sial_alloc(sizeof(caseval_t)); +node_t*n=sial_newnode(); +value_t *v; + + cv->isdef=isdef; + if(val) { + + v=NODE_EXE(val); + cv->val=unival(v); + sial_freeval(v); + NODE_FREE(val); + + } else cv->val=0; + + sial_setpos(&cv->pos); + + cv->next=0; + n->data=cv; + return n; +} + +node_t* +sial_addcaseval(node_t*n, node_t*n2) +{ +caseval_t*cv=(caseval_t*)n->data; +caseval_t*ncv=(caseval_t*)n2->data; + + sial_free(n); + ncv->next=cv; + return n2; +} + +void +sial_freecase(void *vcl) +{ +caselist_t*cl=(caselist_t*)vcl; + + NODE_FREE(cl->stmt); + sial_free(cl); +} + +node_t* +sial_newcase(node_t*nc, node_t* n) +{ +caseval_t*cv=(caseval_t*)nc->data; +caselist_t*cl=sial_alloc(sizeof(caselist_t)); +node_t*nn=sial_newnode(); + + + nn->data=cl; + nn->free=(ffct_t)sial_freecase; + + cl->vals=cv; + sial_free(nc); + + cl->stmt=n; + cl->next=0; + + sial_setpos(&cl->pos); + + return nn; +} + +node_t* +sial_addcase(node_t*n, node_t*n2) +{ +caselist_t*lcl; +caselist_t*ncl=(caselist_t*)n2->data; +caselist_t*cl=(caselist_t*)n->data; + + for(lcl=cl; lcl->next; lcl=lcl->next); + + /* we need to add case in the order they are listed */ + lcl->next=ncl; + sial_free(n2); + ncl->next=0; + + sial_setpos(&ncl->pos); + + return n; +} + +int +sial_docase(ull val, caselist_t*cl) +{ +caselist_t*defclp=0, *clp; + + + for(clp=cl;clp;clp=clp->next) { + + caseval_t*cvp; + + for(cvp=clp->vals; cvp; cvp=cvp->next) { + + if(cvp->val==val) goto out; + else if(cvp->isdef) defclp=clp; + } + } +out: + if(clp || (clp=defclp)) { + + for(;clp;clp=clp->next) { + + if(clp->stmt) NODE_EXE(clp->stmt); + } + } + return 1; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_define.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_define.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_define.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_define.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,519 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include "sial.h" +/* + This set of functions handle #define for simple constant or macros. + We read from the current parser input strem untill end of line. + + The big thing is that we need to do some parsing to get the deinf names + and parameters. Also at the time of the macro instanciation, we need to parse + the parameters again. That leads to a more complex package... +*/ + +#define MAXP 20 +typedef struct mac_s { + + char *name; /* this macro name */ + int np; /* number of parameters */ + int issub; /* subs have to be threated differently */ + char **p; /* parameters names */ + char *buf; /* text for the macro itself */ + struct mac_s *next; /* next on the list */ + srcpos_t pos; + +} mac_t; + +typedef struct { + mac_t *m; + char **subs; +} smac_t; + +static mac_t* macs=0; + +/* we have to add a space at the end of the value + Again, this is to prevent a EOF on the parsing stream */ +def_t* +sial_add_def(def_t*d, char*name, char*val) +{ +def_t*nd=sial_alloc(sizeof(def_t)); +char *buf=sial_alloc(strlen(val)+2); + + strcpy(buf, val); + strcat(buf, " "); + sial_free(val); + nd->name=name; + nd->val=buf; + nd->next=d; + return nd; +} + +/* search for a macro is the current list */ +mac_t * +sial_getmac(char *name, int takeof) +{ +mac_t *m; +mac_t *prev=0; +mac_t *sial_getcurmac(void); + + if(takeof || !(m=sial_getcurmac())) m=macs; + + for(; m; m=m->next) { + + if( !strcmp(m->name, name) ) { + + if(takeof) { + + if(!prev) macs=m->next; + else prev->next=m->next; + + } + return m; + } + prev=m; + } + return 0; +} + +node_t* +sial_macexists(node_t*var) +{ +char *name=NODE_NAME(var); +int val; + + if(sial_getmac(name, 0)) val=1; + else val=0; + return sial_makenum(B_UL, val); +} +static void +sial_freemac(mac_t*m) +{ +int i; + + for(i=0;inp;i++) sial_free(m->p[i]); + if(m->np) sial_free(m->p); + sial_free(m); +} + +/* + These are called at 2 different points. + One call at the very begining. One call for each file. +*/ +void* sial_curmac(void) { return macs; } + +void +sial_flushmacs(void *vtag) +{ +mac_t *m, *next; +mac_t *tag=(mac_t *)vtag; + + for(m=macs; m!=tag; m=next) { + + next=m->next; + sial_freemac(m); + } + macs=m; +} + +/* this function is called to register a new macro. + The text associated w/ the macro is still on the parser stream. + Untill eol. +*/ +void +sial_newmac(char *mname, char *buf, int np, char **p, int silent) +{ +char *p2; +mac_t *m; + + { + char *p=buf+strlen(buf)-1; + + /* eliminate trailing blanks */ + while(*p && (*p==' ' || *p=='\t')) p--; + *(p+1)='\0'; + + /* eliminate leading blanks */ + p=buf; + while(*p && (*p==' ' || *p=='\t')) p++; + + /* copy and append a space. This is to prevent unloading of the + macro before the sial_chkvarmac() call as been performed */ + p2=sial_alloc(strlen(p)+2); + strcpy(p2, p); + sial_free(buf); + p2[strlen(p2)+1]='\0'; + p2[strlen(p2)]=' '; + buf=p2; + } + + if((m=sial_getmac(mname, 1)) && strcmp(m->buf, buf)) { + + /* when processing the compile options, be silent. */ + if(!silent) { + + sial_warning("Macro redefinition '%s' with different value_t\n" + "value_t=[%s]\n" + "Previous value_t at %s:%d=[%s]\n" + , mname, buf, m->pos.file, m->pos.line, m->buf); + } + + } + m=(mac_t*)sial_alloc(sizeof(mac_t)); + m->name=sial_strdup(mname); + m->np=np; + m->p=p; + m->buf=buf; + m->next=macs; + m->issub=0; + sial_setpos(&m->pos); + macs=m; +} + +/* this function is called by the enum declaration function and + when a enum type is extracted from the image to push a set + of define's onto the stack, that correspond to each identifier + in the enum. +*/ +void +sial_pushenums(enum_t *et) +{ + while(et) { + + char *buf=sial_alloc(40); + + sprintf(buf, "%d", et->value); + sial_newmac(et->name, buf, 0, 0, 0); + et=et->next; + } +} + +static void +sial_skipcomment(void) +{ +int c; + + while((c=sial_input())) { + + if(c=='*') { + + int c2; + + if((c2=sial_input())=='/') return; + sial_unput(c2); + } + } +} + +static void +sial_skipstr(void) +{ +int c; + + while((c=sial_input())) { + + if(c=='\\') sial_input(); + else if(c=='"') return; + } +} + + +/* skip over strings and comment to a specific chracter */ +static void +sial_skipto(int x) +{ +int c; + + while((c=sial_input())) { + + if(c==x) return; + + switch(c) { + + case '\\': + sial_input(); + break; + + case '"': + sial_skipstr(); + break; + + case '/': { + + int c2; + + if((c2=sial_input())=='*') { + + sial_skipcomment(); + + } else sial_unput(c2); + } + break; + + case '(': + + sial_skipto(')'); + break; + + case ')': + sial_error("Missing parameters to macro"); + break; + } + + } + + sial_error("Expected '%c'", x); +} + + +/* + This function gets called when the buffer for a macro as been fully + parsed. We need to take the associated parameter substitution macros + of of the stack and deallocate associated data. +*/ +static void +sial_popmac(void *vsm) +{ +smac_t *sm=(smac_t *)vsm; +int i; + + for(i=0;im->np;i++) { + + mac_t *m=sial_getmac(sm->m->p[i], 1); + + if(!m) sial_error("Oops macro pop!"); + sial_free(m->buf); + sial_free(m->name); + sial_free(m); + } + sial_free(sm->subs); + sial_free(sm); +} + +/* + + need to get the actual parameters from the parser stream. + This can be simple variable or complex multiple line expressions + with strings and commants imbedded in them... + +*/ +static int +sial_pushmac(mac_t *m) +{ +int i; +char **subs=sial_alloc(sizeof(char*)*m->np); +smac_t *sm; +int siallex(void); + + /* the next token should be a '(' */ + if(siallex() != '(') { + + sial_error("Expected '(' after '%s'", m->name); + + } + + /* get the parameters */ + for(i=0;inp;i++) { + + char *p=sial_cursorp(); + int nc; + + if(inp-1) sial_skipto(','); + else sial_skipto(')'); + + nc=sial_cursorp()-p-1; + subs[i]=sial_alloc(nc+2); + strncpy(subs[i], p, nc); + subs[i][nc]=' '; + subs[i][nc+1]='\0'; + } + + /* take care of the macro() case. ex: IS_R10000()i.e. no parms */ + if(!m->np) + sial_skipto(')'); + + sm=sial_alloc(sizeof(smac_t)); + + sm->m=m; + sm->subs=subs; + + /* we push the associated buffer on the stream */ + sial_pushbuf(m->buf, 0, sial_popmac, sm, 0); + + /* we push the subs onto the macro stack */ + for(i=0;inp;i++) { + + mac_t *pm=sial_alloc(sizeof(mac_t)); + + pm->name=sial_alloc(strlen(m->p[i])+1); + strcpy(pm->name, m->p[i]); + pm->np=0; + pm->p=0; + pm->buf=subs[i]; + pm->next=macs; + pm->issub=1; + macs=pm; + } + return 1; + +} + + +/* + This one is called from the lexer to check if a 'var' is to be substituted for + a macro +*/ +int +sial_chkmacvar(char *mname) +{ +mac_t *m; + + if((m=sial_getmac(mname, 0))) { + + + /* simple constant ? */ + if(!m->p) { + + sial_pushbuf(m->buf, 0, 0, 0, m->issub ? m->next : 0); + + } else { + return sial_pushmac(m); + } + return 1; + + } + return 0; + +} + +/* + Skip an unsupported preprocessor directive. +*/ +void +sial_skip_directive(void) +{ + sial_free(sial_getline()); +} + +void +sial_undefine(void) +{ +int c; +int i=0; +char mname[MAX_SYMNAMELEN+1]; +mac_t *m; + + /* skip all white spaces */ + while((c=sial_input()) == ' ' || c == '\t') if(c=='\n' || !c) { + + sial_error("Macro name expected"); + } + + mname[i++]=c; + + /* get the constant or macro name */ + while((c=sial_input()) != ' ' && c != '\t') { + + if(c=='\n' || !c) break; + if(i==MAX_SYMNAMELEN) break; + mname[i++]=c; + } + mname[i]='\0'; + if((m=sial_getmac(mname, 1))) sial_freemac(m); + else sial_addneg(mname); +} + +/* + This one is called from the lexer after #define as been detected +*/ +void +sial_define(void) +{ +int c; +int i=0; +char mname[MAX_SYMNAMELEN+1]; + + /* skip all white spaces */ + while((c=sial_input()) == ' ' || c == '\t') if(c=='\n' || !c) goto serror; + + mname[i++]=c; + + /* get the constant or macro name */ + while((c=sial_input()) != ' ' && c != '\t' && c != '(') { + + if(c=='\n' || !c) break; + + if(i==MAX_SYMNAMELEN) break; + + mname[i++]=c; + } + mname[i]='\0'; + + /* does this macro have paraneters */ + /* If so, '(' will be right after name of macro. No spaces. */ + if(c=='(') { + + int np, nc, done; + char **pnames; + char curname[MAX_SYMNAMELEN+1]; + + np=nc=done=0; + pnames=(char **)sial_alloc(sizeof(char*)*MAXP); + + while(!done) { + + c=sial_input(); + + switch(c) { + case '\n': case 0: + goto serror; + + /* continuation */ + case '\\': + if(sial_input()!='\n') goto serror; + break; + + case ',': + if(!nc) goto serror; +last: + curname[nc]='\0'; + pnames[np]=sial_alloc(strlen(curname)+1); + strcpy(pnames[np], curname); + nc=0; + np++; + break; + + case ')': + done=1; + if(nc) goto last; + break; + + case ' ': + case '\t': + break; + + default: + curname[nc++]=c; + break; + } + } + sial_newmac(mname, sial_getline(), np, pnames, 0); + return; + + } else if(c == '\n') { + + /* if nothing speciied then set to "1" */ + sial_newmac(mname, sial_strdup("1"), 0, 0, 0); + + } else { + + sial_newmac(mname, sial_getline(), 0, 0, 0); + } + + return; + +serror: + + sial_error("Syntax error on macro definition"); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_func.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_func.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_func.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_func.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,1191 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sial.h" + +/* + The next few functions manege the files and associated functions. +*/ +struct fdata; + +typedef struct fctype_t { + int idx; + struct fctype_t*next; + +} fctype_t; + +typedef struct func { + + char *name; /* name of the function */ + var_t*varlist; /* parameters information */ + var_t*rvar; /* return value_t information */ + node_t*body; /* execution node for body */ + int local; /* load i.e. static ? */ + srcpos_t pos; /* source position of function declaration */ + struct fdata *file; /* back pointer to corresponding file */ + struct func *next; /* linked list */ + +} func; + +typedef struct fdata { + + char *fname; /* name of the file */ + int isdso; /* is this from a loadable module ? + `globs' becomes the handle */ + time_t time; /* load time */ + var_t*fsvs; /* associated list of static variables */ + var_t*fgvs; /* associated list of global variables */ + void *globs; /* handle for these globals */ + func *funcs; /* chained list of functions */ + fctype_t *ctypes; /* ctypes declared by this function */ + struct fdata *next; /* chained list of files */ + +} fdata; + +static fdata *fall=0; +void sialparse(void); +static func * sial_getfbyname(char *name, fdata *thisfd); +value_t * sial_execmcfunc(func *f, value_t **vp); + +ull +sial_getval(value_t*v) +{ +ull ret=0; + + if(!v) return 0; + + /* need to cast properly here */ + if(v->type.type==V_BASE || v->type.type==V_REF) { + + if(v->type.type==V_REF || !sial_issigned(v->type.typattr)) { + + switch(TYPE_SIZE(&v->type)) { + case 1: ret= (ull) v->v.uc; break; + case 2: ret= (ull) v->v.us; break; + case 4: ret= (ull) v->v.ul; break; + case 8: ret= (ull) v->v.ull; break; + default: sial_error("Oops getval base"); + } + + } else { + + switch(TYPE_SIZE(&v->type)) { + case 1: ret= (ull) v->v.sc; break; + case 2: ret= (ull) v->v.ss; break; + case 4: ret= (ull) v->v.sl; break; + case 8: ret= (ull) v->v.sll; break; + default: sial_error("Oops getval base"); + } + } + } + /* in the case of a struct/union we pass a pointer to it */ + else ret = (unsigned long)v->v.data; + return ret; +} + +static int +sial_dohelp(char *fname) +{ +char buf[MAX_SYMNAMELEN+1]; +char *hstr; + + sprintf(buf, "%s_help", fname); + + if(sial_chkfname(buf, 0)) { + + char buf2[MAX_SYMNAMELEN+1]; + char *ustr; + + sprintf(buf2, "%s_usage", fname); + ustr=(char*)(unsigned long)sial_exefunc(buf2, 0); + sial_msg("COMMAND: %s %s\n\n", fname , ustr?ustr:""); + hstr=(char*)(unsigned long)sial_exefunc(buf, 0); + sial_format(1, hstr); + sial_format(0, "\n"); + sial_msg("\n"); + return 1; + } + return 0; +} + +void +sial_showallhelp() +{ +fdata *filep; + + for(filep=fall; filep; filep=filep->next) { + + func *funcp; + + for(funcp=filep->funcs;funcp;funcp=funcp->next) { + + (void)sial_dohelp(funcp->name); + + } + } +} + +int +sial_showhelp(char *fname) +{ + return sial_dohelp(fname); +} + +void* +sial_getcurfile() { return fall; } + +int +sial_isnew(void *p) +{ +fdata *fd=(fdata *)p; +struct stat stats; + + if(!stat(fd->fname, &stats)) { + + if(stats.st_mtime > fd->time) { + + return 1; + } + } + return 0; +} + +void * +sial_findfile(char *name, int unlink) +{ +fdata *fd; +fdata *last=0; + + for(fd=fall; fd; last=fd, fd=fd->next) { + + if(!strcmp(fd->fname, name)) { + + /* remove from the list ?*/ + if(unlink) { + + if(!last) fall=fd->next; + else last->next=fd->next; + + } + return fd; + } + + } + return 0; +} + +void +sial_freefunc(func *fn) +{ + sial_free(fn->name); + NODE_FREE(fn->body); + if(fn->varlist) sial_freesvs(fn->varlist); + sial_freevar(fn->rvar); + sial_free(fn); +} + +static void +sial_unloadso(fdata *fd) +{ +typedef int (*fp_t)(void); +fp_t fp; +func *f; + + if((fp=(fp_t)dlsym(fd->globs, BT_ENDDSO_SYM))) { + + fp(); + } + for(f=fd->funcs; f; ) { + + func *n=f->next; + sial_rmbuiltin(f->varlist); + sial_freevar(f->varlist); + sial_free(f); + f=n; + } + + dlclose(fd->globs); + + if(fall==fd) fall=fd->next; + else { + + fdata *last=fall; + + while(last->next) { + + if(last->next==fd) { + + last->next=fd->next; + break; + } + last=last->next; + } + } + + /* free the associated static and global variables */ + if(fd->fsvs) sial_freesvs(fd->fsvs); + if(fd->fgvs) sial_freesvs(fd->fgvs); + sial_free(fd->fname); + sial_free(fd); +} + +static void (*cb)(char *, int)=0; +void sial_setcallback(void (*scb)(char *, int)) +{ cb=scb; } +static void +sial_docallback( fdata *fd, int load) +{ +func *f; + + if(!cb) return; + + for(f=fd->funcs; f; f=f->next) { + + cb(f->name, load); + } +} + +void +sial_freefile(fdata *fd) +{ + if(fd) { + + func *fct, *nxt; + fctype_t *ct, *nct; + + if(fd->isdso) { + + sial_unloadso(fd); + return; + } + + /* free the associated static and global variables */ + if(fd->fsvs) sial_freesvs(fd->fsvs); + if(fd->fgvs) sial_freesvs(fd->fgvs); + + /* free all function nodes */ + // let debugger know ... + sial_docallback(fd, 0); + for(fct=fd->funcs; fct; fct=nxt) { + + nxt=fct->next; + sial_freefunc(fct); + } + + for(ct=fd->ctypes; ct; ct=nct) { + + nct=ct->next; + sial_free(ct); + } + sial_free(fd->fname); + if(fd->globs) sial_rm_globals(fd->globs); + sial_free(fd); + } + else sial_warning("Oops freefile!"); +} + +int +sial_deletefile(char *name) +{ +fdata *fd=sial_findfile(name, 0); + + if(fd) { + + sial_freefile(fd); + (void)sial_findfile(name, 1); + return 1; + + } + return 0; +} + +static int parsing=0; +static jmp_buf parjmp; + +void +sial_parseback(void) +{ + if(parsing) { + + parsing=0; + longjmp(parjmp, 1); + } +} + +/* link in a new set of static file variables */ +int +sial_file_decl(var_t*svs) +{ + sial_validate_vars(svs); + + if(!fall->fsvs) + fall->fsvs=(void*)sial_newvlist(); + + if(!fall->fgvs) + fall->fgvs=(void*)sial_newvlist(); + + (void)sial_addnewsvs(fall->fgvs, fall->fsvs, svs); + + return 1; +} + +typedef struct sigaction sact; +static int sigs[]={SIGSEGV, SIGILL, SIGTRAP, SIGINT, SIGPIPE}; +#define S_NSIG (sizeof(sigs)/sizeof(sigs[0])) + +void +sial_except_handler(int sig) +{ +static int i=0; + if(sig != SIGPIPE && sig != SIGINT) sial_error("Exception caught!"); + sial_dojmp(J_EXIT, &i); +} + +void * +sial_setexcept() +{ +int i; +sact *osa=sial_alloc(S_NSIG*sizeof(sact)); +#if linux +sact na; + + memset(&na, 0, sizeof(na)); + na.sa_handler=sial_except_handler; + na.sa_flags=SA_NODEFER; + +#else +sact na={ SA_NODEFER+SA_SIGINFO, sial_except_handler, 0, 0 }; +#endif + + + for(i=0;ifname="__expr__"; + fd->next=fall; + fall=fd; + + sial_pushbuf(exp2, "stdin", 0, 0, 0); + parsing=1; + if(!setjmp(parjmp)) { + + sial_rsteofoneol(); + sial_settakeproto(1); + sialparse(); + sial_settakeproto(0); + + /* remove longjump for parsing */ + parsing=0; + + if(!fall->fgvs) { + + sial_error("Invalid function declaration."); + + } + + ret=fall->fgvs->next; + + } else { + + sial_popallin(); + ret=0; + + } + sial_free(exp2); + /* only free the top of the fgvs list to keep 'ret' */ + if(fall->fgvs) sial_freevar(fall->fgvs); + if(fall->fsvs) sial_freesvs(fall->fsvs); + fall=fd->next; + sial_free(fd); + return ret; +} + +/* + Load a dso file. + We are looking for the btinit() and btshutdown() functions. + + btinit() will should initialized the package and call sial_builtin() + to install the sial functions. + + btshutdown(), if it exists, will be called when an unload of the + file is requested. The dso should deallocate memory etc... at that + time. +*/ +static int +sial_loadso(char *fname, int silent) +{ +void *h; + + if((h=dlopen(fname, RTLD_LAZY))) { + + typedef int (*fp_t)(void); + fp_t fp; + + if((fp=(fp_t)dlsym(h, BT_INIDSO_SYM))) { + + btspec_t *sp; + + if(fp()) { + + if((sp=(btspec_t *)dlsym(h, BT_SPEC_SYM))) { + + int i; + fdata *fd=sial_calloc(sizeof(fdata)); + func **ff=&fd->funcs; + + fd->fname=fname; + fd->isdso=1; + fd->globs=h; + + for(i=0;sp[i].proto;i++) { + + var_t*v; + + if((v=sial_builtin(sp[i].proto, sp[i].fp))) { + + func *f=sial_alloc(sizeof(func)); + + f->varlist=v; + f->next=*ff; + *ff=f; + } + } + fd->next=fall; + fall=fd; + return 1; + + } else if(!silent) { + + sial_msg("Missing '%s' table in dso [%s]", BT_SPEC_SYM, fname); + + } + + } else if(!silent) { + + sial_msg("Could not initialize dso [%s]", fname); + + } + + } else if(!silent) { + + sial_msg("Missing '%s' function in dso [%s]", BT_INIDSO_SYM, fname); + } + dlclose(h); + } + else if(!silent) sial_msg(dlerror()); + sial_free(fname); + return 0; +} + +void +sial_addfunc_ctype(int idx) +{ +fctype_t *fct=sial_alloc(sizeof(fctype_t)); + + fct->idx=idx; + fct->next=fall->ctypes; + fall->ctypes=fct; +} + +int +sial_newfile(char *name, int silent) +{ +fdata *fd; +fdata *oldf; +char *fname=sial_strdup(name); +void *mtag; + + /* check if this is a dso type file */ + if(!strcmp(fname+strlen(fname)-3, ".so")) { + + if(sial_findfile(name,0)) { + + if(!silent) + sial_msg("Warning: dso must be unloaded before reload\n"); + return 0; + } + return sial_loadso(fname, silent); + + } + + fd=sial_calloc(sizeof(fdata)); + oldf=sial_findfile(name,1); + + /* push this file onto the parser stack */ + if(!sial_pushfile(fname)) { + + sial_free(fname); + if(!silent && errno != EISDIR) sial_msg("File %s : %s\n", name, strerror(errno)); + return 0; + } + + /* we also need to remove the globals for this file + before starting the parsing */ + if(oldf && oldf->globs) { + + sial_rm_globals(oldf->globs); + oldf->globs=0; + + } + + needvar=instruct=0; + + fd->fname=fname; + + /* put it on the list */ + fd->next=fall; + fall=fd; + + /* we tag the current ctype list so we know later what to clean up */ + sial_tagst(); + + /* we also tag the macro stack so we can erase out defines and + keep the compiler and api ones. */ + mtag=sial_curmac(); + + parsing=1; + if(!setjmp(parjmp)) { + + func *fct; + int ret=1; + + /* parse it */ + sial_rsteofoneol(); + + sialparse(); + + /* remove longjump for parsing */ + parsing=0; + + /* before adding the globals we need to push all the static + variables for this file since the initialization expressions + might use them (e.g. sizeof('a static var')). Eh, as long as + we keep the interpreter handling a superset of the 'standard' C + I don't have a problem with it. Do you ? */ + + { + int lev; + + lev=sial_addsvs(S_STAT, fd->fsvs); + + /* ok to add the resulting globals now */ + fall->globs=sial_add_globals(fall->fgvs); + + sial_setsvlev(lev); + } + + /* ok to free olf version */ + if(oldf) sial_freefile(oldf); + + sial_flushtdefs(); + sial_flushmacs(mtag); + + /* we proceed with the callback */ + sial_docallback(fd, 1); + + fd->time=time(0); + + /* compilation was ok , check for a __init() function to execute */ + if((fct=sial_getfbyname("__init", fd))) { + + int *exval; + jmp_buf exitjmp; + sact *sa; + + sa=sial_setexcept(); + + if(!setjmp(exitjmp)) { + + sial_pushjmp(J_EXIT, &exitjmp, &exval); + sial_freeval(sial_execmcfunc(fct, 0)); + sial_rmexcept(sa); + sial_popjmp(J_EXIT); + + } + else { + + sial_rmexcept(sa); + ret=0; + } + + } + return ret; + } + else { + + /* remove all streams from the stack */ + sial_popallin(); + + /* error, free this partial one and reinstall old one */ + if(oldf) { + /* we zap the top pointer (it's fd) */ + oldf->next=fall->next; + fall=oldf; + oldf->globs=sial_add_globals(oldf->fgvs); + } + else { + + fall=fall->next; + } + + /* and free fd */ + sial_freefile(fd); + } + sial_flushtdefs(); + sial_flushmacs(mtag); + return 0; +} + +/* scan the current list of functions for the one named name */ +static func * +sial_getfbyname(char *name, fdata *thisfd) +{ +fdata *fd; + + /* check localy first */ + if(thisfd) { + + for(fd=fall; fd; fd=fd->next) { + + func *f; + + if(fd->isdso) continue; + + /* skip non-local function */ + if(thisfd != fd) continue; + + for(f=fd->funcs; f; f=f->next) { + + if(!strcmp(f->name, name)) return f; + } + } + } + + /* check global function */ + for(fd=fall; fd; fd=fd->next) { + + func *f; + + if(fd->isdso) continue; + + for(f=fd->funcs; f; f=f->next) { + + /* skip static functions not local */ + if(f->local) continue; + + if(!strcmp(f->name, name)) return f; + } + } + return 0; +} + +/* external boolean to check if a function exists */ +int sial_funcexists(char *name) +{ + return !(!(sial_getfbyname(name, 0))); +} + +/* + This combined set of functions enables the aplication to + get alist of currently defined commands that have a help. +*/ +static fdata *nxtfdata=0; +static func *nxtfunc; +void +sial_rstscan(void) +{ + nxtfdata=0; +} +char * +sial_getnxtfct(void) +{ + if(!nxtfdata) { + + if(!fall) return 0; + nxtfdata=fall; + nxtfunc=nxtfdata->funcs;; + } + + while(nxtfdata) { + + if(!nxtfdata->isdso) for(; nxtfunc; nxtfunc=nxtfunc->next) { + + int l=strlen(nxtfunc->name); + + if(l > 5) { + + if(!strcmp(nxtfunc->name+l-5, "_help")) { + + char buf[MAX_SYMNAMELEN+1]; + func *ret; + + strncpy(buf, nxtfunc->name, l-5); + buf[l-5]='\0'; + + /* make sure we do have the function */ + if((ret=sial_getfbyname(buf, 0))) { + + nxtfunc=nxtfunc->next; + return ret->name; + } + } + } + } + nxtfdata=nxtfdata->next; + if(nxtfdata) nxtfunc=nxtfdata->funcs; + } + sial_rstscan(); + return 0; +} + +/* + This is the entry point for the error handling +*/ +void +sial_exevi(char *fname, int line) +{ +char buf[200]; +char *ed=getenv("EDITOR"); + + if(!ed) ed="vi"; + snprintf(buf, sizeof(buf), "%s +%d %s", ed, line, fname); + system(buf); + sial_load(fname); +} + +/* + This funciton is called to start a vi session on a function + (file=0) or a file (file=1); +*/ +void +sial_vi(char *fname, int file) +{ +int line, freeit=0; +char *filename; + + if(file) { + + filename=sial_filempath(fname); + + if(!filename) { + + sial_msg("File not found : %s\n", fname); + return; + + } + + line=1; + freeit=1; + + + } else { + + func *f=sial_getfbyname(fname, 0); + + if(!f) { + + sial_msg("Function not found : %s\n", fname); + return; + + } else { + + filename=f->pos.file; + line=f->pos.line; + + } + } + + sial_exevi(filename, line); + + if(freeit) sial_free(filename); + +} + +char * +sial_getfile(char *fname) +{ +func *f; + + if((f=sial_getfbyname(fname, 0))) return f->file->fname; + return 0; +} + +static void +sial_insertfunc(func *f) +{ + f->next=fall->funcs; + fall->funcs=f; +} + +value_t * +sial_execmcfunc(func *f, value_t **vp) +{ +value_t *retval; +jmp_buf env; +var_t*parm=0; +int i=0; +char *ocurp, *curp; + + /* set the current path */ + { + char *p; + + curp=sial_strdup(f->file->fname); + if((p=strrchr(curp, '/'))) *p='\0'; + ocurp=sial_curp(curp); + } + + + if(!(setjmp(env))) { + + /* push a return level */ + sial_pushjmp(J_RETURN, &env, &retval); + + /* Now it's ok to add any static vars for this file */ + sial_addsvs(S_FILE, f->file->fsvs); + + /* we need to create brand new variables with + the name of the declared arguments */ + if(f->varlist) { + + for(i=0, parm=f->varlist->next; + vp && (parm != f->varlist) && vp[i]; + parm=parm->next, i++) { + + var_t*var=sial_newvar(parm->name); + + var->v=sial_cloneval(parm->v); + sial_chkandconvert(var->v, vp[i]); + sial_add_auto(var); + sial_freeval(vp[i]); + + } + } + if(vp && vp[i]) { + + sial_warning("Too many parameters to function call"); + + } else if(parm != f->varlist) { + + sial_warning("Not enough parameters for function call"); + } + + /* we execute the buddy of the function */ + retval=NODE_EXE(f->body); + + sial_freeval(retval); + + retval=0; + + sial_popjmp(J_RETURN); + } + + /* make sure non void function do return something */ + if(!retval) { + + if(!sial_isvoid(f->rvar->v->type.typattr)) + + sial_rwarning(&f->pos, "Non void function should return a value."); + + } else { + + /* type checking here ... */ + } + + sial_curp(ocurp); + sial_free(curp); + + return retval; +} + +/* this is the externalized function that the API users call to execute + a function */ +ull +sial_exefunc(char *fname, value_t **vp) +{ +func *f; +ull ret; + + if(!sial_chkfname(fname, 0)) + sial_warning("Unknown function called: %s\n", fname); + + /* builtin vs cmc ...*/ + if((f=sial_getfbyname(fname, 0))) ret=sial_getval(sial_execmcfunc(f, vp)); + else ret=sial_getval(sial_exebfunc(fname, vp)); + /* sial_freeval(v); */ + return ret; +} + +value_t * +sial_exefunc_common(char *fname, node_t*parms, fdata *fd) +{ +int i; +node_t*args; +value_t *vp[BT_MAXARGS+1]; +func *f; + + /* We most execute before pushing the S_FILE vars so the the + local variable for the caller can still be accessed */ + for(i=0,args=parms; args; args=args->next) { + + if(i==BT_MAXARGS) { + + sial_error("Max number of parameters exceeded [%d]", BT_MAXARGS); + } + vp[i++]=NODE_EXE(args); + + } + + /* null out the rest */ + for(;i<=BT_MAXARGS;i++) vp[i]=0; + + /* builtin vs cmc ...*/ + if((f=sial_getfbyname(fname, fd))) return sial_execmcfunc(f, vp); + else return sial_exebfunc(fname, vp); +} + + +/* this function is called by the sial_exeop() through a CALL op. */ +value_t * +sial_docall(node_t*name, node_t*parms, void *arg) +{ +fdata *fd = arg; +char *sname=sial_vartofunc(name); +value_t *v=0; + + if(sial_chkfname(sname, fd)) { + + v=sial_exefunc_common(sname, parms, fd); + + } + else sial_rerror(&name->pos, "Unknown function being called:[%s]", sname, fd); + /* sial_vartofunc() allocates the name */ + /* we don't free this item if mem debug has been set */ + if(!sial_ismemdebug()) sial_free(sname); + return v; + +} + +int +sial_newfunc(var_t*fvar, node_t* body) +{ +var_t*v=fvar->next; + + if(v == fvar) { + + sial_freevar(v); + NODE_FREE(body); + sial_error("Syntax error in function declaration"); + + }else{ + + func *fn, *fi ; + + sial_freevar(fvar); + + /* we do the func insertion first so that if we have a problem + we can jump our of the parser using the sial_parback() function + which will deallocate the stuff */ + + fn=sial_alloc(sizeof(func)); + if(sial_isstatic(v->v->type.typattr)) fn->local=1; + fn->rvar=v; + fn->varlist=v->dv->fargs; + + /* check for func(void) */ + if(fn->varlist && fn->varlist->next != fn->varlist) { + + var_t*v=fn->varlist->next; + + if(v->v->type.type != V_REF && sial_isvoid(v->v->type.typattr)) { + + /* cut the chain here */ + if(v->next != fn->varlist) { + + sial_error("function parameter cannot have 'void' type"); + } + sial_freesvs(fn->varlist); + fn->varlist=0; + } + } + + v->dv->fargs=0; + fn->name=sial_strdup(v->name); + fn->local=sial_isstatic(v->v->type.typattr)?1:0; + fn->body=body; + fn->file=fall; + + /* the position of the function is the position of the var_t*/ + memcpy(&fn->pos, &v->dv->pos, sizeof(srcpos_t)); + + /* emit a warning for variables in the main statement group that + shadow ont of the parameters */ + if(fn->varlist) { + + var_t*v; + + for(v=fn->varlist->next; v!=fn->varlist; v=v->next) { + + var_t*vs; + + if((vs=sial_inlist(v->name, sial_getsgrp_avs(body))) || + (vs=sial_inlist(v->name, sial_getsgrp_svs(body)))) { + + sial_rwarning(&vs->dv->pos, "variable '%s' shadow's a function parameter" + , v->name); + + } + } + } + + if((fi=sial_getfbyname(fn->name, fall))) { + + /* check for local conflicts */ + if(fi->file == fn->file) { + + sial_insertfunc(fn); + sial_rerror(&fn->pos, "Function '%s' redefinition, first defined in file '%s' line %d" + , fn->name, fi->pos.file, fi->pos.line); + + /* check for global conflicts */ + } else if(!fn->local) { + + sial_insertfunc(fn); + sial_rerror(&fn->pos, "Function '%s' already defined in file %s, line %d" + , fn->name, fi->pos.file, fi->pos.line); + + } /* else... it's a static that shadows a global somewhere else. So it's ok */ + + } + + /* Searching is all done, so insert it */ + sial_insertfunc(fn); + + /* check out the storage class. Only 'static' is supported */ + if(!sial_isjuststatic(v->v->type.typattr)) { + + sial_error("Only 'static' storage class is valid for a function"); + } + } + return 1; +} + +/* check for the existance of a function in the list */ +int +sial_chkfname(char *fname, void *vfd) +{ +fdata *fd=(fdata *)vfd; + + /* check script functions */ + if(!sial_getfbyname(fname, fd)) { + + /* check builtin list */ + if(sial_chkbuiltin(fname)) return 1; + return 0; + + } + return 1; +} + +/* + + Thsi is the interface function with the command interpreter. + It needs to be able to execute a function giving a name and + passing some random parameters to it. + + A return of 0 means "no such function". +*/ +int +sial_runcmd(char *fname, var_t*args) +{ + if(sial_chkfname(fname, 0)) { + + value_t *val; + int *exval; + jmp_buf exitjmp; + void *vp; + ull ret; + sact *sa; + + /* make sure arguments are available in the global vars */ + vp=sial_add_globals(args); + + /* we set the exception handler too... */ + sa=sial_setexcept(); + + if(!setjmp(exitjmp)) { + + sial_pushjmp(J_EXIT, &exitjmp, &exval); + + /* we need to create a var with that name */ + val=sial_exefunc_common(fname, 0, 0); + + sial_popjmp(J_EXIT); + + if(val) { + + ret=unival(val); + sial_freeval(val); + } + else ret=0; + } + else { + + ret=*exval; + } + + /* remove exception handlers and restore previous handlers */ + sial_rmexcept(sa); + + /* remove args from global vars */ + sial_rm_globals(vp); + return ret; + } + return 0; +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.h /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.h 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,465 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial_api.h" +typedef unsigned long long caddr; + +#define SRCPOS_S struct srcpos_s +#define DVAR_S struct dvar_s +#define CASELIST_S struct caselist_s +#define CASEVAL_S struct caseval_s +#define STMEMBER_S struct stmember_s +#define STINFO_S struct stinfo_s + +SRCPOS_S; +DVAR_S; +CASELIST_S; +CASEVAL_S; +STMEMBER_S; +STINFO_S; + + +/************* source position tracking ************/ +typedef SRCPOS_S { + char *file; + int line; + int col; +} srcpos_t; + +/* member information */ +typedef MEMBER_S { + + char *name; + int offset; /* offset from top of structure */ + int size; /* size in bytes of the member or of the bit array */ + int fbit; /* fist bit (-1) is not a bit field */ + int nbits; /* number of bits for this member */ + int value; /* for a enum member, the corresponding value_t */ + +} member_t; + +/* list to hold enum constant information */ +typedef ENUM_S { + + struct enum_s *next; + char *name; + int value; + +} enum_t; + +/* list of macro symbols and there corresponding value_ts */ +typedef DEF_S { + struct def_s * next; + char *name; + char *val; + +} def_t; + +/* type_t information past back and forth */ +typedef TYPE_S { + int type; /* type_t of type_t */ + ull idx; /* index to basetype_t or ctype_t */ + int size; /* size of this item */ + /* ... next fields are use internally */ + int typattr; /* base type_t qualifiers */ + int ref; /* level of reference */ + int fct; /* 1 if function pointer */ + int *idxlst; /* points to list of indexes if array */ + ull rtype; /* type_t a reference refers too */ +} type_t; + +/* scope/storage of variables */ +#define S_FILE 1 /* persistant file scope */ +#define S_STAT 2 /* persistant statement scope */ +#define S_AUTO 3 /* stack (default) */ +#define S_GLOB 4 /* add to the global variables */ + +typedef union vu_s { + unsigned char uc; + signed char sc; + unsigned short us; + signed short ss; + unsigned int ul; + signed int sl; + unsigned long long ull; + signed long long sll; + void *data; +} vu_t; + +/************* value_t **************/ +typedef VALUE_S { + type_t type; + int set; /* is this is a Lvalue_t then set is 1 */ + VALUE_S *setval;/* value_t to set back to */ + void (*setfct)(struct value_s*, struct value_s*); + /* the function that will set the value */ + ARRAY_S *arr; /* array associated with value */ + vu_t v; + ull mem; +} value_t; + +/************** array linked lists *****************/ +typedef ARRAY_S { + + ARRAY_S *next; /* to support a linked list of array elements */ + ARRAY_S *prev; + int ref; /* reference count on this array */ + VALUE_S *idx; /* arrays can be indexed using any type of variables */ + VALUE_S *val; /* arrays element values */ + +} array_t; + +/************* node_t *************/ +typedef NODE_S { + VALUE_S* (*exe)(void*); /* execute it */ + void (*free)(void*); /* free it up */ + char* (*name)(void*); /* get a name */ + void *data; /* opaque data */ + NODE_S* next; + SRCPOS_S pos; +} node_t; + +typedef IDX_S { + + int nidx; + NODE_S *idxs[MAXIDX]; + +} idx_t; + +/*************** variable list ****************/ +typedef VAR_S { + + char *name; + VAR_S *next; + VAR_S *prev; + VALUE_S *v; + int ini; + DVAR_S *dv; + +} var_t; + +/* V_BASE subtype */ +#define B_SC 0 /* signed char */ +#define B_UC 1 /* unsignec char */ +#define B_SS 2 /* signed short */ +#define B_US 3 /* unsigned short */ +#define B_SL 4 /* signed long */ +#define B_UL 5 /* unsigned long */ +#define B_SLL 6 /* signed long long */ +#define B_ULL 7 /* unsigned long long */ + +#define is_ctype(t) ((t)==V_UNION || (t)==V_STRUCT) +#define VAL_TYPE(v) (v->type.type) +#define TYPE_SIZE(t) ((t)->type==V_REF?sial_defbsize():(t)->size) + +/* type_ts of jumps */ +#define J_CONTINUE 1 +#define J_BREAK 2 +#define J_RETURN 3 +#define J_EXIT 4 + +#define sial_setval(v, v2) if((v)->set) ((v)->setfct)((v)->setval, (v2)) + +/************* case *************/ +typedef CASEVAL_S { + + int isdef; + ull val; + CASEVAL_S *next; + SRCPOS_S pos; + +} caseval_t; + +typedef CASELIST_S { + + CASEVAL_S *vals; + NODE_S *stmt; + CASELIST_S *next; + SRCPOS_S pos; + +} caselist_t; + +/*************** struct member info ****************/ +typedef STMEMBER_S { + + TYPE_S type; /* corresponding type_t */ + MEMBER_S m; /* member information */ + + STMEMBER_S *next; + +} stmember_t; + +typedef DVAR_S { + + char *name; + int refcount; + int ref; + int fct; + int bitfield; + int nbits; + IDX_S *idx; + NODE_S *init; + VAR_S *fargs; + SRCPOS_S pos; + DVAR_S *next; + +} dvar_t; + +typedef STINFO_S { + char *name; /* structure name */ + ull idx; /* key for search */ + int all; /* local : partial or complete declaration ? */ + TYPE_S ctype; /* associated type */ + TYPE_S rtype; /* real type_t when typedef */ + STMEMBER_S *stm; /* linked list of members */ + ENUM_S *enums; /* enums names and values */ + STINFO_S *next; /* next struct on the list */ + +} stinfo_t; + +stinfo_t *sial_getstbyindex(ull idx, int type_t); + +typedef value_t* (*xfct_t)(void *); +typedef char* (*nfct_t)(void *); +typedef void (*ffct_t)(void *); +typedef void (*setfct_t)(value_t*, value_t*); + +#ifdef DEBUG +#define NODE_EXE(n) (printf("(%s):[%d]\n",__FILE__, __LINE__), (n)->exe((n)->data)) */ +#else +#define NODE_EXE(n) ((n)->exe((n)->data)) +#endif +#define NODE_NAME(n) ((n)->name?((n)->name((n)->data)):0) +#define NODE_FREE(n) (sial_freenode(n)) + +#ifdef __GNUC__ +#define __return_address (void*)(__builtin_return_address(0)) +#else +// must be the SGI Mips compiler. +#endif +#if 1 +#define TAG(p) sial_caller(p, __return_address) +#else +#define TAG(p) ; +#endif + +node_t *sial_sibling(node_t*, node_t*); +node_t *sial_newnode(void); +node_t *sial_newvnode(char *); +node_t *sial_newstr(void); +node_t *sial_newnum(char *); +node_t *sial_newop(int op, int nagrs, ...); +node_t *sial_newptrto(int, node_t*); +node_t *sial_newmult(node_t*, node_t*, int); +node_t *sial_newstat(int op, int nargs, ...); +node_t *sial_stat_decl(node_t*, var_t*); +node_t *sial_addstat(node_t*, node_t*); +node_t *sial_type_cast(type_t*, node_t*); +node_t *sial_newmem(int, node_t*, node_t*); +node_t *sial_newcall(node_t*, node_t*); +node_t *sial_newindex(node_t*, node_t*); +node_t *sial_newadrof(node_t*); +node_t *sial_newcase(node_t*, node_t*); +node_t *sial_addcase(node_t*, node_t*); +node_t *sial_caseval(int, node_t*); +node_t *sial_addcaseval(node_t*, node_t*); +node_t *sial_sizeof(void *p, int type_t); +node_t *sial_tdeftovar(type_t *td); +node_t *sial_getppnode(void); +node_t *sial_allocstr(char *buf); +node_t *sial_makenum(int type_t, ull val); +node_t *sial_macexists(node_t *var_t); +node_t *sial_newptype(var_t *v); +node_t *sial_newpval(node_t *vn, int fmt); +node_t *sial_strconcat(node_t *, node_t *); +node_t *sial_typecast(type_t*type, node_t*expr); + +dvar_t *sial_newdvar(node_t *v); +dvar_t *sial_linkdvar(dvar_t *dvl, dvar_t *dv); +dvar_t *sial_dvarini(dvar_t *dv, node_t *init); +dvar_t *sial_dvaridx(dvar_t *dv, node_t *n); +dvar_t *sial_dvarfld(dvar_t *dv, node_t *n); +dvar_t *sial_dvarptr(int ref, dvar_t *dv); +dvar_t *sial_dvarfct(dvar_t *dv, var_t *fargs); + +void sial_pushjmp(int type_t, void *env, void *val); +void sial_popjmp(int type_t); +void *sial_getcurfile(void); +void sial_walkarray(node_t *varnode_t, node_t *arrnode_t, void(*cb)(void *), void *data); +void get_bit_value(ull val, int nbits, int boff, int size, value_t *v); +void sial_enqueue(var_t *vl, var_t *v); +void sial_freenode(node_t *n); +void sial_validate_vars(var_t *svs); +void sial_freesvs(var_t *svs); +void *sial_setexcept(void); +void sial_tdef_decl(dvar_t *dv, type_t *t); +void sial_refarray(value_t *v, int inc); +void *sial_curmac(void); +void sial_setfct(value_t *v1, value_t *v2); +void sial_exevi(char *fname, int line); +void sial_unput(char); +void sial_dupval(value_t *v, value_t *vs); +void sial_parseback(void); +void sial_curpos(srcpos_t *p, srcpos_t *s); +void sial_rmexcept(void *osa); +void sial_chksign(type_t*t); +void sial_chksize(type_t*t); +void sial_setpos(srcpos_t *p); +void sial_rerror(srcpos_t *p, char *fmt, ...); +void sial_rwarning(srcpos_t *p, char *fmt, ...); +void sial_chkandconvert(value_t *vto, value_t *vfrm); +void sial_warning(char *fmt, ...); +void sial_format(int tabs, char *str); +void sial_freevar(var_t*v); +void sial_rmbuiltin(var_t*v); +void sial_rm_globals(void *vg); +void sial_addnewsvs(var_t*avl, var_t*svl, var_t*nvl); +void sial_dojmp(int type, void *val); +void sial_pushbuf(char *buf, char *fname, void(*f)(void*), void *d, void *m); +void sial_rsteofoneol(void); +void sial_settakeproto(int v); +void sial_popallin(void); +void sial_tagst(void); +void sial_flushtdefs(void); +void sial_setsvlev(int newlev); +void sial_flushmacs(void *tag); +void sial_add_auto(var_t*nv); +void *sial_chkbuiltin(char *name); +void sial_freedata(value_t *v); +void sial_dupdata(value_t *v, value_t *vs); +void sial_setarray(array_t**arpp); +void sial_rawinput(int on); +void sial_setini(node_t*n); +void sial_valindex(value_t *var, value_t *idx, value_t *ret); +void sial_free_siblings(node_t*ni); +void sial_mkvsigned(value_t*v); +void sial_transval(int s1, int s2, value_t *v, int issigned); +void sial_popref(type_t*t, int ref); +void sial_getmem(ull kp, void *p, int n); +void sial_baseop(int op, value_t *v1, value_t *v2, value_t *result); +void sial_setinsizeof(int v); +void sial_freeidx(idx_t *idx); +void sial_freedvar(dvar_t*dv); +void sial_pushenums(enum_t *et); +void sial_addfunc_ctype(int idx); +void sial_setapiglobs(void); +void sial_setbuiltins(void); +void sial_setdefbtype(int size, int sign); +void get_bit_value(ull val, int nbits, int boff, int size, value_t *v); +void *sial_findfile(char *name, int unlink); +void sial_newmac(char *mname, char *buf, int np, char **p, int silent); +void *sial_getcurfile(void); +void *sial_getcurfile(void); +void sial_startctype(int type, node_t*namen); +void sial_addtolist(var_t*vl, var_t*v); +void sial_arch_swapvals(void* vp, void *sp); +void sial_fillst(stinfo_t *st); +void sial_exememlocal(value_t *vp, stmember_t* stm, value_t *v); +void sial_do_deref(int n, value_t *v, value_t *ref); +void sial_addneg(char *name); + +stmember_t*sial_member(char *mname, type_t*tp); + +ull set_bit_value_t(ull dvalue_t, ull value_t, int nbits, int boff); +ull unival(value_t *); +ul sial_bool(value_t *); + +value_t *sial_docall(node_t *, node_t *, void *); +value_t *sial_docast(void); +value_t *sial_newval(void); +value_t *sial_exebfunc(char *, value_t **); +value_t *sial_exevar(void *); +value_t *sial_exenode(node_t *); +value_t *sial_setstrval(value_t *, char *); +value_t *sial_defbtype(value_t *, ull); +value_t *sial_defbtypesize(value_t *, ull, int); +value_t *sial_sprintf(value_t *, ...); +value_t *sial_printf(value_t *, ...); +value_t *sial_exists(value_t *vname); +value_t *sial_exit(int v); +value_t *sial_bload(value_t *name); +value_t *sial_bdepend(value_t *name); +value_t *sial_bunload(value_t *vfname); +value_t *sial_showtemp(void); +value_t *sial_showaddr(value_t *vadr); +value_t *sial_findsym(value_t *vadr); +value_t *sial_memdebugon(void); +value_t *sial_memdebugoff(void); +value_t *sial_ismember(value_t*vp, value_t*vm); + +value_t *sial_prarr(value_t*name, value_t*root); +value_t *sial_getstr(value_t*vm); + +var_t *sial_vardecl(dvar_t *dv, type_t *t); +var_t *sial_inlist(char *name, var_t *vl); +var_t *sial_dupvlist(var_t *vl); +var_t *sial_getcurgvar(void); +var_t *sial_getvarbyname(char *name, int silent, int local); +var_t *sial_getsgrp_avs(node_t *n); +var_t *sial_getsgrp_svs(node_t *n); +var_t *sial_parsexpr(char *); + +int sial_file_decl(var_t *svs); +int sial_newfunc(var_t *fvar, node_t* body); +int sial_line(int inc); +int sial_samectypename(int type_t, ull idx1, ull idx2); +int sial_issigned(int attr); +int sial_isstatic(int atr); +int sial_isjuststatic(int attr); +int sial_isconst(int atr); +int sial_issigned(int atr); +int sial_istdef(int atr); +int sial_isxtern(int atr); +int sial_isvoid(int atr); +int sial_isstor(int atr); +int sial_ispartial(type_t*t); +int sial_input(void); +int sial_addsvs(int type, var_t*sv); +int sial_pushfile(char *name); +int sial_chkfname(char *fname, void *fd); +int sial_lookuparray(node_t*vnode, node_t*arrnode); +int sial_runcmd(char *fname, var_t*args); +int sial_getseq(int c); +int sial_newfile(char *name, int silent); +int sial_deletefile(char *name); +int sial_getsvlev(void); +int sial_idxtoattr(int idx); +int sial_docase(ull val, caselist_t*cl); +int siallex(void); +int sialpplex(void); +int sial_ismemdebug(void); +int sial_isenum(int atr); +int sial_funcexists(char *name); +int sial_isnew(void* p); +int sial_isneg(char *name); + +char *sial_vartofunc(node_t *name); +char *sial_gettdefname(ull idx); +char *sial_ctypename(int type_t); +char *sial_filempath(char *fname); +char *sial_fileipath(char *fname); +char *sial_getline(void); +char *sial_cursorp(void); +char *sial_getbtypename(int typattr); +char *sial_filename(void); +char *sial_curp(char *); + +type_t *sial_newcast(var_t *v); +type_t *sial_newctype(int ctype_t, node_t *n); +type_t *sial_addbtype(type_t *t, int newtok); +type_t *sial_ctype_decl(int ctype_t, node_t *n, var_t *list); +type_t *sial_enum_decl(int ctype_t, node_t *n, dvar_t *dvl); +type_t *sial_addstorage(type_t *t1, type_t *t2); +type_t *sial_getvoidstruct(int ctype); + +extern int lineno, needvar, instruct, nomacs; +node_t *lastv; + +#define NULLNODE ((node_t*)0) + +/* configuration variables */ +#define S_MAXSTRLEN 1024 /* lengh of a STRING variable value_t */ +#define S_MAXDEEP 500 /* maximum stacking of calls */ +#define S_MAXFILES 200 /* maximum number of macro files */ + +#define S_VARARG "__VARARG" /* name of the special var for ... */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_input.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_input.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_input.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_input.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,802 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sial.h" + +char *sialpp_create_buffer(void *, int); +void sialpp_switch_to_buffer(void *); +void sialpp_delete_buffer(void *); + +typedef void fdone(void *data); +extern void* sial_create_buffer(FILE *, int); +typedef struct inbuf_s { + srcpos_t pos; /* current filename,line,col */ + int cursor; /* position of next input() character */ + int len; /* length of the buffer */ + char *buf; /* buffer */ + void *data; /* opaque data for callback */ + void *mac; /* for nested defines substitutions */ + fdone *donefunc; /* function to call when done with buffer */ + int space; + int eofonpop; /* terminate parsing at end of buffer ? */ +#if linux + void* yybuf; +#endif + +} inbuf_t; + +void sial_switch_to_buffer(void *); +void sial_delete_buffer(void *); +#define MAXIN 20 +static inbuf_t inlist[MAXIN]; +static inbuf_t *in=0; +static int nin=0; +static int eol=0, virgin=1; +#if linux +static int inpp=0; +#endif + +extern void *sial_getmac(char *, int); + +/* this function is called by the macro macro functions to set + and test the current buffer level in order to take care of + imbedded macros w/ the same parameter names. + see sial_getmac(). +*/ +void *sial_getcurmac(void) +{ + return in ? in->mac : 0 ; +} + +static void +sial_pusherror(void) +{ + sial_error("Too many level of input stream"); +} + +/* + Push a buffer onto the parser input stream. +*/ +void +sial_pushbuf(char *buf, char *fname, void (*vf)(void *), void *d, void *m) +{ +fdone *f=(fdone*)vf; + + if(nin==MAXIN) sial_pusherror(); + + /* if we are pushing a macro then use upper level coordinates */ + if(fname) { + + inlist[nin].pos.line=1; + inlist[nin].pos.col=1; + inlist[nin].pos.file=fname; + + } else sial_setpos(&inlist[nin].pos); + + /* set it */ + if(nin) { + + sial_curpos(&inlist[nin].pos, &inlist[nin-1].pos); + + } else { + + sial_curpos(&inlist[nin].pos, 0); + + } + + inlist[nin].buf=buf; + inlist[nin].donefunc=f; + inlist[nin].space=0; + inlist[nin].data=d; + inlist[nin].mac=m; + inlist[nin].cursor=0; + inlist[nin].len=strlen(buf); + inlist[nin].eofonpop=0; +#if linux + if(inpp) { + inlist[nin].yybuf=sialpp_create_buffer(0, inlist[nin].len); + sialpp_switch_to_buffer(inlist[nin].yybuf); + }else{ + inlist[nin].yybuf=sial_create_buffer(0, inlist[nin].len); + sial_switch_to_buffer(inlist[nin].yybuf); + } +#endif + in=&inlist[nin]; + nin++; +} + +/* read the rest of the "#include" line from the parser input stream + open the corresponding file, push it's contain on the parser input + stream. +*/ +int +sial_pushfile(char *name) +{ +struct stat s; +char *fname; + + if(nin==MAXIN) sial_pusherror(); + + fname=sial_fileipath(name); + + if(fname) { + + if(!stat(fname, &s)) { + + char *buf=sial_alloc(s.st_size+1); + int fd; + + if((fd=open(fname, O_RDONLY))==-1) { + + sial_msg("%s: %s", fname, strerror(errno)); + + } + else { + + if(read(fd, buf, s.st_size) != s.st_size) { + + if(errno != EISDIR) + sial_msg("%s: read error : %s", fname, strerror(errno)); + + } + else { + + + buf[s.st_size]='\0'; + sial_pushbuf(buf, fname, sial_free, buf, 0); + close(fd); + return 1; + + } + close(fd); + } + + sial_free(buf); + + } + sial_free(fname); + } + return 0; + +} + +/* + Done with the current buffer. + Go back to previous on the stack. +*/ +static int +sial_popin(void) +{ + + if(eol || !nin) { + + if(!nin) in=0; + return 1; + + } else { + + nin--; + + /* call back */ + if(inlist[nin].donefunc) { + + inlist[nin].donefunc(inlist[nin].data); + } + if(inlist[nin].eofonpop) { + + eol=1; +#if linux + inpp=0; +#endif + } + if(!nin) in=0; + else { + + in=&inlist[nin-1]; + if(!eol) { +#if linux + if(inpp) { + sialpp_switch_to_buffer(inlist[nin-1].yybuf); + sialpp_delete_buffer(inlist[nin].yybuf); + } else { + sial_switch_to_buffer(inlist[nin-1].yybuf); + sial_delete_buffer(inlist[nin].yybuf); + } +#endif + } + sial_curpos(&in->pos, 0); + } + return 0; + } +} + +/* + With linux we need to use the wrap function + so that the flex buffer stuff is keaped in the game. +*/ +int +sialwrap(void) +{ + return sial_popin(); +} + +int +sialppwrap(void) +{ + if(eol) return 1; + return sial_popin(); +} + +void +sial_popallin(void) +{ + while(nin) { + eol=0; + sial_popin(); + } +} + +#define BLK_IFDEF 1 +#define BLK_IFNDEF 2 +#define BLK_IF 3 +#define BLK_ELIF 4 +#define BLK_ELSE 5 + +typedef struct ifblk { + int type; /* type of block */ + int exprpos; /* curpor to start of corresponding expression */ + int bstart; /* curpor position at start of block */ + int dirlen; /* length of the directive name */ + int bend; /* cursor position at end of block */ + struct ifblk *next; +} ifblk_t; + +static int +sial_isif(int pos) +{ + if( + (in->len-pos>6 && !strncmp(in->buf+pos, "ifndef", 6)) + || (in->len-pos>5 && !strncmp(in->buf+pos, "ifdef", 5)) + || (in->len-pos>2 && !strncmp(in->buf+pos, "if", 2)) + + ) return 1; + + return 0; +} + +/* + Get directly to next block, skipping nested blocks. +*/ +static int +sial_nxtblk(int pos, int lev) +{ +int virgin=0; + + while(1) { + + if(pos==in->len) { + + sial_error("Block without endif"); + } + + if(virgin && in->buf[pos]=='#') { + + pos++; + + /* nested if ? */ + if(in->buf[pos]=='i' && sial_isif(pos)) { + + while(1) { + pos=sial_nxtblk(pos, lev+1); + if(in->len-pos>5 && !strncmp(in->buf+pos, "endif", 5)) break; + } + + } else if(in->buf[pos]=='e') return pos; + + } else if(in->buf[pos]=='\n') { + + virgin=1; + + } else if(in->buf[pos] != ' ' && in->buf[pos] != '\t') { + + virgin=0; + } + pos++; + } +} + +static ifblk_t * +sial_getblklst(void) +{ +ifblk_t *lst, *last; +int doneelse=0, pos; + + lst=sial_alloc(sizeof(ifblk_t)); + + lst->bstart=in->cursor-1; + if(!strncmp(in->buf+in->cursor, "ifdef", 5)) { + + lst->type=BLK_IFDEF; + lst->exprpos=lst->bstart+6; + lst->dirlen=6; + + } else if(!strncmp(in->buf+in->cursor, "ifndef", 6)){ + + lst->type=BLK_IFNDEF; + lst->exprpos=lst->bstart+7; + lst->dirlen=7; + + } else { + + lst->type=BLK_IF; + lst->exprpos=lst->bstart+3; + lst->dirlen=3; + } + + last=lst; + pos=in->cursor; + + while(1) { + + ifblk_t *new=sial_alloc(sizeof(ifblk_t)); + + pos=sial_nxtblk(pos, 0); + + last->bend=pos-2; + new->bstart=pos-1; + if(!strncmp(in->buf+pos, "elif", 4)) { + + if(doneelse) { + + sial_error("Additional block found after #else directive"); + } + new->type=BLK_ELIF; + new->exprpos=new->bstart+5; + new->dirlen=5; + + } else if(!strncmp(in->buf+pos, "else", 4)) { + + if(doneelse) { + + sial_error("#else already done"); + } + new->type=BLK_ELSE; + new->exprpos=new->bstart+5; + new->dirlen=5; + doneelse=1; + + } else if(!strncmp(in->buf+pos, "endif", 5)) { + + sial_free(new); + last->next=0; + break; + } + last->next=new; + last=new; + } + return lst; +} + +/* + Zap a complete block. + We put spaces everywhere but over the newline. + Hey, it works. It's good enough for me. +*/ +static void +sial_zapblk(ifblk_t *blk) +{ +int i; + + for(i=blk->bstart;ibend;i++) { + + if(in->buf[i]!='\n') in->buf[i]=' '; + } +} + +int sial_eol(char c) { return (!c || c=='\n') ? 1 : 0; } + +/* + This function is called by sial_input() when a #if[def] is found. + We gather all blocks of the if/then/else into a list. + Parsing and execution of the expression is done only when needed. +*/ +void sial_rsteofoneol(void) +{ + eol=0; + virgin=1; +#if linux + inpp=0; +#endif +} + +void +sial_zapif(void) +{ +ifblk_t *lst=sial_getblklst(); +ifblk_t *last=lst; +int b=0; + + /* we scan the entire list untill a condition is true or we + reach #else or we reach the end */ + while(lst) { + + switch(lst->type) { + + case BLK_IFDEF: + case BLK_IFNDEF: + { + char mname[MAX_SYMNAMELEN+1], c; + int i=0, j=lst->bstart+lst->dirlen; + int v; + + /* get the macro name and see if it exists */ + /* skip all white spaces */ + while((c=in->buf[j]) == ' ' || c == '\t') if(c=='\n' || !c) { + + sial_error("Macro name not found!"); + + } else j++; + + /* get the constant or macro name */ + while((c=in->buf[j]) != ' ' && c != '\t' && c != '(') { + + if(c=='\n' || !c) break; + + if(i==MAX_SYMNAMELEN) break; + + mname[i++]=c; + j++; + } + mname[i]='\0'; + lst->dirlen += (j-lst->bstart-lst->dirlen); + if(sial_getmac(mname,0)) v=1; + else v=0; + b=lst->type==BLK_IFDEF?v:!v; + + } + break; + + case BLK_IF: case BLK_ELIF: + { + node_t*n; + void sialpprestart(int); + void sialppparse(void); + char *expr=sial_getline(); + int len=lst->dirlen; + +#if linux + sialpprestart(0); + inpp=1; +#endif + lst->dirlen += (in->cursor-lst->exprpos-1); + sial_pushbuf(expr, 0, sial_free, expr, 0); + in->eofonpop=1; + in->cursor += len; + sialppparse(); + + sial_rsteofoneol(); + eol=0; + + /* get the resulting node_t*/ + n=sial_getppnode(); + + /* execute it */ + { + + int *exval; + jmp_buf exitjmp; + void *sa; + value_t *v; + + sa=sial_setexcept(); + + if(!setjmp(exitjmp)) { + + sial_pushjmp(J_EXIT, &exitjmp, &exval); + v=NODE_EXE(n); + sial_rmexcept(sa); + sial_popjmp(J_EXIT); + b=sial_bool(v); + sial_freeval(v); + + } else { + + sial_rmexcept(sa); + sial_parseback(); + } + } + } + break; + + case BLK_ELSE: + { + + b=1; + + } + break; + } + + last=lst; + if(b) break; + + /* count new lines */ + { + while(in->cursor < lst->bend+1) { + + if(sial_eol(in->buf[in->cursor])) + sial_line(1); + in->cursor++; + } + + } + lst=lst->next; + } + + if(lst) { + + /* remove the # directive itself */ + memset(in->buf+lst->bstart, ' ', lst->dirlen); + + /* zap all remaining blocks */ + while((lst=lst->next)) { sial_zapblk(lst); last=lst; } + } + + /* most remove the #endif */ + memset(in->buf+last->bend+1, ' ', 6); +} + +static int rawinput=0; +void sial_rawinput(int on) { rawinput=on; } + +/* + Get the next character from the input stream tack. +*/ +int +sial_input(void) +{ +register char c; + +redo: + + if(!in || eol) { + + return 0; + } + + if(in->cursor==in->len) { + +#if linux + return (-1); +#else + sial_popin(); + goto redo; +#endif + } + + c=in->buf[in->cursor++]; + if(!rawinput) { + if(c=='\\') { + + if(in->cursor==in->len) return c; + else if(in->buf[in->cursor]=='\n') { + + sial_line(1); + in->cursor++; + goto redo; + } + + } else if(c=='/') { + + if(in->cursor==in->len) return c; + else if(in->buf[in->cursor]=='/') { + + /* C++ stype comment. Eat it. */ + in->cursor++; + while(in->cursorlen) { + + c=in->buf[in->cursor++]; + if(c=='\n') { + /* leave the newline in there */ + in->cursor--; + break; + } + } + goto redo; + + }else if(in->buf[in->cursor]=='*') { + + /* C style comment, eat it */ + in->cursor++; + while(in->cursorlen) { + + c=in->buf[in->cursor++]; + if(c=='*' && (in->cursorlen)) { + + if(in->buf[in->cursor]=='/') { + + in->cursor++; + break; + + } + + } else if(c=='/' && (in->cursorlen)) { + + if(in->buf[in->cursor]=='*') { + + sial_warning("Nested comment"); + + } + + } + if(c=='\n') sial_line(1); + } + goto redo; + } + + }else if(virgin && c=='#') { + + char *p=in->buf+in->cursor; + char *end=in->buf+in->len; + int c=0; + + /* skip white spaces '# define ... ' */ + while(p<(end-4) && (*p==' ' || *p=='\t')) { p++; c++; } + + /* this must be a preprocessor command */ + /* we trigger on the if, ifdef only. #define, #undef, #include are + handled by the lexer */ + + if(!strncmp(p, "if", 2)) { + + in->cursor += c; + sial_zapif(); + /* zapif sets the cursor correctly */ + goto redo; + } + } + } + + if(c=='\n') { + + virgin=1; + sial_line(1); + + }else if(c != ' ' && c != '\t') { + + virgin=0; + + } + else if(!rawinput){ + + register char c2=c; + + /* return one white space for a group of them */ + while((in->cursor < in->len) + && in->buf[in->cursor]==c2) in->cursor++; + + } + + return c; +} + +char * +sial_cursorp() +{ + if(!in) return 0; + return in->buf+in->cursor; +} + +void +sial_unput(char c) +{ + + if(!c) return; + if(!nin) return; + if(!in->cursor) { + + sial_error("Fatal unput error"); + + } + in->buf[--in->cursor]=c; + if(c=='\n') { + + sial_line(-1); + } +} + +/* + Get a single line from the parser stream. +*/ +char * +sial_getline() +{ +char *buf2=0; + + /* use the current input stream for that */ + if(in) { + + /* save the cursor */ + int n=0, c; + char *buf=sial_alloc(in->len-in->cursor+1); + + while(!sial_eol(c=sial_input())) + buf[n++]=c; + buf[n]='\0'; + buf2=sial_alloc(n+2); + strcpy(buf2,buf); + buf2[n]=' '; + buf2[n+1]='\0'; + sial_free(buf); + /* leave the newline there */ + sial_unput(c); + } + return buf2; +} + + +/* read a complete line from the input stream */ +void +sial_include(void) +{ +char name[MAX_SYMNAMELEN+1]; +int n=0; +int c; +int found=0; + + while((c=sial_input())) { + + if(c=='"') { + + if(!found) found++; + else break; + continue; + } + + if(c=='<') { + + found++; + continue; + + } + if(c=='>') break; + if(sial_eol(c)) { + + sial_error("Unexpected EOL on #include"); + } + if(found) { + + if(n==MAX_SYMNAMELEN) { + + sial_error("Filename too long"); + } + name[n++]=c; + + } + } + name[n]='\0'; + + /* flush the rest of the line */ + while((c=sial_input())) { + + if(sial_eol(c)) break; + } + sial_unput(c); + if(sial_fileipath(name)) { + + sial_pushfile(name); + + } else { + + sial_msg("Include file not found: '%s' [include path is '%s']", name, sial_getipath()); + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.l /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.l --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.l 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.l 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,206 @@ +%{ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +%} + +%{ +#include + +#ifdef linux +#define YY_INPUT(buf,result,max_size) \ +{ \ + int c = sial_input(); \ + result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \ +} +#endif + +#define yylval siallval +#include "sial.h" +#define YY_NO_UNPUT +#include "sial.tab.h" + +#define retok(t) return(t) +int needvar=0, instruct=0; +node_t *lastv; +static char *lastvar=0; +char *sial_lastvar(void) { return lastvar; } +extern void sial_skip_directive(void); +extern void sial_define(void); +extern void sial_include(void); +extern void sial_undefine(void); +extern char sial_newchar(void); +extern int sial_chkmacvar(char *); +%} + +ABC [a-zA-Z_] +ABCN [a-zA-Z0-9_] +N [0-9] +X [0-9a-fA-F] +W [ \t\n] +P #[ \t]* +OP [(] +CP [)] + +%s var1 +%s var2 +%s var3 +%s var4 +%% + +{W} { ; } + +"..." { retok(VARARGS); } +"&&" { retok(BAND); } +"||" { retok(BOR); } +"<" { retok(LT); } +"<=" { retok(LE); } +"==" { retok(EQ); } +">=" { retok(GE); } +">" { retok(GT); } +"!=" { retok(NE); } + +"&=" { retok(ANDME); } +"|" { retok(OR); } +"|=" { retok(ORME); } +"!" { retok(NOT); } +"^" { retok(XOR); } +"&" { retok(AND); } +"^=" { retok(XORME); } +">>" { retok(SHR); } +"<<=" { retok(SHLME); } +">>=" { retok(SHRME); } +"<<" { retok(SHL); } +"++" { retok(INCR); } +"+" { retok(ADD); } +"--" { retok(DECR); } +"-" { retok(SUB); } +"+=" { retok(ADDME); } +"-=" { retok(SUBME); } +"*=" { retok(MULME); } +"/=" { retok(DIVME); } +"/" { retok(DIV); } +"%=" { retok(MODME); } +"%" { retok(MOD); } +"=" { retok(ASSIGN); } +"->" { retok(INDIRECT); } +"." { retok(DIRECT); } +"{" { needvar=0; retok('{'); } + +\*+ { + yylval.i=strlen(yytext); + return PTR; + } + +(("0x"+){X}+[lL]*|{N}+[lL]*) { yylval.n = sial_newnum(yytext); retok(NUMBER); } + +{P}ident { sial_skip_directive(); } +{P}pragma { sial_skip_directive(); } +{P}define { + /* preprocessor command */ + /* either a simple constant or a macro */ + sial_define(); + } +{P}include { + + /* file inclusion */ + sial_include(); + } +{P}undef { + sial_undefine(); + } +while { retok(WHILE); } +for { retok(FOR); } +do { retok(DO); } +if { retok(IF); } +else { retok(ELSE); } +break { retok(BREAK); } +continue { retok(CONTINUE); } +in { retok(IN); } +return { retok(RETURN); } + +__char__ { retok(yylval.i=CHAR); } +__short__ { retok(yylval.i=SHORT); } +__int__ { retok(yylval.i=INT); } +__float__ { retok(yylval.i=FLOAT); } +__double__ { retok(yylval.i=DOUBLE); } +__register__ { retok(yylval.i=REGISTER); } +__volatile__ { retok(yylval.i=VOLATILE); } +__void__ { retok(yylval.i=VOID); } +__unsigned__ { retok(yylval.i=UNSIGNED); } +__signed__ { retok(yylval.i=SIGNED); } +__long__ { retok(yylval.i=LONG); } +__const__ { retok(yylval.i=CONST); } +__static__ { retok(yylval.i=STATIC); } +__extern__ { retok(yylval.i=EXTERN); } + +char { retok(yylval.i=CHAR); } +short { retok(yylval.i=SHORT); } +int { retok(yylval.i=INT); } +float { retok(yylval.i=FLOAT); } +double { retok(yylval.i=DOUBLE); } +register { retok(yylval.i=REGISTER); } +volatile { retok(yylval.i=VOLATILE); } +void { retok(yylval.i=VOID); } +unsigned { retok(yylval.i=UNSIGNED); } +signed { retok(yylval.i=SIGNED); } +long { retok(yylval.i=LONG); } +const { retok(yylval.i=CONST); } +static { retok(yylval.i=STATIC); } +extern { retok(yylval.i=EXTERN); } + +string { retok(yylval.i=STRTYPE); } +__inline { ; } +switch { retok(SWITCH); } +case { retok(CASE); } +default { retok(DEFAULT); } +enum { retok(yylval.i=ENUM); } +union { retok(yylval.i=UNION);} +struct { retok(yylval.i=STRUCT); } +typedef { retok(yylval.i=TDEF); } +sizeof { retok(SIZEOF); } +print { retok(PRINT); } +printo { retok(PRINTO); } +printd { retok(PRINTD); } +printx { retok(PRINTX); } +take_array { retok(TAKE_ARR); } + +__var__ { BEGIN(var1); } +{W}*{OP}{W}* { BEGIN(var2); } +{ABC}{ABCN}* { BEGIN(var3); goto forcevar; } +{W}*{CP}{W}* { BEGIN(INITIAL); } + + +{ABC}{ABCN}* { + if((!needvar) && (yylval.t=sial_getctype(V_TYPEDEF, yytext, 1))) + { + /* hack to remember last tdef name */ + if(lastvar) sial_free(lastvar); + lastvar=sial_alloc(strlen(yytext)+1); + strcpy(lastvar, yytext); + needvar++; + retok(TYPEDEF); + } +forcevar: + needvar=0; + if(strlen(yytext) > MAX_SYMNAMELEN) { + + sial_error("Symbol name too long"); + } + if(!sial_chkmacvar(yytext)) { + yylval.n = sial_newvnode(yytext); + retok(VAR); + } + } + +\" { yylval.n = sial_newstr(); retok(STRING); } +\'.\' { yylval.n = sial_makenum(B_SC, yytext[1]); retok(NUMBER); } +\'\\.\' { yylval.n = sial_makenum(B_SC, sial_getseq(yytext[2])); retok(NUMBER); } + +. { retok(yylval.i = yytext[0]); } + +%% +#undef input +#undef unput +#define input() sial_input() +#define unput(c) sial_unput(c) diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial-lsed /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial-lsed --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial-lsed 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial-lsed 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,32 @@ +s/yyback/sialback/g +s/yybgin/sialbgin/g +s/yycrank/sialcrank/g +s/yyerror/sialerror/g +s/yyestate/sialestate/g +s/yyextra/sialextra/g +s/yyfnd/sialfnd/g +s/yyin/sialin/g +s/yyinput/sialinput/g +s/yyleng/sialleng/g +s/yylex/siallex/g +s/yylineno/siallineno/g +s/yylook/siallook/g +s/yylsp/siallsp/g +s/yylstate/siallstate/g +s/yylval/siallval/g +s/yymatch/sialmatch/g +s/yymorfg/sialmorfg/g +s/yyolsp/sialolsp/g +s/yyout/sialout/g +s/yyoutput/sialoutput/g +s/yyprevious/sialprevious/g +s/yysbuf/sialsbuf/g +s/yysptr/sialsptr/g +s/yysvec/sialsvec/g +s/yytchar/sialtchar/g +s/yytext/sialtext/g +s/yytop/sialtop/g +s/yyunput/sialunput/g +s/yyvstop/sialvstop/g +s/yywrap/sialwrap/g +s/yydebug/sialdebug/g diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_member.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_member.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_member.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_member.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,321 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include "sial.h" +#include "sial.tab.h" + +/* these function are used to access and set members in structs */ + +/* define a member access */ +typedef struct mem { + char *name; /* member name */ + int dir; /* direct/indirect access */ + node_t*expr; /* expression node_t*/ + stmember_t*stm; /* associated member information */ + char *local; /* local memory or ... */ + ull mem; /* ... system memory access */ + srcpos_t p; +} mem; + +void * +sial_adrval(value_t *v) +{ + switch(v->type.size) { + + case 1: return &v->v.uc; + case 2: return &v->v.us; + case 4: return &v->v.ul; + case 8: return &v->v.ull; + } + sial_error("Oops sial_adrval"); + return 0; +} + +/* some API secondary entry points */ +void sial_member_soffset(member_t*m, int offset) { m->offset=offset; } +void sial_member_ssize(member_t*m, int size) { m->size=size; } +void sial_member_sfbit(member_t*m, int fbit) { m->fbit=fbit; } +void sial_member_snbits(member_t*m, int nbits) { m->nbits=nbits; } +void sial_member_sname(member_t*m, char *name) { m->name=sial_strdup(name); } + + +void +sial_setmem(mem *m, value_t *v) +{ +stmember_t*stm=m->stm; + + /* check type compatibility. Ctypes should point to the same stinfo...*/ + if(stm->type.type != v->type.type + /* pointer most point to the same type of object */ + || (v->type.type==V_REF && v->type.rtype != stm->type.rtype) + /* ctypes should point to the same stinfo */ + || (is_ctype(v->type.type) && v->type.idx != stm->type.idx)) { + + sial_error("Incompatible types for assignment"); + + } + + if(stm->m.nbits) { + + ull dvalue_t=0; + + if(v->type.type!=V_BASE) { + + sial_error("Invalid assignment to bit field"); + + } + + /* do the bit gymnastic */ + /* we need to create a ull that contain the current + bit of teh destination */ + if(m->local) { + + memmove(m->local+stm->m.offset, ((char*)(&dvalue_t))+8-stm->m.size, stm->m.size); + dvalue_t=set_bit_value_t(dvalue_t, v->v.ull, stm->m.nbits, stm->m.fbit); + memmove(((char*)(&dvalue_t))+8-stm->m.size, m->local+stm->m.offset, stm->m.size); + + } + + if(m->mem) { + + API_GETMEM(m->mem+stm->m.offset, ((char*)(&dvalue_t))+8-stm->m.size, stm->m.size); + dvalue_t=set_bit_value_t(dvalue_t, v->v.ull, stm->m.nbits, stm->m.fbit); + API_PUTMEM(m->mem+stm->m.offset, ((char*)(&dvalue_t))+8-stm->m.size, stm->m.size); + + } + + + } else { + + /* move the data */ + if(is_ctype(v->type.type)) { + + if(m->local) { + + memmove(m->local+stm->m.offset, v->v.data, stm->m.size); + + } + if(m->mem) { + + API_PUTMEM(m->mem+stm->m.offset, v->v.data, stm->m.size); + } + + } else { + + sial_transval(v->type.size, stm->m.size, v, sial_issigned(v->type.typattr)); + + if(m->local) { + + memmove(m->local+stm->m.offset, sial_adrval(v), stm->m.size); + + } + + if(m->mem) { + + API_PUTMEM(m->mem+stm->m.offset, sial_adrval(v), stm->m.size); + } + } + } +} + +#define vdata(p, t) ((t*)(p->v.data)) + +void +sial_exememlocal(value_t *vp, stmember_t* stm, value_t *v) +{ + /* expression should be a ctype_t*/ + if(!is_ctype(vp->type.type)) { + + sial_error("Invalid type for '.' expression"); + } + /* get that value_t from the application memory */ + if(is_ctype(stm->type.type) && !stm->type.idxlst) { + + void *data=sial_alloc(stm->m.size); + + memmove(data, vdata(vp, char)+stm->m.offset, stm->m.size); + if(vp->mem) v->mem=vp->mem+stm->m.offset; + v->v.data=data; + + } + /* bit field gymnastic */ + else if(stm->m.nbits) { + + ull value=0; + + memmove(vdata(vp, char)+stm->m.offset, ((char*)&value)+(sizeof(value)-stm->m.size), stm->m.size); + get_bit_value(value, stm->m.nbits, stm->m.fbit, stm->m.size, v); + + } + /* check if this is an array, if so then create a reference to it */ + else if(stm->type.idxlst) { + + ull mempos=vp->mem+stm->m.offset; + if(sial_defbsize()==8) v->v.ull=mempos; + else v->v.ul=mempos; + v->mem=mempos; + + } else { + + switch(TYPE_SIZE(&stm->type)) { + case 1: + memmove(&v->v.uc, vdata(vp, char)+stm->m.offset, 1); + break; + case 2: + memmove(&v->v.us, vdata(vp, char)+stm->m.offset, 2); + break; + case 4: + memmove(&v->v.ul, vdata(vp, char)+stm->m.offset, 4); + break; + case 8: + memmove(&v->v.ull, vdata(vp, char)+stm->m.offset, 8); + break; + default: + sial_error("Oops exemem2[%d]", TYPE_SIZE(&stm->type)); + break; + } + if(vp->mem) v->mem=vp->mem+stm->m.offset; + } +} + +value_t * +sial_exemem(mem *m) +{ +value_t *v=sial_newval(); +value_t *vp=NODE_EXE(m->expr); +stmember_t*stm; +srcpos_t p; + + sial_curpos(&m->p, &p); + + if(vp->type.type == V_REF) { + + if(vp->type.ref > 1) { + + sial_error("Too many levels of indirection for access to [%s]", m->name); + + } + } + + /* get the member information and attach it */ + stm=m->stm=(stmember_t*)sial_member(m->name, &vp->type); + if(!stm) { + + sial_freeval(v); + sial_freeval(vp); + sial_error("Invalid member name specified : %s", m->name); + + } + + /* get a copy of the type of thise member and put it in v */ + sial_duptype(&v->type, &stm->type); + + /* indirect i.e. (struct*)->member *most* be relative to the + system image. This is a restriction of this language */ + if(m->dir==INDIRECT) { + + ull mempos; + + if(vp->type.type != V_REF || !is_ctype(vp->type.rtype)) { + + sial_error("Invalid type for '->' expression"); + } + + m->local=0; + m->mem=sial_defbsize()==8?vp->v.ull:vp->v.ul; + mempos=m->mem+stm->m.offset; + + /* get that value_t from the system image */ + if(is_ctype(v->type.type) && !stm->type.idxlst) { + + v->v.data=sial_alloc(stm->m.size); + API_GETMEM(mempos, v->v.data, stm->m.size); + v->mem=mempos; + + } + /* bit field gymnastic */ + else if(stm->m.nbits) { + + ull value=0; + + API_GETMEM(m->mem+stm->m.offset, &value, stm->m.size); + get_bit_value(value, stm->m.nbits, stm->m.fbit, stm->m.size, v); + /* no mempos for bit fields ... */ + + } + /* check if this is an array, if so then create a reference to it */ + else if(stm->type.idxlst) { + + if(sial_defbsize()==8) v->v.ull=mempos; + else v->v.ul=mempos; + v->mem=mempos; + + } else { + + v->mem=mempos; + + switch(TYPE_SIZE(&stm->type)) { + case 1: + API_GETMEM(mempos, &v->v.uc, 1); + break; + case 2: + API_GETMEM(mempos, &v->v.us, 2); + break; + case 4: + API_GETMEM(mempos, &v->v.ul, 4); + break; + case 8: + API_GETMEM(mempos, &v->v.ull, 8); + break; + default: + sial_error("Oops exemem[%d]", TYPE_SIZE(&stm->type)); + break; + } + + } + } + /* direct i.e. (struct).member *most* be in referance to a local + structure. */ + else { + + m->mem=vp->mem; + m->local=vp->v.data; + + /* extract the value from a local copy */ + sial_exememlocal(vp, stm, v); + } + sial_curpos(&p, 0); + sial_freeval(vp); + v->setfct=(setfct_t)sial_setmem; + v->setval=(value_t*)m; + v->set=1; + return v; +} + +void +sial_freemem(mem *m) +{ + NODE_FREE(m->expr); + sial_free(m->name); + sial_free(m); +} + +node_t* +sial_newmem(int dir, node_t*expr, node_t*name) +{ +char *nstr=NODE_NAME(name); +node_t*n=sial_newnode(); +mem *m=sial_alloc(sizeof(mem)); + + /* dicard nam node_t*/ + NODE_FREE(name); + m->name=nstr; + m->dir=dir; + m->expr=expr; + sial_setpos(&m->p); + n->data=m; + n->exe=(xfct_t)sial_exemem; + n->free=(ffct_t)sial_freemem; + return n; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_node.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_node.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_node.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_node.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,69 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +/* + These function are use to allocate a new node. + It's a layer between the type specific functions and the parser. +*/ +#include "sial.h" +#include + +/* + Allocate a new node structure +*/ +node_t* +sial_newnode() +{ +node_t*n; + + n = (node_t*) sial_calloc(sizeof(node_t)); + TAG(n); + return n; +} + +void +sial_free_siblings(node_t*ni) +{ + while(ni) { + + node_t*next=ni->next; + + NODE_FREE(ni); + + ni=next; + } +} + +/* + This function is called du ring compile time + to exevaluate constant expression, like sizeof() and + array sizes and enum constant. +*/ +value_t * +sial_exenode(node_t*n) +{ +value_t *v; +int *exval; +jmp_buf exitjmp; +void *sa; +srcpos_t p; + + sial_curpos(&n->pos, &p); + sa=sial_setexcept(); + + if(!setjmp(exitjmp)) { + + sial_pushjmp(J_EXIT, &exitjmp, &exval); + v=NODE_EXE(n); + sial_rmexcept(sa); + sial_popjmp(J_EXIT); + + } else { + + sial_rmexcept(sa); + return 0; + + } + sial_curpos(&p, 0); + return v; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_num.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_num.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_num.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_num.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,233 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include "sial.h" + +typedef struct { + int type; + ull val; +} num; + +/* + Numeric constants. +*/ + +static value_t* +sial_exenum(num *n) +{ +value_t *v=sial_newval(); + + v->type.type=V_BASE; + v->type.idx=n->type; + if(n->type==B_SLL) { + +ll: + v->v.sll=n->val; + v->type.size=8; + + }else if(n->type==B_SC) { + + v->v.sc=n->val; + v->type.size=1; + + } else { + + if(sial_defbsize()==4) { + + v->v.sl=n->val; + v->type.size=4; + + } else { + + v->type.idx=B_SLL; + goto ll; + } + } + v->type.typattr=sial_idxtoattr(v->type.idx); + v->set=0; + return v; +} + +void +sial_freenumnode(num *n) +{ + sial_free(n); +} + +node_t* +sial_makenum(int type, ull val) +{ +node_t*n=sial_newnode(); +num *nu=sial_alloc(sizeof(num)); + + TAG(nu); + + nu->type=type; + nu->val=val; + n->exe=(xfct_t)sial_exenum; + n->free=(ffct_t)sial_freenumnode; + n->data=nu; + + sial_setpos(&n->pos); + return n; +} + +/* + Execution of the sizeof() operator. + This sould be done at compile time, but I have not setup + a 'type only' execution path for the nodes. + Runtime is good enough to cover mos cases. +*/ +#define SN_TYPE 1 +#define SN_EXPR 2 + +typedef struct { + int type; + void *p; + srcpos_t pos; +} snode_t; + +static value_t * +sial_exesnode(snode_t*sn) +{ +srcpos_t pos; +type_t*t; +value_t *v=sial_newval(); +value_t *v2=0; +int size; + + sial_curpos(&sn->pos, &pos); + if(sn->type == SN_TYPE) { + + t=(type_t*)(sn->p); + + } else { + + sial_setinsizeof(1); + v2=NODE_EXE((node_t*)(sn->p)); + t=&v2->type; + sial_setinsizeof(0); + } + + switch(t->type) { + + case V_REF: + + if(t->idxlst) { + + int i; + for(size=t->size,i=0;t->idxlst[i];i++) size *= t->idxlst[i]; + + } else size=sial_defbsize(); + + break; + case V_STRUCT: case V_UNION: + + if(sial_ispartial(t)) { + + sial_error("Invalid type specified"); + } + size=t->size; + + break; + case V_BASE: case V_STRING: + size=t->size; + break; + + default: size=0; + } + + sial_defbtype(v, (ull)size); + + sial_curpos(&pos, 0); + + if(v2) sial_freeval(v2); + + return v; + +} + +static void +sial_freesnode(snode_t*sn) +{ + if(sn->type == SN_TYPE) sial_free(sn->p); + else NODE_FREE(sn->p); + sial_free(sn); +} + +node_t* +sial_sizeof(void *p, int type) +{ +node_t*n=sial_newnode(); +snode_t*sn=sial_alloc(sizeof(snode_t)); + + n->exe=(xfct_t)sial_exesnode; + n->free=(ffct_t)sial_freesnode; + n->data=sn; + sn->type=type; + sn->p=p; + sial_setpos(&sn->pos); + return n; +} + +node_t* +sial_newnum(char *buf) +{ +int type; +unsigned long long val; + + type=B_SL; + + /* get the value_t of this constant. Could be hex, octal or dec. */ + if(buf[0]=='0') { + + if(buf[1]=='x') { + + if(!sscanf(buf, "%llx", &val)) goto error; + + } else { + + if(!sscanf(buf,"%llo", &val)) goto error; + } + + } else { + + if(!sscanf(buf,"%lld", &val)) goto error; + + } + + if(val & 0xffffffff00000000ll) type=B_SLL; + + /* threat the long and long long atributes */ + { + int l=strlen(buf); + + if(l>1) { + + if(buf[l-1]=='l' || buf[l-1]=='L') { + + if(l>2) { + + if(sial_defbsize()==8 || buf[l-2]=='l' || buf[l-2]=='L') { + + type=B_SLL; + + } + else type=B_SL; + + } + + } + } + } + { + node_t*n=sial_makenum(type, val); + TAG(n->data); + return n; + } +error: + sial_error("Oops! NUMBER"); + return 0; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_op.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_op.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_op.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_op.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,904 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial.h" +#include "sial.tab.h" +#include +#include + +#define MAXPARMS 10 + +typedef struct { + + int op; /* operator */ + int np; /* number of operands */ + node_t*parms[MAXPARMS]; /* operands */ + + srcpos_t pos; + +} oper; + +#define P1 (o->parms[0]) +#define P2 (o->parms[1]) +#define P3 (o->parms[2]) +#define P4 (o->parms[3]) + +#define V1 (v1?v1:(v1=NODE_EXE(P1))) +#define V2 (v2?v2:(v2=NODE_EXE(P2))) +#define V3 (v3?v3:(v3=NODE_EXE(P3))) +#define V4 (v4?v4:(v4=NODE_EXE(P4))) + +#define L1 (unival(V1)) +#define L2 (unival(V2)) +#define L3 (unival(V3)) +#define L4 (unival(V4)) + +#define S1 ((V1)->v.data) +#define S2 ((V2)->v.data) +#define S3 ((V3)->v.data) +#define S4 ((V4)->v.data) + +void sial_do_deref(int n, value_t *v, value_t *ref); +ul +sial_bool(value_t *v) +{ + switch(v->type.type) { + + case V_BASE: + switch(v->type.size) { + case 1: return !(!(v->v.uc)); + case 2: return !(!(v->v.us)); + case 4: return !(!(v->v.ul)); + case 8: return !(!(v->v.ull)); + default: sial_error("Oops sial_bool()[%d]", v->type.size); break; + } + case V_STRING : return !(!(*((char*)(v->v.data)))); + case V_REF: return sial_defbsize()==8?(!(!(v->v.ull))):(!(!(v->v.ul))); + default : + + sial_error("Invalid operand for boolean expression"); + return 0; + } +} + +static int cops[]={BAND,BOR,NOT,LT,LE,EQ,GE,GT,NE,CEXPR}; +#define NCOPS (sizeof(cops)/sizeof(cops[0])) + +static int +is_cond(int op) +{ +int i; + + for(i=0;itype)) { + + case 1: v1->v.uc=rl; break; + case 2: v1->v.us=rl; break; + case 4: v1->v.ul=rl; break; + case 8: v1->v.ull=rl; break; + + } + /* the result of an assignment cannot be a lvalue_t */ + v1->set=0; +} + +#define anyop(t) (V1->type.type==t || (o->np>1 && V2->type.type==t)) + +typedef struct { + node_t*index; + node_t*var; + srcpos_t pos; +} index_t ; + +static value_t * +sial_exeindex(index_t *i) +{ +value_t *var; +value_t *vi=NODE_EXE(i->index); +value_t *v; +srcpos_t p; + + sial_curpos(&i->pos, &p); + + /* we need to make believe it's been initiazed */ + sial_setini(i->var); + var=NODE_EXE(i->var); + + /* check the type of the variable */ + /* if it's a pointer then index through the image */ + if(var->type.type==V_REF) { + + int size; + int n=sial_getval(vi); + value_t *ref; + + /* if this is an array and we're not at the rightmost index */ + if(var->type.idxlst && var->type.idxlst[1]) { + + int i, size=var->type.size; + + v=sial_cloneval(var); + + v->type.idxlst[0]=0; + for(i=1; var->type.idxlst[i]; i++) { + + size *= var->type.idxlst[i]; + v->type.idxlst[i]=var->type.idxlst[i+1]; + } + + if(sial_defbsize()==4) { + + v->v.ul+=size*n; + v->mem=v->v.ul; + + } else { + + v->v.ull+=size*n; + v->mem=v->v.ull; + } + + + } else { + + v=sial_newval(); + ref=sial_cloneval(var); + + if(var->type.ref==1) size=var->type.size; + else size=sial_defbsize(); + + if(sial_defbsize()==4) { + + ref->v.ul+=size*n; + ref->mem=ref->v.ul; + + } else { + + ref->v.ull+=size*n; + ref->mem=ref->v.ull; + } + sial_do_deref(1, v, ref); + sial_freeval(ref); + } + + } else { + + v=sial_newval(); + + /* use dynamic indexing aka awk indexing */ + sial_valindex(var, vi, v); + } + + /* discard expression results */ + sial_freeval(var); + sial_freeval(vi); + sial_curpos(&p, 0); + + return v; +} + +void +sial_freeindex(index_t *i) +{ + NODE_FREE(i->index); + NODE_FREE(i->var); + sial_free(i); +} + +node_t* +sial_newindex(node_t*var, node_t*idx) +{ +index_t *i=sial_alloc(sizeof(index_t )); +node_t*n=sial_newnode(); + + i->index=idx; + i->var=var; + n->exe=(xfct_t)sial_exeindex; + n->free=(ffct_t)sial_freeindex; + n->data=i; + sial_setpos(&i->pos); + return n; +} + +typedef struct { + node_t*fname; + node_t*parms; + srcpos_t pos; + void *file; +} call; + +static value_t * +sial_execall(call *c) +{ +value_t *rv; +srcpos_t p; + + sial_curpos(&c->pos, &p); + rv=sial_docall(c->fname, c->parms, c->file); + sial_curpos(&p, 0); + return rv; +} + +void +sial_freecall(call *c) +{ + NODE_FREE(c->fname); + sial_free_siblings(c->parms); + sial_free(c); +} + +node_t* +sial_newcall(node_t* fname, node_t* parms) +{ +node_t*n=sial_newnode(); +call *c=sial_alloc(sizeof(call)); + + c->fname=fname; + c->file=sial_getcurfile(); + c->parms=parms; + n->exe=(xfct_t)sial_execall; + n->free=(ffct_t)sial_freecall; + n->data=c; + sial_setpos(&c->pos); + return n; +} + +typedef struct { + node_t*expr; + srcpos_t pos; +} adrof; + +static value_t * +sial_exeadrof(adrof *a) +{ +value_t *rv, *v=NODE_EXE(a->expr); + +#if 0 + /* we can only do this op on something that came from system image + Must not allow creation of references to local variable */ + if(!v->mem) { + + sial_freeval(v); + sial_rerror(&a->pos, "Invalid operand to '&' operator"); + + } +#endif + /* create the reference */ + rv=sial_newval(); + sial_duptype(&rv->type, &v->type); + sial_pushref(&rv->type, 1); + + /* remmember position in image */ + if(sial_defbsize()==8) rv->v.ull=v->mem; + else rv->v.ul=v->mem; + rv->mem=0; + + sial_freeval(v); + + return rv; +} + +void +sial_freeadrof(adrof *a) +{ + NODE_FREE(a->expr); + sial_free(a); +} + +node_t* +sial_newadrof(node_t* expr) +{ +node_t*n=sial_newnode(); +adrof *a=sial_alloc(sizeof(adrof)); + + a->expr=expr; + n->exe=(xfct_t)sial_exeadrof; + n->free=(ffct_t)sial_freeadrof; + n->data=a; + sial_setpos(&a->pos); + return n; +} + +static int +sial_reftobase(value_t *v) +{ +int idx= v->type.idx; + + if(v->type.type==V_REF) { + + if(sial_defbsize()==4) + v->type.idx=B_UL; + else + v->type.idx=B_ULL; + } + return idx; +} + +static value_t* +sial_docomp(int op, value_t *v1, value_t *v2) +{ + + /* if one parameter is string then both must be */ + if(v1->type.type == V_STRING || v2->type.type == V_STRING) { + + if(v1->type.type != V_STRING || v2->type.type != V_STRING) { + + sial_error("Invalid condition arguments"); + } + else { + + switch(op) { + + case EQ: { /* expr == expr */ + + return sial_makebtype(!strcmp(v1->v.data, v2->v.data)); + + } + case GT: case GE: { /* expr > expr */ + + return sial_makebtype(strcmp(v1->v.data, v2->v.data) > 0); + + } + case LE: case LT: { /* expr <= expr */ + + return sial_makebtype(strcmp(v1->v.data, v2->v.data) < 0); + + } + case NE: { /* expr != expr */ + + return sial_makebtype(strcmp(v1->v.data, v2->v.data)); + + } + default: { + + sial_error("Oops conditional unknown 1"); + + } + } + } + + } + else { + + int idx1, idx2; + value_t *v=sial_newval(); + + /* make sure pointers are forced to proper basetype + before calling sial_baseop()*/ + idx1=sial_reftobase(v1); + idx2=sial_reftobase(v2); + + + switch(op) { + + case EQ: + case GT: + case GE: + case LE: + case LT: + case NE: + sial_baseop(op, v1, v2, v); + break; + default: { + + sial_error("Oops conditional unknown 2"); + + } + } + v1->type.idx=idx1; + v2->type.idx=idx2; + return v; + } + return 0; +} + +static value_t * +sial_exeop(oper *o) +{ +value_t *v=0, *v1=0, *v2=0, *v3=0, *v4=0; +int top; +srcpos_t p; + + sial_curpos(&o->pos, &p); + + /* if ME (op on myself) operator, translate to normal operator + we will re-assign onto self when done */ + + top=getop(o->op); + + if(top == ASSIGN) { + + goto doop; + + } else if(top == IN) { + + /* the val in array[] test is valid for anything but struct/union */ + v=sial_makebtype((ull)sial_lookuparray(P1,P2)); + + } + else if(is_cond(top)) { + + /* the operands are eithr BASE (integer) or REF (pointer) */ + /* all conditional operators accept a mixture of pointers and integer */ + /* set the return as a basetype even if bool */ + + switch(top) { + + case CEXPR: { /* conditional expression expr ? : stmt : stmt */ + + if(sial_bool(V1)) { + + v=sial_cloneval(V2); + + } else { + + v=sial_cloneval(V3); + + } + + } + break; + case BOR: { /* a || b */ + + v=sial_makebtype((ull)(sial_bool(V1) || sial_bool(V2))); + + } + break; + case BAND: { /* a && b */ + + v=sial_makebtype((ull)(sial_bool(V1) && sial_bool(V2))); + + } + break; + case NOT: { /* ! expr */ + + v=sial_makebtype((ull)(! sial_bool(V1))); + + } + break; + default: { + + v=sial_docomp(top, V1, V2); + + } + } + + } else if(anyop(V_STRING)) { + + if(top == ADD) + { + char *buf; + + if(V1->type.type != V_STRING || V2->type.type != V_STRING) { + + sial_rerror(&P1->pos, "String concatenation needs two strings!"); + + } + buf=sial_alloc(strlen(S1)+strlen(S2)+1); + strcpy(buf, S1); + strcat(buf, S2); + v=sial_makestr(buf); + sial_free(buf); + } + else { + + sial_rerror(&P1->pos, "Invalid string operator"); + + } + } + /* arithmetic operator */ + else if(anyop(V_REF)) { + + int size; + value_t *vt; + + /* make sure we have the base type second */ + if(V1->type.type != V_REF) { vt=V1; v1=V2; v2=vt; } + + + if(V1->type.type == V_BASE) { +inval: + sial_error("Invalid operand on pointer operation"); + } + + /* get the size of whas we reference */ + size=V1->type.size; + + switch(top) { + case ADD: { /* expr + expr */ + /* adding two pointers ? */ + if(V2->type.type == V_REF) goto inval; + + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) + L2 * size); + } + break; + case SUB: { /* expr - expr */ + /* different results if mixed types. + if both are pointers then result is a V_BASE */ + if(V2->type.type == V_REF) + v=sial_makebtype(L1 - L2); + + else { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) - L2 * size); + } + } + break; + case PREDECR: { /* pre is easy */ + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) - size); + sial_setval(v1, v); + } + break; + case PREINCR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) + size); + sial_setval(v1, v); + } + break; + case POSTINCR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) + size); + sial_setval(v1, v); + sial_transfer(v, v1, unival(v1)); + } + break; + case POSTDECR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) - size); + sial_setval(v1, v); + sial_transfer(v, v1, unival(v1)); + } + break; + default: + sial_error("Invalid operation on pointer [%d]",top); + } + } + else { + + /* both operands are V_BASE */ + switch(top) { + + /* for mod and div, we check for divide by zero */ + case MOD: case DIV: + if(!L2) { + sial_rerror(&P1->pos, "Mod by zero"); + } + case ADD: case SUB: case MUL: case XOR: + case OR: case AND: case SHL: case SHR: + { + sial_baseop(top, V1, V2, v=sial_newval()); + } + break; + case UMINUS: { + + value_t *v0=sial_newval(); + sial_defbtype(v0, (ull)0); + /* keep original type of v1 */ + v=sial_newval(); + sial_duptype(&v0->type, &V1->type); + sial_duptype(&v->type, &V1->type); + sial_baseop(SUB, v0, V1, v); + sial_freeval(v0); + /* must make result signed */ + sial_mkvsigned(v); + } + break; + case FLIP: { + + value_t *v0=sial_newval(); + sial_defbtype(v0, (ull)0xffffffffffffffffll); + /* keep original type of v1 */ + sial_duptype(&v0->type, &V1->type); + sial_baseop(XOR, v0, V1, v=sial_newval()); + sial_freeval(v0); + } + break; + case PREDECR: { /* pre is easy */ + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) - 1); + sial_setval(v1, v); + } + break; + case PREINCR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) + 1); + sial_setval(v1, v); + } + break; + case POSTINCR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) + 1); + sial_setval(v1, v); + sial_transfer(v, v1, unival(v1)); + } + break; + case POSTDECR: { + V1; + sial_transfer(v=sial_newval(), v1, + unival(v1) - 1); + sial_setval(v1, v); + sial_transfer(v, v1, unival(v1)); + } + break; + default: sial_rerror(&P1->pos, "Oops ops ! [%d]", top); + } + } +doop: + /* need to assign the value_t back to P1 */ + if(top != o->op || top==ASSIGN) { + + /* in the case the Lvalue_t is a variable , bypass execution and set ini */ + if(P1->exe == sial_exevar) { + + char *name=NODE_NAME(P1); + var_t*va=sial_getvarbyname(name, 0, 0); + value_t *vp; + + sial_free(name); + + if(top != o->op) vp=v; + else vp=V2; + + sial_chkandconvert(va->v, vp); + + sial_freeval(v); + v=sial_cloneval(va->v); + va->ini=1; + + } else { + + if(!(V1->set)) { + + sial_rerror(&P1->pos, "Not Lvalue_t on assignment"); + + } + else { + + /* if it's a Me-op then v is already set */ + V1; + if(top != o->op) { + sial_setval(v1, v); + } else { + sial_setval(v1, V2); + v=sial_cloneval(V2); + } + + } + } + /* the result of a assignment if not an Lvalue_t */ + v->set=0; + } + sial_freeval(v1); + sial_freeval(v2); + sial_freeval(v3); + sial_freeval(v4); + sial_setpos(&p); + return v; +} + +void +sial_freeop(oper *o) +{ +int i; + + for(i=0;inp;i++) NODE_FREE(o->parms[i]); + sial_free(o); +} + +node_t* +sial_newop(int op, int nargs, ...) +{ +va_list ap; +node_t*n=sial_newnode(); +oper *o=sial_alloc(sizeof(oper)); +int i; + + o->op=op; + o->np=nargs; + + sial_setpos(&o->pos); + + va_start(ap, nargs); + + for(i=0 ; iparms[i]=va_arg(ap, node_t*))) break;; + } + + n->exe=(xfct_t)sial_exeop; + n->free=(ffct_t)sial_freeop; + n->data=o; + + va_end(ap); + return n; +} + +/* mult is a special case since the parse always return a PTR token + for the '*' signed. The PTR token value_t is the number of '* found. +*/ +node_t* +sial_newmult(node_t*n1, node_t*n2, int n) +{ + if(n>1) { + + sial_error("Syntax error"); + } + return sial_newop(MUL, 2, n1, n2); +} +/* + This function is called when we want to set a value_t in live memory + using a pointer to it. +*/ +static void +sial_setderef(value_t *v1, value_t *v2) +{ + void *sial_adrval(value_t *); + sial_transval(v2->type.size, v1->type.size, v2, sial_issigned(v2->type.typattr)); + API_PUTMEM(v1->mem, sial_adrval(v2), v2->type.size); +} + +/* + Do a de-referencing from a pointer (ref) and put the result in v. +*/ +typedef struct { + int lev; + node_t*n; +} ptrto; + +void +sial_do_deref(int n, value_t *v, value_t *ref) +{ +ull madr, new_madr; + + if(n > ref->type.ref) { + + sial_error("Too many levels of dereference"); + + }else { + + + if(sial_defbsize()==4) madr=(ull)ref->v.ul; + else madr=ref->v.ull; + + /* copy the target type to the returned value_t's type_t*/ + sial_duptype(&v->type, &ref->type); + + /* do a number of deferences according to PTR value_t */ + while(n--) { + + sial_popref(&v->type, 1); + + if(!v->type.ref) { + + /* make sure the pointer is pointing into the vmcore */ + if(is_ctype(v->type.type)) { + + v->v.data=sial_alloc(v->type.size); + sial_getmem(madr, v->v.data, v->type.size); + + } else { + + /* get the data from the system image */ + switch(TYPE_SIZE(&v->type)) { + + case 1: sial_getmem(madr, &v->v.uc, 1); + break; + case 2: sial_getmem(madr, &v->v.us, 2); + break; + case 4: sial_getmem(madr, &v->v.ul, 4); + break; + case 8: sial_getmem(madr, &v->v.ull, 8); + break; + + } + } + } + else { + + /* get the pointer at this address */ + if(sial_defbsize()==4) { + + sial_getmem(madr, &v->v.ul, 4); + new_madr=v->v.ul; + + } else { + + sial_getmem(madr, &v->v.ull, 8); + new_madr=v->v.ull; + } + } + + /* remember this address. For the '&' operator */ + v->mem=madr; + madr=new_madr; + } + } + + /* we can always assign to a reference */ + v->set=1; + v->setval=v; + v->setfct=sial_setderef; +} + +static value_t * +sial_exepto(ptrto *pto) +{ +value_t *v=sial_newval(); +int n=pto->lev; +value_t *ref=NODE_EXE(pto->n); + + sial_do_deref(n, v, ref); + sial_freeval(ref); + return v; +} + +static void +sial_freepto(ptrto *pto) +{ + NODE_FREE(pto->n); + sial_free(pto); +} + + +/* same thing for the ptrto operator */ +node_t* +sial_newptrto(int lev, node_t*n) +{ +ptrto *pto=sial_alloc(sizeof(ptrto)); +node_t*nn=sial_newnode(); + + pto->lev=lev; + pto->n=n; + nn->exe=(xfct_t)sial_exepto; + nn->free=(ffct_t)sial_freepto; + nn->data=pto; + return nn; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp.l /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp.l --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp.l 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp.l 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,85 @@ +%{ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ + +#define YY_NO_UNPUT +%} + +%{ +#include + +#ifdef linux +#define YY_INPUT(buf,result,max_size) \ +{ \ + int c = sial_input(); \ + result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \ +} +#endif + +#include "sial.h" +#include "sialpp.tab.h" +#if linux +#define yylval sialpplval +#endif + +#define retok(t) return(t) +int nomacs=0; +extern int sial_chkmacvar(char *); +extern node_t *sial_newchar(void); +%} + +ABC [a-zA-Z_] +ABCN [a-zA-Z0-9_] +N [0-9] +X [0-9a-fA-F] + +%% + +[ \t\n]+ { ; } + +"defined" { retok(P_DEFINED); } +"&&" { retok(P_BAND); } +"||" { retok(P_BOR); } +"<" { retok(P_LT); } +"<=" { retok(P_LE); } +"==" { retok(P_EQ); } +">=" { retok(P_GE); } +">" { retok(P_GT); } +"!=" { retok(P_NE); } +"|" { retok(P_OR); } +"!" { retok(P_NOT); } +"^" { retok(P_XOR); } +">>" { retok(P_SHR); } +"<<" { retok(P_SHL); } +"+" { retok(P_ADD); } +"-" { retok(P_SUB); } +"/" { retok(P_DIV); } +"%" { retok(P_MOD); } +"*" { retok(P_MUL); } + +(("0x"+){X}+[lL]*|{N}+[lL]*) { yylval.n = sial_newnum(yytext); retok(P_NUMBER); } + +{ABC}{ABCN}* { + if(strlen(yytext) > MAX_SYMNAMELEN) { + + sial_error("Symbol name too long"); + } + if(nomacs || !sial_chkmacvar(yytext)) { + + yylval.n = sial_newvnode(yytext); + retok(P_VAR); + } + } + +\'.\' { yylval.n = sial_makenum(B_SC, yytext[1]); retok(P_NUMBER); } +\'\\.\' { yylval.n = sial_makenum(B_SC, sial_getseq(yytext[2])); retok(P_NUMBER); } + + +. { retok(yylval.i = yytext[0]); } + +%% +#undef input +#undef unput +#define input() sial_input() +#define unput(c) sial_unput(c) diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp-lsed /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp-lsed --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp-lsed 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp-lsed 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,32 @@ +s/yyback/sialppback/g +s/yybgin/sialppbgin/g +s/yycrank/sialppcrank/g +s/yyerror/sialpperror/g +s/yyestate/sialppestate/g +s/yyextra/sialppextra/g +s/yyfnd/sialppfnd/g +s/yyin/sialppin/g +s/yyinput/sialppinput/g +s/yyleng/sialppleng/g +s/yylex/sialpplex/g +s/yylineno/sialpplineno/g +s/yylook/sialpplook/g +s/yylsp/sialpplsp/g +s/yylstate/sialpplstate/g +s/yylval/sialpplval/g +s/yymatch/sialppmatch/g +s/yymorfg/sialppmorfg/g +s/yyolsp/sialppolsp/g +s/yyout/sialppout/g +s/yyoutput/sialppoutput/g +s/yyprevious/sialppprevious/g +s/yysbuf/sialppsbuf/g +s/yysptr/sialppsptr/g +s/yysvec/sialppsvec/g +s/yytchar/sialpptchar/g +s/yytext/sialpptext/g +s/yytop/sialpptop/g +s/yyunput/sialppunput/g +s/yyvstop/sialppvstop/g +s/yywrap/sialppwrap/g +s/yydebug/sialdebug/g diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp.y /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp.y --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sialpp.y 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sialpp.y 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,88 @@ +%{ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +/* + This is the grammar for the preprocessor expression evaluation. +*/ +#include "sial.h" +#include "sial.tab.h" +#include +#include +#include +static node_t *last_term; +%} + +%union { + node_t *n; + int i; +} + +%token P_VAR P_NUMBER +%token P_DEFINED + +%type term + +%right '?' +%left P_BOR +%left P_BAND +%left P_OR +%left P_XOR +%left P_AND +%left P_EQ P_NE +%left P_GE P_GT P_LE P_LT +%left P_SHL P_SHR +%left P_ADD P_SUB +%left P_MUL P_DIV P_MOD +%right P_UMINUS P_FLIP P_NOT + +%% + +term: + + term '?' term ':' term %prec '?' + { $$ = sial_newop(CEXPR, 3, $1, $3, $5); last_term = $$; } + | term P_BOR term { $$ = sial_newop(BOR, 2, $1, $3); last_term = $$; } + | term P_BAND term { $$ = sial_newop(BAND, 2, $1, $3); last_term = $$; } + | P_NOT term { $$ = sial_newop(NOT, 1, $2); last_term = $$; } + | term P_EQ term { $$ = sial_newop(EQ, 2, $1, $3); last_term = $$; } + | term P_GE term { $$ = sial_newop(GE, 2, $1, $3); last_term = $$; } + | term P_GT term { $$ = sial_newop(GT, 2, $1, $3); last_term = $$; } + | term P_LE term { $$ = sial_newop(LE, 2, $1, $3); last_term = $$; } + | term P_LT term { $$ = sial_newop(LT, 2, $1, $3); last_term = $$; } + | term P_NE term { $$ = sial_newop(NE, 2, $1, $3); last_term = $$; } + | '(' term ')' { $$ = $2; last_term == $$; } + | term P_OR term { $$ = sial_newop(OR, 2, $1, $3); last_term = $$; } + | term P_XOR term { $$ = sial_newop(XOR, 2, $1, $3); last_term = $$; } + | term P_SHR term { $$ = sial_newop(SHR, 2, $1, $3); last_term = $$; } + | term P_SHL term { $$ = sial_newop(SHL, 2, $1, $3); last_term = $$; } + | term P_DIV term { $$ = sial_newop(DIV, 2, $1, $3); last_term = $$; } + | term P_MOD term { $$ = sial_newop(MOD, 2, $1, $3); last_term = $$; } + | term P_SUB term { $$ = sial_newop(SUB, 2, $1, $3); last_term = $$; } + | term P_ADD term { $$ = sial_newop(ADD, 2, $1, $3); last_term = $$; } + | term P_MUL term { $$ = sial_newop(MUL, 2, $1, $3); last_term = $$; } + | term '&' term %prec P_AND { $$ = sial_newop(AND, 2, $1, $3); last_term = $$; } + | P_SUB term %prec P_UMINUS { $$ = sial_newop(UMINUS, 1, $2); last_term = $$; } + | '~' term %prec P_FLIP { $$ = sial_newop(FLIP, 1, $2); last_term = $$; } + | '+' term %prec P_UMINUS { $$ = $2; last_term = $$; } + | P_DEFINED '(' {nomacs++;} P_VAR ')' + { nomacs=0; $$ = sial_macexists($4); last_term = $$; } + | P_NUMBER { last_term = $$; } + | P_VAR { $$ = sial_makenum(B_UL, 0); last_term = $$; } + ; + +%% + +node_t * +sial_getppnode() +{ + return last_term; +} + +int +sialpperror(char *s) +{ + sial_error(s); + return 1; +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_print.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_print.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_print.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_print.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,398 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include +#include "sial.h" +/* + This set of function are used to print value_ts. +*/ + +/* utility that returns a string of '*' for a reference */ +static +char *sial_getref(int lev) +{ +static char *ptrs="*******"; + + return ptrs+strlen(ptrs)-lev; +} + +static char * +sial_getidx(type_t *t, char*buf, int len) +{ +int pos=0; + + buf[0]='\0'; + if(t->idxlst) { + + int i; + + for(i=0; t->idxlst[i] && pos < len; i++) { + + pos += snprintf(buf+pos, len-pos, "[%d]", t->idxlst[i]); + } + } + return buf; +} + +#define INDENT 4 /* print indent at beginning of new line */ +#define SPACER 16 /* space for type string */ +#define NAMESPACE 16 /* space used for member/var names */ +#define NBUNDLE 4 /* when printing arrays print this much before \n */ + +static void +sial_indent(int level, int indent) +{ + if(!indent) return; + sial_msg("%*s", level*INDENT, ""); +} + +static void sial_ptype2(type_t*t, value_t*v, int level, int indent, char *name, int ref, int justv); + +/* + Print a struct/union type or value +*/ +static void +sial_print_ctype(type_t *t, value_t *v, int level, int indent, char *name, int ref, int justv) +{ +stinfo_t *st=sial_getstbyindex(t->idx, t->type); +stmember_t *m; +char buf[100]; + + if(!st) sial_error("Oops sial_print_ctype!"); + + if(!st->all) { + + sial_fillst(st); + if(!st->all) sial_error("Reference to a incomplete type"); + } + + sial_indent(level, indent); + + if(!justv) { + snprintf(buf, sizeof(buf)-1, "%s %s", sial_ctypename(t->type), st->name?st->name:""); + sial_msg("%-*s ", SPACER, buf); + + /* is this is a pointer, bail out */ + } + if(ref) return; + + if(v && !justv) sial_msg(" = "); + + sial_msg("{\n"); + + for(m=st->stm; m; m=m->next) { + + value_t *vm=0; + + sial_indent(level+1, 1); + if(v) { + vm=sial_newval(); + sial_duptype(&vm->type, &m->type); + sial_exememlocal(v, m, vm); + sial_ptype2(&vm->type, vm, level+1, 0, m->m.name, 0, 0); + + } else sial_ptype2(&m->type, vm, level+1, 0, m->m.name, 0, 0); + sial_msg(";\n"); + if(vm) sial_freeval(vm); + } + + sial_indent(level, 1); + sial_msg("}"); + if(name) sial_msg(" %s", name); + +} + +static void +sial_prbval(value_t *v) +{ + if(sial_issigned(v->type.typattr)) sial_msg("%8lld", sial_getval(v)); + else sial_msg("%8llu", sial_getval(v)); +} + +static int +sial_prtstr(value_t *v, int justv) +{ +value_t *vs; +char *s, *p; + + if(sial_defbsize()==8) v->v.ull=v->mem; + else v->v.ul=v->mem; + vs=sial_getstr(v); + s=sial_getptr(vs, char); + for(p=s; *p; p++) if(!isprint(*p)) return 0; + if(p==s) { sial_freeval(vs); return 0; } + if(!justv) sial_msg("= "); + sial_msg("\"%s\"", s); + sial_freeval(vs); + return 1; +} + +static void +sial_prtarray(type_t*t, ull mem, int level, int idx) +{ +int i; +int j, size=1; + + for(j=idx+1; t->idxlst[j]; j++) size *= t->idxlst[j]; + size *= t->type==V_REF ? sial_defbsize() : t->size; + + /* start printing */ + sial_msg("{"); + sial_msg("\n"); + sial_indent(level+1, 1); + + for(i=0; iidxlst[idx]; i++, mem += size) { + + if(t->idxlst[idx+1]) { + + sial_msg("[%d] = ", i); + sial_prtarray(t, mem, level+1, idx+1); + + } else { + + /* time to deref and print final type */ + value_t *v=sial_newval(), *vr=sial_newval(); + int *pi=t->idxlst; + + t->idxlst=0; + + sial_duptype(&vr->type, t); + sial_pushref(&vr->type, 1); + if(sial_defbsize()==8) vr->v.ull=mem; + else vr->v.ul=(ul)mem; + sial_do_deref(1, v, vr); + if(is_ctype(v->type.type) || !(i%NBUNDLE)) sial_msg("[%2d] ", i); + sial_ptype2(&v->type, v, level+1, 0, 0, 0, 1); + sial_msg(", "); + /* anything else then struct/unions, print in buddles */ + if(!is_ctype(v->type.type) && !((i+1)%NBUNDLE)) { + + sial_msg("\n"); + sial_indent(level+1, 1); + } + sial_freeval(v); + sial_freeval(vr); + t->idxlst=pi; + } + } + sial_msg("\n"); + sial_indent(level, 1); + sial_msg("}"); +} + +/* + Print a type. + Typical output of the 'whatis' command. +*/ +static +void sial_ptype2(type_t*t, value_t*v, int level, int indent, char *name, int ref, int justv) +{ +int type=t->type; + + sial_indent(level, indent); + switch(type) { + + case V_STRUCT: case V_UNION: + + /* make sure we have all the member info */ + sial_print_ctype(t, v, level, 0, name, ref, justv); + break; + + + case V_TYPEDEF: + /* no typedef should get here */ + sial_warning("Typedef in print!"); + break; + + case V_ENUM: + /* no enum should get here */ + sial_warning("ENUM in print!"); + break; + + case V_REF: + { + int refi=t->ref, ref=refi; + + /* decrement ref if this was declared as a array */ + if(t->idxlst) ref--; + + /* print the referenced type */ + sial_popref(t, t->ref); + sial_ptype2(t, 0, level, 0, 0, 1, justv); + sial_pushref(t, refi); + + if(!justv) { + + char buf[100], buf2[100]; + int pos=0, len=sizeof(buf); + + buf[0]='\0'; + if(t->fct) buf[pos++]='('; + if(pos < len) + pos += snprintf(buf+pos, len-pos, "%s%s", sial_getref(ref), name?name:""); + if(pos < len) + pos += snprintf(buf+pos, len-pos, "%s", sial_getidx(t, buf2, sizeof(buf2))); + if(pos < len && t->fct) + pos += snprintf(buf+pos, len-pos, "%s", ")()"); + + sial_msg("%*s ", NAMESPACE, buf); + } + + /* arrays are ref with boundaries... */ + if(t->idxlst && v) { + + if(t->idxlst[1] || t->rtype!=V_BASE || t->size!=1 || !sial_prtstr(v, justv)) + { + if(!justv) sial_msg("= "); + sial_popref(t, 1); + sial_prtarray(t, v->mem, level, 0); + sial_pushref(t, 1); + } + + } else if(v) { + + if(!justv) sial_msg("= "); + if(!sial_getval(v)) sial_msg("(nil)"); + else { + if(sial_defbsize()==8) sial_msg("0x%016llx", sial_getval(v)); + else sial_msg("0x%08x", sial_getval(v)); + } + if(t->ref==1 && t->rtype==V_BASE && t->size==1) { + + (void)sial_prtstr(v, justv); + } + } + } + break; + + case V_BASE: + { + if(sial_isenum(t->typattr)) { + + stinfo_t *st=sial_getstbyindex(t->rtype, V_ENUM); + if(!justv) { + char buf[200]; + snprintf(buf, sizeof(buf), "enum %s", st->name?st->name:""); + sial_msg("%-*s ", SPACER, buf); + sial_msg("%*s ", NAMESPACE, (name&&v)?name:""); + } + if(v) { + + enum_t *e=st->enums; + + sial_msg("= "); + sial_prbval(v); + while(e) { + + if(e->value==sial_getval(v)) { + sial_msg(" [%s]", e->name); + break; + } + e=e->next; + } + if(!e) sial_msg(" [???]"); + + }else{ + + enum_t *e=st->enums; + int count=0; + + sial_msg(" {"); + while(e) { + + if(!(count%4)) { + sial_msg("\n"); + sial_indent(level+1, 1); + } + count ++; + sial_msg("%s = %d, ", e->name, e->value); + e=e->next; + + } + sial_msg("\n"); + sial_indent(level, 1); + sial_msg("%-*s ", SPACER, "}"); + if(ref) return; + sial_msg("%*s ", NAMESPACE, name?name:""); + } + + } else { + + if(!justv) { + sial_msg("%-*s " , SPACER , sial_getbtypename(t->typattr)); + if(ref) return; + sial_msg("%s%*s ", sial_getref(t->ref), NAMESPACE, name?name:""); + } + if(v) { + + if(!justv) sial_msg("= "); + sial_prbval(v); + } + } + } + break; + case V_STRING: + if(!justv) { + sial_msg("%-*s " , SPACER , "string"); + sial_msg("%*s ", NAMESPACE, name?name:""); + } + if(v) { + + if(!justv) sial_msg("= "); + sial_msg("\"%s\"", v->v.data); + } + break; + } + if(indent) sial_msg("\n"); +} + +static value_t* +sial_ptype(value_t*v) +{ + sial_ptype2(&v->type, 0, 0, 1, 0, 0, 0); + sial_msg("\n"); + return 0; +} + +node_t* +sial_newptype(var_t*v) +{ +node_t*n=sial_newnode(); + + n->data=v->next->v; + v->next->v=0; /* save value against freeing */ + sial_freevar(v->next); + sial_freevar(v); + n->exe=(xfct_t)sial_ptype; + n->free=(ffct_t)sial_freeval; + n->name=0; + sial_setpos(&n->pos); + return n; +} + +static value_t * +sial_pval(node_t*n) +{ +value_t *v=NODE_EXE(n); +char *name=NODE_NAME(n); + + sial_ptype2(&v->type, v, 0, 1, name, 0, 0); + sial_free(name); + sial_freeval(v); + return 0; +} + +node_t* +sial_newpval(node_t*vn, int fmt) +{ +node_t*n=sial_newnode(); + + n->data=vn; + n->exe=(xfct_t)sial_pval; + n->free=(ffct_t)sial_freenode; + n->name=0; + sial_setpos(&n->pos); + return n; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_stat.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_stat.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_stat.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_stat.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,435 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial.h" +#include "sial.tab.h" +#include +#include + +#define MAXPARMS 10 + +typedef struct stat { + + int stype; + int np; + struct stat *next; + srcpos_t pos; + node_t*n; + node_t*parms[MAXPARMS]; + var_t*svs; /* if statement block then these are the auto and static + wars for it */ + var_t*avs; + +} stat; + +#define SETVS value_t *v1=0,*v2=0,*v3=0,*v4=0 +#define FV1 sial_freeval(v1),v1=0 +#define FV2 sial_freeval(v2),v2=0 +#define FV3 sial_freeval(v3),v3=0 +#define FV4 sial_freeval(v4),v4=0 +#define UNSETVS FV1,FV2,FV3,FV4 + +#define P1 (s->parms[0]) +#define P2 (s->parms[1]) +#define P3 (s->parms[2]) +#define P4 (s->parms[3]) + +#define V1 (v1?v1:(v1=NODE_EXE(P1))) +#define V2 (v2?v2:(v2=NODE_EXE(P2))) +#define V3 (v3?v3:(v3=NODE_EXE(P3))) +#define V4 (v4?v4:(v4=NODE_EXE(P4))) + +#define L1 (unival(V1)) +#define L2 (unival(V2)) +#define L3 (unival(V3)) +#define L4 (unival(V4)) + +#define S1 (V1->v.data) +#define S2 (V2->v.data) +#define S3 (V3->v.data) +#define S4 (V4->v.data) + +/* this is used to execute staement lists e.g. i=1,j=3; */ +static value_t* +sial_exeplist(node_t*n) +{ +value_t *val=0; + + if(n) { + + do { + + if(val) sial_freeval(val), val=0; + val=NODE_EXE(n); + n=n->next; + + } while(n); + } + return val; +} + +static int +sial_dofor(stat *s) +{ +jmp_buf brkenv; +jmp_buf cntenv; +SETVS; + + if(!setjmp(brkenv)) { + + sial_pushjmp(J_BREAK, &brkenv, 0); + + v1=sial_exeplist(P1); + FV1; + + while(!P2 || sial_bool(V2)) { + + FV2; + + if(!setjmp(cntenv)) { + + sial_pushjmp(J_CONTINUE, &cntenv, 0); + V4; + FV4; + sial_popjmp(J_CONTINUE); + + } + + UNSETVS; /* make sure we re-execute everything each time */ + v3=sial_exeplist(P3); + FV3; + } + sial_popjmp(J_BREAK); + + } + UNSETVS; + return 1; +} + +static int +sial_dowhile(stat *s) +{ +jmp_buf brkenv; +jmp_buf cntenv; +SETVS; + + if(!setjmp(brkenv)) { + + sial_pushjmp(J_BREAK, &brkenv, 0); + + while(sial_bool(V1)) { + + FV1; + + if(!setjmp(cntenv)) { + + sial_pushjmp(J_CONTINUE, &cntenv, 0); + V2; + FV2; + sial_popjmp(J_CONTINUE); + + } + + UNSETVS; /* make sure we re-execute everything each time */ + } + FV1; + sial_popjmp(J_BREAK); + + } + + return 1; +} + +static int +sial_dodo(stat *s) +{ +jmp_buf brkenv; +jmp_buf cntenv; +SETVS; + + if(!setjmp(brkenv)) { + + sial_pushjmp(J_BREAK, &brkenv, 0); + + do { + + FV2; + if(!setjmp(cntenv)) { + + sial_pushjmp(J_CONTINUE, &cntenv, 0); + V1; + FV1; + sial_popjmp(J_CONTINUE); + + } + + UNSETVS; /* make sure we re-execute everything each time */ + + } while (sial_bool(V2)); + FV2; + + sial_popjmp(J_BREAK); + + } + + UNSETVS; + return 1; +} + +static int +sial_doif(stat *s) +{ +SETVS; +ul b; + + b=sial_bool(V1); + FV1; + + if(s->np==3) { + + if (b) + V2; + else + V3; + + } else { + + if (b) + V2; + + } + + UNSETVS; + return 1; +} + +static int +sial_doswitch(stat *s) +{ +jmp_buf brkenv; +ull cval; +SETVS; + + if(!setjmp(brkenv)) { + + sial_pushjmp(J_BREAK, &brkenv, 0); + cval=unival(V1); + FV1; + sial_docase(cval, P2->data); + sial_popjmp(J_BREAK); + + } + + UNSETVS; + return 1; +} + +static void +sial_exein(stat *s) +{ +jmp_buf cntenv; +SETVS; + + if(!setjmp(cntenv)) { + + sial_pushjmp(J_CONTINUE, &cntenv, 0); + V3; + sial_popjmp(J_CONTINUE); + + } + UNSETVS; +} + +static int +sial_doin(stat *s) +{ +jmp_buf brkenv; + if(!setjmp(brkenv)) { + + sial_pushjmp(J_BREAK, &brkenv, 0); + sial_walkarray(P1, P2, (void (*)(void *))sial_exein, s); + sial_popjmp(J_BREAK); + } + return 1; +} + +/* this is where all of the flow control takes place */ + +static value_t* +sial_exestat(stat *s) +{ +srcpos_t p; +value_t *val=0; + + do { + + /* dump the val while looping */ + if(val) sial_freeval(val); + val=0; + + sial_curpos(&s->pos, &p); + + + switch(s->stype) { + + case FOR : sial_dofor(s); break; + case WHILE: sial_dowhile(s); break; + case IN: sial_doin(s); break; + case IF: sial_doif(s); break; + case DO: sial_dodo(s); break; + case SWITCH: sial_doswitch(s); break; + case DOBLK: + { + int lev; + + /* add any static variables to the current context */ + lev=sial_addsvs(S_STAT, s->svs); + sial_addsvs(S_AUTO, sial_dupvlist(s->avs)); + + /* with the block statics inserted exeute the inside stmts */ + if(s->next) val=sial_exestat(s->next); + + /* remove any static variables to the current context */ + if(s->svs) sial_setsvlev(lev); + + sial_curpos(&p, 0); + + return val; + } + + case BREAK: sial_dojmp(J_BREAK, 0); break; + case CONTINUE: sial_dojmp(J_CONTINUE, 0); break; + case RETURN: { + + + if(s->parms[0]) { + + val=(s->parms[0]->exe)(s->parms[0]->data); + } + else val=sial_newval(); + + sial_curpos(&p, 0); + sial_dojmp(J_RETURN, val); + } + break; + case PATTERN: + + val=sial_exeplist(s->parms[0]); + + } + + sial_curpos(&p, 0); + + } while((s=s->next)); + + /* we most return a type val no mather what it is */ + /* that's just the way it is...Somethings will never change...*/ + if(!val) val=sial_newval(); + + return val; +} + +void +sial_freestat(stat *s) +{ +int i; + + if(s->next) sial_freenode(s->next->n); + + for(i=0;inp && s->parms[i];i++) { + + NODE_FREE(s->parms[i]); + + } + sial_free(s); +} + +void +sial_freestat_static(stat *s) +{ + + if(s->next) sial_freenode(s->next->n); + + /* free associated static var list */ + sial_freesvs(s->svs); + sial_freesvs(s->avs); + sial_free(s); +} + +var_t*sial_getsgrp_avs(node_t*n) { return ((stat *)n->data)->avs; } +var_t*sial_getsgrp_svs(node_t*n) { return ((stat *)n->data)->svs; } + +/* add a set of static variable to a statement */ +node_t* +sial_stat_decl(node_t*n, var_t*svs) +{ +node_t*nn; +stat *s; + + sial_validate_vars(svs); + + nn=sial_newnode(); + s=sial_alloc(sizeof(stat)); + + /* add statics and autos to this statement */ + s->svs=sial_newvlist(); + s->avs=sial_newvlist(); + sial_addnewsvs(s->avs, s->svs, svs); + + if(n) s->next=(stat*)(n->data); + else s->next=0; + s->stype=DOBLK; + s->n=nn; + nn->exe=(xfct_t)sial_exestat; + nn->free=(ffct_t)sial_freestat_static; + nn->data=s; + sial_setpos(&s->pos); + + return nn; +} + +node_t* +sial_newstat(int type, int nargs, ...) +{ +va_list ap; +node_t*n=sial_newnode(); +stat *s=sial_alloc(sizeof(stat)); +int i; + + s->stype=type; + + va_start(ap, nargs); + + for(i=0;iparms[i]=va_arg(ap, node_t*); + } + + s->np=i; + s->n=n; + s->next=0; + n->exe=(xfct_t)sial_exestat; + n->free=(ffct_t)sial_freestat; + n->data=s; + + sial_setpos(&s->pos); + + va_end(ap); + return n; +} + +node_t* +sial_addstat(node_t*list, node_t*s) +{ + if(!s && list) return list; + if(s && !list) return s; + else { + stat *sp=(stat*)(list->data); + + while(sp->next) sp=sp->next; + sp->next=(stat*)(s->data); + return list; + + } +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_str.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_str.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_str.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_str.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,185 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include "sial.h" + +/* + Create a new string node from a string. +*/ + +value_t * +sial_setstrval(value_t *val, char *buf) +{ +char *newbuf=sial_strdup(buf); + + val->v.data=(void*)newbuf; + val->type.type=V_STRING; + val->type.size=strlen(buf)+1; + val->set=0; + return val; +} + +value_t * +sial_makestr(char *s) +{ + return sial_setstrval(sial_newval(), s); +} + +static value_t* +sial_exestr(char *buf) +{ +value_t *v=sial_newval(); + + sial_setstrval(v, buf); + return v; +} + +void +sial_freestrnode(char *buf) +{ + sial_free(buf); +} + +node_t* +sial_allocstr(char *buf) +{ +node_t*n=sial_newnode(); + + n->exe=(xfct_t)sial_exestr; + n->free=(ffct_t)sial_freestrnode; + n->data=buf; + sial_setpos(&n->pos); + + return n; +} + +node_t* +sial_strconcat(node_t*n1, node_t*n2) +{ +char *newbuf=sial_alloc(strlen(n1->data)+strlen(n2->data)+1); + + strcpy(newbuf, n1->data); + strcat(newbuf, n2->data); + sial_free(n1->data); + n1->data=newbuf; + sial_freenode(n2); + return n1; +} + +static int +is_valid(int c, int base) +{ + switch(base) + { + case 16: return (c>='0' && c<='9') || (toupper(c) >= 'A' && toupper(c) <= 'F'); + case 10: return (c>='0' && c<='9'); + case 8: return (c>='0' && c<='7'); + } + return 0; +} + +/* extract a number value_t from the input stream */ +static int sial_getnum(int base) +{ +int val=0; + while(1) + { + char c=sial_input(), C; + + C=toupper(c); + if(is_valid(C, base)) { + + val=val*base; + val+=(C>='A')?10+('F'-C):'9'-C; + } + else + { + sial_unput(c); + break; + } + } + return val; +} + +int +sial_getseq(int c) +{ +int i; +static struct { + int code; + int value; +} seqs[] = { + { 'n', '\n' }, + { 't', '\t' }, + { 'f', '\f' }, + { 'r', '\r' }, + { 'n', '\n' }, + { 'v', '\v' }, + { '\\', '\007' }, +}; + for(i=0;i +#include +/* + This file contains functions that deals with type and type + casting operators. +*/ +#define B_SIZE_MASK 0x0007f0 +#define B_SIGN_MASK 0x00f000 +#define B_STOR_MASK 0x1f0000 +#define B_CHAR 0x000010 +#define B_SHORT 0x000020 +#define B_INT 0x000040 +#define B_LONG 0x000080 +#define B_LONGLONG 0x000100 +#define B_FLOAT 0x000200 +#define B_CONST 0x000400 +#define B_SIGNED 0x001000 +#define B_UNSIGNED 0x002000 +#define B_STATIC 0x010000 +#define B_REGISTER 0x020000 +#define B_VOLATILE 0x040000 +#define B_TYPEDEF 0x080000 +#define B_EXTERN 0x100000 +#define B_VOID 0x800000 +#define B_USPEC 0x000001 /* user specified sign */ +#define B_ENUM 0x000002 /* btype is from a enum */ + +#define is_size(i) ((i)&B_SIZE_MASK) +#define is_sign(i) ((i)&B_SIGN_MASK) +#define is_stor(i) ((i)&B_STOR_MASK) +#define issigned(v) (v->type.typattr & B_SIGNED) +#define vsize(v) (is_size(v->type.typattr)) + +static struct { + int btype; + int key; + char *name; +} blut[] = { + { B_VOID, VOID , "void"}, + { B_TYPEDEF, TDEF , "tdef"}, + { B_EXTERN, EXTERN , "extern"}, + { B_STATIC, STATIC , "static"}, + { B_VOLATILE, VOLATILE , "volatile"}, + { B_CONST, CONST , "const"}, + { B_REGISTER, REGISTER , "register"}, + { B_UNSIGNED, UNSIGNED , "unsigned"}, + { B_SIGNED, SIGNED , "signed"}, + { B_CHAR, CHAR, "char" }, + { B_SHORT, SHORT , "short"}, + { B_INT, INT , "int"}, + { B_LONG, LONG , "long"}, + { B_LONGLONG, DOUBLE , "long long"}, + { B_FLOAT, FLOAT , "float"}, +}; + +type_t * +sial_newtype() +{ + return sial_calloc(sizeof(type_t)); +} + +void +sial_freetype(type_t* t) +{ + if(t->idxlst) sial_free(t->idxlst); + sial_free(t); +} + +/* this function is called by the parser to merge the + storage information (being hold in a basetype) into the real type_t*/ +type_t* +sial_addstorage(type_t*t1, type_t*t2) +{ + t1->typattr |= is_stor(t2->typattr); + sial_freetype(t2); + return t1; +} + +char * +sial_ctypename(int type) +{ + switch(type) { + + case V_TYPEDEF: return "typedef"; + case V_STRUCT: return "struct"; + case V_UNION: return "union"; + case V_ENUM: return "enum"; + default: return "???"; + } +} + +int sial_isstatic(int atr) { return atr & B_STATIC; } +int sial_isenum(int atr) { return atr & B_ENUM; } +int sial_isconst(int atr) { return atr & B_CONST; } +int sial_issigned(int atr) { return atr & B_SIGNED; } +int sial_istdef(int atr) { return atr & B_TYPEDEF; } +int sial_isxtern(int atr) { return atr & B_EXTERN; } +int sial_isvoid(int atr) { return atr & B_VOID; } +int sial_isstor(int atr) { return is_stor(atr); } +int sial_is_struct(int ctype) { return ctype==V_STRUCT; } +int sial_is_enum(int ctype) { return ctype==V_ENUM; } +int sial_is_union(int ctype) { return ctype==V_UNION; } +int sial_is_typedef(int ctype) { return ctype==V_TYPEDEF; } + +/* type seting */ +int sial_type_gettype(type_t*t) { return t->type; } +void sial_type_settype(type_t*t, int type) { t->type=type; } +void sial_type_setsize(type_t*t, int size) { t->size=size; } +int sial_type_getsize(type_t*t) { return t->size; } +void sial_type_setidx(type_t*t, ull idx) { t->idx=idx; } +ull sial_type_getidx(type_t*t) { return t->idx; } +void sial_type_setidxlst(type_t*t, int* idxlst) { t->idxlst=idxlst; } +void sial_type_setref(type_t*t, int ref, int type) { t->ref=ref; t->rtype=type; } +void sial_type_setfct(type_t*t, int val) { t->fct=val; } +void sial_type_mkunion(type_t*t) { t->type=V_UNION; } +void sial_type_mkenum(type_t*t) { t->type=V_ENUM; } +void sial_type_mkstruct(type_t*t) { t->type=V_STRUCT; } +void sial_type_mktypedef(type_t*t) { t->type=V_TYPEDEF; } + +static int defbtype=B_LONG|B_SIGNED; +static int defbidx=B_SL; +static int defbsize=4; +static int defbsign=B_SIGNED; +int sial_defbsize() { return defbsize; } + +char * +sial_getbtypename(int typattr) +{ +int i; +char *name=sial_alloc(200); + + name[0]='\0'; + for(i=0;itype.type==V_REF) { + + return TYPE_SIZE(&v->type)==4 ? (ull)(v->v.ul) : v->v.ull; + + } else switch(v->type.idx) { + + case B_SC: return (ull)(v->v.sc); + case B_UC: return (ull)(v->v.uc); + case B_SS: return (ull)(v->v.ss); + case B_US: return (ull)(v->v.us); + case B_SL: return (ull)(v->v.sl); + case B_UL: return (ull)(v->v.ul); + case B_SLL: return (ull)(v->v.sll); + case B_ULL: return (ull)(v->v.ull); + default: sial_error("Oops univ()[%d]", TYPE_SIZE(&v->type)); break; + } + return 0; +} + +void +sial_duptype(type_t*t, type_t*ts) +{ + memmove(t, ts, sizeof(type_t)); + if(ts->idxlst) { + + t->idxlst=sial_calloc(sizeof(int)*(MAXIDX+1)); + memmove(t->idxlst, ts->idxlst, sizeof(int)*(MAXIDX+1)); + } +} + +#define asarray(v) (v->arr!=v->arr->next) + +/* + Duplicate a value_t. + On duplication we do verification of the value_ts involved. + this is to make it possible to pass array to subfunctions + and to override specific value_ts that also have arrays attached + to them. +*/ +void +sial_dupval(value_t *v, value_t *vs) +{ +int isvoid=(v->type.typattr & B_VOID); + + /* if both have an attached array ... fail */ + if(asarray(v) && asarray(vs)) { + + sial_error("Can't override array"); + + } + /* when we are attaching a new array to the destination value_t + we need to add the destination reference count to the source */ + if(asarray(v)) { + + array_t*a=v->arr; + + /* preserve the array accross the freedata and memmove */ + v->arr=0; + sial_freedata(v); + + /* copy the new value_t over it */ + memmove(v, vs, sizeof(value_t)); + + /* and restore the array_t*/ + v->arr=a; + + } else { + + sial_refarray(vs, 1); + sial_freedata(v); + memmove(v, vs, sizeof(value_t)); + } + + sial_duptype(&v->type, &vs->type); + sial_dupdata(v, vs); + + /* conserve the void atribute across asignements */ + v->type.typattr |= isvoid; +} + +/* + clone a value_t. +*/ +value_t * +sial_cloneval(value_t *v) +{ +value_t *nv=sial_alloc(sizeof(value_t)); + + memmove(nv, v, sizeof(value_t)); + sial_refarray(v, 1); + sial_dupdata(nv, v); + return nv; +} + +static signed long long +twoscomp(ull val, int nbits) +{ + return val | (0xffffffffffffffffll << nbits); + // XXX return (val-1)^0xffffffffll; +} + +/* + Get a bit field value_t from system image or live memory. + We do all operations with a ull untill the end. + Then we check for the basetype size and sign and convert + apropriatly. +*/ +void +get_bit_value(ull val, int nbits, int boff, int size, value_t *v) +{ + ull mask; + int dosign=0; + int vnbits=size*8; + + + val = API_GET_UINT64(&val); + + /* first get the value_t */ + if (nbits >= 32) { + int upper_bits = nbits - 32; + mask = ((1 << upper_bits) - 1); + mask = (mask << 32) | 0xffffffff; + } + else { + mask = ((1 << nbits) - 1); + } + val = val >> boff; + val &= mask; + + if(issigned(v)) { + + /* get the sign bit */ + if(val >> (nbits-1)) dosign=1; + + } + switch(vsize(v)) { + + case B_CHAR: { + if(dosign) { + v->v.sc=(signed char)twoscomp(val, nbits); + } + else { + v->v.uc=val; + } + } + break; + case B_SHORT: { + if(dosign) { + v->v.ss=(signed short)twoscomp(val, nbits); + } + else { + v->v.us=val; + } + } + break; + case B_LONG: + + if(sial_defbsize()==8) goto ll; + + case B_INT: { + if(dosign) { + v->v.sl=(signed long)twoscomp(val, nbits); + } + else { + v->v.ul=val; + } + } + break; + case B_LONGLONG: { +ll: + if(dosign) { + v->v.sll=(signed long long)twoscomp(val, nbits); + } + else { + v->v.ull=val; + } + } + break; + default: + sial_error("Oops get_bit_value_t..."); + break; + } + +} +/* + Set a bit field value_t. dvalue_t is the destination value_t as read + from either the system image of live memory. + */ +ull +set_bit_value_t(ull dvalue, ull value, int nbits, int boff) +{ + ull mask; + + if (nbits >= 32) { + int upper_bits = nbits - 32; + mask = ((1 << upper_bits) - 1); + mask = (mask << 32) | 0xffffffff; + } + else { + mask = ((1 << nbits) - 1); + } + /* strip out the current value_t */ + dvalue &= ~(mask << boff); + + /* put in the new one */ + dvalue |= (value << boff); + return dvalue; +} + +/* this function is called when we have determined the systems + default int size (64 bit vs 32 bits) */ +void +sial_setdefbtype(int size, int sign) +{ +int idx=B_INT; + + switch(size) { + + case 1: defbtype=B_CHAR; idx=B_UC; break; + case 2: defbtype=B_SHORT;idx=B_US; break; + case 4: defbtype=B_INT; idx=B_UL; break; + case 8: defbtype=B_LONGLONG; idx=B_ULL; break; + + } + if(sign) defbsign = B_SIGNED; + else defbsign = B_UNSIGNED; + defbtype |= defbsign; + defbsize=size; + defbidx=idx; +} + +static int +getbtype(int token) +{ +int i; + + for(i=0;itype.type=V_BASE; + v->setfct=sial_setfct; + v->type.idx=idx; + v->mem=0; + switch(idx) { + + case B_UC: case B_SC: + v->type.size=1; + v->v.uc=i; + break; + case B_US: case B_SS: + v->type.size=2; + v->v.us=i; + break; + case B_UL: case B_SL: + v->type.size=4; + v->v.ul=i; + break; + case B_ULL: case B_SLL: + v->type.size=8; + v->v.ull=i; + break; + default: sial_error("Oops defbtypesize!"); break; + } + return v; +} + +value_t * +sial_defbtype(value_t *v, ull i) +{ + v->type.typattr=defbtype; + return sial_defbtypesize(v, i, defbidx); +} + +value_t * +sial_makebtype(ull i) +{ +value_t *v=sial_calloc(sizeof(value_t)); + + sial_defbtype(v, i); + sial_setarray(&v->arr); + TAG(v); + return v; +} + +value_t * +sial_newval() +{ +value_t *v=sial_makebtype(0); + + return v; +} + +/* take the current basetypes and generate a uniq index */ +static void +settypidx(type_t*t) +{ +int v1, v2, v3, size; + + if(t->typattr & B_CHAR) { + size=1; + v1=B_SC; v2=B_UC; + v3=(defbsign==B_SIGNED?B_SC:B_UC); + } else if(t->typattr & B_SHORT) { + size=2; + v1=B_SS; v2=B_US; v3=B_SS; + } else if(t->typattr & B_LONG) { + if(sial_defbsize()==4) { + size=4; + v1=B_SL; v2=B_UL; v3=B_SL; + } else goto ll; + } else if(t->typattr & B_INT) { +go: + size=4; + v1=B_SL; v2=B_UL; v3=B_SL; + } else if(t->typattr & B_LONGLONG) { +ll: + size=8; + v1=B_SLL; v2=B_ULL; v3=B_SLL; + } + else goto go; + + if(t->typattr & B_SIGNED) t->idx=v1; + else if(t->typattr & B_UNSIGNED) t->idx=v2; + else t->idx=v3; + t->size=size; +} + +/* take the current basetypes and generate a uniq index */ +int +sial_idxtoattr(int idx) +{ +int i; +static struct { + + int idx; + int attr; + +} atoidx[] = { + + {B_SC, B_SIGNED | B_CHAR}, + {B_UC, B_UNSIGNED| B_CHAR}, + {B_SS, B_SIGNED | B_SHORT}, + {B_US, B_UNSIGNED| B_SHORT}, + {B_SL, B_SIGNED | B_LONG}, + {B_UL, B_UNSIGNED| B_LONG}, + {B_SLL, B_SIGNED | B_LONGLONG}, + {B_ULL, B_UNSIGNED| B_LONGLONG}, +}; + + for(i=0; i < sizeof(atoidx)/sizeof(atoidx[0]); i++) { + + if(atoidx[i].idx==idx) return atoidx[i].attr; + } + sial_error("Oops sial_idxtoattr!"); + return 0; +} + +void +sial_mkvsigned(value_t*v) +{ + v->type.typattr &= ~B_SIGN_MASK; + v->type.typattr |= B_SIGNED; + settypidx(&v->type); +} + +/* if there's no sign set the default */ +void +sial_chksign(type_t*t) +{ + if(sial_isvoid(t->typattr)) return; + if(!is_sign(t->typattr)) { + + /* char is compile time dependant */ + if(t->idx==B_SC || t->idx==B_UC) t->typattr |= defbsign; + /* all other sizes are signed by default */ + else t->typattr |= B_SIGNED; + } + settypidx(t); +} + +/* if ther's no size specification, make it an INT */ +void +sial_chksize(type_t*t) +{ + if(!sial_isvoid(t->typattr) && !is_size(t->typattr)) sial_addbtype(t, INT); +} + +/* create a new base type element */ +type_t* +sial_newbtype(int token) +{ +int btype; +type_t*t=sial_newtype(); + + if(!token) btype=defbtype; + else { + + btype=getbtype(token); + if(is_sign(btype)) btype |= B_USPEC; + } + t->type=V_BASE; + t->typattr=btype; + settypidx(t); + TAG(t); + return t; +} + +/* set the default sign on a type if user did'nt specify one and not int */ +#define set_base_sign(a) if(!(base & (B_USPEC|B_INT))) base = (base ^ is_sign(base)) | a + +/* + char short int long longlong +char XXX XXX XXX XXX XXX +short XXX XXX OOO XXX XXX +int XXX OOO XXX OOO OOO +long XXX XXX OOO OOO XXX +longlong XXX XXX OOO XXX XXX + + the parser let's you specify any of the B_ type. It's here that we + have to check things out + +*/ +type_t* +sial_addbtype(type_t*t, int newtok) +{ +int btype=getbtype(newtok); +int base=t->typattr; + + /* size specification. Check for 'long long' any other + combinaison of size is invalid as is 'long long long' */ + if(is_size(btype)) { + + int ibase=base; + + switch(btype) { + + case B_LONG: { + + + if(!(base & (B_CHAR|B_SHORT))) { + + set_base_sign(B_UNSIGNED); + + if(base & B_LONG || sial_defbsize()==8) { + + ibase &= ~B_LONGLONG; + base |= B_LONGLONG; + base &= ~B_LONG; + + } else { + + base |= B_LONG; + } + } + break; + } + case B_INT: { + + /* + * This is a bit of a hack to circumvent the + * problem that "long int" or "long long int" + * is a valid statement in C. + */ + if(!(base & (B_INT|B_CHAR|B_LONG|B_LONGLONG))) { + + set_base_sign(B_SIGNED); + base |= B_INT; + } + if (base & (B_LONG|B_LONGLONG)) + ibase = 0; + break; + } + case B_SHORT: { + + if(!(base & (B_SHORT|B_CHAR|B_LONG|B_LONGLONG))) { + + base |= B_SHORT; + set_base_sign(B_UNSIGNED); + } + + } + case B_CHAR: { + + if(!(base & (B_CHAR|B_SHORT|B_INT|B_LONG|B_LONGLONG))) { + + base |= B_CHAR; + set_base_sign(defbsign); + } + + } + } + + if(ibase == base) { + + sial_warning("Invalid combinaison of sizes"); + + } + + } else if(is_sign(btype)) { + + if(base & B_USPEC) { + + if(is_sign(btype) == is_sign(base)) + + sial_warning("duplicate type specifier"); + + else + + sial_error("invalid combination of type specifiers"); + } + /* always keep last found signed specification */ + base ^= is_sign(base); + base |= btype; + base |= B_USPEC; + + } else if(is_stor(btype)) { + + if(is_stor(base)) { + + sial_warning("Suplemental storage class ignore"); + + } + else base |= btype; + } + t->typattr=base; + settypidx(t); + return t; +} + +/* this function gets called back from the API when the user need to parse + a type declaration. Like when a typedef dwarf returns a type string */ + +void +sial_pushref(type_t*t, int ref) +{ + if(t->type==V_REF) { + + t->ref += ref; + + } else { + + t->ref=ref; + + if(ref) { + + t->rtype=t->type; + t->type=V_REF; + } + } +} +void +sial_popref(type_t*t, int ref) +{ + + if(!t->ref) return; + + t->ref-=ref; + + if(!t->ref) { + + t->type=t->rtype; + } +} + +typedef struct { + int battr; + char *str; +} bstr; +static bstr btypstr[] = { + {CHAR, "char"}, + {SHORT, "short"}, + {INT, "int"}, + {LONG, "long"}, + {DOUBLE, "double"}, + {SIGNED, "signed"}, + {UNSIGNED, "unsigned"}, + {STATIC, "static"}, + {REGISTER, "register"}, + {VOLATILE, "volatile"}, + {VOID, "void"}, +}; +int +sial_parsetype(char *str, type_t*t, int ref) +{ +char *p; +char *tok, *pend; +int ctype=0, i, first, found; +type_t*bt=0; + + /* if it's a simple unamed ctype return 0 */ + if(!strcmp(str, "struct")) { t->type=V_STRUCT; return 0; } + if(!strcmp(str, "enum")) { t->type=V_ENUM; return 0; } + if(!strcmp(str, "union")) { t->type=V_UNION; return 0; } + + p=sial_strdup(str); + + /* get he level of reference */ + for(pend=p+strlen(p)-1; pend>=p; pend--) { + + if(*pend==' ' || *pend == '\t') continue; + if(*pend == '*' ) ref ++; + else break; + + } + *++pend='\0'; + +again: + tok=strtok(p," "); + if(!strcmp(tok, "struct")) { + + ctype=V_STRUCT; + + } else if(!strcmp(tok, "union")) { + + ctype=V_UNION; + + } else if(!strcmp(tok, "enum")) { + sial_free(p); + p=(char*)sial_alloc(strlen("unsigned int") + 1); + /* force enum type into unigned int type for now */ + strcpy(p, "unsigned int"); + goto again; + + } + if(ctype) { + + char *name=strtok(NULL, " \t"); + bt=sial_getctype(ctype, name, 1); + + /* we accept unknow struct reference if it's a ref to it */ + /* the user will probably cast it to something else anyway... */ + if(!bt) { + + if(ref) { + + bt=(type_t*)sial_getvoidstruct(ctype); + + } else { + + sial_error("Unknown Struct/Union/Enum %s", name); + + } + } + + sial_duptype(t, bt); + sial_freetype(bt); + sial_pushref(t, ref); + sial_free(p); + return 1; + } + + /* this must be a basetype_t*/ + first=1; + do { + found=0; + for(i=0;inext->v->type); + sial_freesvs(v); + return type; +} + +typedef struct cast { + + type_t*t; + node_t*n; + srcpos_t pos; + +} cast; + +/* make sure we do the proper casting */ +void +sial_transval(int s1, int s2, value_t *v, int issigned) +{ +vu_t u; + + if(s1==s2) return; + + if(issigned) { + + switch(s1) { + case 1: + switch(s2) { + case 2: + u.us=v->v.sc; + break; + case 4: + u.ul=v->v.sc; + break; + case 8: + u.ull=v->v.sc; + break; + } + break; + case 2: + switch(s2) { + case 1: + u.uc=v->v.ss; + break; + case 4: + u.ul=v->v.ss; + break; + case 8: + u.ull=v->v.ss; + break; + } + break; + case 4: + switch(s2) { + case 2: + u.us=v->v.sl; + break; + case 1: + u.uc=v->v.sl; + break; + case 8: + u.ull=v->v.sl; + break; + } + break; + case 8: + switch(s2) { + case 2: + u.us=v->v.sll; + break; + case 4: + u.ul=v->v.sll; + break; + case 1: + u.uc=v->v.sll; + break; + } + break; + } + + } else { + + switch(s1) { + case 1: + switch(s2) { + case 2: + u.us=v->v.uc; + break; + case 4: + u.ul=v->v.uc; + break; + case 8: + u.ull=v->v.uc; + break; + } + break; + case 2: + switch(s2) { + case 1: + u.uc=v->v.us; + break; + case 4: + u.ul=v->v.us; + break; + case 8: + u.ull=v->v.us; + break; + } + break; + case 4: + switch(s2) { + case 2: + u.us=v->v.ul; + break; + case 1: + u.uc=v->v.ul; + break; + case 8: + u.ull=v->v.ul; + break; + } + break; + case 8: + switch(s2) { + case 2: + u.us=v->v.ull; + break; + case 4: + u.ul=v->v.ull; + break; + case 1: + u.uc=v->v.ull; + break; + } + break; + } + } + memmove(&v->v, &u, sizeof(u)); + if(v->type.type!=V_REF) v->type.size=s2; +} + +value_t * +sial_execast(cast *c) +{ +/* we execute the expression node_t*/ +value_t *v=NODE_EXE(c->n); + + /* ... and validate the type cast */ + if(v->type.type != V_REF && v->type.type != V_BASE) { + + sial_rerror(&c->pos, "Invalid typecast"); + + } + else { + + int vsize=TYPE_SIZE(&v->type); + int issigned=sial_issigned(v->type.typattr); + + /* Now, just copy the cast type over the current type_t*/ + sial_duptype(&v->type, c->t); + + /* Take into account the size of the two objects */ + sial_transval(vsize, TYPE_SIZE(c->t), v, issigned); + } + return v; +} + +void +sial_freecast(cast *c) +{ + NODE_FREE(c->n); + sial_freetype(c->t); + sial_free(c); +} + +node_t* +sial_typecast(type_t*type, node_t*expr) +{ + if(type->type==V_STRING) { + + sial_error("Cannot cast to a 'string'"); + return 0; + + } else { + + node_t*n=sial_newnode(); + cast *c=sial_alloc(sizeof(cast)); + + c->t=type; + c->n=expr; + n->exe=(xfct_t)sial_execast; + n->free=(ffct_t)sial_freecast; + n->data=c; + sial_setpos(&c->pos); + return n; + } +} + +/* + Validate type conversions on function calls and assignments. +*/ +void +sial_chkandconvert(value_t *vto, value_t *vfrm) +{ +type_t*tto=&vto->type; +type_t*tfrm=&vfrm->type; + + if(tto->type == tfrm->type) { + + if(tto->type == V_BASE) { + + int attr=tto->typattr; + int idx=tto->idx; + + sial_transval(tfrm->size, tto->size, vfrm, sial_issigned(vfrm->type.typattr)); + sial_dupval(vto, vfrm); + tto->typattr=attr; + tto->idx=idx; + return; + + } else if(tto->type == V_REF) { + + if(sial_isvoid(tto->typattr) || sial_isvoid(tfrm->typattr)) goto dupit; + + if(tto->ref == tfrm->ref && tto->rtype == tfrm->rtype) { + + if(is_ctype(tto->rtype)) { + + if(tto->idx == tfrm->idx || sial_samectypename(tto->rtype, tto->idx, tfrm->idx)) + goto dupit; + + } else if(tto->size == tfrm->size) { + + int attr=tto->typattr; + sial_dupval(vto, vfrm); + tto->typattr=attr; + return; + } + } + } + /* Allow assignments between enums of the same type */ + else if(is_ctype(tto->type) || tto->type == V_ENUM) { + + /* same structure type_t*/ + if(tto->idx == tfrm->idx || sial_samectypename(tto->type, tto->idx, tfrm->idx)) + goto dupit; + } + else if(tto->type == V_STRING) goto dupit; + + } + else if((tto->type == V_ENUM && tfrm->type == V_BASE) || + (tto->type == V_BASE && tfrm->type == V_ENUM)) { + /* convert type from or to enum */ + int attr=tto->typattr; + int idx=tto->idx; + + sial_transval(tfrm->size, tto->size, vfrm, sial_issigned(vfrm->type.typattr)); + sial_dupval(vto, vfrm); + tto->typattr=attr; + tto->idx=idx; + return; + } + // support NULL assignment to pointer + else if(tto->type == V_REF && tfrm->type == V_BASE && !sial_getval(vfrm)) return; + sial_error("Invalid type conversion"); + +dupit: + sial_dupval(vto, vfrm); +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_util.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_util.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_util.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_util.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,922 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static FILE *ofile=0; +static int cols=25; +static char *bold_on, *bold_off; + + +static void +sial_getwinsize(void) +{ +struct winsize w; + + if (ioctl (fileno(ofile), TIOCGWINSZ, &w) == 0) + { + cols=w.ws_col; + } + else /* use ENV */ + { + char *ewidth; + if ((ewidth = getenv ("COLUMNS"))) + cols = atoi (ewidth); + /* use what's in terminfo */ + if (cols <= 0) + cols = tigetnum ("co"); + } + if(cols <= 10) cols=10; + if(cols > 80) cols=80; +} + +void +sial_setofile(void * f) +{ +int out; +int ret; +char *term; + + ofile=(FILE *)f; + + bold_on=""; + bold_off=""; + cols=80; + + out=fileno(ofile); + if(isatty(out)) + { + + if(!(term = getenv ("TERM"))) term="dumb"; + if(setupterm(term, out, &ret)!=ERR) + { + bold_on=tigetstr("bold"); + if(!bold_on) bold_on=""; + bold_off=tigetstr("sgr0"); + if(!bold_off) bold_off=""; + } + sial_getwinsize(); + } +} + +void * +sial_getofile(void) +{ + return ofile; +} + +/* + Output a line of text to the screen with line wrap + and escape sequence. +*/ +#define ESC '<' +#define ESC2 '>' + +static int +sial_tabs(int tabs, char *t, int lf) +{ +int i; + + if(lf) fprintf(ofile, "\n"); + for(i=0;i cols) { + + char *p3=p+(cols-n-1); + + char c=*p3; + char c2=*(p3+1); + + *p3='-'; + *(p3+1)='\0'; + + fprintf(ofile, "%s", p); + *p3=c; + *(p3+1)=c2; + n=sial_tabs(tabs, t, 0); + + } else if(n + (p2-p) >= cols) { + + n=sial_tabs(tabs, t, 1); + + } else { + + fprintf(ofile, " "); + n++; + } + + } else if(*p=='\n') { + + n=sial_tabs(tabs, t, 1); + + } else { + + fprintf(ofile, "%c", *p); + n++; + } + } + +} + +void +sial_msg(char *fmt, ...) +{ +va_list ap; + va_start(ap, fmt); + vfprintf(ofile, fmt, ap); + va_end(ap); +} + +void +sial_freenode(node_t *n) +{ + n->free(n->data); + sial_free(n); +} + +int lineno=1, lastline=1; +int col=1; +static char *filename=0; +static char *lastfile=0; + +void +sial_setlastfile(char *fname, int line) +{ + if(!fname) return; + if(lastfile) sial_free(lastfile); + lastfile=sial_strdup(fname); + lastline=line; +} + +void +sial_rstpos(void) +{ + lineno=1; + col=1; + /* do not free filename */ + filename=0; +} + +void +sial_setpos(srcpos_t *p) +{ + p->line=lineno; + p->col=col; + p->file=filename; +} + +/* set the current position */ +void +sial_curpos(srcpos_t *p, srcpos_t *s) +{ + if(s) { + s->line=lineno; + s->col=col; + s->file=filename; + } + lineno=p->line; + col=p->col; + filename=p->file; +} + +int +sial_line(int inc){ return lineno+=inc; } + +int +sial_col(int inc) { return col+=inc; } + +char * +sial_filename(void) { return filename; } + +/* + This function scans a printf() fmt string and transaletes the %p + to %08x or %016x depending on the pointer size of the object image. + We also substiture %> for 8 spaces if the pointer size is 4 bytes, this + permits easy allignment of output on either 32 or 64 bit images. + + ex: + + Proc %> pid ppid + %p %3d %3d + + In this case the %> alligns the pid with it's corresponding value_t + in the next line of output. + + We also process the '?' format which will be set to match the + corresponding value_t type. + + Also, format versus argument type validation is performed. + +*/ + +/* + Printf formats have the form : + %3$-*3$.*4$lld + %20x + %08x + %-08.8f +*/ +/* these are the buildin blocks for a regex matching formats */ +#define F_POSP "([0-9]+\\$)*" +#define F_FLGS "([-'+ #0]*)" +#define F_WARG "(\\*([0-9]+\\$)*){0,1}" +#define F_WIDTH "([0-9]*)" +#define F_PREC "((\\.(\\*([0-9]+\\$)*)*([0-9]*))*)" +#define F_SIZE "([hlL]*)" +#define F_FMT "([diouxXfeEgGcCsSpn?>]{1})" +#define FMTREG F_POSP""F_FLGS""F_WARG""F_WIDTH""F_PREC""F_SIZE""F_FMT +#define M_POSP 1 +#define M_FLAGS 2 +#define M_WIDTHARG 3 +#define M_WIDTDIGITS 4 +#define M_WIDTH 5 +#define M_PRECARG 8 +#define M_PRECDIGITS 9 +#define M_PREC 10 +#define M_SIZE 11 +#define M_FMT 12 +#define NMATCH 16 +static int addit[]={M_FLAGS,M_WIDTHARG,M_WIDTH,M_PRECARG,M_PREC,M_SIZE}; + +#define ptrto(idx) (matches[idx].rm_so==matches[idx].rm_eo?0:(pi+matches[idx].rm_so)) +#define matchlen(idx) (matches[(idx)].rm_eo-matches[(idx)].rm_so) + +void sial_error(char *fmt, ...); + +static int +chkforint(char *p, value_t **vals, int *curarg) +{ +int pos=-1; + + if(!p) return -1; + + /* a single star ? */ + if(isdigit(p[1])) { + + if(sscanf(p+1, "%d", &pos)!=1) { + + return pos; + } + pos--; + + } else { + + pos=*curarg; + *curarg=(*curarg)+1; + + } + + if(pos < BT_MAXARGS && vals[pos] && vals[pos]->type.type == V_BASE) return pos; + sial_error("Expected 'integer' type for arg%d", pos+1); + return -1; +} + +#define pushval(val, s, sig) ( \ + sig ? \ + ( \ + (s==8) ? \ + (val)->v.sll \ + : ( \ + (s==4) ? \ + (val)->v.sl \ + : ( \ + (s==2) ? \ + (val)->v.ss \ + :( \ + (s==1) ? \ + (val)->v.sc \ + :( \ + sial_error("Oops pushval"),1 \ + ) \ + ) \ + ) \ + ) \ + ) : ( \ + (s==8) ? \ + (val)->v.ull \ + : ( \ + (s==4) ? \ + (val)->v.ul \ + : ( \ + (s==2) ? \ + (val)->v.us \ + :( \ + (s==1) ? \ + (val)->v.uc \ + :( \ + sial_error("Oops pushval"),1 \ + ) \ + ) \ + ) \ + ) \ + ) \ + ) + + +static char * +add_fmt(int len, char *s, char *onefmt, int ppos, int wpos, int posarg, value_t **vals) +{ +int size=(vals[posarg]->type.type == V_REF ? sial_defbsize(): vals[posarg]->type.size); +int sign=(vals[posarg]->type.type == V_REF ? 0 : sial_issigned(vals[posarg]->type.typattr)); + + if(vals[posarg]->type.type == V_STRING) { + + if(wpos>=0 && ppos<0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , vals[posarg]->v.data); + else if(wpos<0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[ppos]) + , vals[posarg]->v.data); + else if(wpos>=0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , (int)sial_getval(vals[ppos]) + , vals[posarg]->v.data); + else s+=snprintf(s, len, onefmt + , vals[posarg]->v.data); + + } else { +#if defined(__s390x__) || defined(__s390__) + if(wpos>=0 && ppos<0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , (unsigned long)pushval(vals[posarg], size, sign)); + else if(wpos<0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[ppos]) + , (unsigned long)pushval(vals[posarg], size, sign)); + else if(wpos>=0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , (int)sial_getval(vals[ppos]) + , (unsigned long) pushval(vals[posarg], size, sign)); + else s+=snprintf(s, len, onefmt + , (unsigned long) pushval(vals[posarg], size, sign)); +#else + if(wpos>=0 && ppos<0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , pushval(vals[posarg], size, sign)); + else if(wpos<0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[ppos]) + , pushval(vals[posarg], size, sign)); + else if(wpos>=0 && ppos>=0) + s+=snprintf(s, len, onefmt + , (int)sial_getval(vals[wpos]) + , (int)sial_getval(vals[ppos]) + , pushval(vals[posarg], size, sign)); + else s+=snprintf(s, len, onefmt + , pushval(vals[posarg], size, sign)); +#endif + } + return s; +} + +static char * +sial_ptr(char *fmt, value_t **vals) +{ + /* We need to ensure that we dont overflow our string buffer. Although its unlikely we will overflow it with + just numbers, strings will easliy overflow. So, lets check for strings and see how long they are. + */ +int len=0; +char *nfmt=NULL,*ni=NULL; +char *onefmt=NULL, *onei=NULL; +char *p=fmt; +char last=' '; +int curarg=0; +#define NBYTES (len-(nfmt-ni)) + +int i = 0; + + while(vals[i] != NULL) { + if(vals[i]->type.type == V_STRING) + len+=vals[i]->type.size; + i++; + } + /* We add a fudge factor of 100, which should cover all the number arguments */ + len+=strlen(fmt) + 100; + nfmt=sial_alloc(len); + ni=nfmt; + onefmt=sial_alloc(len); + onei=onefmt; + + + + while(*p) { + + if(*p=='%') { + + static regex_t preg; + static int done=0; + regmatch_t matches[NMATCH]; + + if(!done) { + + regcomp(&preg, FMTREG, REG_EXTENDED); + done=1; + } + + /* build a new format translation */ + onefmt=onei; + *onefmt++=*p++; + + /* if the returned pointer is (char*)-1 or NULL then something is wrong */ + if(!regexec(&preg, p, NMATCH, matches, 0)) { + + int i, n=matches[0].rm_eo-1; + int posarg, wpos, ppos; + char *pi=p; /* save p for ptrto() macro */ + + /* check that the width and precision field args point + to a int value_t. If they were used */ + wpos=chkforint(ptrto(M_WIDTHARG), vals, &curarg); + ppos=chkforint(ptrto(M_PRECARG), vals, &curarg); + + /* argument position was specfified ? */ + if(ptrto(M_POSP)) { + + /* we work from 0-n, printf works from 1-n */ + if(sscanf(ptrto(M_POSP), "%d", &posarg)==1) posarg--; + + if(posarg >= BT_MAXARGS || !vals[posarg]) { + sial_error("Invalid arg position specified [%d]", posarg+1); + } + + } else posarg=curarg++; + + /* jump over the format spec in the original */ + p+=n; +#if 0 +for(i=0;i=0 ){ + + *onefmt++='*'; + + } else goto def; + + break; + case M_PRECARG: + + if(ppos >=0 ){ + + *onefmt++='.'; + *onefmt++='*'; + + } else goto def; + + break; + case M_PREC: + if(ptrto(addit[i])) *onefmt++='.'; + goto def; + default: +def: + if(ptrto(addit[i])) { + strcpy(onefmt, ptrto(addit[i])); + onefmt+=matchlen(addit[i]); + } + } + } + + if(*p=='p') { + +ref: + /* if user overrides anything don't do nothing */ + if(ptrto(M_FLAGS)||ptrto(M_WIDTH)||ptrto(M_WIDTHARG)||ptrto(M_PREC)||ptrto(M_PRECARG)||ptrto(M_SIZE)) { + *onefmt++='p'; + + } else { + if(sial_defbsize()==8) { + + strcpy(onefmt, "016llx"); + onefmt+=6; + + } else { + + strcpy(onefmt, "08x"); + onefmt+=3; + } + } + *onefmt='\0'; + p++; + nfmt=add_fmt(NBYTES, nfmt, onei, ppos, wpos, posarg, vals); + + } else if(*p=='>') { + + nfmt--; + if(sial_defbsize()==8) { + + int i; + + for(i=0;i<8;i++) *nfmt++=last; + } + p++; + curarg--; + + } else if(*p=='?') { + + /* put the proper format for the user */ + if(!vals[posarg]) { + + sial_error("Expected additional argument %d\n", posarg+1); + + } else switch(vals[posarg]->type.type) { + + case V_BASE: case V_ENUM: + { + if(!ptrto(M_SIZE)) { + + if(vals[posarg]->type.size==8) { + + *onefmt++='l'; + *onefmt++='l'; + } + } + if(sial_issigned(vals[posarg]->type.typattr)) { + + *onefmt++='d'; + + }else{ + + *onefmt++='u'; + } + } + break; + case V_REF: + { + *p='p'; + goto ref; + } + case V_STRING: + { + *onefmt++='s'; + } + break; + } + p++; + *onefmt='\0'; + nfmt=add_fmt(NBYTES, nfmt, onei, ppos, wpos, posarg, vals); + + } else { + + /* check that format and value_t agree */ + /* can't do a lot more then check for strings vs anything_else */ + + if(!vals[posarg]) { + + sial_error("Expected additional argument %d\n", posarg+1); + + + } else if(*p=='s') { + + if(vals[posarg]->type.type != V_STRING) { + + sial_error("Expected type 'string' as arg%d", posarg+1); + } + + } else if(vals[posarg]->type.type == V_STRING) { + + sial_error("Incompatible type 'string' in arg%d", posarg+1); + + } + *onefmt++=*p++; + *onefmt='\0'; + nfmt=add_fmt(NBYTES, nfmt, onei, ppos, wpos, posarg, vals); + } + + } else { + + sial_warning("Malformed format specifier!"); + + } + + } else { + + last=*p; + if(nfmt-ni > len) sial_error("format tranlation overflow!"); + *nfmt++=*p++; + + } + } + sial_free(onei); + *nfmt='\0'; + return ni; +} + +value_t* sial_printf(value_t *vfmt, ...) +{ +char *fmt = sial_getptr(vfmt, char); +va_list ap; +value_t *vals[BT_MAXARGS]; +int i; + + va_start(ap, vfmt); + for(i=0;i 9) + sial_msg("Invalid debug level value.\n"); + else + dbglvl=lvl; +} +char *sial_getname(void) +{ + return dbg_name; +} + +void sial_setname(char *name) +{ + if(dbg_name) sial_free(dbg_name); + dbg_name=sial_strdup(name); +} + +#define MAXCLASSES 10 +static struct { + char *name; + int class; +} classes [MAXCLASSES] = { + { "type", DBG_TYPE }, + { "struct", DBG_STRUCT }, + { 0 }, +}; + +char **sial_getclass(void) +{ +int i,j; +static char *ptrs[MAXCLASSES+1]; + + for(i=j=0;classes[i].name;i++) { + if(clist&classes[i].class) ptrs[j++]=classes[i].name; + } + ptrs[i]=0; + return ptrs; +} + +void sial_setclass(char *cl) +{ +int i,j; + + for(i=0;classes[i].name;i++) { + if(!strcmp(classes[i].name,cl)) { + clist |= classes[i].class; + return; + } + } + sial_msg("Invalid class '%s' specified.\n", cl); +} + +static void +sial_dbg_all(int class, char *name, int lvl, char *fmt, va_list ap) +{ + if(lvl<=dbglvl && (clist & class) && (!dbg_name || !strcmp(name, dbg_name))) { + fprintf(ofile, "dbg(%d) : ", lvl); + vfprintf(ofile, fmt, ap); + } +} + +void +sial_dbg(int class, int lvl, char *fmt, ...) +{ +va_list ap; + va_start(ap, fmt); + sial_dbg_all(class, 0, lvl, fmt, ap); + va_end(ap); +} + +void +sial_dbg_named(int class, char *name, int lvl, char *fmt, ...) +{ +va_list ap; + va_start(ap, fmt); + sial_dbg_all(class, name, lvl, fmt, ap); + va_end(ap); +} +/******************************************************************/ + +void +sial_rerror(srcpos_t *p, char *fmt, ...) +{ +va_list ap; + + sial_setlastfile(p->file, p->line); + va_start(ap, fmt); + fprintf(ofile, "%s : line %d : Error: ", p->file, p->line); + vfprintf(ofile, fmt, ap); + fprintf(ofile, "\n"); + va_end(ap); + sial_exit(1); +} + +void +sial_warning(char *fmt, ...) +{ +va_list ap; + + sial_setlastfile(filename, sial_line(0)); + va_start(ap, fmt); + fprintf(ofile, "%s : line %d : Warning: ", filename, lineno); + vfprintf(ofile, fmt, ap); + fprintf(ofile, "\n"); + va_end(ap); +} + +void +sial_rwarning(srcpos_t *p, char *fmt, ...) +{ +va_list ap; + + sial_setlastfile(p->file, p->line); + va_start(ap, fmt); + fprintf(ofile, "%s : line %d : Warning: ", p->file, p->line); + vfprintf(ofile, fmt, ap); + fprintf(ofile, "\n"); + va_end(ap); +} + +void +sial_vilast() +{ + if(lastfile) { + + sial_exevi(lastfile, lastline); + + } else { + + sial_msg("No last error record available"); + } +} + +void +sial_getcomment(void) +{ + while(1) { + + unsigned char c; + + while((c=sial_input())!='*' && c!=255) + + if(c==255) goto bad; + + if((c=sial_input())=='/') return; + else if(c==255) { +bad: + sial_error("Unterminated comment!"); + } + } +} + +/* on assignment this function is called to set the new value */ +void +sial_setfct(value_t *v1, value_t *v2) +{ + /* duplicate type and data, safeguarding array info */ + sial_dupval(v1, v2); + + /* value_t v1 is still setable */ + v1->set=1; + v1->setval=v1; +} + +node_t * +sial_sibling(node_t *n, node_t *m) +{ +node_t *p; + + if(m) { + + for(p=n;p->next;p=p->next); + p->next=m; + m->next=0; + } + return n; +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_var.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_var.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial_var.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial_var.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,1320 @@ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include +#include +#include +#include "sial.h" + +/* + Get an existing variable from the current set. +*/ + +/* variable lists for the different scopes */ +typedef struct { + int type; + var_t*svs; +} svlist; + +typedef struct glo { + struct glo *next; + var_t*vv; +} glo; + +/* + Free indexes specifications. +*/ +void +sial_freeidx(idx_t *idx) +{ +int i; + + for(i=0;inidx;i++) { + + if(idx->idxs[i]) NODE_FREE(idx->idxs[i]); + } + sial_free(idx); +} + +/* + Free a variable declaration structure. +*/ +void +sial_freedvar(dvar_t*dv) +{ + if(!dv) return; + if(--dv->refcount) return; + if(dv->name) sial_free(dv->name); + if(dv->idx) sial_freeidx(dv->idx); + if(dv->init) NODE_FREE(dv->init); + if(dv->fargs) sial_freesvs(dv->fargs); + sial_free(dv); +} + +void +sial_setarray(array_t**arpp) +{ +array_t*arp=*arpp; + + if(!arp) { + + arp=sial_calloc(sizeof(array_t)); + TAG(arp); + arp->next=arp->prev=arp; + arp->ref=1; + *arpp=arp; + } +} + +/* + this is the main variable declaration function. + We support the global scope attribute that make the declared + variable accessible to all function from all scripts. + + By default the scope of a variable either the statement block + where it was declared (or first used): + { + int var; + ... + } + Then it's scope is the block itself. + + Or the file, if it was declared outside of a function. + + Storage is by default 'automatic' and can be made permanent + by using the 'static' keywork in the declaration. + 'Volatile' and 'register' storage classes are supported but + have no effect. +*/ +var_t* +sial_vardecl(dvar_t*dv, type_t*t) +{ +var_t*vlist=sial_newvlist(); +var_t*var; + + /* type *and* dv can have ref counts. First comes from typedef parsing + second comes from the declaration itself */ + dv->ref += t->ref; + + /* add one level of ref for arrays */ + if(dv->idx) dv->ref++; + + /* reset ref level for tests below */ + sial_popref(t, t->ref); + + TAG(vlist); + + if(!t->type) { + + int sto=sial_isstor(t->typattr); + + sial_freetype(t); + t=sial_newbtype(0); + t->typattr |= sto; + } + else if(t->type==V_BASE && !dv->ref) { + + sial_chksign(t); + sial_chksize(t); + } + + /* is this a new typedef declaration ? */ + /* typedef is considered just like any other storage class */ + if(sial_istdef(t->typattr)) { + + sial_tdef_decl(dv, t); + return 0; + } + + while(dv) { + + /* disalow var names that match against already defined vars */ + if(dv->name[0]) { + type_t *t=sial_getctype(V_TYPEDEF, dv->name, 1); + if(t) { + + sial_freetype(t); + sial_warning("Variable '%s' already defined as typedef.\n"); + } + } + + /* + some sanity checks here that apply to both var and struct + declarations + */ + if(is_ctype(t->type) && !dv->ref) { + + if(dv->name[0]) { + + if(!instruct) { + + if(!sial_isxtern(t->typattr)) { + + sial_freesvs(vlist); + sial_error("struct/union instances not supported, please use pointers"); + } + + } else if(sial_ispartial(t)) { + + sial_freesvs(vlist); + sial_error("Reference to incomplete type"); + } + } + } + if(dv->nbits) { + + if(t->type != V_BASE) { + + sial_freesvs(vlist); + sial_error("Bit fields can only be of integer type"); + + } + if(dv->idx) { + + sial_freesvs(vlist); + sial_error("An array of bits ? Come on..."); + } + } + + var=sial_newvar(dv->name); + + t->fct=dv->fct; + sial_duptype(&var->v->type, t); + sial_pushref(&var->v->type, dv->ref); + + var->dv=dv; + + TAG(var); + + if(t->type == V_STRING) { + + sial_setstrval(var->v, ""); + + } + + sial_setpos(&dv->pos); + + sial_enqueue(vlist, var); + + dv=dv->next; + } + sial_free(t); + TAG(vlist); + return vlist; +} + +dvar_t* +sial_newdvar(node_t*v) +{ +dvar_t*dv; + + dv=sial_alloc(sizeof(dvar_t)); + memset(dv, 0, sizeof(dvar_t)); + if(v) { + dv->name=NODE_NAME(v); + NODE_FREE(v); + + } else { + + dv->name=sial_alloc(1); + dv->name[0]='\0'; + } + dv->refcount=1; + sial_setpos(&dv->pos); + return dv; +} + +dvar_t* +sial_dvarini(dvar_t*dv, node_t*init) +{ + dv->init=init; + return dv; +} + +dvar_t* +sial_dvarptr(int ref, dvar_t*dv) +{ + dv->ref+=ref; + return dv; +} + +dvar_t* +sial_dvaridx(dvar_t*dv, node_t*n) +{ + if(!dv->idx) { + + dv->idx=sial_alloc(sizeof(idx_t)); + dv->idx->nidx=0; + } + dv->idx->idxs[dv->idx->nidx++]=n; + return dv; +} + +dvar_t* +sial_dvarfld(dvar_t*dv, node_t*n) +{ + + if(n) { + + value_t *va=sial_exenode(n); + + /* get the value_t for the bits */ + if(!va) dv->nbits=0; + else { + dv->nbits=unival(va); + sial_freeval(va); + } + NODE_FREE(n); + + } else dv->nbits=0; + + dv->bitfield=1; + return dv; +} + +dvar_t* +sial_dvarfct(dvar_t*dv, var_t*fargs) +{ + dv->fct=1; + dv->fargs=fargs; + return dv; +} + +dvar_t* +sial_linkdvar(dvar_t*dvl, dvar_t*dv) +{ +dvar_t*v; + + /* need to keep declaration order for variable initialization */ + if(dv) { + + for(v=dvl; v->next; v=v->next); + dv->next=0; + v->next=dv; + } + return dvl; +} + +idx_t * +sial_newidx(node_t*n) +{ +idx_t *idx; + + if(!instruct) { + + sial_error("Array supported only in struct/union declarations"); + } + idx=sial_alloc(sizeof(idx_t)); + idx->nidx=1; + idx->idxs[0]=n; + return idx; +} + +idx_t * +sial_addidx(idx_t *idx, node_t*n) +{ + if(idx->nidx==MAXIDX) { + + sial_error("Maximum number of dimension is %d", MAXIDX); + } + idx->idxs[idx->nidx++]=n; + return idx; +} + +static svlist svs[S_MAXDEEP]; +static glo *globs=0; +int svlev=0; + +void +sial_refarray(value_t *v, int inc) +{ +array_t*ap, *na; + + if(!v->arr) return; + v->arr->ref+=inc; + if(v->arr->ref == 0) { + + /* free all array element. */ + for(ap=v->arr->next; ap!=v->arr; ap=na) { + + na=ap->next; + sial_freeval(ap->idx); + sial_freeval(ap->val); + sial_free(ap); + } + sial_free(v->arr); + v->arr=0; + + } else { + + /* do the same to all sub arrays */ + for(ap=v->arr->next; ap!=v->arr; ap=na) { + + na=ap->next; + sial_refarray(ap->val, inc); + } + } + +} + +void +sial_freedata(value_t *v) +{ + + if(is_ctype(v->type.type) || v->type.type == V_STRING) { + + if(v->v.data) sial_free(v->v.data); + v->v.data=0; + + } + sial_refarray(v, -1); +} + +void +sial_dupdata(value_t *v, value_t *vs) +{ + + if(is_ctype(vs->type.type) || vs->type.type == V_STRING) { + + v->v.data=sial_alloc(vs->type.size); + memmove(v->v.data, vs->v.data, vs->type.size); + } +} + +void +sial_freeval(value_t *v) +{ + if(!v) return; + sial_freedata(v); + sial_free(v); +} + + +void +sial_freevar(var_t*v) +{ + + if(v->name) sial_free(v->name); + sial_freeval(v->v); + sial_freedvar(v->dv); + sial_free(v); +} + +void +sial_enqueue(var_t*vl, var_t*v) +{ + v->prev=vl->prev; + v->next=vl; + vl->prev->next=v; + vl->prev=v; +} + +void +sial_dequeue(var_t*v) +{ + v->prev->next=v->next; + v->next->prev=v->prev; + v->next=v->prev=v; +} + +/* + This function is called to validate variable declaration. + No array decalration for variables (this can only be checked in + sial_stat_decl() and sial_file_decl() usingthe idx field ofthe var struct. + Same comment for nbits. Only in struct declarations. +*/ +void +sial_validate_vars(var_t*svs) +{ +var_t*v, *next; + + if(!svs) return; + + for(v=svs->next; v!=svs; v=next) { + + next=v->next; + + /* just remove extern variables */ + if(sial_isxtern(v->v->type.typattr)) { + + sial_dequeue(v); + sial_freevar(v); + + } else { + + if(v->dv->idx) { + + sial_freesvs(svs); + sial_error("Array instanciations not supported."); + + } + if(v->dv->nbits) { + + sial_freesvs(svs); + sial_error("Syntax error. Bit field unexpected."); + } + } + } +} + +var_t* +sial_inlist(char *name, var_t*vl) +{ +var_t*vp; + + if(vl) { + + for(vp=vl->next; vp!=vl; vp=vp->next) { + + if(!strcmp(name, vp->name)) { + + return vp; + + } + + } + } + return 0; +} + +static var_t*apiglobs; + +void +sial_setapiglobs(void) +{ + apiglobs=sial_newvlist(); + sial_add_globals(apiglobs); +} + +static var_t* +sial_inglobs(char *name) +{ +var_t*vp; +glo *g; + + for(g=globs; g; g=g->next) { + + if((vp=sial_inlist(name, g->vv))) return vp; + } + return 0; +} + + +void +sial_chkglobsforvardups(var_t*vl) +{ +var_t*v; + + if(!vl) return; + + for(v=vl->next; v != vl; v=v->next) { + + var_t*vg; + + if(v->name[0] && (vg=sial_inglobs(v->name))) { + + /* if this is a prototype declaration then skip it */ + if(v->dv && v->dv->fct) continue; + + sial_rerror(&v->dv->pos, "Duplicate declaration of variable '%s', defined at %s:%d" + , v->name, vg->dv->pos.file, vg->dv->pos.line); + } + } +} + +/* + This function scans a list of variable and looks for those that have not been initialized yet. + Globals, statics and autos all get initialized through here. +*/ +static void +sial_inivars(var_t*sv) +{ +var_t*v; + + if(!sv) return; + + for(v=sv->next; v!=sv; v=v->next) { + + /* check if we need to initialize it */ + if(!v->ini && v->dv && v->dv->init) { + + value_t *val; + srcpos_t pos; + + sial_curpos(&v->dv->pos, &pos); + + if((val=sial_exenode(v->dv->init))) { + + sial_chkandconvert(v->v, val); + sial_freeval(val); + v->ini=1; + + } else { + + sial_rwarning(&v->dv->pos, "Error initializing '%s'", v->name); + } + sial_curpos(&pos, 0); + } + } +} + +/* return the last set of globals */ +var_t* +sial_getcurgvar() +{ + if(!globs) return 0; + return globs->vv; +} + +void * +sial_add_globals(var_t*vv) +{ +glo *ng=sial_alloc(sizeof(glo)); + + sial_inivars(vv); + ng->vv=vv; + ng->next=globs; + sial_chkglobsforvardups(vv); + globs=ng; + return ng; +} + +void +sial_rm_globals(void *vg) +{ +glo *g=(glo*)vg; + + if(globs) { + + if(globs==g) globs=g->next; + else { + + glo *gp; + + for(gp=globs; gp; gp=gp->next) { + + if(gp->next==g) { + + gp->next=g->next; + + } + + } + } + sial_free(g); + } +} + + + +/* + This is where we implement the variable scoping. +*/ +var_t* +sial_getvarbyname(char *name, int silent, int local) +{ +var_t*vp; +int i, aidx=0; +ull apiv; + + for(i=svlev-1; i>=0; i--) { + + if((vp=sial_inlist(name, svs[i].svs))) { + + return vp; + } + if(svs[i].type==S_AUTO && !aidx) aidx=i; + + /* when we get to the function we're finished */ + if(svs[i].type==S_FILE) break; + } + + /* have'nt found any variable named like this one */ + /* first check the globals */ + if(!(vp=sial_inglobs(name))) { + + int off=0; + + /* check the API for a corresponding symbol */ + /* Jump over possible leading "IMG_" prefix */ + if(!strncmp(name, "IMG_", 4)) off=4; + if(!local && API_GETVAL(name+off, &apiv)) { + + vp=sial_newvar(name); + vp->ini=1; + + sial_defbtype(vp->v, apiv); + vp->v->mem=apiv; + + /* put this on the global list */ + sial_enqueue(apiglobs, vp); + } + else { + + if(silent) return 0; + sial_error("Unknown variable [%s]", name); + } + } + return vp; +} + +value_t * +sial_exists(value_t *vname) +{ +char *name=sial_getptr(vname, char); + + return sial_defbtype(sial_newval(), (sial_getvarbyname(name, 1, 0) || sial_funcexists(name))); +} + +/* get a new empty vlist */ +var_t* +sial_newvlist() +{ +var_t*p=sial_newvar(""); + TAG(p); + TAG(p->name); + return p; +} + +/* this is called when we duplicate a list of automatic variables */ +var_t* +sial_dupvlist(var_t*vl) +{ +var_t*nv=(var_t*)sial_newvlist(); /* new root */ +var_t*vp; + + for(vp=vl->next; vp !=vl; vp=vp->next) { + + var_t*v=sial_newvar(vp->name); /* new var_t*/ + + v->dv=vp->dv; + v->dv->refcount++; + v->ini=vp->ini; + sial_dupval(v->v, vp->v); + + /* we start with a new array for automatic variable */ + sial_refarray(v->v, -1); + v->v->arr=0; + sial_setarray(&v->v->arr); + + /* can't check ctypes for initialisation */ + if(is_ctype(v->v->type.type)) v->ini=1; + sial_enqueue(nv, v); + + } + return nv; +} + +void +sial_addtolist(var_t*vl, var_t*v) +{ + if(!v->name[0] || !sial_inlist(v->name, vl)) { + + sial_enqueue(vl, v); + + } else { + + /* if this is a prototype declaration then skip it */ + if(v->dv && v->dv->fct) return; + + sial_error("Duplicate declaration of variable %s", v->name); + } +} + +static void +sial_chkforvardups(var_t*vl) +{ +var_t*v; + + if(!vl) return; + + for(v=vl->next; v!=vl; v=v->next) { + + var_t*v2=v->next; + + for(v2=v->next; v2!=vl; v2=v2->next) { + + if(v2->name[0] && !strcmp(v->name, v2->name)) { + + sial_rerror(&v2->dv->pos, "Duplicate declaration of variable '%s'", v->name); + + } + } + } +} + +static int takeproto=0; +void sial_settakeproto(int v) { takeproto=v; } + + +/* + This function scans a new list of declared variables + searching for static variables. +*/ +void +sial_addnewsvs(var_t*avl, var_t*svl, var_t*nvl) +{ +var_t*v; + + if(nvl) { + + for(v=nvl->next; v!=nvl; ) { + + var_t*next; + + /* save next before sial_enqueue() trashes it ... */ + next=v->next; + + /* if this is a external variable or prototype function declaration + skip it */ + if((!takeproto && v->dv->fct && !v->dv->ref) || sial_isxtern(v->v->type.typattr)) { + + v=next; + continue; + } + + if(sial_isstatic(v->v->type.typattr)) { + + sial_addtolist(svl, v); + + } else { + + sial_addtolist(avl, v); + } + /* with each new variables check for duplicate declarations */ + sial_chkforvardups(avl); + sial_chkforvardups(svl); + + v=next; + } + /* discard nvl's root */ + sial_freevar(nvl); + } +} + +int +sial_addsvs(int type, var_t*sv) +{ +int curlev=svlev; + + if(svlev==S_MAXDEEP) { + + sial_error("Svars stack overflow"); + + } else { + + svs[svlev].type=type; + svs[svlev].svs=sv; + svlev++; + + /* perform automatic initializations */ + sial_inivars(sv); + + /* if S_FILE then we are entering a function so start a newset of + stack variables */ + if(type == S_FILE ) { + + (void)sial_addsvs(S_AUTO, (var_t*)sial_newvlist()); + + } + } + return curlev; +} + +void +sial_add_statics(var_t*var) +{ +int i; + + for(i=svlev-1;i>=0;i--) { + + if(svs[i].type==S_FILE ) { + + if(svs[i].svs) + sial_enqueue(svs[i].svs, var); + else + svs[i].svs=var; + return; + + } + } + sial_rwarning(&var->dv->pos, "No static context for var %s.", var->name); +} + +void sial_freesvs(var_t*v) +{ +var_t*vp; + + for(vp=v->next; vp != v; ) { + + var_t*vn=vp->next; + + sial_freevar(vp); + + vp=vn; + } + sial_freevar(v); +} + +int +sial_getsvlev() { return svlev; } + +/* reset the current level of execution and free up any automatic + variables. */ +void +sial_setsvlev(int newlev) +{ +int lev; + + for(lev=svlev-1; lev>=newlev; lev--) { + + if(svs[lev].type==S_AUTO) { + + sial_freesvs(svs[lev].svs); + + } + + } + svlev=newlev; +} + +/* + called by the 'var in array' bool expression. +*/ +int +sial_lookuparray(node_t*vnode, node_t*arrnode) +{ +value_t *varr=NODE_EXE(arrnode); +array_t*ap, *apr=varr->arr; +value_t *val; +int b=0; + + val=NODE_EXE(vnode); + + if(apr) { + + for(ap=apr->next; ap != apr; ap=ap->next) { + + if(VAL_TYPE(ap->idx) == VAL_TYPE(val)) { + + switch(VAL_TYPE(val)) { + case V_STRING: b=(!strcmp(ap->idx->v.data, val->v.data)); break; + case V_BASE: b=(unival(ap->idx)==unival(val)); break; + case V_REF: + if(sial_defbsize()==4) + b=(ap->idx->v.ul==val->v.ul); + else + b=(ap->idx->v.ull==val->v.ull); + break; + default: + sial_rerror(&vnode->pos, "Invalid indexing type %d", VAL_TYPE(val)); + } + if(b) break; + } + + } + } + sial_freeval(val); + sial_freeval(varr); + return b; +} + +/* + The actual for(i in array) core... +*/ +void +sial_walkarray(node_t*varnode, node_t*arrnode, void (*cb)(void *), void *data) +{ +value_t *v; +value_t *av; +array_t*ap, *apr; + + sial_setini(varnode); + v=NODE_EXE(varnode); + + av=NODE_EXE(arrnode); + + if(av->arr) { + + for(apr=av->arr, ap=apr->next; ap != apr; ap=ap->next) { + + /* we set the value_t of the variable */ + sial_setval(v,ap->idx); + + (cb)(data); + + } + } + sial_freeval(v); + sial_freeval(av); +} + +/* scan the current array for a specific index and return value_t + XXX should use some hashing tables here for speed and scalability */ +array_t* +sial_getarrval(array_t**app, value_t *idx) +{ +array_t*ap, *apr; + + /* sial_setarray(app); AAA comment out */ + apr=*app; + + for(ap=apr->next; ap != apr; ap=ap->next) { + + if(ap->idx->type.type == idx->type.type) { + + int b=0; + + switch(idx->type.type) { + case V_STRING: b=(!strcmp(ap->idx->v.data, idx->v.data)); + break; + case V_BASE: b=(unival(ap->idx)==unival(idx)); + break; + case V_REF: + if(sial_defbsize()==4) + b=(ap->idx->v.ul==idx->v.ul); + else + b=(ap->idx->v.ull==idx->v.ull); + break; + default: + sial_error("Invalid index type %d", idx->type.type); + } + + if(b) { + + return ap; + + } + } + } + + /* we have not found this index, create one */ + ap=(array_t*)sial_calloc(sizeof(array_t)); + ap->idx=sial_makebtype(0); + sial_dupval(ap->idx, idx); + + /* just give it a int value_t of 0 for now */ + ap->val=sial_makebtype(0); + + /* we must set the same refenrence number as the + upper level array_t*/ + ap->val->arr->ref=apr->ref; + + /* link it in */ + ap->prev=apr->prev; + ap->next=apr; + apr->prev->next=ap; + apr->prev=ap; + ap->ref=0; + return ap; +} + +value_t * +sial_intindex(value_t *a, int idx) +{ +value_t *v=sial_makebtype(idx); +array_t*ap=sial_getarrval(&a->arr, v); + + sial_dupval(v, ap->val); + return v; +} + +value_t * +sial_strindex(value_t *a, char *idx) +{ +value_t *v=sial_makestr(idx); +array_t*ap=sial_getarrval(&a->arr, v); + + sial_dupval(v, ap->val); + return v; +} + + +void +sial_setarrbval(array_t*a, int val) +{ + sial_defbtype(a->val, (ull)val); +} + +array_t* +sial_addarrelem(array_t**arr, value_t *idx, value_t *val) +{ +array_t*na; + + na=sial_getarrval(arr, idx); + + /* copy new val over */ + sial_freeval(na->val); + na->val=val; + + return na; +} + +/* insert a variable at the end of the list */ +static void +sial_varinsert(var_t*v) +{ +int i; + + for(i=svlev-1;i>=0;i--) { + + if(svs[i].type==S_AUTO) { + + sial_enqueue(svs[i].svs, v); + break; + } + } +} + +/* Dupicate and add a set of variables. Used to setup a function execution. + The new veriables are the actual parameters of the function so we mark them + As being initialized. +*/ +void +sial_add_auto(var_t*nv) +{ + nv->ini=1; + sial_varinsert(nv); +} + +void +sial_valindex(value_t *var, value_t *idx, value_t *ret) +{ + if(is_ctype(idx->type.type)) { + + sial_error("Invalid indexing type"); + + } else { + + array_t*a; + + a=sial_getarrval(&var->arr, idx); + + /* this is the first level of indexing through a variable */ + sial_dupval(ret, a->val); + ret->set=1; + ret->setval=a->val; + } +} + +void +sial_addvalarray(value_t*v, value_t*idx, value_t*val) +{ + sial_addarrelem(&v->arr, idx, val); + sial_freeval(idx); +} + +static void +prtval(value_t*v) +{ +value_t*fmt=sial_makestr("%?"); + + sial_printf(fmt, v, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); + sial_freeval(fmt); +} + +static void +prlevel(char *name, value_t*root, int level) +{ +ARRAY_S *arr; + + for(arr=root->arr->next; arr != root->arr; arr=arr->next) { + + printf("%*s%s[", level*3, "", name); + prtval(arr->idx); + printf("]="); + prtval(arr->val); + printf("\n"); + prlevel(name, arr->val, level+1); + } +} + +/* sial_prarr builtin */ +value_t* +sial_prarr(value_t*vname, value_t*root) +{ +char *name=sial_getptr(vname, char); + printf("%s=", name); + prtval(root); + printf("\n"); + prlevel(name, root, 1); + return sial_makebtype(0); +} + +var_t* +sial_newvar(char *name) +{ +var_t*v=sial_calloc(sizeof(var_t)); +char *myname=sial_alloc(strlen(name)+1); + + TAG(myname); + strcpy(myname,name); + v->name=myname; + v->v=sial_makebtype(0); + v->v->setval=v->v; + v->next=v->prev=v; + return v; +} + + +typedef struct { + node_t*n; + char name[1]; +} vnode_t ; + +static int insizeof=0; +void sial_setinsizeof(int v) { insizeof=v;} + +value_t * +sial_exevar(void *arg) +{ +vnode_t *vn = arg; +value_t *nv; +var_t*curv; +srcpos_t pos; + + sial_curpos(&vn->n->pos, &pos); + + if(!(curv=sial_getvarbyname(vn->name, 0, 0))) { + + sial_error("Oops! Var ref1.[%s]", vn->name); + + } + if(!curv->ini && !insizeof) { + + sial_error("Variable [%s] used before being initialized", curv->name); + + } + + nv=sial_newval(); + sial_dupval(nv,curv->v); + nv->set=1; + nv->setval=curv->v; + nv->setfct=sial_setfct; + + sial_curpos(&pos, 0); + + return nv; +} + +/* make sure a variable is flaged as being inited */ +void +sial_setini(node_t*n) +{ + if((void*)n->exe == (void*)sial_exevar) { + + var_t*v=sial_getvarbyname(((vnode_t*)(n->data))->name, 0, 0); + v->ini=1; + } +} + + +/* get the name of a function through a variable */ +char * +sial_vartofunc(node_t*name) +{ +char *vname=NODE_NAME(name); +value_t *val; + + /* if the nore is a general expression, then vname is 0 */ + if(!vname) { + + val=sial_exenode(name); + + } else { + + var_t*v; + + v=sial_getvarbyname(vname, 1, 1); + if(!v) return vname; + val=v->v; + } + + switch(val->type.type) + { + case V_STRING: + { + char *p=sial_alloc(val->type.size+1); + /* return the value_t of that string variable */ + strcpy(p, val->v.data); + sial_free(vname); + return p; + } + default: + /* return the name of the variable itself */ + sial_error("Invalid type for function pointer, expected 'string'."); + return vname; + } +} + +char * +sial_namevar(vnode_t*vn) +{ +char *p; + + p=sial_strdup(vn->name); + TAG(p); + return p; +} + +static void +sial_freevnode(vnode_t*vn) +{ + sial_free(vn); +} + +/* + create or return existing variable node. +*/ +node_t* +sial_newvnode(char *name) +{ +node_t*n=sial_newnode(); +vnode_t*vn=sial_alloc(sizeof(vnode_t)+strlen(name)+1); + + TAG(vn); + + strcpy(vn->name, name); + n->exe=(xfct_t)sial_exevar; + n->free=(ffct_t)sial_freevnode; + n->name=(nfct_t)sial_namevar; + n->data=vn; + vn->n=n; + + sial_setpos(&n->pos); + + return n; +} + +#define TO (*to) +#define FRM (*frm) + +void +sial_cparrelems(array_t**to, array_t**frm) +{ +array_t*ap; + + if(FRM) { + + sial_setarray(to); + for(ap=FRM->next; ap!=FRM; ap=ap->next) { + + array_t*na=sial_calloc(sizeof(array_t)); + + /* copy value_ts */ + sial_dupval(na->idx, ap->idx); + sial_dupval(na->val, ap->val); + + /* link it in */ + na->prev=TO->prev; + na->next=TO; + TO->prev->next=na; + TO->prev=na; + na->ref=1; + + /* copy that branch */ + sial_cparrelems(&na->val->arr, &ap->val->arr); + } + } +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.y /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.y --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/libsial/sial.y 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/libsial/sial.y 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,436 @@ +%{ +/* + * Copyright 2001 Silicon Graphics, Inc. All rights reserved. + */ +#include "sial.h" +#include +#include +#include +#include +// to help resolve type name versus var name ambiguity... +#define VARON needvar=1; +#define VAROFF needvar=0; +static int sial_toctype(int); +int sialerror(char *); +%} + +%union { + node_t *n; + char *s; + int i; + type_t *t; + dvar_t *d; + var_t *v; +} + +%token STATIC DOBLK WHILE RETURN TDEF EXTERN VARARGS +%token CHAR SHORT FLOAT DOUBLE VOID INT UNSIGNED LONG SIGNED VOLATILE REGISTER STRTYPE CONST +%token BREAK CONTINUE DO FOR FUNC +%token IF PATTERN BASETYPE +%token STRUCT ENUM UNION +%token SWITCH CASE DEFAULT +%token ELSE CEXPR +%token VAR NUMBER STRING +%token TYPEDEF +%token '(' ')' ',' ';' '{' '}' + +%type termlist term opt_term opt_termlist +%type stmt stmtlist expstmt stmtgroup +%type var opt_var c_string +%type for if while switch case caselist caseconstlist caseconst + +%type dvar dvarlist dvarini + +%type one_var_decl var_decl_list var_decl farglist decl_list + +%type type ctype rctype btype_list tdef typecast +%type storage_list string type_decl +%type ctype_decl +%type btype storage ctype_tok print + +%right ASSIGN ADDME SUBME MULME DIVME MODME ANDME XORME +%right ORME SHLME SHRME +%right '?' +%left IN +%left BOR +%left BAND +%left OR +%left XOR +%left AND +%left EQ NE +%left GE GT LE LT +%left SHL SHR +%left ADD SUB +%left MUL DIV MOD +%left PRINT PRINTO PRINTD PRINTX TAKE_ARR +%right ADROF PTRTO PTR UMINUS SIZEOF TYPECAST POSTINCR PREINCR POSTDECR PREDECR INCR DECR FLIP NOT +%left ARRAY CALL INDIRECT DIRECT + +%% + +file: + /* empty */ + | fileobj + | file fileobj + ; + +fileobj: + function + | var_decl ';' { sial_file_decl($1); } + | ctype_decl ';' { ; } + ; + +function: + one_var_decl stmtgroup + { sial_newfunc($1, $2); } + ; + + +for: + FOR '(' opt_termlist ';' opt_term ';' opt_termlist ')' expstmt + { $$ = sial_newstat(FOR, 4, $3, $5, $7, $9); } + | FOR '(' var IN term ')' expstmt + { $$ = sial_newstat(IN, 3, $3, $5, $7); } + ; + +if: + IF '(' {VARON} term {VAROFF} ')' { $$ = $4; } + ; + +switch : + SWITCH '(' {VARON} term {VAROFF} ')' '{' caselist '}' + + { $$ = sial_newstat(SWITCH, 2, $4, $8); } + ; + +caselist: + case + | caselist case { $$ = sial_addcase($1, $2); } + ; + +case : + caseconstlist stmtlist { $$ = sial_newcase($1, $2); } + ; + +caseconst: + CASE term ':' { $$ = sial_caseval(0, $2); } + | DEFAULT ':' { $$ = sial_caseval(1, 0); } + ; + +caseconstlist: + caseconst + | caseconstlist caseconst { $$ = sial_addcaseval($1, $2); } + ; + +opt_term: + /* empty */ { $$ = 0; } + | term + ; + +termlist: + term + | termlist ',' term { $$ = sial_sibling($1, $3); } + ; + +opt_termlist: + /* empty */ { $$ = 0; } + | termlist + ; + +stmt: + termlist ';' { $$ = sial_newstat(PATTERN, 1, $1); } + | while expstmt { $$ = sial_newstat(WHILE, 2, $1, $2); } + | switch + | for + | if expstmt ELSE expstmt { $$ = sial_newstat(IF, 3, $1, $2, $4); } + | if expstmt { $$ = sial_newstat(IF, 2, $1, $2); } + | DO expstmt WHILE '(' term ')' ';' + { $$ = sial_newstat(DO, 2, $2, $5); } + | RETURN term ';' { $$ = sial_newstat(RETURN, 1, $2); } + | RETURN ';' { $$ = sial_newstat(RETURN, 1, NULLNODE); } + | BREAK ';' { $$ = sial_newstat(BREAK, 0); } + | CONTINUE ';' { $$ = sial_newstat(CONTINUE, 0); } + | ';' { $$ = 0; } + ; + +stmtlist: + /* empty */ { $$ = 0; } + | stmt + | stmtgroup + | stmtlist stmt { $$ = sial_addstat($1, $2); } + | stmtlist stmtgroup { $$ = sial_addstat($1, $2); } + ; + +stmtgroup: + '{' decl_list stmtlist '}' { $$ = sial_stat_decl($3, $2); } + | '{' stmtlist '}' { $$ = sial_stat_decl($2, 0); } + ; + +expstmt: + stmt + | stmtgroup + ; + +term: + + term '?' term ':' term %prec '?' + { $$ = sial_newop(CEXPR, 3, $1, $3, $5); } + | term BOR term { $$ = sial_newop(BOR, 2, $1, $3); } + | term BAND term { $$ = sial_newop(BAND, 2, $1, $3); } + | NOT term { $$ = sial_newop(NOT, 1, $2); } + | term ASSIGN term { $$ = sial_newop(ASSIGN, 2, $1, $3); } + | term EQ term { $$ = sial_newop(EQ, 2, $1, $3); } + | term GE term { $$ = sial_newop(GE, 2, $1, $3); } + | term GT term { $$ = sial_newop(GT, 2, $1, $3); } + | term LE term { $$ = sial_newop(LE, 2, $1, $3); } + | term LT term { $$ = sial_newop(LT, 2, $1, $3); } + | term IN term { $$ = sial_newop(IN, 2, $1, $3); } + | term NE term { $$ = sial_newop(NE, 2, $1, $3); } + | '(' term ')' { $$ = $2; } + | term ANDME term { $$ = sial_newop(ANDME, 2, $1, $3); } + | PTR term %prec PTRTO { $$ = sial_newptrto($1, $2); } + | AND term %prec ADROF { $$ = sial_newadrof($2); } + | term OR term { $$ = sial_newop(OR, 2, $1, $3); } + | term ORME term { $$ = sial_newop(ORME, 2, $1, $3); } + | term XOR term { $$ = sial_newop(XOR, 2, $1, $3); } + | term XORME term { $$ = sial_newop(XORME, 2, $1, $3); } + | term SHR term { $$ = sial_newop(SHR, 2, $1, $3); } + | term SHRME term { $$ = sial_newop(SHRME, 2, $1, $3); } + | term SHL term { $$ = sial_newop(SHL, 2, $1, $3); } + | term SHLME term { $$ = sial_newop(SHLME, 2, $1, $3); } + | term ADDME term { $$ = sial_newop(ADDME, 2, $1, $3); } + | term SUBME term { $$ = sial_newop(SUBME, 2, $1, $3); } + | term MULME term { $$ = sial_newop(MULME, 2, $1, $3); } + | term DIV term { $$ = sial_newop(DIV, 2, $1, $3); } + | term DIVME term { $$ = sial_newop(DIVME, 2, $1, $3); } + | term MODME term { $$ = sial_newop(MODME, 2, $1, $3); } + | term MOD term { $$ = sial_newop(MOD, 2, $1, $3); } + | term SUB term { $$ = sial_newop(SUB, 2, $1, $3); } + | term ADD term { $$ = sial_newop(ADD, 2, $1, $3); } + | term PTR term %prec MUL { $$ = sial_newmult($1, $3, $2); } + | term AND term { $$ = sial_newop(AND, 2, $1, $3); } + | SUB term %prec UMINUS { $$ = sial_newop(UMINUS, 1, $2); } + | '~' term %prec FLIP { $$ = sial_newop(FLIP, 1, $2); } + | '+' term %prec UMINUS { $$ = $2; } + | term '(' ')' %prec CALL { $$ = sial_newcall($1, NULLNODE); } + | term '(' termlist ')' %prec CALL { $$ = sial_newcall($1, $3); } + | DECR term { $$ = sial_newop(PREDECR, 1, $2); } + | INCR term { $$ = sial_newop(PREINCR, 1, $2); } + | term DECR { $$ = sial_newop(POSTDECR, 1, $1); } + | term INCR { $$ = sial_newop(POSTINCR, 1, $1); } + | term INDIRECT var { $$ = sial_newmem(INDIRECT, $1, $3); } + | term INDIRECT tdef { $$ = sial_newmem(INDIRECT, $1, sial_tdeftovar($3)); } // resolve ambiguity + | term DIRECT var { $$ = sial_newmem(DIRECT, $1, $3); } + | term DIRECT tdef { $$ = sial_newmem(DIRECT, $1, sial_tdeftovar($3)); } // resolve ambiguity + | term '[' term ']' %prec ARRAY + { $$ = sial_newindex($1, $3); } + | NUMBER + | c_string + | typecast term %prec TYPECAST { $$ = sial_typecast($1, $2); } + | SIZEOF '(' var_decl ')' + { $$ = sial_sizeof(sial_newcast($3), 1); } + | SIZEOF term { $$ = sial_sizeof($2, 2); } + | print '(' var_decl ')' %prec SIZEOF + { $$ = sial_newptype($3); } + | print term %prec SIZEOF { $$ = sial_newpval($2, $1); } + | TAKE_ARR '(' term ',' term ')' { $$ = $3; /* sial_newtakearr($3, $5); */ } + | var + ; + +print: + PRINT + | PRINTX + | PRINTO + | PRINTD + ; + +typecast: + '(' var_decl ')' { $$ = sial_newcast($2); } + ; + +var_decl_list: + var_decl ';' + | var_decl_list var_decl ';' { sial_addnewsvs($1, $1, $2); $$=$1; } + ; + +decl_list: + ctype_decl ';' { $$ = 0; } + | var_decl ';' { $$ = $1; } + | decl_list var_decl ';' { $$=$1; if($1 && $2) sial_addnewsvs($1, $1, $2); } + | decl_list ctype_decl ';' { $$ = $1; } + ; + + +var_decl: + type_decl dvarlist { needvar=0; $$ = sial_vardecl($2, $1); } + ; + +one_var_decl: + type_decl dvar { needvar=0; $$ = sial_vardecl($2, $1); } + ; + +type_decl: + type { $$=$1; needvar++; } + | storage_list { $$=$1; needvar++; } + | type storage_list { $$=sial_addstorage($1, $2); needvar++; } + | storage_list type { $$=sial_addstorage($2, $1); needvar++; } + | type_decl PTR { $$=$1; sial_pushref($1, $2);; needvar++; } + | type_decl storage_list { $$=sial_addstorage($1, $2); needvar++; } + ; + +type: + ctype + | tdef + | btype_list + | string + | ctype_decl + ; + +ctype_decl: + ctype_tok var '{' {sial_startctype(sial_toctype($1),$2);instruct++;} var_decl_list '}' + { instruct--; $$ = sial_ctype_decl(sial_toctype($1), $2, $5); } + | ctype_tok tdef '{' {sial_startctype(sial_toctype($1),lastv=sial_tdeftovar($2));instruct++;} var_decl_list '}' + { instruct--; $$ = sial_ctype_decl(sial_toctype($1), lastv, $5); } + | ctype_tok var '{' dvarlist '}' + { $$ = sial_enum_decl(sial_toctype($1), $2, $4); } + | ctype_tok tdef '{' dvarlist '}' + { $$ = sial_enum_decl(sial_toctype($1), sial_tdeftovar($2), $4); } + ; + +ctype: + rctype { $$ = $1; } + | ctype_tok '{' {instruct++;} var_decl_list '}' + { instruct--; $$ = sial_ctype_decl(sial_toctype($1), 0, $4); } + | ctype_tok '{' dvarlist '}' + { $$ = sial_enum_decl(sial_toctype($1), 0, $3); } + ; + +farglist: + /* empty */ { $$ = 0; } + | one_var_decl { $$ = $1; } + | farglist ',' one_var_decl { + if(!$1) sial_error("Syntax error"); + if($3) sial_addnewsvs($1, $1, $3); $$=$1; + } + | farglist ',' VARARGS { + if(!$1) sial_error("Syntax error"); + sial_addtolist($1, sial_newvar(S_VARARG)); $$=$1; + } + ; + + +string: + STRTYPE { + type_t *t; + t=sial_newtype(); + t->type=V_STRING; + t->typattr=0; + $$ = t; + } + ; + +rctype: + ctype_tok var { $$ = sial_newctype(sial_toctype($1), $2); } + | ctype_tok tdef { $$ = sial_newctype(sial_toctype($1), sial_tdeftovar($2)); } + ; + +ctype_tok: + STRUCT + | ENUM + | UNION + ; + +btype_list: + btype { $$ = sial_newbtype($1); } + | btype_list btype { $$ = sial_addbtype($1, $2); } + ; + +c_string: + STRING { $$ = $1; } + | c_string STRING { $$ = sial_strconcat($1, $2); } + ; + +btype: + LONG + | CHAR + | INT + | SHORT + | UNSIGNED + | SIGNED + | DOUBLE + | FLOAT + | VOID + ; + +storage_list: + storage { $$ = sial_newbtype($1); } + | storage_list storage { sial_error("Only one storage class can be speficied"); } + ; + +storage: + STATIC + | VOLATILE + | REGISTER + | TDEF + | EXTERN + | CONST + ; + +dvarlist: + dvarini { $$ = $1; } + | dvarlist ',' dvarini { $$ = sial_linkdvar($1, $3); } + ; + +dvarini: + dvar { $$ = $1; } + | dvar ASSIGN term { $$ = sial_dvarini($1, $3); } + ; + +dvar: + opt_var { $$ = sial_newdvar($1); needvar=0; } + | ':' term { $$ = sial_dvarfld(sial_newdvar(0), $2); } + | dvar ':' term { $$ = sial_dvarfld($1, $3); } + | dvar '[' opt_term ']' { $$ = sial_dvaridx($1, $3); } + | PTR dvar { $$ = sial_dvarptr($1, $2); } + | dvar '(' ')' { $$ = sial_dvarfct($1, 0); } + | dvar '(' farglist ')' { $$ = sial_dvarfct($1, $3); } + | '(' dvar ')' { $$ = $2; } + ; + +opt_var: + /* empty */ { $$ = 0; } + | var { $$ = $1; } + ; + +var: + VAR { $$ = $1; } + ; + +tdef: + TYPEDEF { $$ = $1; } + ; + +while: + WHILE '(' {VARON} term {VAROFF} ')' { $$ = $4; } + ; + +%% + +static int +sial_toctype(int tok) +{ + switch(tok) { + case STRUCT: return V_STRUCT; + case ENUM: return V_ENUM; + case UNION: return V_UNION; + default: sial_error("Oops sial_toctype!"); return 0; + } +} + +/* + This file gets included into the yacc specs. + So the "sial.h" is already included +*/ + +int sialerror(char *p) { sial_error(p); return 0; } + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/Makefile /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/Makefile --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/Makefile 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/Makefile 2007-11-19 15:01:37.000000000 -0600 @@ -1,8 +1,8 @@ # # Makefile for building crash shared object extensions # -# Copyright (C) 2005 David Anderson -# Copyright (C) 2005 Red Hat, Inc. All rights reserved. +# Copyright (C) 2005, 2007 David Anderson +# Copyright (C) 2005, 2007 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,25 +17,31 @@ # To build the extension shared objects in this directory, run # "make extensions" from the top-level directory. # -# To add a new extension object: -# -# - add the new source file to the EXTENSION_SOURCE_FILES list -# in the top-level Makefile -# - add the object file name to the EXTENSION_OBJECT_FILES list -# in the top-level Makefile -# - create a compile stanza below, typically using "echo.so" as -# a base template. +# To add a new extension object, simply copy your module's .c file +# to this directory, and it will be built automatically using +# the "standard" compile line. If that compile line does not +# suffice, create a .mk file with the same prefix as the .c file, +# and that makefile will be invoked. # -all: link_defs $(OBJECTS) +CONTRIB_SO := $(patsubst %.c,%.so,$(wildcard *.c)) + +all: link_defs $(CONTRIB_SO) link_defs: @if [ ! -f defs.h ]; then \ ln -s ../defs.h; fi -echo.so: ../defs.h echo.c - gcc -nostartfiles -shared -rdynamic -o echo.so echo.c -fPIC -D$(TARGET) +$(CONTRIB_SO): %.so: %.c + @if [ -f $*.mk ]; then \ + make -f $*.mk; \ + else \ + echo "gcc -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS)"; \ + gcc -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS); \ + fi -dminfo.so: ../defs.h dminfo.c - gcc -nostartfiles -shared -rdynamic -o dminfo.so dminfo.c -fPIC -D$(TARGET) - +clean: + rm -f $(CONTRIB_SO) + @for MAKEFILE in `grep -sl "^clean:" *.mk`; \ + do make --no-print-directory -f $$MAKEFILE clean; \ + done diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/sial.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/sial.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/sial.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/sial.c 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,1021 @@ +/* + * $Id: sial.c,v 1.5 2007/11/13 21:03:15 anderson Exp $ + * + * This file is part of lcrash, an analysis tool for Linux memory dumps. + * + * Created by Silicon Graphics, Inc. + * Contributions by IBM, and others + * + * Copyright (C) 1999 - 2005 Silicon Graphics, Inc. All rights reserved. + * Copyright (C) 2001, 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. See the file COPYING for more + * information. + */ + +#include "gdb-6.1/gdb/defs.h" +#include "target.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +#include +#include +#include +#include + +///////////////////////////////////////////////////////////////////////// +// some stuff from crash's defs.h, file which cannot be included here. +// Hate to do this but this is a quick port. +// If anyone cares to work on the include and defs structure to make +// this work cleanly... +// +/* + * Global data (global_data.c) + */ +extern char *args[]; +extern int argcnt; +extern int argerrs; +#define SYNOPSIS (0x1) +#define COMPLETE_HELP (0x2) +#define PIPE_TO_LESS (0x4) +#define KVADDR (0x1) +#define QUIET (0x4) + +typedef void (*cmd_func_t)(void); + +struct command_table_entry { /* one for each command in menu */ + char *name; + cmd_func_t func; + char **help_data; + ulong flags; +}; +extern FILE *fp; +extern char *crash_global_cmd(); + +// +///////////////////////////////////////////////////////////////////////// +/* + This is the glue between the sial interpreter and crash. +*/ + +static int +apigetmem(ull iaddr, void *p, int nbytes) +{ + return readmem(iaddr, KVADDR, p, nbytes, NULL, QUIET); +} + +// Since crash is target dependant (build for the +static uint8_t apigetuint8(void* ptr) +{ +uint8_t val; + if(!readmem((unsigned long)ptr, KVADDR, (char*)&val, sizeof val, NULL, QUIET)) return (uint8_t)-1; + return val; +} + +static uint16_t apigetuint16(void* ptr) +{ +uint16_t val; + if(!readmem((unsigned long)ptr, KVADDR, (char*)&val, sizeof val, NULL, QUIET)) return (uint16_t)-1; + return val; +} + +static uint32_t apigetuint32(void* ptr) +{ +uint32_t val; + if(!readmem((unsigned long)ptr, KVADDR, (char*)&val, sizeof val, NULL, QUIET)) return (uint32_t)-1; + return val; +} + +static uint64_t apigetuint64(void* ptr) +{ +uint64_t val; + if(!readmem((unsigned long)ptr, KVADDR, (char*)&val, sizeof val, NULL, QUIET)) return (uint64_t)-1; + return val; +} + +static int +apiputmem(ull iaddr, void *p, int nbytes) +{ + return 1; +} + +/* extract a complex type (struct, union and enum) */ +static int +apigetctype(int ctype, char *name, TYPE_S *tout) +{ + struct symbol *sym; + struct type *type; + int v=0; + + sial_dbg_named(DBG_TYPE, name, 2, "Looking for type %d name [%s] in struct domain...", ctype, name); + sym = lookup_symbol(name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); + if(!sym) { + sial_dbg_named(DBG_TYPE, name, 2, "Not found.\nLooking for type %d name [%s] in var domain...", ctype, name); + sym = lookup_symbol(name, 0, VAR_DOMAIN, 0, (struct symtab **) NULL); + if(sym) { + sial_dbg_named(DBG_TYPE, name, 2, "found class=%d\n", sym->aclass); + if(sym->aclass == LOC_TYPEDEF) v=1; + } + } + + if (sym) { + type=sym->type; + if(sial_is_typedef(ctype) && v) goto match; + switch(TYPE_CODE(type)) { + case TYPE_CODE_TYPEDEF: case TYPE_CODE_INT: + if(sial_is_typedef(ctype)) goto match; break; + case TYPE_CODE_ENUM: if(sial_is_enum(ctype)) goto match; break; + case TYPE_CODE_STRUCT: if(sial_is_struct(ctype)) goto match; break; + case TYPE_CODE_UNION: if(sial_is_union(ctype)) goto match; break; + } + sial_dbg_named(DBG_TYPE, name, 2, "Found but no match.\n"); + } + else sial_dbg_named(DBG_TYPE, name, 2, "Not Found.\n"); + + return 0; + +match: + sial_dbg_named(DBG_TYPE, name, 2, "Found.\n"); + /* populate */ + sial_type_settype(tout, ctype); + sial_type_setsize(tout, TYPE_LENGTH(type)); + sial_type_setidx(tout, (ull)(unsigned long)type); + sial_pushref(tout, 0); + return 1; +} + +/* set idx value to actual array indexes from specified size */ +static void +sial_setupidx(TYPE_S*t, int ref, int nidx, int *idxlst) +{ + /* put the idxlst in index size format */ + if(nidx) { + + int i; + + for(i=0;itype; + } + } + + switch(TYPE_CODE(type)) { + + /* typedef inserts a level of reference to the 1'dactual type */ + case TYPE_CODE_PTR: + + ref++; + type=TYPE_TARGET_TYPE(type); + /* this could be a void*, in which case the drill down stops here */ + if(!type) { + + /* make it a char* */ + sial_parsetype("char", t, ref); + return 0; + + } + break; + + /* handle pointer to functions */ + case TYPE_CODE_FUNC: + + fctflg=1; + type=TYPE_TARGET_TYPE(type); + break; + + /* Is this an array ? if so then just skip this type info and + we only need information on the elements themselves */ + case TYPE_CODE_ARRAY: + if(!idxlst) idxlst=sial_calloc(sizeof(int)*(MAXIDX+1)); + if(nidx >= MAXIDX) sial_error("Too many indexes! max=%d\n", MAXIDX); + if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0) + { + idxlst[nidx++]=TYPE_LENGTH (type) / TYPE_LENGTH (check_typedef(TYPE_TARGET_TYPE (type))); + } + type=TYPE_TARGET_TYPE(type); + break; + + /* typedef points to a typedef itself */ + case TYPE_CODE_TYPEDEF: + type=TYPE_TARGET_TYPE(type); + break; + + case TYPE_CODE_INT: + + sial_parsetype(tstr=TYPE_NAME(type), t, 0); + type=0; + break; + + case TYPE_CODE_UNION: + sial_type_mkunion(t); + goto label; + + case TYPE_CODE_ENUM: + sial_type_mkenum(t); + goto label; + + case TYPE_CODE_STRUCT: + { + sial_type_mkstruct(t); + +label: + sial_type_setsize(t, TYPE_LENGTH(type)); + sial_type_setidx(t, (ull)(unsigned long)type); + tstr=TYPE_TAG_NAME(type); + type=0; + } + break; + + /* we don;t have all the info about it */ + case TYPE_CODE_VOID: + sial_parsetype("int", t, 0); + type=0; + break; + + + default: + sial_error("Oops drilldowntype"); + break; + } + + + } + sial_setupidx(t, ref, nidx, idxlst); + if(fctflg) sial_type_setfct(t, 1); + sial_pushref(t, ref+(nidx?1:0)); + if(tstr) return sial_strdup(tstr); + return sial_strdup(""); +} + +static char * +apigetrtype(ull idx, TYPE_S *t) +{ + return drilldowntype((struct type*)(unsigned long)(idx), t); +} + +/* + Return the name of a symbol at an address (if any) +*/ +static char* +apifindsym(char *p) +{ + return NULL; +} + + +/* + Get the type, size and position information for a member of a structure. +*/ +static char* +apimember(char *mname, ull tnum, TYPE_S *tm, MEMBER_S *m, ull *lnum) +{ +struct type *type=(struct type*)(unsigned long)tnum; +int midx; +#define LASTNUM (*lnum) + + /* if we're being asked the next member in a getfirst/getnext sequence */ + if(mname && !mname[0] && LASTNUM) { + + midx = LASTNUM; + + } else { + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + return 0; + } + if ((TYPE_CODE(type) != TYPE_CODE_STRUCT) && (TYPE_CODE(type) != TYPE_CODE_UNION)) { + return 0; + } + midx=0; + } + while(midx < TYPE_NFIELDS(type)) { + + if (!mname || !mname[0] || !strcmp(mname, TYPE_FIELD_NAME(type, midx))) { + + check_typedef(TYPE_FIELD_TYPE(type, midx)); + sial_member_soffset(m, TYPE_FIELD_BITPOS(type, midx)/8); + sial_member_ssize(m, TYPE_FIELD_TYPE(type, midx)->length); + sial_member_snbits(m, TYPE_FIELD_BITSIZE(type, midx)); + sial_member_sfbit(m, TYPE_FIELD_BITSIZE(type, midx)); + sial_member_sname(m, TYPE_FIELD_NAME(type, midx)); + LASTNUM=midx+1; + return drilldowntype(TYPE_FIELD_TYPE(type, midx), tm); + } + midx++; + } + return 0; +} + +/* + This function gets the proper allignment value for a type. +*/ +static int +apialignment(ull idx) +{ +struct type *type=(struct type *)(unsigned long)idx; + + while(1) + { + switch(TYPE_CODE(type)) { + + case TYPE_CODE_ARRAY: case TYPE_CODE_TYPEDEF: + type=TYPE_TARGET_TYPE(type); + break; + + case TYPE_CODE_STRUCT: + case TYPE_CODE_UNION: + { + int max=0, cur; + int midx=0; + + while(midx < TYPE_NFIELDS(type)) { + cur=apialignment((ull)(unsigned long)TYPE_FIELD_TYPE(type, midx)); + if(cur > max) max=cur; + midx++; + } + return max; + } + + + case TYPE_CODE_PTR: + case TYPE_CODE_ENUM: + case TYPE_CODE_INT: + + return TYPE_LENGTH (type); + + default: + + sial_error("Oops apialignment"); + } + } +} + +/* get the value of a symbol */ +static int +apigetval(char *name, ull *val) +{ + if (symbol_exists(name)) { + *val=symbol_value(name); + return 1; + } + return 0; +} + +/* + Get the list of enum symbols. +*/ +ENUM_S* +apigetenum(char *name) +{ + struct symbol *sym; + + sym = lookup_symbol(name, 0, STRUCT_DOMAIN, 0, (struct symtab **) NULL); + if (sym && TYPE_CODE(sym->type)==TYPE_CODE_ENUM) { + ENUM_S *et=0; + struct type *type=sym->type; + int n=0; + while(n < TYPE_NFIELDS (type)) { + et=sial_add_enum(et, sial_strdup(TYPE_FIELD_NAME(type, n)), TYPE_FIELD_BITPOS(type, n)); + n++; + } + return et; + } + return 0; +} + +/* + Return the list of preprocessor defines. + For Irix we have to get the die for a startup.c file. + Of dwarf type DW_TAG_compile_unit. + the DW_AT_producer will contain the compile line. + + We then need to parse that line to get all the -Dname[=value] +*/ +DEF_S * +apigetdefs(void) +{ +DEF_S *dt=0; +int i; +static struct linuxdefs_s { + + char *name; + char *value; + +} linuxdefs[] = { + + {"crash", "1"}, + {"linux", "1"}, + {"__linux", "1"}, + {"__linux__", "1"}, + {"unix", "1"}, + {"__unix", "1"}, + {"__unix__", "1"}, + // helper macros + {"LINUX_2_2_16", "(LINUX_RELEASE==0x020210)"}, + {"LINUX_2_2_17", "(LINUX_RELEASE==0x020211)"}, + {"LINUX_2_4_0", "(LINUX_RELEASE==0x020400)"}, + {"LINUX_2_2_X", "(((LINUX_RELEASE) & 0xffff00) == 0x020200)"}, + {"LINUX_2_4_X", "(((LINUX_RELEASE) & 0xffff00) == 0x020400)"}, + {"LINUX_2_6_X", "(((LINUX_RELEASE) & 0xffff00) == 0x020600)"}, +#ifdef i386 + {"i386", "1"}, + {"__i386", "1"}, + {"__i386__", "1"}, +#endif +#ifdef s390 + {"s390", "1"}, + {"__s390", "1"}, + {"__s390__", "1"}, +#endif +#ifdef s390x + {"s390x", "1"}, + {"__s390x", "1"}, + {"__s390x__", "1"}, +#endif +#ifdef __ia64__ + {"ia64", "1"}, + {"__ia64", "1"}, + {"__ia64__", "1"}, + {"__LP64__", "1"}, + {"_LONGLONG", "1"}, + {"__LONG_MAX__", "9223372036854775807L"}, +#endif +#ifdef ppc64 + {"ppc64", "1"}, + {"__ppc64", "1"}, + {"__ppc64__", "1"}, +#endif + }; + +static char *untdef[] = { + "clock", + "mode", + "pid", + "uid", + "xtime", + "init_task", + "size", + "type", + "level", + 0 +}; + +#if 0 +How to extract basic set of -D flags from the kernel image + + prod=sial_strdup(kl_getproducer()); + for(p=prod; *p; p++) { + + if(*p=='-' && *(p+1)=='D') { + + char *def=p+2; + + while(*p && *p != '=' && *p != ' ') p++; + + if(!*p || *p == ' ') { + + *p='\0'; + dt=sial_add_def(dt, sial_strdup(def), sial_strdup("1")); + + } else { + + char *val=p+1; + + *p++='\0'; + while(*p && *p != ' ') p++; + *p='\0'; + + dt=sial_add_def(dt, sial_strdup(def), sial_strdup(val)); + } + } + } +#endif + + /* remove some tdef with very usual identifier. + could also be cases where the kernel defined a type and variable with same name e.g. xtime. + the same can be accomplished in source using #undef or forcing the evaluation of + a indentifier as a variable name ex: __var(xtime). + + I tried to make the grammar as unambiqguous as I could. + + If this becomes to much of a problem I might diable usage of all image typedefs usage in sial! + */ + { + char **tdefname=untdef; + while(*tdefname) sial_addneg(*tdefname++);; + + } + + /* insert constant defines from list above */ + for(i=0;i\n" + , S_MAJOR, S_MINOR); +} + +static void +run_callback(void) +{ +extern char *crash_global_cmd(); +FILE *ofp = NULL; + + if (fp) { + ofp = sial_getofile(); + sial_setofile(fp); + } + + sial_cmd(crash_global_cmd(), args, argcnt); + + if (ofp) + sial_setofile(ofp); +} + + +void +edit_cmd(void) +{ +int c, file=0; + while ((c = getopt(argcnt, args, "lf")) != EOF) { + switch(c) + { + case 'l': + sial_vilast(); + return; + break; + case 'f': + file++; + break; + default: + argerrs++; + break; + } + } + + if (argerrs) + cmd_usage(crash_global_cmd(), SYNOPSIS); + + else if(args[optind]) { + while(args[optind]) { + sial_vi(args[optind++], file); + } + } + else cmd_usage(crash_global_cmd(), SYNOPSIS); +} + +char *edit_help[]={ + "edit", + "Start a $EDITOR session of a sial function or file", + "<-f fileName>|", + "This command can be use during a tight development cycle", + "where frequent editing->run->editing sequences are executed.", + "To edit a known sial macro file use the -f option. To edit the file", + "at the location of a known function's declaration omit the -f option.", + "Use a single -l option to be brought to the last compile error location.", + "", + "EXAMPLES:", + " %s> edit -f ps", + " %s> edit ps", + " %s> edit ps_opt", + " %s> edit -l", + NULL +}; + + +// these control debug mode when parsing (pre-processor and compile) +int sialdebug=0, sialppdebug=0; + +void +load_cmd(void) +{ + if(argcnt< 2) cmd_usage(crash_global_cmd(), SYNOPSIS); + else { + sial_setofile(fp); + sial_loadunload(1, args[1], 0); + } +} + +char *load_help[]={ + "load", + "Load a sial file", + "|", + " Load a file or a directory. In the case of a directory", + " all files in that directory will be loaded.", + NULL + +}; + +void +unload_cmd(void) +{ + if(argcnt < 2) cmd_usage(crash_global_cmd(), SYNOPSIS); + else sial_loadunload(0, args[1], 0); +} + +char *unload_help[]={ + "unload", + "Unload a sial file", + "|", + " Unload a file or a directory. In the case of a directory", + " all files in that directory will be unloaded.", + NULL +}; + +void +sdebug_cmd(void) +{ + if(argcnt < 2) sial_msg("Current sial debug level is %d\n", sial_getdbg()); + else sial_setdbg(atoi(args[1])); +} + +char *sdebug_help[]={ + "sdebug", + "Print or set sial debug level", + "", + " Set the debug of sial. Without any parameter, shows the current debug level.", + NULL +}; + +void +sname_cmd(void) +{ + if(argcnt < 2) { + if(sial_getname()) sial_msg("Current sial name match is '%s'\n", sial_getname()); + else sial_msg("No name match specified yet.\n"); + } else sial_setname(args[1]); +} + +char *sname_help[]={ + "sname", + "Print or set sial name match.", + "", + " Set sial name string for matches. Debug messages that are object oriented", + " will only be displayed if the object name (struct, type, ...) matches this", + " value.", + NULL +}; + +void +sclass_cmd(void) +{ + if(argcnt < 2) { + char **classes=sial_getclass(); + sial_msg("Current sial classes are :"); + while(*classes) sial_msg("'%s' ", *classes++); + sial_msg("\n"); + + } + else { + int i; + for(i=1; i[, ]", + " Set sial debug classes. Only debug messages that are in the specified classes", + " will be displayed.", + NULL +}; + +#define NCMDS 100 +static struct command_table_entry command_table[NCMDS] = { + + {"edit", edit_cmd, edit_help}, + {"load", load_cmd, load_help}, + {"unload", unload_cmd, unload_help}, + {"sdebug", sdebug_cmd, sdebug_help}, + {"sname", sname_cmd, sname_help}, + {"sclass", sclass_cmd, sclass_help}, + {(char *)0 } +}; + +static void +add_sial_cmd(char *name, void (*cmd)(void), char **help, int flags) +{ +struct command_table_entry *cp; +struct command_table_entry *crash_cmd_table(); + + // check for a clash with native commands + for (cp = crash_cmd_table(); cp->name; cp++) { + if (!strcmp(cp->name, name)) { + sial_msg("Sial command name '%s' conflicts with native crash command.\n", name); + return; + } + } + + // make sure we have enough space for the new command + if(!command_table[NCMDS-2].name) { + for (cp = command_table; cp->name; cp++); + cp->name=sial_strdup(name); + cp->func=cmd; + cp->help_data=help; + cp->flags=flags; + } +} + +static void +rm_sial_cmd(char *name) +{ +struct command_table_entry *cp, *end; + + for (cp = command_table; cp->name; cp++) { + if (!strcmp(cp->name, name)) { + sial_free(cp->name); + memmove(cp, cp+1, sizeof *cp *(NCMDS-(cp-command_table)-1)); + break; + } + } +} + +/* + This function is called for every new function + generated by a load command. This enables us to + register new commands. + + We check here is the functions: + + fname_help() + fname_opt() + and + fname_usage() + + exist, and if so then we have a new command. + Then we associated (register) a function with + the standard sial callbacks. +*/ +void +reg_callback(char *name, int load) +{ +char fname[MAX_SYMNAMELEN+sizeof("_usage")+1]; +char *help_str, *opt_str; +char **help=malloc(sizeof *help * 5); + + if(!help) return; + snprintf(fname, sizeof(fname), "%s_help", name); + if(sial_chkfname(fname, 0)) { + help_str=sial_strdup((char*)(unsigned long)sial_exefunc(fname, 0)); + snprintf(fname, sizeof(fname), "%s_usage", name); + if(sial_chkfname(fname, 0)) { + if(load) { + opt_str=sial_strdup((char*)(unsigned long)sial_exefunc(fname, 0)); + help[0]=sial_strdup(name); + help[1]=""; + help[2]=sial_strdup(opt_str); + help[3]=sial_strdup(help_str); + help[4]=0; + add_sial_cmd(name, run_callback, help, 0); + return; + } + else rm_sial_cmd(name); + } + sial_free(help_str); + } + free(help); + return; +} + +/* + * The _fini() function is called if the shared object is unloaded. + * If desired, perform any cleanups here. + */ +void _fini() +{ + // need to unload any files we have loaded + +} + +VALUE_S *curtask(VALUE_S *v, ...) +{ +unsigned long get_curtask(); + return sial_makebtype((ull)get_curtask()); +} + +_init() /* Register the command set. */ +{ +#define LCDIR "/usr/share/sial/crash" +#define LCIDIR "include" +#define LCUDIR ".sial" + + + if(sial_open() >= 0) { + + char *path, *ipath; + char *homepath=0; + char *home=getenv("HOME"); + + /* set api, default size, and default sign for types */ +#ifdef i386 +#define SIAL_ABI ABI_INTEL_X86 +#else +#ifdef __ia64__ +#define SIAL_ABI ABI_INTEL_IA +#else +#ifdef __x86_64__ +#define SIAL_ABI ABI_INTEL_IA +#else +#ifdef __s390__ +#define SIAL_ABI ABI_S390 +#else +#ifdef __s390x__ +#define SIAL_ABI ABI_S390X +#else +#ifdef PPC64 +#define SIAL_ABI ABI_PPC64 +#else +#error sial: Unkown ABI +#endif +#endif +#endif +#endif +#endif +#endif + sial_apiset(&icops, SIAL_ABI, sizeof(long), 0); + + sial_version(); + + /* set the macro search path */ + if(!(path=getenv("SIAL_MPATH"))) { + + if(home) { + + path=sial_alloc(strlen(home)+sizeof(LCUDIR)+sizeof(LCDIR)+4); + homepath=sial_alloc(strlen(home)+sizeof(LCUDIR)+2); + + /* build a path for call to sial_load() */ + strcpy(homepath, home); + strcat(homepath, "/"); + strcat(homepath, LCUDIR); + + /* built the official path */ + strcpy(path, LCDIR); + strcat(path, ":"); + strcat(path, home); + strcat(path, "/"); + strcat(path, LCUDIR); + } + else path=LCDIR; + } + sial_setmpath(path); + + fprintf(fp, "\tLoading sial commands from %s .... ", + path); + + /* include path */ + if(!(ipath=getenv("SIAL_IPATH"))) { + + if(home) { + + ipath=sial_alloc(strlen(home)+sizeof(LCDIR)+sizeof(LCUDIR)+(sizeof(LCIDIR)*2)+(sizeof("/usr/include")+2)+6); + + /* built the official path */ + strcpy(ipath, LCDIR); + strcat(ipath, "/"LCIDIR":"); + strcat(ipath, home); + strcat(ipath, "/"); + strcat(ipath, LCUDIR); + strcat(ipath, "/"LCIDIR); + strcat(ipath, ":/usr/include"); + } + else ipath=LCDIR"/"LCIDIR; + } + sial_setipath(ipath); + + /* set the new function callback */ + sial_setcallback(reg_callback); + + /* load the default macros */ + sial_loadall(); + + /* load some sial specific commands */ + register_extension(command_table); + + /* some builtins */ + sial_builtin("int curtask()", curtask); + + fprintf(fp, "Done.\n"); + } + return 1; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/sial.mk /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/sial.mk --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions/sial.mk 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions/sial.mk 2007-11-19 15:01:37.000000000 -0600 @@ -0,0 +1,17 @@ +# +ifeq ($(TARGET), PPC64) + TARGET_FLAGS = -D$(TARGET) -m64 +else + TARGET_FLAGS = -D$(TARGET) +endif + +all: sial.so + +lib-sial: + cd libsial && make + +sial.so: ../defs.h sial.c lib-sial + gcc -g -I.. -Ilibsial -I../gdb-6.1/bfd -I../gdb-6.1/include -I../gdb-6.1/gdb -I../gdb-6.1/gdb/config -nostartfiles -shared -rdynamic -o sial.so sial.c -fPIC $(TARGET_FLAGS) -Llibsial -lsial + +clean: + cd libsial && make clean diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions.c /tmp/e3X06Fy51n/crash-4.0-4.9/extensions.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/extensions.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/extensions.c 2007-11-19 15:01:37.000000000 -0600 @@ -107,6 +107,7 @@ void dump_extension_table(int verbose) { + int i; struct extension_table *ext; struct command_table_entry *cp; char buf[BUFSIZE]; @@ -117,23 +118,37 @@ if (verbose) { for (ext = extension_table; ext; ext = ext->next) { - fprintf(fp, " filename: %s\n", ext->filename); - fprintf(fp, " handle: %lx\n", (ulong)ext->handle); - fprintf(fp, "command_table: %lx (", - (ulong)ext->command_table); - for (others = 0, cp = ext->command_table; cp->name;cp++) - fprintf(fp, "%s%s%s", others++ ? " " : "", - cp->name, cp->help_data ? "*" : ""); - fprintf(fp, ")\n"); - fprintf(fp, " flags: %lx (", ext->flags); + fprintf(fp, " filename: %s\n", ext->filename); + fprintf(fp, " handle: %lx\n", (ulong)ext->handle); + + + fprintf(fp, " flags: %lx (", ext->flags); others = 0; if (ext->flags & REGISTERED) fprintf(fp, "%sREGISTERED", others++ ? "|" : ""); fprintf(fp, ")\n"); - fprintf(fp, " next: %lx\n", (ulong)ext->next); - fprintf(fp, " prev: %lx\n%s", - (ulong)ext->prev, ext->next ? "\n" : ""); + fprintf(fp, " next: %lx\n", (ulong)ext->next); + fprintf(fp, " prev: %lx\n", (ulong)ext->prev); + + for (i = 0, cp = ext->command_table; cp->name; cp++, i++) { + fprintf(fp, "command_table[%d]: %lx\n", i, (ulong)cp); + fprintf(fp, " name: %s\n", cp->name); + fprintf(fp, " func: %lx\n", (ulong)cp->func); + fprintf(fp, " help_data: %lx\n", (ulong)cp->help_data); + fprintf(fp, " flags: %lx (", cp->flags); + others = 0; + if (cp->flags & CLEANUP) + fprintf(fp, "%sCLEANUP", others++ ? "|" : ""); + if (cp->flags & REFRESH_TASK_TABLE) + fprintf(fp, "%sREFRESH_TASK_TABLE", others++ ? "|" : ""); + if (cp->flags & HIDDEN_COMMAND) + fprintf(fp, "%sHIDDEN_COMMAND", others++ ? "|" : ""); + fprintf(fp, ")\n"); + } + + if (ext->next) + fprintf(fp, "\n"); } return; } @@ -339,4 +354,23 @@ pc->curext->flags |= REGISTERED; /* Mark of approval */ } +/* + * Hooks for sial. + */ +unsigned long +get_curtask(void) +{ + return CURRENT_TASK(); +} +char * +crash_global_cmd(void) +{ + return pc->curcmd; +} + +struct command_table_entry * +crash_cmd_table(void) +{ + return pc->cmd_table; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/filesys.c /tmp/e3X06Fy51n/crash-4.0-4.9/filesys.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/filesys.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/filesys.c 2007-11-19 15:01:37.000000000 -0600 @@ -230,7 +230,7 @@ static void match_proc_version(void) { - char buffer[BUFSIZE]; + char buffer[BUFSIZE], *p1, *p2; if (pc->flags & KERNEL_DEBUG_QUERY) return; @@ -250,6 +250,24 @@ pc->namelist, strlen(pc->namelist) > 39 ? "\n " : " "); + /* + * find_booted_system_map() requires VTOP(), which used to be a + * hardwired masking of the kernel address. But some architectures + * may not know what their physical base address is at this point, + * and others may have different machdep->kvbase values, so for all + * but the 0-based kernel virtual address architectures, bail out + * here with a relevant error message. + */ + if (!machine_type("S390") && !machine_type("S390X")) { + p1 = &kt->proc_version[strlen("Linux version ")]; + p2 = strstr(p1, " "); + *p2 = NULLCHAR; + error(WARNING, "/proc/version indicates kernel version: %s\n", p1); + error(FATAL, "please use the vmlinux file for that kernel version, or try using\n" + " the System.map for that kernel version as an additional argument.\n", p1); + clean_exit(1); + } + if (find_booted_system_map()) pc->flags |= SYSMAP; } @@ -1811,8 +1829,12 @@ if (symbol_exists("height_to_maxindex")) { int tmp; - ARRAY_LENGTH_INIT(tmp, height_to_maxindex, - "height_to_maxindex", NULL, 0); + if (LKCD_KERNTYPES()) + ARRAY_LENGTH_INIT_ALT(tmp, "height_to_maxindex", + "radix_tree_preload.nodes", NULL, 0); + else + ARRAY_LENGTH_INIT(tmp, height_to_maxindex, + "height_to_maxindex", NULL, 0); STRUCT_SIZE_INIT(radix_tree_root, "radix_tree_root"); STRUCT_SIZE_INIT(radix_tree_node, "radix_tree_node"); MEMBER_OFFSET_INIT(radix_tree_root_height, diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/dwarf2read.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,8077 @@ +/* DWARF 2 debugging format support for GDB. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, + Inc. with support from Florida State University (under contract + with the Ada Joint Program Office), and Silicon Graphics, Inc. + Initial contribution by Brent Benson, Harris Computer Systems, Inc., + based on Fred Fish's (Cygnus Support) implementation of DWARF 1 + support in dwarfread.c + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "objfiles.h" +#include "elf/dwarf2.h" +#include "buildsym.h" +#include "demangle.h" +#include "expression.h" +#include "filenames.h" /* for DOSish file names */ +#include "macrotab.h" +#include "language.h" +#include "complaints.h" +#include "bcache.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" +#include "cp-support.h" + +#include +#include "gdb_string.h" +#include "gdb_assert.h" +#include + +#ifndef DWARF2_REG_TO_REGNUM +#define DWARF2_REG_TO_REGNUM(REG) (REG) +#endif + +#if 0 +/* .debug_info header for a compilation unit + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct comp_unit_header + { + unsigned int length; /* length of the .debug_info + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int abbrev_offset; /* offset into .debug_abbrev section */ + unsigned char addr_size; /* byte size of an address -- 4 */ + } +_COMP_UNIT_HEADER; +#define _ACTUAL_COMP_UNIT_HEADER_SIZE 11 +#endif + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct pubnames_header + { + unsigned int length; /* length of the .debug_pubnames + contribution */ + unsigned char version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned int info_size; /* byte size of .debug_info section + portion */ + } +_PUBNAMES_HEADER; +#define _ACTUAL_PUBNAMES_HEADER_SIZE 13 + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct aranges_header + { + unsigned int length; /* byte len of the .debug_aranges + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned char addr_size; /* byte size of an address */ + unsigned char seg_size; /* byte size of segment descriptor */ + } +_ARANGES_HEADER; +#define _ACTUAL_ARANGES_HEADER_SIZE 12 + +/* .debug_line statement program prologue + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct statement_prologue + { + unsigned int total_length; /* byte length of the statement + information */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int prologue_length; /* # bytes between prologue & + stmt program */ + unsigned char minimum_instruction_length; /* byte size of + smallest instr */ + unsigned char default_is_stmt; /* initial value of is_stmt + register */ + char line_base; + unsigned char line_range; + unsigned char opcode_base; /* number assigned to first special + opcode */ + unsigned char *standard_opcode_lengths; + } +_STATEMENT_PROLOGUE; + +/* offsets and sizes of debugging sections */ + +static unsigned int dwarf_info_size; +static unsigned int dwarf_abbrev_size; +static unsigned int dwarf_line_size; +static unsigned int dwarf_pubnames_size; +static unsigned int dwarf_aranges_size; +static unsigned int dwarf_loc_size; +static unsigned int dwarf_macinfo_size; +static unsigned int dwarf_str_size; +static unsigned int dwarf_ranges_size; +unsigned int dwarf_frame_size; +unsigned int dwarf_eh_frame_size; + +static asection *dwarf_info_section; +static asection *dwarf_abbrev_section; +static asection *dwarf_line_section; +static asection *dwarf_pubnames_section; +static asection *dwarf_aranges_section; +static asection *dwarf_loc_section; +static asection *dwarf_macinfo_section; +static asection *dwarf_str_section; +static asection *dwarf_ranges_section; +asection *dwarf_frame_section; +asection *dwarf_eh_frame_section; + +/* names of the debugging sections */ + +#define INFO_SECTION ".debug_info" +#define ABBREV_SECTION ".debug_abbrev" +#define LINE_SECTION ".debug_line" +#define PUBNAMES_SECTION ".debug_pubnames" +#define ARANGES_SECTION ".debug_aranges" +#define LOC_SECTION ".debug_loc" +#define MACINFO_SECTION ".debug_macinfo" +#define STR_SECTION ".debug_str" +#define RANGES_SECTION ".debug_ranges" +#define FRAME_SECTION ".debug_frame" +#define EH_FRAME_SECTION ".eh_frame" + +/* local data types */ + +/* We hold several abbreviation tables in memory at the same time. */ +#ifndef ABBREV_HASH_SIZE +#define ABBREV_HASH_SIZE 121 +#endif + +/* The data in a compilation unit header, after target2host + translation, looks like this. */ +struct comp_unit_head + { + unsigned long length; + short version; + unsigned int abbrev_offset; + unsigned char addr_size; + unsigned char signed_addr_p; + unsigned int offset_size; /* size of file offsets; either 4 or 8 */ + unsigned int initial_length_size; /* size of the length field; either + 4 or 12 */ + + /* Offset to the first byte of this compilation unit header in the + * .debug_info section, for resolving relative reference dies. */ + + unsigned int offset; + + /* Pointer to this compilation unit header in the .debug_info + * section */ + + char *cu_head_ptr; + + /* Pointer to the first die of this compilatio unit. This will + * be the first byte following the compilation unit header. */ + + char *first_die_ptr; + + /* Pointer to the next compilation unit header in the program. */ + + struct comp_unit_head *next; + + /* DWARF abbreviation table associated with this compilation unit */ + + struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE]; + + /* Base address of this compilation unit. */ + + CORE_ADDR base_address; + + /* Non-zero if base_address has been set. */ + + int base_known; + }; + +/* Internal state when decoding a particular compilation unit. */ +struct dwarf2_cu +{ + /* The objfile containing this compilation unit. */ + struct objfile *objfile; + + /* The header of the compilation unit. + + FIXME drow/2003-11-10: Some of the things from the comp_unit_head + should be moved to the dwarf2_cu structure; for instance the abbrevs + hash table. */ + struct comp_unit_head header; + + struct function_range *first_fn, *last_fn, *cached_fn; + + /* The language we are debugging. */ + enum language language; + const struct language_defn *language_defn; + + /* The generic symbol table building routines have separate lists for + file scope symbols and all all other scopes (local scopes). So + we need to select the right one to pass to add_symbol_to_list(). + We do it by keeping a pointer to the correct list in list_in_scope. + + FIXME: The original dwarf code just treated the file scope as the + first local scope, and all other local scopes as nested local + scopes, and worked fine. Check to see if we really need to + distinguish these in buildsym.c. */ + struct pending **list_in_scope; + + /* Maintain an array of referenced fundamental types for the current + compilation unit being read. For DWARF version 1, we have to construct + the fundamental types on the fly, since no information about the + fundamental types is supplied. Each such fundamental type is created by + calling a language dependent routine to create the type, and then a + pointer to that type is then placed in the array at the index specified + by it's FT_ value. The array has a fixed size set by the + FT_NUM_MEMBERS compile time constant, which is the number of predefined + fundamental types gdb knows how to construct. */ + struct type *ftypes[FT_NUM_MEMBERS]; /* Fundamental types */ +}; + +/* The line number information for a compilation unit (found in the + .debug_line section) begins with a "statement program header", + which contains the following information. */ +struct line_header +{ + unsigned int total_length; + unsigned short version; + unsigned int header_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + + /* standard_opcode_lengths[i] is the number of operands for the + standard opcode whose value is i. This means that + standard_opcode_lengths[0] is unused, and the last meaningful + element is standard_opcode_lengths[opcode_base - 1]. */ + unsigned char *standard_opcode_lengths; + + /* The include_directories table. NOTE! These strings are not + allocated with xmalloc; instead, they are pointers into + debug_line_buffer. If you try to free them, `free' will get + indigestion. */ + unsigned int num_include_dirs, include_dirs_size; + char **include_dirs; + + /* The file_names table. NOTE! These strings are not allocated + with xmalloc; instead, they are pointers into debug_line_buffer. + Don't try to free them directly. */ + unsigned int num_file_names, file_names_size; + struct file_entry + { + char *name; + unsigned int dir_index; + unsigned int mod_time; + unsigned int length; + } *file_names; + + /* The start and end of the statement program following this + header. These point into dwarf_line_buffer. */ + char *statement_program_start, *statement_program_end; +}; + +/* When we construct a partial symbol table entry we only + need this much information. */ +struct partial_die_info + { + enum dwarf_tag tag; + unsigned char has_children; + unsigned char is_external; + unsigned char is_declaration; + unsigned char has_type; + unsigned int offset; + unsigned int abbrev; + char *name; + int has_pc_info; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct dwarf_block *locdesc; + unsigned int language; + char *sibling; + }; + +/* This data structure holds the information of an abbrev. */ +struct abbrev_info + { + unsigned int number; /* number identifying abbrev */ + enum dwarf_tag tag; /* dwarf tag */ + int has_children; /* boolean */ + unsigned int num_attrs; /* number of attributes */ + struct attr_abbrev *attrs; /* an array of attribute descriptions */ + struct abbrev_info *next; /* next in chain */ + }; + +struct attr_abbrev + { + enum dwarf_attribute name; + enum dwarf_form form; + }; + +/* This data structure holds a complete die structure. */ +struct die_info + { + enum dwarf_tag tag; /* Tag indicating type of die */ + unsigned int abbrev; /* Abbrev number */ + unsigned int offset; /* Offset in .debug_info section */ + unsigned int num_attrs; /* Number of attributes */ + struct attribute *attrs; /* An array of attributes */ + struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ + struct die_info *child; /* Its first child, if any. */ + struct die_info *sibling; /* Its next sibling, if any. */ + struct die_info *parent; /* Its parent, if any. */ + + struct type *type; /* Cached type information */ + }; + +/* Attributes have a name and a value */ +struct attribute + { + enum dwarf_attribute name; + enum dwarf_form form; + union + { + char *str; + struct dwarf_block *blk; + unsigned long unsnd; + long int snd; + CORE_ADDR addr; + } + u; + }; + +struct function_range +{ + const char *name; + CORE_ADDR lowpc, highpc; + int seen_line; + struct function_range *next; +}; + +/* Get at parts of an attribute structure */ + +#define DW_STRING(attr) ((attr)->u.str) +#define DW_UNSND(attr) ((attr)->u.unsnd) +#define DW_BLOCK(attr) ((attr)->u.blk) +#define DW_SND(attr) ((attr)->u.snd) +#define DW_ADDR(attr) ((attr)->u.addr) + +/* Blocks are a bunch of untyped bytes. */ +struct dwarf_block + { + unsigned int size; + char *data; + }; + +#ifndef ATTR_ALLOC_CHUNK +#define ATTR_ALLOC_CHUNK 4 +#endif + +/* A hash table of die offsets for following references. */ +#ifndef REF_HASH_SIZE +#define REF_HASH_SIZE 1021 +#endif + +static struct die_info *die_ref_table[REF_HASH_SIZE]; + +/* Obstack for allocating temporary storage used during symbol reading. */ +static struct obstack dwarf2_tmp_obstack; + +/* Allocate fields for structs, unions and enums in this size. */ +#ifndef DW_FIELD_ALLOC_CHUNK +#define DW_FIELD_ALLOC_CHUNK 4 +#endif + +/* Actually data from the sections. */ +static char *dwarf_info_buffer; +static char *dwarf_abbrev_buffer; +static char *dwarf_line_buffer; +static char *dwarf_str_buffer; +static char *dwarf_macinfo_buffer; +static char *dwarf_ranges_buffer; +static char *dwarf_loc_buffer; + +/* A zeroed version of a partial die for initialization purposes. */ +static struct partial_die_info zeroed_partial_die; + +/* FIXME: decode_locdesc sets these variables to describe the location + to the caller. These ought to be a structure or something. If + none of the flags are set, the object lives at the address returned + by decode_locdesc. */ + +static int isreg; /* Object lives in register. + decode_locdesc's return value is + the register number. */ + +/* We put a pointer to this structure in the read_symtab_private field + of the psymtab. + The complete dwarf information for an objfile is kept in the + objfile_obstack, so that absolute die references can be handled. + Most of the information in this structure is related to an entire + object file and could be passed via the sym_private field of the objfile. + It is however conceivable that dwarf2 might not be the only type + of symbols read from an object file. */ + +struct dwarf2_pinfo + { + /* Pointer to start of dwarf info buffer for the objfile. */ + + char *dwarf_info_buffer; + + /* Offset in dwarf_info_buffer for this compilation unit. */ + + unsigned long dwarf_info_offset; + + /* Pointer to start of dwarf abbreviation buffer for the objfile. */ + + char *dwarf_abbrev_buffer; + + /* Size of dwarf abbreviation section for the objfile. */ + + unsigned int dwarf_abbrev_size; + + /* Pointer to start of dwarf line buffer for the objfile. */ + + char *dwarf_line_buffer; + + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + + /* Pointer to start of dwarf string buffer for the objfile. */ + + char *dwarf_str_buffer; + + /* Size of dwarf string section for the objfile. */ + + unsigned int dwarf_str_size; + + /* Pointer to start of dwarf macro buffer for the objfile. */ + + char *dwarf_macinfo_buffer; + + /* Size of dwarf macinfo section for the objfile. */ + + unsigned int dwarf_macinfo_size; + + /* Pointer to start of dwarf ranges buffer for the objfile. */ + + char *dwarf_ranges_buffer; + + /* Size of dwarf ranges buffer for the objfile. */ + + unsigned int dwarf_ranges_size; + + /* Pointer to start of dwarf locations buffer for the objfile. */ + + char *dwarf_loc_buffer; + + /* Size of dwarf locations buffer for the objfile. */ + + unsigned int dwarf_loc_size; + }; + +#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private) +#define DWARF_INFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_info_buffer) +#define DWARF_INFO_OFFSET(p) (PST_PRIVATE(p)->dwarf_info_offset) +#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) +#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) +#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) +#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) +#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) +#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer) +#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size) +#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer) +#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size) +#define DWARF_LOC_BUFFER(p) (PST_PRIVATE(p)->dwarf_loc_buffer) +#define DWARF_LOC_SIZE(p) (PST_PRIVATE(p)->dwarf_loc_size) + +/* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, + but this would require a corresponding change in unpack_field_as_long + and friends. */ +static int bits_per_byte = 8; + +/* The routines that read and process dies for a C struct or C++ class + pass lists of data member fields and lists of member function fields + in an instance of a field_info structure, as defined below. */ +struct field_info + { + /* List of data member and baseclasses fields. */ + struct nextfield + { + struct nextfield *next; + int accessibility; + int virtuality; + struct field field; + } + *fields; + + /* Number of fields. */ + int nfields; + + /* Number of baseclasses. */ + int nbaseclasses; + + /* Set if the accesibility of one of the fields is not public. */ + int non_public_fields; + + /* Member function fields array, entries are allocated in the order they + are encountered in the object file. */ + struct nextfnfield + { + struct nextfnfield *next; + struct fn_field fnfield; + } + *fnfields; + + /* Member function fieldlist array, contains name of possibly overloaded + member function, number of overloaded member functions and a pointer + to the head of the member function field chain. */ + struct fnfieldlist + { + char *name; + int length; + struct nextfnfield *head; + } + *fnfieldlists; + + /* Number of entries in the fnfieldlists array. */ + int nfnfields; + }; + +/* Various complaints about symbol reading that don't abort the process */ + +static void +dwarf2_statement_list_fits_in_line_number_section_complaint (void) +{ + complaint (&symfile_complaints, + "statement list doesn't fit in .debug_line section"); +} + +static void +dwarf2_complex_location_expr_complaint (void) +{ + complaint (&symfile_complaints, "location expression too complex"); +} + +static void +dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, + int arg3) +{ + complaint (&symfile_complaints, + "const value length mismatch for '%s', got %d, expected %d", arg1, + arg2, arg3); +} + +static void +dwarf2_macros_too_long_complaint (void) +{ + complaint (&symfile_complaints, + "macro info runs off end of `.debug_macinfo' section"); +} + +static void +dwarf2_macro_malformed_definition_complaint (const char *arg1) +{ + complaint (&symfile_complaints, + "macro debug info contains a malformed macro definition:\n`%s'", + arg1); +} + +static void +dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2) +{ + complaint (&symfile_complaints, + "invalid attribute class or form for '%s' in '%s'", arg1, arg2); +} + +/* local function prototypes */ + +static void dwarf2_locate_sections (bfd *, asection *, void *); + +#if 0 +static void dwarf2_build_psymtabs_easy (struct objfile *, int); +#endif + +static void dwarf2_build_psymtabs_hard (struct objfile *, int); + +static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *, + const char *namespace); + +static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *, + const char *namespace); + +static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace); + +static char *add_partial_namespace (struct partial_die_info *pdi, + char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_structure (struct partial_die_info *struct_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_enumeration (struct partial_die_info *enum_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *locate_pdi_sibling (struct partial_die_info *orig_pdi, + char *info_ptr, + bfd *abfd, + struct dwarf2_cu *cu); + +static void dwarf2_psymtab_to_symtab (struct partial_symtab *); + +static void psymtab_to_symtab_1 (struct partial_symtab *); + +char *dwarf2_read_section (struct objfile *, asection *); + +static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu); + +static void dwarf2_empty_abbrev_table (void *); + +static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int, + struct dwarf2_cu *); + +static char *read_partial_die (struct partial_die_info *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_full_die (struct die_info **, bfd *, char *, + struct dwarf2_cu *, int *); + +static char *read_attribute (struct attribute *, struct attr_abbrev *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_attribute_value (struct attribute *, unsigned, + bfd *, char *, struct dwarf2_cu *); + +static unsigned int read_1_byte (bfd *, char *); + +static int read_1_signed_byte (bfd *, char *); + +static unsigned int read_2_bytes (bfd *, char *); + +static unsigned int read_4_bytes (bfd *, char *); + +static unsigned long read_8_bytes (bfd *, char *); + +static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *, + int *bytes_read); + +static LONGEST read_initial_length (bfd *, char *, + struct comp_unit_head *, int *bytes_read); + +static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *, + int *bytes_read); + +static char *read_n_bytes (bfd *, char *, unsigned int); + +static char *read_string (bfd *, char *, unsigned int *); + +static char *read_indirect_string (bfd *, char *, const struct comp_unit_head *, + unsigned int *); + +static unsigned long read_unsigned_leb128 (bfd *, char *, unsigned int *); + +static long read_signed_leb128 (bfd *, char *, unsigned int *); + +static void set_cu_language (unsigned int, struct dwarf2_cu *); + +static struct attribute *dwarf2_attr (struct die_info *, unsigned int, + struct dwarf2_cu *); + +static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); + +static struct die_info *die_specification (struct die_info *die, + struct dwarf2_cu *); + +static void free_line_header (struct line_header *lh); + +static struct line_header *(dwarf_decode_line_header + (unsigned int offset, + bfd *abfd, struct dwarf2_cu *cu)); + +static void dwarf_decode_lines (struct line_header *, char *, bfd *, + struct dwarf2_cu *); + +static void dwarf2_start_subfile (char *, char *); + +static struct symbol *new_symbol (struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_const_value (struct attribute *, struct symbol *, + struct dwarf2_cu *); + +static void dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits); + +static struct type *die_type (struct die_info *, struct dwarf2_cu *); + +static struct type *die_containing_type (struct die_info *, + struct dwarf2_cu *); + +#if 0 +static struct type *type_at_offset (unsigned int, struct objfile *); +#endif + +static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *); + +static void read_type_die (struct die_info *, struct dwarf2_cu *); + +static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); + +static char *typename_concat (const char *prefix, const char *suffix); + +static void read_typedef (struct die_info *, struct dwarf2_cu *); + +static void read_base_type (struct die_info *, struct dwarf2_cu *); + +static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu); + +static void read_file_scope (struct die_info *, struct dwarf2_cu *); + +static void read_func_scope (struct die_info *, struct dwarf2_cu *); + +static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *); + +static int dwarf2_get_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *); + +static void get_scope_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *); + +static void dwarf2_add_field (struct field_info *, struct die_info *, + struct dwarf2_cu *); + +static void dwarf2_attach_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void dwarf2_add_member_fn (struct field_info *, + struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_attach_fn_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); + +static void read_common_block (struct die_info *, struct dwarf2_cu *); + +static void read_namespace (struct die_info *die, struct dwarf2_cu *); + +static const char *namespace_name (struct die_info *die, + int *is_anonymous, struct dwarf2_cu *); + +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); + +static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); + +static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *); + +static void read_array_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_ptr_to_member_type (struct die_info *, + struct dwarf2_cu *); + +static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_const_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_string_type (struct die_info *, struct dwarf2_cu *); + +static void read_subroutine_type (struct die_info *, struct dwarf2_cu *); + +static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *); + +static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static void free_die_list (struct die_info *); + +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + +static void process_die (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_linkage_name (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_name (struct die_info *die, struct dwarf2_cu *); + +static struct die_info *dwarf2_extension (struct die_info *die, + struct dwarf2_cu *); + +static char *dwarf_tag_name (unsigned int); + +static char *dwarf_attr_name (unsigned int); + +static char *dwarf_form_name (unsigned int); + +static char *dwarf_stack_op_name (unsigned int); + +static char *dwarf_bool_name (unsigned int); + +static char *dwarf_type_encoding_name (unsigned int); + +#if 0 +static char *dwarf_cfi_name (unsigned int); + +struct die_info *copy_die (struct die_info *); +#endif + +static struct die_info *sibling_die (struct die_info *); + +static void dump_die (struct die_info *); + +static void dump_die_list (struct die_info *); + +static void store_in_ref_table (unsigned int, struct die_info *); + +static void dwarf2_empty_hash_tables (void); + +static unsigned int dwarf2_get_ref_die_offset (struct attribute *, + struct dwarf2_cu *); + +static int dwarf2_get_attr_constant_value (struct attribute *, int); + +static struct die_info *follow_die_ref (unsigned int); + +static struct type *dwarf2_fundamental_type (struct objfile *, int, + struct dwarf2_cu *); + +/* memory allocation interface */ + +static void dwarf2_free_tmp_obstack (void *); + +static struct dwarf_block *dwarf_alloc_block (void); + +static struct abbrev_info *dwarf_alloc_abbrev (void); + +static struct die_info *dwarf_alloc_die (void); + +static void initialize_cu_func_list (struct dwarf2_cu *); + +static void add_to_cu_func_list (const char *, CORE_ADDR, CORE_ADDR, + struct dwarf2_cu *); + +static void dwarf_decode_macros (struct line_header *, unsigned int, + char *, bfd *, struct dwarf2_cu *); + +static int attr_form_is_block (struct attribute *); + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu); + +/* Try to locate the sections we need for DWARF 2 debugging + information and return true if we have enough to do something. */ + +int +dwarf2_has_info (bfd *abfd) +{ + dwarf_info_section = 0; + dwarf_abbrev_section = 0; + dwarf_line_section = 0; + dwarf_str_section = 0; + dwarf_macinfo_section = 0; + dwarf_frame_section = 0; + dwarf_eh_frame_section = 0; + dwarf_ranges_section = 0; + dwarf_loc_section = 0; + + bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); + return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL); +} + +/* This function is mapped across the sections and remembers the + offset and size of each of the debugging sections we are interested + in. */ + +static void +dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) +{ + if (strcmp (sectp->name, INFO_SECTION) == 0) + { + dwarf_info_size = bfd_get_section_size_before_reloc (sectp); + dwarf_info_section = sectp; + } + else if (strcmp (sectp->name, ABBREV_SECTION) == 0) + { + dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp); + dwarf_abbrev_section = sectp; + } + else if (strcmp (sectp->name, LINE_SECTION) == 0) + { + dwarf_line_size = bfd_get_section_size_before_reloc (sectp); + dwarf_line_section = sectp; + } + else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0) + { + dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp); + dwarf_pubnames_section = sectp; + } + else if (strcmp (sectp->name, ARANGES_SECTION) == 0) + { + dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_aranges_section = sectp; + } + else if (strcmp (sectp->name, LOC_SECTION) == 0) + { + dwarf_loc_size = bfd_get_section_size_before_reloc (sectp); + dwarf_loc_section = sectp; + } + else if (strcmp (sectp->name, MACINFO_SECTION) == 0) + { + dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp); + dwarf_macinfo_section = sectp; + } + else if (strcmp (sectp->name, STR_SECTION) == 0) + { + dwarf_str_size = bfd_get_section_size_before_reloc (sectp); + dwarf_str_section = sectp; + } + else if (strcmp (sectp->name, FRAME_SECTION) == 0) + { + dwarf_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_frame_section = sectp; + } + else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0) + { + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } + } + else if (strcmp (sectp->name, RANGES_SECTION) == 0) + { + dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_ranges_section = sectp; + } +} + +/* Build a partial symbol table. */ + +void +dwarf2_build_psymtabs (struct objfile *objfile, int mainline) +{ + + /* We definitely need the .debug_info and .debug_abbrev sections */ + + dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section); + dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section); + + if (dwarf_line_section) + dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section); + else + dwarf_line_buffer = NULL; + + if (dwarf_str_section) + dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section); + else + dwarf_str_buffer = NULL; + + if (dwarf_macinfo_section) + dwarf_macinfo_buffer = dwarf2_read_section (objfile, + dwarf_macinfo_section); + else + dwarf_macinfo_buffer = NULL; + + if (dwarf_ranges_section) + dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section); + else + dwarf_ranges_buffer = NULL; + + if (dwarf_loc_section) + dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section); + else + dwarf_loc_buffer = NULL; + + if (mainline + || (objfile->global_psymbols.size == 0 + && objfile->static_psymbols.size == 0)) + { + init_psymbol_list (objfile, 1024); + } + +#if 0 + if (dwarf_aranges_offset && dwarf_pubnames_offset) + { + /* Things are significantly easier if we have .debug_aranges and + .debug_pubnames sections */ + + dwarf2_build_psymtabs_easy (objfile, mainline); + } + else +#endif + /* only test this case for now */ + { + /* In this case we have to work a bit harder */ + dwarf2_build_psymtabs_hard (objfile, mainline); + } +} + +#if 0 +/* Build the partial symbol table from the information in the + .debug_pubnames and .debug_aranges sections. */ + +static void +dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + char *aranges_buffer, *pubnames_buffer; + char *aranges_ptr, *pubnames_ptr; + unsigned int entry_length, version, info_offset, info_size; + + pubnames_buffer = dwarf2_read_section (objfile, + dwarf_pubnames_section); + pubnames_ptr = pubnames_buffer; + while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size) + { + struct comp_unit_head cu_header; + int bytes_read; + + entry_length = read_initial_length (abfd, pubnames_ptr, &cu_header, + &bytes_read); + pubnames_ptr += bytes_read; + version = read_1_byte (abfd, pubnames_ptr); + pubnames_ptr += 1; + info_offset = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + info_size = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + } + + aranges_buffer = dwarf2_read_section (objfile, + dwarf_aranges_section); + +} +#endif + +/* Read in the comp unit header information from the debug_info at + info_ptr. */ + +static char * +read_comp_unit_head (struct comp_unit_head *cu_header, + char *info_ptr, bfd *abfd) +{ + int signed_addr; + int bytes_read; + cu_header->length = read_initial_length (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->version = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + cu_header->abbrev_offset = read_offset (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->addr_size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + signed_addr = bfd_get_sign_extend_vma (abfd); + if (signed_addr < 0) + internal_error (__FILE__, __LINE__, + "read_comp_unit_head: dwarf from non elf file"); + cu_header->signed_addr_p = signed_addr; + return info_ptr; +} + +/* Build the partial symbol table by doing a quick pass through the + .debug_info and .debug_abbrev sections. */ + +static void +dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) +{ + /* Instead of reading this into a big buffer, we should probably use + mmap() on architectures that support it. (FIXME) */ + bfd *abfd = objfile->obfd; + char *info_ptr, *abbrev_ptr; + char *beg_of_comp_unit; + struct partial_die_info comp_unit_die; + struct partial_symtab *pst; + struct cleanup *back_to; + CORE_ADDR lowpc, highpc, baseaddr; + + info_ptr = dwarf_info_buffer; + abbrev_ptr = dwarf_abbrev_buffer; + + /* We use dwarf2_tmp_obstack for objects that don't need to survive + the partial symbol scan, like attribute values. + + We could reduce our peak memory consumption during partial symbol + table construction by freeing stuff from this obstack more often + --- say, after processing each compilation unit, or each die --- + but it turns out that this saves almost nothing. For an + executable with 11Mb of Dwarf 2 data, I found about 64k allocated + on dwarf2_tmp_obstack. Some investigation showed: + + 1) 69% of the attributes used forms DW_FORM_addr, DW_FORM_data*, + DW_FORM_flag, DW_FORM_[su]data, and DW_FORM_ref*. These are + all fixed-length values not requiring dynamic allocation. + + 2) 30% of the attributes used the form DW_FORM_string. For + DW_FORM_string, read_attribute simply hands back a pointer to + the null-terminated string in dwarf_info_buffer, so no dynamic + allocation is needed there either. + + 3) The remaining 1% of the attributes all used DW_FORM_block1. + 75% of those were DW_AT_frame_base location lists for + functions; the rest were DW_AT_location attributes, probably + for the global variables. + + Anyway, what this all means is that the memory the dwarf2 + reader uses as temporary space reading partial symbols is about + 0.5% as much as we use for dwarf_*_buffer. That's noise. */ + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ + while (info_ptr < dwarf_info_buffer + dwarf_info_size) + { + struct dwarf2_cu cu; + beg_of_comp_unit = info_ptr; + + cu.objfile = objfile; + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + if (cu.header.version != 2) + { + error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd)); + return; + } + if (cu.header.abbrev_offset >= dwarf_abbrev_size) + { + error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]", + (long) cu.header.abbrev_offset, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size + > dwarf_info_buffer + dwarf_info_size) + { + error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]", + (long) cu.header.length, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + /* Complete the cu_header */ + cu.header.offset = beg_of_comp_unit - dwarf_info_buffer; + cu.header.first_die_ptr = info_ptr; + cu.header.cu_head_ptr = beg_of_comp_unit; + + cu.list_in_scope = &file_symbols; + + /* Read the abbrevs for this compilation unit into a table */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + /* Read the compilation unit die */ + info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr, + &cu); + + /* Set the language we're debugging */ + set_cu_language (comp_unit_die.language, &cu); + + /* Allocate a new partial symbol table structure */ + pst = start_psymtab_common (objfile, objfile->section_offsets, + comp_unit_die.name ? comp_unit_die.name : "", + comp_unit_die.lowpc, + objfile->global_psymbols.next, + objfile->static_psymbols.next); + + pst->read_symtab_private = (char *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo)); + DWARF_INFO_BUFFER (pst) = dwarf_info_buffer; + DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf_info_buffer; + DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; + DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; + DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; + DWARF_STR_BUFFER (pst) = dwarf_str_buffer; + DWARF_STR_SIZE (pst) = dwarf_str_size; + DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer; + DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size; + DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer; + DWARF_RANGES_SIZE (pst) = dwarf_ranges_size; + DWARF_LOC_BUFFER (pst) = dwarf_loc_buffer; + DWARF_LOC_SIZE (pst) = dwarf_loc_size; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Store the function that reads in the rest of the symbol table */ + pst->read_symtab = dwarf2_psymtab_to_symtab; + + /* Check if comp unit has_children. + If so, read the rest of the partial symbols from this comp unit. + If not, there's no more debug_info for this comp unit. */ + if (comp_unit_die.has_children) + { + lowpc = ((CORE_ADDR) -1); + highpc = ((CORE_ADDR) 0); + + info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc, + &cu, NULL); + + /* If we didn't find a lowpc, set it to highpc to avoid + complaints from `maint check'. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + + /* If the compilation unit didn't have an explicit address range, + then use the information extracted from its child dies. */ + if (! comp_unit_die.has_pc_info) + { + comp_unit_die.lowpc = lowpc; + comp_unit_die.highpc = highpc; + } + } + pst->textlow = comp_unit_die.lowpc + baseaddr; + pst->texthigh = comp_unit_die.highpc + baseaddr; + + pst->n_global_syms = objfile->global_psymbols.next - + (objfile->global_psymbols.list + pst->globals_offset); + pst->n_static_syms = objfile->static_psymbols.next - + (objfile->static_psymbols.list + pst->statics_offset); + sort_pst_symbols (pst); + + /* If there is already a psymtab or symtab for a file of this + name, remove it. (If there is a symtab, more drastic things + also happen.) This happens in VxWorks. */ + free_named_symtabs (pst->filename); + + info_ptr = beg_of_comp_unit + cu.header.length + + cu.header.initial_length_size; + } + do_cleanups (back_to); +} + +/* Read in all interesting dies to the end of the compilation unit or + to the end of the current namespace. NAMESPACE is NULL if we + haven't yet encountered any DW_TAG_namespace entries; otherwise, + it's the name of the current namespace. In particular, it's the + empty string if we're currently in the global namespace but have + previously encountered a DW_TAG_namespace. */ + +static char * +scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu, + const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + /* Now, march along the PDI's, descending into ones which have + interesting children but skipping the children of the other ones, + until we reach the end of the compilation unit. */ + + while (1) + { + /* This flag tells whether or not info_ptr has gotten updated + inside the loop. */ + int info_ptr_updated = 0; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + /* Anonymous namespaces have no name but have interesting + children, so we need to look at them. Ditto for anonymous + enums. */ + + if (pdi.name != NULL || pdi.tag == DW_TAG_namespace + || pdi.tag == DW_TAG_enumeration_type) + { + switch (pdi.tag) + { + case DW_TAG_subprogram: + if (pdi.has_pc_info) + { + if (pdi.lowpc < *lowpc) + { + *lowpc = pdi.lowpc; + } + if (pdi.highpc > *highpc) + { + *highpc = pdi.highpc; + } + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + } + break; + case DW_TAG_variable: + case DW_TAG_typedef: + case DW_TAG_union_type: + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_structure (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_enumeration_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_enumeration (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + /* File scope base type definitions are added to the partial + symbol table. */ + add_partial_symbol (&pdi, cu, namespace); + break; + case DW_TAG_namespace: + /* We've hit a DW_TAG_namespace entry, so we know this + file has been compiled using a compiler that + generates them; update NAMESPACE to reflect that. */ + if (namespace == NULL) + namespace = ""; + info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc, + cu, namespace); + info_ptr_updated = 1; + break; + default: + break; + } + } + + if (pdi.tag == 0) + break; + + /* If the die has a sibling, skip to the sibling, unless another + function has already updated info_ptr for us. */ + + /* NOTE: carlton/2003-06-16: This is a bit hackish, but whether + or not we want to update this depends on enough stuff (not + only pdi.tag but also whether or not pdi.name is NULL) that + this seems like the easiest way to handle the issue. */ + + if (!info_ptr_updated) + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } + + return info_ptr; +} + +static void +add_partial_symbol (struct partial_die_info *pdi, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + CORE_ADDR addr = 0; + char *actual_name = pdi->name; + const struct partial_symbol *psym = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* If we're not in the global namespace and if the namespace name + isn't encoded in a mangled actual_name, add it. */ + + if (pdi_needs_namespace (pdi->tag, namespace)) + { + actual_name = alloca (strlen (pdi->name) + 2 + strlen (namespace) + 1); + strcpy (actual_name, namespace); + strcat (actual_name, "::"); + strcat (actual_name, pdi->name); + } + + switch (pdi->tag) + { + case DW_TAG_subprogram: + if (pdi->is_external) + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->global_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + else + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_file_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->static_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_variable: + if (pdi->is_external) + { + /* Global Variable. + Don't enter into the minimal symbol tables as there is + a minimal symbol table entry from the ELF symbols already. + Enter into partial symbol table if it has a location + descriptor or a type. + If the location descriptor is missing, new_symbol will create + a LOC_UNRESOLVED symbol, the address of the variable will then + be determined from the minimal symbol table whenever the variable + is referenced. + The address for the partial symbol table entry is not + used by GDB, but it comes in handy for debugging partial symbol + table building. */ + + if (pdi->locdesc) + addr = decode_locdesc (pdi->locdesc, cu); + if (pdi->locdesc || pdi->has_type) + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->global_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + else + { + /* Static Variable. Skip symbols without location descriptors. */ + if (pdi->locdesc == NULL) + return; + addr = decode_locdesc (pdi->locdesc, cu); + /*prim_record_minimal_symbol (actual_name, addr + baseaddr, + mst_file_data, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->static_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_typedef: + case DW_TAG_base_type: + case DW_TAG_subrange_type: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + /* Skip aggregate types without children, these are external + references. */ + /* NOTE: carlton/2003-10-07: See comment in new_symbol about + static vs. global. */ + if (pdi->has_children == 0) + return; + add_psymbol_to_list (actual_name, strlen (actual_name), + STRUCT_DOMAIN, LOC_TYPEDEF, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + + if (cu->language == language_cplus) + { + /* For C++, these implicitly act as typedefs as well. */ + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + } + break; + case DW_TAG_enumerator: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_CONST, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + default: + break; + } + + /* Check to see if we should scan the name for possible namespace + info. Only do this if this is C++, if we don't have namespace + debugging info in the file, if the psym is of an appropriate type + (otherwise we'll have psym == NULL), and if we actually had a + mangled name to begin with. */ + + if (cu->language == language_cplus + && namespace == NULL + && psym != NULL + && SYMBOL_CPLUS_DEMANGLED_NAME (psym) != NULL) + cp_check_possible_namespace_symbols (SYMBOL_CPLUS_DEMANGLED_NAME (psym), + objfile); +} + +/* Determine whether a die of type TAG living in the C++ namespace + NAMESPACE needs to have the name of the namespace prepended to the + name listed in the die. */ + +static int +pdi_needs_namespace (enum dwarf_tag tag, const char *namespace) +{ + if (namespace == NULL || namespace[0] == '\0') + return 0; + + switch (tag) + { + case DW_TAG_typedef: + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + case DW_TAG_enumerator: + return 1; + default: + return 0; + } +} + +/* Read a partial die corresponding to a namespace; also, add a symbol + corresponding to that namespace to the symbol table. NAMESPACE is + the name of the enclosing namespace. */ + +static char * +add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + const char *new_name = pdi->name; + char *full_name; + + /* Calculate the full name of the namespace that we just entered. */ + + if (new_name == NULL) + new_name = "(anonymous namespace)"; + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + strcpy (full_name, namespace); + if (*namespace != '\0') + strcat (full_name, "::"); + strcat (full_name, new_name); + + /* FIXME: carlton/2003-10-07: We can't just replace this by a call + to add_partial_symbol, because we don't have a way to pass in the + full name to that function; that might be a flaw in + add_partial_symbol's interface. */ + + add_psymbol_to_list (full_name, strlen (full_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, 0, cu->language, objfile); + + /* Now scan partial symbols in that namespace. */ + + if (pdi->has_children) + info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name); + + return info_ptr; +} + +/* Read a partial die corresponding to a class or structure. */ + +static char * +add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace) +{ + bfd *abfd = cu->objfile->obfd; + char *actual_class_name = NULL; + + if (cu->language == language_cplus + && (namespace == NULL || namespace[0] == '\0') + && struct_pdi->name != NULL + && struct_pdi->has_children) + { + /* See if we can figure out if the class lives in a namespace + (or is nested within another class.) We do this by looking + for a member function; its demangled name will contain + namespace info, if there is any. */ + + /* NOTE: carlton/2003-10-07: Getting the info this way changes + what template types look like, because the demangler + frequently doesn't give the same name as the debug info. We + could fix this by only using the demangled name to get the + prefix (but see comment in read_structure_type). */ + + /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have + the appropriate debug information, so it would be nice to be + able to avoid this hack. But NAMESPACE may not be the + namespace where this class was defined: NAMESPACE reflects + where STRUCT_PDI occurs in the tree of dies, but because of + DW_AT_specification, that may not actually tell us where the + class is defined. (See the comment in read_func_scope for an + example of how this could occur.) + + Unfortunately, our current partial symtab data structures are + completely unable to deal with DW_AT_specification. So, for + now, the best thing to do is to get nesting information from + places other than the tree structure of dies if there's any + chance that a DW_AT_specification is involved. :-( */ + + char *next_child = info_ptr; + + while (1) + { + struct partial_die_info child_pdi; + + next_child = read_partial_die (&child_pdi, abfd, next_child, + cu); + if (!child_pdi.tag) + break; + if (child_pdi.tag == DW_TAG_subprogram) + { + actual_class_name = class_name_from_physname (child_pdi.name); + if (actual_class_name != NULL) + struct_pdi->name = actual_class_name; + break; + } + else + { + next_child = locate_pdi_sibling (&child_pdi, next_child, + abfd, cu); + } + } + } + + add_partial_symbol (struct_pdi, cu, namespace); + xfree (actual_class_name); + + return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu); +} + +/* Read a partial die corresponding to an enumeration type. */ + +static char * +add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + if (enum_pdi->name != NULL) + add_partial_symbol (enum_pdi, cu, namespace); + + while (1) + { + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + if (pdi.tag == 0) + break; + if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL) + complaint (&symfile_complaints, "malformed enumerator DIE ignored"); + else + add_partial_symbol (&pdi, cu, namespace); + } + + return info_ptr; +} + +/* Locate ORIG_PDI's sibling; INFO_PTR should point to the next DIE + after ORIG_PDI. */ + +static char * +locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr, + bfd *abfd, struct dwarf2_cu *cu) +{ + /* Do we know the sibling already? */ + + if (orig_pdi->sibling) + return orig_pdi->sibling; + + /* Are there any children to deal with? */ + + if (!orig_pdi->has_children) + return info_ptr; + + /* Okay, we don't know the sibling, but we have children that we + want to skip. So read children until we run into one without a + tag; return whatever follows it. */ + + while (1) + { + struct partial_die_info pdi; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + if (pdi.tag == 0) + return info_ptr; + else + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } +} + +/* Expand this partial symbol table into a full symbol table. */ + +static void +dwarf2_psymtab_to_symtab (struct partial_symtab *pst) +{ + /* FIXME: This is barely more than a stub. */ + if (pst != NULL) + { + if (pst->readin) + { + warning ("bug: psymtab for %s is already read in.", pst->filename); + } + else + { + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + gdb_flush (gdb_stdout); + } + + psymtab_to_symtab_1 (pst); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); + } + } +} + +static void +psymtab_to_symtab_1 (struct partial_symtab *pst) +{ + struct objfile *objfile = pst->objfile; + bfd *abfd = objfile->obfd; + struct dwarf2_cu cu; + struct die_info *dies; + unsigned long offset; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + char *info_ptr; + struct symtab *symtab; + struct cleanup *back_to; + struct attribute *attr; + CORE_ADDR baseaddr; + + /* Set local variables from the partial symbol table info. */ + offset = DWARF_INFO_OFFSET (pst); + dwarf_info_buffer = DWARF_INFO_BUFFER (pst); + dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); + dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); + dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); + dwarf_str_buffer = DWARF_STR_BUFFER (pst); + dwarf_str_size = DWARF_STR_SIZE (pst); + dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst); + dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst); + dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst); + dwarf_ranges_size = DWARF_RANGES_SIZE (pst); + dwarf_loc_buffer = DWARF_LOC_BUFFER (pst); + dwarf_loc_size = DWARF_LOC_SIZE (pst); + info_ptr = dwarf_info_buffer + offset; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* We're in the global namespace. */ + processing_current_prefix = ""; + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + buildsym_init (); + make_cleanup (really_free_pendings, NULL); + + cu.objfile = objfile; + + /* read in the comp_unit header */ + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + /* Read the abbrevs for this compilation unit */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + cu.header.offset = offset; + + cu.list_in_scope = &file_symbols; + + dies = read_comp_unit (info_ptr, abfd, &cu); + + make_cleanup_free_die_list (dies); + + /* Find the base address of the compilation unit for range lists and + location lists. It will normally be specified by DW_AT_low_pc. + In DWARF-3 draft 4, the base address could be overridden by + DW_AT_entry_pc. It's been removed, but GCC still uses this for + compilation units with discontinuous ranges. */ + + cu.header.base_known = 0; + cu.header.base_address = 0; + + attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + else + { + attr = dwarf2_attr (dies, DW_AT_low_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + } + + /* Do line number decoding in read_file_scope () */ + process_die (dies, &cu); + + /* Some compilers don't define a DW_AT_high_pc attribute for the + compilation unit. If the DW_AT_high_pc is missing, synthesize + it, by scanning the DIE's below the compilation unit. */ + get_scope_pc_bounds (dies, &lowpc, &highpc, &cu); + + symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + + /* Set symtab language to language from DW_AT_language. + If the compilation is from a C file generated by language preprocessors, + do not set the language if it was already deduced by start_subfile. */ + if (symtab != NULL + && !(cu.language == language_c && symtab->language != language_c)) + { + symtab->language = cu.language; + } + pst->symtab = symtab; + pst->readin = 1; + + do_cleanups (back_to); +} + +/* Process a die and its children. */ + +static void +process_die (struct die_info *die, struct dwarf2_cu *cu) +{ + switch (die->tag) + { + case DW_TAG_padding: + break; + case DW_TAG_compile_unit: + read_file_scope (die, cu); + break; + case DW_TAG_subprogram: + read_subroutine_type (die, cu); + read_func_scope (die, cu); + break; + case DW_TAG_inlined_subroutine: + /* FIXME: These are ignored for now. + They could be used to set breakpoints on all inlined instances + of a function and make GDB `next' properly over inlined functions. */ + break; + case DW_TAG_lexical_block: + case DW_TAG_try_block: + case DW_TAG_catch_block: + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); + process_structure_scope (die, cu); + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); + break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + /* END FIXME */ + + case DW_TAG_base_type: + read_base_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_common_block: + read_common_block (die, cu); + break; + case DW_TAG_common_inclusion: + break; + case DW_TAG_namespace: + processing_has_namespace_info = 1; + read_namespace (die, cu); + break; + case DW_TAG_imported_declaration: + case DW_TAG_imported_module: + /* FIXME: carlton/2002-10-16: Eventually, we should use the + information contained in these. DW_TAG_imported_declaration + dies shouldn't have children; DW_TAG_imported_module dies + shouldn't in the C++ case, but conceivably could in the + Fortran case, so we'll have to replace this gdb_assert if + Fortran compilers start generating that info. */ + processing_has_namespace_info = 1; + gdb_assert (die->child == NULL); + break; + default: + new_symbol (die, NULL, cu); + break; + } +} + +static void +initialize_cu_func_list (struct dwarf2_cu *cu) +{ + cu->first_fn = cu->last_fn = cu->cached_fn = NULL; +} + +static void +read_file_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct cleanup *back_to = make_cleanup (null_cleanup, 0); + CORE_ADDR lowpc = ((CORE_ADDR) -1); + CORE_ADDR highpc = ((CORE_ADDR) 0); + struct attribute *attr; + char *name = ""; + char *comp_dir = NULL; + struct die_info *child_die; + bfd *abfd = objfile->obfd; + struct line_header *line_header = 0; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + get_scope_pc_bounds (die, &lowpc, &highpc, cu); + + /* If we didn't find a lowpc, set it to highpc to avoid complaints + from finish_block. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + lowpc += baseaddr; + highpc += baseaddr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr) + { + name = DW_STRING (attr); + } + attr = dwarf2_attr (die, DW_AT_comp_dir, cu); + if (attr) + { + comp_dir = DW_STRING (attr); + if (comp_dir) + { + /* Irix 6.2 native cc prepends .: to the compilation + directory, get rid of it. */ + char *cp = strchr (comp_dir, ':'); + + if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/') + comp_dir = cp + 1; + } + } + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.deprecated_entry_file_lowpc = lowpc; + objfile->ei.deprecated_entry_file_highpc = highpc; + } + + attr = dwarf2_attr (die, DW_AT_language, cu); + if (attr) + { + set_cu_language (DW_UNSND (attr), cu); + } + + /* We assume that we're processing GCC output. */ + processing_gcc_compilation = 2; +#if 0 + /* FIXME:Do something here. */ + if (dip->at_producer != NULL) + { + handle_producer (dip->at_producer); + } +#endif + + /* The compilation unit may be in a different language or objfile, + zero out all remembered fundamental types. */ + memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *)); + + start_symtab (name, comp_dir, lowpc); + record_debugformat ("DWARF 2"); + + initialize_cu_func_list (cu); + + /* Process all dies in compilation unit. */ + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + /* Decode line number information if present. */ + attr = dwarf2_attr (die, DW_AT_stmt_list, cu); + if (attr) + { + unsigned int line_offset = DW_UNSND (attr); + line_header = dwarf_decode_line_header (line_offset, abfd, cu); + if (line_header) + { + make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) line_header); + dwarf_decode_lines (line_header, comp_dir, abfd, cu); + } + } + + /* Decode macro information, if present. Dwarf 2 macro information + refers to information in the line number info statement program + header, so we can only read it if we've read the header + successfully. */ + attr = dwarf2_attr (die, DW_AT_macro_info, cu); + if (attr && line_header) + { + unsigned int macro_offset = DW_UNSND (attr); + dwarf_decode_macros (line_header, macro_offset, + comp_dir, abfd, cu); + } + do_cleanups (back_to); +} + +static void +add_to_cu_func_list (const char *name, CORE_ADDR lowpc, CORE_ADDR highpc, + struct dwarf2_cu *cu) +{ + struct function_range *thisfn; + + thisfn = (struct function_range *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct function_range)); + thisfn->name = name; + thisfn->lowpc = lowpc; + thisfn->highpc = highpc; + thisfn->seen_line = 0; + thisfn->next = NULL; + + if (cu->last_fn == NULL) + cu->first_fn = thisfn; + else + cu->last_fn->next = thisfn; + + cu->last_fn = thisfn; +} + +static void +read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct die_info *child_die; + struct attribute *attr; + char *name; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + name = dwarf2_linkage_name (die, cu); + + /* Ignore functions with missing or empty names and functions with + missing or invalid low and high pc attributes. */ + if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + + if (cu->language == language_cplus) + { + struct die_info *spec_die = die_specification (die, cu); + + /* NOTE: carlton/2004-01-23: We have to be careful in the + presence of DW_AT_specification. For example, with GCC 3.4, + given the code + + namespace N { + void foo() { + // Definition of N::foo. + } + } + + then we'll have a tree of DIEs like this: + + 1: DW_TAG_compile_unit + 2: DW_TAG_namespace // N + 3: DW_TAG_subprogram // declaration of N::foo + 4: DW_TAG_subprogram // definition of N::foo + DW_AT_specification // refers to die #3 + + Thus, when processing die #4, we have to pretend that we're + in the context of its DW_AT_specification, namely the contex + of die #3. */ + + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + } + + lowpc += baseaddr; + highpc += baseaddr; + + /* Record the function range for dwarf_decode_lines. */ + add_to_cu_func_list (name, lowpc, highpc, cu); + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.entry_func_lowpc = lowpc; + objfile->ei.entry_func_highpc = highpc; + } + + new = push_context (0, lowpc); + new->name = new_symbol (die, die->type, cu); + + /* If there is a location expression for DW_AT_frame_base, record + it. */ + attr = dwarf2_attr (die, DW_AT_frame_base, cu); + if (attr) + /* FIXME: cagney/2004-01-26: The DW_AT_frame_base's location + expression is being recorded directly in the function's symbol + and not in a separate frame-base object. I guess this hack is + to avoid adding some sort of frame-base adjunct/annex to the + function's symbol :-(. The problem with doing this is that it + results in a function symbol with a location expression that + has nothing to do with the location of the function, ouch! The + relationship should be: a function's symbol has-a frame base; a + frame-base has-a location expression. */ + dwarf2_symbol_mark_computed (attr, new->name, cu); + + cu->list_in_scope = &local_symbols; + + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + new = pop_context (); + /* Make a block for the local symbols within. */ + finish_block (new->name, &local_symbols, new->old_blocks, + lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + + /* If we've finished processing a top-level function, subsequent + symbols go in the file symbol list. */ + if (outermost_context_p ()) + cu->list_in_scope = &file_symbols; + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +/* Process all the DIES contained within a lexical block scope. Start + a new scope, process the dies, and then close the scope. */ + +static void +read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Ignore blocks with missing or invalid low and high pc attributes. */ + /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges + as multiple lexical blocks? Handling children in a sane way would + be nasty. Might be easier to properly extend generic blocks to + describe ranges. */ + if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + lowpc += baseaddr; + highpc += baseaddr; + + push_context (0, lowpc); + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + new = pop_context (); + + if (local_symbols != NULL) + { + finish_block (0, &local_symbols, new->old_blocks, new->start_addr, + highpc, objfile); + } + local_symbols = new->locals; +} + +/* Get low and high pc attributes from a die. Return 1 if the attributes + are present and valid, otherwise, return 0. Return -1 if the range is + discontinuous, i.e. derived from DW_AT_ranges information. */ +static int +dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct attribute *attr; + bfd *obfd = objfile->obfd; + CORE_ADDR low = 0; + CORE_ADDR high = 0; + int ret = 0; + + attr = dwarf2_attr (die, DW_AT_high_pc, cu); + if (attr) + { + high = DW_ADDR (attr); + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + low = DW_ADDR (attr); + else + /* Found high w/o low attribute. */ + return 0; + + /* Found consecutive range of addresses. */ + ret = 1; + } + else + { + attr = dwarf2_attr (die, DW_AT_ranges, cu); + if (attr != NULL) + { + unsigned int addr_size = cu_header->addr_size; + CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1)); + /* Value of the DW_AT_ranges attribute is the offset in the + .debug_ranges section. */ + unsigned int offset = DW_UNSND (attr); + /* Base address selection entry. */ + CORE_ADDR base; + int found_base; + int dummy; + char *buffer; + CORE_ADDR marker; + int low_set; + + found_base = cu_header->base_known; + base = cu_header->base_address; + + if (offset >= dwarf_ranges_size) + { + complaint (&symfile_complaints, + "Offset %d out of bounds for DW_AT_ranges attribute", + offset); + return 0; + } + buffer = dwarf_ranges_buffer + offset; + + /* Read in the largest possible address. */ + marker = read_address (obfd, buffer, cu, &dummy); + if ((marker & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + buffer += 2 * addr_size; + offset += 2 * addr_size; + found_base = 1; + } + + low_set = 0; + + while (1) + { + CORE_ADDR range_beginning, range_end; + + range_beginning = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + range_end = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + offset += 2 * addr_size; + + /* An end of list marker is a pair of zero addresses. */ + if (range_beginning == 0 && range_end == 0) + /* Found the end of list entry. */ + break; + + /* Each base address selection entry is a pair of 2 values. + The first is the largest possible address, the second is + the base address. Check for a base address here. */ + if ((range_beginning & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + found_base = 1; + continue; + } + + if (!found_base) + { + /* We have no valid base address for the ranges + data. */ + complaint (&symfile_complaints, + "Invalid .debug_ranges data (no base address)"); + return 0; + } + + range_beginning += base; + range_end += base; + + /* FIXME: This is recording everything as a low-high + segment of consecutive addresses. We should have a + data structure for discontiguous block ranges + instead. */ + if (! low_set) + { + low = range_beginning; + high = range_end; + low_set = 1; + } + else + { + if (range_beginning < low) + low = range_beginning; + if (range_end > high) + high = range_end; + } + } + + if (! low_set) + /* If the first entry is an end-of-list marker, the range + describes an empty scope, i.e. no instructions. */ + return 0; + + ret = -1; + } + } + + if (high < low) + return 0; + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0) + return 0; + + *lowpc = low; + *highpc = high; + return ret; +} + +/* Get the low and high pc's represented by the scope DIE, and store + them in *LOWPC and *HIGHPC. If the correct values can't be + determined, set *LOWPC to -1 and *HIGHPC to 0. */ + +static void +get_scope_pc_bounds (struct die_info *die, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu) +{ + CORE_ADDR best_low = (CORE_ADDR) -1; + CORE_ADDR best_high = (CORE_ADDR) 0; + CORE_ADDR current_low, current_high; + + if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu)) + { + best_low = current_low; + best_high = current_high; + } + else + { + struct die_info *child = die->child; + + while (child && child->tag) + { + switch (child->tag) { + case DW_TAG_subprogram: + if (dwarf2_get_pc_bounds (child, ¤t_low, ¤t_high, cu)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + case DW_TAG_namespace: + /* FIXME: carlton/2004-01-16: Should we do this for + DW_TAG_class_type/DW_TAG_structure_type, too? I think + that current GCC's always emit the DIEs corresponding + to definitions of methods of classes as children of a + DW_TAG_compile_unit or DW_TAG_namespace (as opposed to + the DIEs giving the declarations, which could be + anywhere). But I don't see any reason why the + standards says that they have to be there. */ + get_scope_pc_bounds (child, ¤t_low, ¤t_high, cu); + + if (current_low != ((CORE_ADDR) -1)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + default: + /* Ignore. */ + break; + } + + child = sibling_die (child); + } + } + + *lowpc = best_low; + *highpc = best_high; +} + +/* Add an aggregate field to the field list. */ + +static void +dwarf2_add_field (struct field_info *fip, struct die_info *die, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct nextfield *new_field; + struct attribute *attr; + struct field *fp; + char *fieldname = ""; + + /* Allocate a new field list entry and link it in. */ + new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield)); + make_cleanup (xfree, new_field); + memset (new_field, 0, sizeof (struct nextfield)); + new_field->next = fip->fields; + fip->fields = new_field; + fip->nfields++; + + /* Handle accessibility and virtuality of field. + The default accessibility for members is public, the default + accessibility for inheritance is private. */ + if (die->tag != DW_TAG_inheritance) + new_field->accessibility = DW_ACCESS_public; + else + new_field->accessibility = DW_ACCESS_private; + new_field->virtuality = DW_VIRTUALITY_none; + + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + new_field->accessibility = DW_UNSND (attr); + if (new_field->accessibility != DW_ACCESS_public) + fip->non_public_fields = 1; + attr = dwarf2_attr (die, DW_AT_virtuality, cu); + if (attr) + new_field->virtuality = DW_UNSND (attr); + + fp = &new_field->field; + + if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu)) + { + /* Data member other than a C++ static data member. */ + + /* Get type of field. */ + fp->type = die_type (die, cu); + + FIELD_STATIC_KIND (*fp) = 0; + + /* Get bit size of field (zero if none). */ + attr = dwarf2_attr (die, DW_AT_bit_size, cu); + if (attr) + { + FIELD_BITSIZE (*fp) = DW_UNSND (attr); + } + else + { + FIELD_BITSIZE (*fp) = 0; + } + + /* Get bit offset of field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + { + FIELD_BITPOS (*fp) = + decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte; + } + else + FIELD_BITPOS (*fp) = 0; + attr = dwarf2_attr (die, DW_AT_bit_offset, cu); + if (attr) + { + if (BITS_BIG_ENDIAN) + { + /* For big endian bits, the DW_AT_bit_offset gives the + additional bit offset from the MSB of the containing + anonymous object to the MSB of the field. We don't + have to do anything special since we don't need to + know the size of the anonymous object. */ + FIELD_BITPOS (*fp) += DW_UNSND (attr); + } + else + { + /* For little endian bits, compute the bit offset to the + MSB of the anonymous object, subtract off the number of + bits from the MSB of the field to the MSB of the + object, and then subtract off the number of bits of + the field itself. The result is the bit offset of + the LSB of the field. */ + int anonymous_size; + int bit_offset = DW_UNSND (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + /* The size of the anonymous object containing + the bit field is explicit, so use the + indicated size (in bytes). */ + anonymous_size = DW_UNSND (attr); + } + else + { + /* The size of the anonymous object containing + the bit field must be inferred from the type + attribute of the data member containing the + bit field. */ + anonymous_size = TYPE_LENGTH (fp->type); + } + FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp); + } + } + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + fp->name = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + + /* Change accessibility for artificial fields (e.g. virtual table + pointer or virtual base class pointer) to private. */ + if (dwarf2_attr (die, DW_AT_artificial, cu)) + { + new_field->accessibility = DW_ACCESS_private; + fip->non_public_fields = 1; + } + } + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) + { + /* C++ static member. */ + + /* NOTE: carlton/2002-11-05: It should be a DW_TAG_member that + is a declaration, but all versions of G++ as of this writing + (so through at least 3.2.1) incorrectly generate + DW_TAG_variable tags. */ + + char *physname; + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get physical name. */ + physname = dwarf2_linkage_name (die, cu); + + SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname), + &objfile->objfile_obstack)); + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + } + else if (die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); + FIELD_BITSIZE (*fp) = 0; + FIELD_STATIC_KIND (*fp) = 0; + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = type_name_no_tag (fp->type); + fip->nbaseclasses++; + } +} + +/* Create the vector of fields, and attach it to the type. */ + +static void +dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + int nfields = fip->nfields; + + /* Record the field count, allocate space for the array of fields, + and create blank accessibility bitfields if necessary. */ + TYPE_NFIELDS (type) = nfields; + TYPE_FIELDS (type) = (struct field *) + TYPE_ALLOC (type, sizeof (struct field) * nfields); + memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + + if (fip->non_public_fields) + { + ALLOCATE_CPLUS_STRUCT_TYPE (type); + + TYPE_FIELD_PRIVATE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields); + + TYPE_FIELD_PROTECTED_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields); + + TYPE_FIELD_IGNORE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields); + } + + /* If the type has baseclasses, allocate and clear a bit vector for + TYPE_FIELD_VIRTUAL_BITS. */ + if (fip->nbaseclasses) + { + int num_bytes = B_BYTES (fip->nbaseclasses); + char *pointer; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + pointer = (char *) TYPE_ALLOC (type, num_bytes); + TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; + B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses); + TYPE_N_BASECLASSES (type) = fip->nbaseclasses; + } + + /* Copy the saved-up fields into the field vector. Start from the head + of the list, adding to the tail of the field array, so that they end + up in the same order in the array in which they were added to the list. */ + while (nfields-- > 0) + { + TYPE_FIELD (type, nfields) = fip->fields->field; + switch (fip->fields->accessibility) + { + case DW_ACCESS_private: + SET_TYPE_FIELD_PRIVATE (type, nfields); + break; + + case DW_ACCESS_protected: + SET_TYPE_FIELD_PROTECTED (type, nfields); + break; + + case DW_ACCESS_public: + break; + + default: + /* Unknown accessibility. Complain and treat it as public. */ + { + complaint (&symfile_complaints, "unsupported accessibility %d", + fip->fields->accessibility); + } + break; + } + if (nfields < fip->nbaseclasses) + { + switch (fip->fields->virtuality) + { + case DW_VIRTUALITY_virtual: + case DW_VIRTUALITY_pure_virtual: + SET_TYPE_FIELD_VIRTUAL (type, nfields); + break; + } + } + fip->fields = fip->fields->next; + } +} + +/* Add a member function to the proper fieldlist. */ + +static void +dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, + struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + struct fnfieldlist *flp; + int i; + struct fn_field *fnp; + char *fieldname; + char *physname; + struct nextfnfield *new_fnfield; + + /* Get name of member function. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get the mangled name. */ + physname = dwarf2_linkage_name (die, cu); + + /* Look up member function name in fieldlist. */ + for (i = 0; i < fip->nfnfields; i++) + { + if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0) + break; + } + + /* Create new list element if necessary. */ + if (i < fip->nfnfields) + flp = &fip->fnfieldlists[i]; + else + { + if ((fip->nfnfields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fip->fnfieldlists = (struct fnfieldlist *) + xrealloc (fip->fnfieldlists, + (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct fnfieldlist)); + if (fip->nfnfields == 0) + make_cleanup (free_current_contents, &fip->fnfieldlists); + } + flp = &fip->fnfieldlists[fip->nfnfields]; + flp->name = fieldname; + flp->length = 0; + flp->head = NULL; + fip->nfnfields++; + } + + /* Create a new member function field and chain it to the field list + entry. */ + new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield)); + make_cleanup (xfree, new_fnfield); + memset (new_fnfield, 0, sizeof (struct nextfnfield)); + new_fnfield->next = flp->head; + flp->head = new_fnfield; + flp->length++; + + /* Fill in the member function field info. */ + fnp = &new_fnfield->fnfield; + fnp->physname = obsavestring (physname, strlen (physname), + &objfile->objfile_obstack); + fnp->type = alloc_type (objfile); + if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC) + { + int nparams = TYPE_NFIELDS (die->type); + + /* TYPE is the domain of this method, and DIE->TYPE is the type + of the method itself (TYPE_CODE_METHOD). */ + smash_to_method_type (fnp->type, type, + TYPE_TARGET_TYPE (die->type), + TYPE_FIELDS (die->type), + TYPE_NFIELDS (die->type), + TYPE_VARARGS (die->type)); + + /* Handle static member functions. + Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We obtain this information + from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */ + if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (die->type, 0) == 0) + fnp->voffset = VOFFSET_STATIC; + } + else + complaint (&symfile_complaints, "member function type missing for '%s'", + physname); + + /* Get fcontext from DW_AT_containing_type if present. */ + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + fnp->fcontext = die_containing_type (die, cu); + + /* dwarf2 doesn't have stubbed physical names, so the setting of is_const + and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */ + + /* Get accessibility. */ + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + { + switch (DW_UNSND (attr)) + { + case DW_ACCESS_private: + fnp->is_private = 1; + break; + case DW_ACCESS_protected: + fnp->is_protected = 1; + break; + } + } + + /* Check for artificial methods. */ + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr && DW_UNSND (attr) != 0) + fnp->is_artificial = 1; + + /* Get index in virtual function table if it is a virtual member function. */ + attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2; + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location", + fieldname); + } + } +} + +/* Create the vector of member function fields, and attach it to the type. */ + +static void +dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + struct fnfieldlist *flp; + int total_length = 0; + int i; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *) + TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * fip->nfnfields); + + for (i = 0, flp = fip->fnfieldlists; i < fip->nfnfields; i++, flp++) + { + struct nextfnfield *nfp = flp->head; + struct fn_fieldlist *fn_flp = &TYPE_FN_FIELDLIST (type, i); + int k; + + TYPE_FN_FIELDLIST_NAME (type, i) = flp->name; + TYPE_FN_FIELDLIST_LENGTH (type, i) = flp->length; + fn_flp->fn_fields = (struct fn_field *) + TYPE_ALLOC (type, sizeof (struct fn_field) * flp->length); + for (k = flp->length; (k--, nfp); nfp = nfp->next) + fn_flp->fn_fields[k] = nfp->fnfield; + + total_length += flp->length; + } + + TYPE_NFN_FIELDS (type) = fip->nfnfields; + TYPE_NFN_FIELDS_TOTAL (type) = total_length; +} + +/* Called when we find the DIE that starts a structure or union scope + (definition) to process all dies that define the members of the + structure or union. + + NOTE: we need to call struct_type regardless of whether or not the + DIE has an at_name attribute, since it might be an anonymous + structure or union. This gets the type entered into our set of + user defined types. + + However, if the structure is incomplete (an opaque struct/union) + then suppress creating a symbol table entry for it since gdb only + wants to find the one with the complete definition. Note that if + it is complete, we just call new_symbol, which does it's own + checking about whether the struct/union is anonymous or not (and + suppresses creating a symbol table entry itself). */ + +static void +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + + if (die->type) + return; + + type = alloc_type (objfile); + + INIT_CPLUS_SPECIFIC (type); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + if (cu->language == language_cplus) + { + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); + processing_current_prefix = new_prefix; + } + else + { + TYPE_TAG_NAME (type) = DW_STRING (attr); + } + } + + if (die->tag == DW_TAG_structure_type) + { + TYPE_CODE (type) = TYPE_CODE_STRUCT; + } + else if (die->tag == DW_TAG_union_type) + { + TYPE_CODE (type) = TYPE_CODE_UNION; + } + else + { + /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT + in gdbtypes.h. */ + TYPE_CODE (type) = TYPE_CODE_CLASS; + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + /* We need to add the type field to the die immediately so we don't + infinitely recurse when dealing with pointers to the structure + type within the structure itself. */ + die->type = type; + + if (die->child != NULL && ! die_is_declaration (die, cu)) + { + struct field_info fi; + struct die_info *child_die; + struct cleanup *back_to = make_cleanup (null_cleanup, NULL); + + memset (&fi, 0, sizeof (struct field_info)); + + child_die = die->child; + + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable) + { + /* NOTE: carlton/2002-11-05: A C++ static data member + should be a DW_TAG_member that is a declaration, but + all versions of G++ as of this writing (so through at + least 3.2.1) incorrectly generate DW_TAG_variable + tags for them instead. */ + dwarf2_add_field (&fi, child_die, cu); + } + else if (child_die->tag == DW_TAG_subprogram) + { + /* C++ member function. */ + read_type_die (child_die, cu); + dwarf2_add_member_fn (&fi, child_die, type, cu); + } + else if (child_die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + dwarf2_add_field (&fi, child_die, cu); + } + child_die = sibling_die (child_die); + } + + /* Attach fields and member functions to the type. */ + if (fi.nfields) + dwarf2_attach_fields_to_type (&fi, type, cu); + if (fi.nfnfields) + { + dwarf2_attach_fn_fields_to_type (&fi, type, cu); + + /* Get the type which refers to the base class (possibly this + class itself) which contains the vtable pointer for the current + class from the DW_AT_containing_type attribute. */ + + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + { + struct type *t = die_containing_type (die, cu); + + TYPE_VPTR_BASETYPE (type) = t; + if (type == t) + { + static const char vptr_name[] = + {'_', 'v', 'p', 't', 'r', '\0'}; + int i; + + /* Our own class provides vtbl ptr. */ + for (i = TYPE_NFIELDS (t) - 1; + i >= TYPE_N_BASECLASSES (t); + --i) + { + char *fieldname = TYPE_FIELD_NAME (t, i); + + if ((strncmp (fieldname, vptr_name, + strlen (vptr_name) - 1) + == 0) + && is_cplus_marker (fieldname[strlen (vptr_name)])) + { + TYPE_VPTR_FIELDNO (type) = i; + break; + } + } + + /* Complain if virtual function table field not found. */ + if (i < TYPE_N_BASECLASSES (t)) + complaint (&symfile_complaints, + "virtual function table pointer not found when defining class '%s'", + TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) : + ""); + } + else + { + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); + } + } + } + + do_cleanups (back_to); + } + else + { + /* No children, must be stub. */ + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + } + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; + + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); + + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ + +static void +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + type = alloc_type (objfile); + + TYPE_CODE (type) = TYPE_CODE_ENUM; + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + const char *name = DW_STRING (attr); + + if (processing_has_namespace_info) + { + TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + processing_current_prefix[0] == '\0' + ? "" : "::", + name); + } + else + { + TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), + &objfile->objfile_obstack); + } + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + + num_fields = 0; + fields = NULL; + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag != DW_TAG_enumerator) + { + process_die (child_die, cu); + } + else + { + attr = dwarf2_attr (child_die, DW_AT_name, cu); + if (attr) + { + sym = new_symbol (child_die, die->type, cu); + if (SYMBOL_VALUE (sym) < 0) + unsigned_enum = 0; + + if ((num_fields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fields = (struct field *) + xrealloc (fields, + (num_fields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct field)); + } + + FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym); + FIELD_TYPE (fields[num_fields]) = NULL; + FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + FIELD_BITSIZE (fields[num_fields]) = 0; + FIELD_STATIC_KIND (fields[num_fields]) = 0; + + num_fields++; + } + } + + child_die = sibling_die (child_die); + } + + if (num_fields) + { + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, + sizeof (struct field) * num_fields); + xfree (fields); + } + if (unsigned_enum) + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; + } + + new_symbol (die, die->type, cu); +} + +/* Extract all information from a DW_TAG_array_type DIE and put it in + the DIE's type field. For now, this only handles one dimensional + arrays. */ + +static void +read_array_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct type *type = NULL; + struct type *element_type, *range_type, *index_type; + struct type **range_types = NULL; + struct attribute *attr; + int ndim = 0; + struct cleanup *back_to; + + /* Return if we've already decoded this type. */ + if (die->type) + { + return; + } + + element_type = die_type (die, cu); + + /* Irix 6.2 native cc creates array types without children for + arrays with unspecified length. */ + if (die->child == NULL) + { + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 0, -1); + die->type = create_array_type (NULL, element_type, range_type); + return; + } + + back_to = make_cleanup (null_cleanup, NULL); + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_subrange_type) + { + read_subrange_type (child_die, cu); + + if (child_die->type != NULL) + { + /* The range type was succesfully read. Save it for + the array type creation. */ + if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0) + { + range_types = (struct type **) + xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct type *)); + if (ndim == 0) + make_cleanup (free_current_contents, &range_types); + } + range_types[ndim++] = child_die->type; + } + } + child_die = sibling_die (child_die); + } + + /* Dwarf2 dimensions are output from left to right, create the + necessary array types in backwards order. */ + type = element_type; + while (ndim-- > 0) + type = create_array_type (NULL, type, range_types[ndim]); + + /* Understand Dwarf2 support for vector types (like they occur on + the PowerPC w/ AltiVec). Gcc just adds another attribute to the + array type. This is not part of the Dwarf2/3 standard yet, but a + custom vendor extension. The main difference between a regular + array and the vector variant is that vectors are passed by value + to functions. */ + attr = dwarf2_attr (die, DW_AT_GNU_vector, cu); + if (attr) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; + + do_cleanups (back_to); + + /* Install the type in the die. */ + die->type = type; +} + +/* First cut: install each common block member as a global variable. */ + +static void +read_common_block (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *child_die; + struct attribute *attr; + struct symbol *sym; + CORE_ADDR base = (CORE_ADDR) 0; + + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + base = decode_locdesc (DW_BLOCK (attr), cu); + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "common block member"); + } + } + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + sym = new_symbol (child_die, NULL, cu); + attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = + base + decode_locdesc (DW_BLOCK (attr), cu); + add_symbol_to_list (sym, &global_symbols); + } + child_die = sibling_die (child_die); + } + } +} + +/* Read a C++ namespace. */ + +static void +read_namespace (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + const char *name; + int is_anonymous; + struct die_info *current_die; + + name = namespace_name (die, &is_anonymous, cu); + + /* Now build the name of the current namespace. */ + + if (previous_prefix[0] == '\0') + { + processing_current_prefix = name; + } + else + { + /* We need temp_name around because processing_current_prefix + is a const char *. */ + char *temp_name = alloca (strlen (previous_prefix) + + 2 + strlen(name) + 1); + strcpy (temp_name, previous_prefix); + strcat (temp_name, "::"); + strcat (temp_name, name); + + processing_current_prefix = temp_name; + } + + /* Add a symbol associated to this if we haven't seen the namespace + before. Also, add a using directive if it's an anonymous + namespace. */ + + if (dwarf2_extension (die, cu) == NULL) + { + struct type *type; + + /* FIXME: carlton/2003-06-27: Once GDB is more const-correct, + this cast will hopefully become unnecessary. */ + type = init_type (TYPE_CODE_NAMESPACE, 0, 0, + (char *) processing_current_prefix, + objfile); + TYPE_TAG_NAME (type) = TYPE_NAME (type); + + new_symbol (die, type, cu); + die->type = type; + + if (is_anonymous) + cp_add_using_directive (processing_current_prefix, + strlen (previous_prefix), + strlen (processing_current_prefix)); + } + + if (die->child != NULL) + { + struct die_info *child_die = die->child; + + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + processing_current_prefix = previous_prefix; +} + +/* Return the name of the namespace represented by DIE. Set + *IS_ANONYMOUS to tell whether or not the namespace is an anonymous + namespace. */ + +static const char * +namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu) +{ + struct die_info *current_die; + const char *name = NULL; + + /* Loop through the extensions until we find a name. */ + + for (current_die = die; + current_die != NULL; + current_die = dwarf2_extension (die, cu)) + { + name = dwarf2_name (current_die, cu); + if (name != NULL) + break; + } + + /* Is it an anonymous namespace? */ + + *is_anonymous = (name == NULL); + if (*is_anonymous) + name = "(anonymous namespace)"; + + return name; +} + +/* Extract all information from a DW_TAG_pointer_type DIE and add to + the user defined type vector. */ + +static void +read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr_byte_size; + struct attribute *attr_address_class; + int byte_size, addr_class; + + if (die->type) + { + return; + } + + type = lookup_pointer_type (die_type (die, cu)); + + attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr_byte_size) + byte_size = DW_UNSND (attr_byte_size); + else + byte_size = cu_header->addr_size; + + attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu); + if (attr_address_class) + addr_class = DW_UNSND (attr_address_class); + else + addr_class = DW_ADDR_none; + + /* If the pointer size or address class is different than the + default, create a type variant marked as such and set the + length accordingly. */ + if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) + { + if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + { + int type_flags; + + type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); + type = make_type_with_address_space (type, type_flags); + } + else if (TYPE_LENGTH (type) != byte_size) + { + complaint (&symfile_complaints, "invalid pointer size %d", byte_size); + } + else { + /* Should we also complain about unhandled address classes? */ + } + } + + TYPE_LENGTH (type) = byte_size; + die->type = type; +} + +/* Extract all information from a DW_TAG_ptr_to_member_type DIE and add to + the user defined type vector. */ + +static void +read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct type *to_type; + struct type *domain; + + if (die->type) + { + return; + } + + type = alloc_type (objfile); + to_type = die_type (die, cu); + domain = die_containing_type (die, cu); + smash_to_member_type (type, domain, to_type); + + die->type = type; +} + +/* Extract all information from a DW_TAG_reference_type DIE and add to + the user defined type vector. */ + +static void +read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr; + + if (die->type) + { + return; + } + + type = lookup_reference_type (die_type (die, cu)); + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = cu_header->addr_size; + } + die->type = type; +} + +static void +read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); +} + +static void +read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0); +} + +/* Extract all information from a DW_TAG_string_type DIE and add to + the user defined type vector. It isn't really a user defined type, + but it behaves like one, with other DIE's using an AT_user_def_type + attribute to reference it. */ + +static void +read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type, *range_type, *index_type, *char_type; + struct attribute *attr; + unsigned int length; + + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_string_length, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + /* check for the DW_AT_byte_size attribute */ + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + length = 1; + } + } + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 1, length); + if (cu->language == language_fortran) + { + /* Need to create a unique string type for bounds + information */ + type = create_string_type (0, range_type); + } + else + { + char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu); + type = create_string_type (char_type, range_type); + } + die->type = type; +} + +/* Handle DIES due to C code like: + + struct foo + { + int (*funcp)(int a, long l); + int b; + }; + + ('funcp' generates a DW_TAG_subroutine_type DIE) + */ + +static void +read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; /* Type that this function returns */ + struct type *ftype; /* Function that returns above type */ + struct attribute *attr; + + /* Decode the type that this subroutine returns */ + if (die->type) + { + return; + } + type = die_type (die, cu); + ftype = lookup_function_type (type); + + /* All functions in C++ have prototypes. */ + attr = dwarf2_attr (die, DW_AT_prototyped, cu); + if ((attr && (DW_UNSND (attr) != 0)) + || cu->language == language_cplus) + TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED; + + if (die->child != NULL) + { + struct die_info *child_die; + int nparams = 0; + int iparams = 0; + + /* Count the number of parameters. + FIXME: GDB currently ignores vararg functions, but knows about + vararg member functions. */ + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + nparams++; + else if (child_die->tag == DW_TAG_unspecified_parameters) + TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS; + child_die = sibling_die (child_die); + } + + /* Allocate storage for parameters and fill them in. */ + TYPE_NFIELDS (ftype) = nparams; + TYPE_FIELDS (ftype) = (struct field *) + TYPE_ALLOC (ftype, nparams * sizeof (struct field)); + + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + { + /* Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We pass this information + to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL. */ + attr = dwarf2_attr (child_die, DW_AT_artificial, cu); + if (attr) + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr); + else + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; + TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu); + iparams++; + } + child_die = sibling_die (child_die); + } + } + + die->type = ftype; +} + +static void +read_typedef (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + char *name = NULL; + + if (!die->type) + { + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + name = DW_STRING (attr); + } + die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB, name, objfile); + TYPE_TARGET_TYPE (die->type) = die_type (die, cu); + } +} + +/* Find a representation of a given base type and install + it in the TYPE field of the die. */ + +static void +read_base_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + int encoding = 0, size = 0; + + /* If we've already decoded this die, this is a no-op. */ + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_encoding, cu); + if (attr) + { + encoding = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + size = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + enum type_code code = TYPE_CODE_INT; + int type_flags = 0; + + switch (encoding) + { + case DW_ATE_address: + /* Turn DW_ATE_address into a void * pointer. */ + code = TYPE_CODE_PTR; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_boolean: + code = TYPE_CODE_BOOL; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_complex_float: + code = TYPE_CODE_COMPLEX; + break; + case DW_ATE_float: + code = TYPE_CODE_FLT; + break; + case DW_ATE_signed: + case DW_ATE_signed_char: + break; + case DW_ATE_unsigned: + case DW_ATE_unsigned_char: + type_flags |= TYPE_FLAG_UNSIGNED; + break; + default: + complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'", + dwarf_type_encoding_name (encoding)); + break; + } + type = init_type (code, size, type_flags, DW_STRING (attr), objfile); + if (encoding == DW_ATE_address) + TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID, + cu); + else if (encoding == DW_ATE_complex_float) + { + if (size == 32) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu); + else if (size == 16) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + else if (size == 8) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + } + else + { + type = dwarf_base_type (encoding, size, cu); + } + die->type = type; +} + +/* Read the given DW_AT_subrange DIE. */ + +static void +read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + struct type *range_type; + struct attribute *attr; + int low = 0; + int high = -1; + + /* If we have already decoded this die, then nothing more to do. */ + if (die->type) + return; + + base_type = die_type (die, cu); + if (base_type == NULL) + { + complaint (&symfile_complaints, + "DW_AT_type missing from DW_TAG_subrange_type"); + return; + } + + if (TYPE_CODE (base_type) == TYPE_CODE_VOID) + base_type = alloc_type (NULL); + + if (cu->language == language_fortran) + { + /* FORTRAN implies a lower bound of 1, if not given. */ + low = 1; + } + + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); + if (attr) + low = dwarf2_get_attr_constant_value (attr, 0); + + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (attr) + { + if (attr->form == DW_FORM_block1) + { + /* GCC encodes arrays with unspecified or dynamic length + with a DW_FORM_block1 attribute. + FIXME: GDB does not yet know how to handle dynamic + arrays properly, treat them as arrays with unspecified + length for now. + + FIXME: jimb/2003-09-22: GDB does not really know + how to handle arrays of unspecified length + either; we just represent them as zero-length + arrays. Choose an appropriate upper bound given + the lower bound we've computed above. */ + high = low - 1; + } + else + high = dwarf2_get_attr_constant_value (attr, 1); + } + + range_type = create_range_type (NULL, base_type, low, high); + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + TYPE_NAME (range_type) = DW_STRING (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + TYPE_LENGTH (range_type) = DW_UNSND (attr); + + die->type = range_type; +} + + +/* Read a whole compilation unit into a linked list of dies. */ + +static struct die_info * +read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu) +{ + /* Reset die reference table; we are + building new ones now. */ + dwarf2_empty_hash_tables (); + + return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL); +} + +/* Read a single die and all its descendents. Set the die's sibling + field to NULL; set other fields in the die correctly, and set all + of the descendents' fields correctly. Set *NEW_INFO_PTR to the + location of the info_ptr after reading all of those dies. PARENT + is the parent of the die in question. */ + +static struct die_info * +read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *die; + char *cur_ptr; + int has_children; + + cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children); + store_in_ref_table (die->offset, die); + + if (has_children) + { + die->child = read_die_and_siblings (cur_ptr, abfd, cu, + new_info_ptr, die); + } + else + { + die->child = NULL; + *new_info_ptr = cur_ptr; + } + + die->sibling = NULL; + die->parent = parent; + return die; +} + +/* Read a die, all of its descendents, and all of its siblings; set + all of the fields of all of the dies correctly. Arguments are as + in read_die_and_children. */ + +static struct die_info * +read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *first_die, *last_sibling; + char *cur_ptr; + + cur_ptr = info_ptr; + first_die = last_sibling = NULL; + + while (1) + { + struct die_info *die + = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent); + + if (!first_die) + { + first_die = die; + } + else + { + last_sibling->sibling = die; + } + + if (die->tag == 0) + { + *new_info_ptr = cur_ptr; + return first_die; + } + else + { + last_sibling = die; + } + } +} + +/* Free a linked list of dies. */ + +static void +free_die_list (struct die_info *dies) +{ + struct die_info *die, *next; + + die = dies; + while (die) + { + if (die->child != NULL) + free_die_list (die->child); + next = die->sibling; + xfree (die->attrs); + xfree (die); + die = next; + } +} + +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + +/* Read the contents of the section at OFFSET and of size SIZE from the + object file specified by OBJFILE into the objfile_obstack and return it. */ + +char * +dwarf2_read_section (struct objfile *objfile, asection *sectp) +{ + bfd *abfd = objfile->obfd; + char *buf, *retbuf; + bfd_size_type size = bfd_get_section_size_before_reloc (sectp); + + if (size == 0) + return NULL; + + buf = (char *) obstack_alloc (&objfile->objfile_obstack, size); + retbuf + = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf); + if (retbuf != NULL) + return retbuf; + + if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 + || bfd_bread (buf, size, abfd) != size) + error ("Dwarf Error: Can't read DWARF data from '%s'", + bfd_get_filename (abfd)); + + return buf; +} + +/* In DWARF version 2, the description of the debugging information is + stored in a separate .debug_abbrev section. Before we read any + dies from a section we read in all abbreviations and install them + in a hash table. */ + +static void +dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + char *abbrev_ptr; + struct abbrev_info *cur_abbrev; + unsigned int abbrev_number, bytes_read, abbrev_name; + unsigned int abbrev_form, hash_number; + + /* Initialize dwarf2 abbrevs */ + memset (cu_header->dwarf2_abbrevs, 0, + ABBREV_HASH_SIZE*sizeof (struct abbrev_info *)); + + abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + + /* loop until we reach an abbrev number of 0 */ + while (abbrev_number) + { + cur_abbrev = dwarf_alloc_abbrev (); + + /* read in abbrev header */ + cur_abbrev->number = abbrev_number; + cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + abbrev_ptr += 1; + + /* now read in declarations */ + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + while (abbrev_name) + { + if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) + { + cur_abbrev->attrs = (struct attr_abbrev *) + xrealloc (cur_abbrev->attrs, + (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK) + * sizeof (struct attr_abbrev)); + } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; + cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + } + + hash_number = abbrev_number % ABBREV_HASH_SIZE; + cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number]; + cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev; + + /* Get next abbreviation. + Under Irix6 the abbreviations for a compilation unit are not + always properly terminated with an abbrev number of 0. + Exit loop if we encounter an abbreviation which we have + already read (which means we are about to read the abbreviations + for the next compile unit) or if the end of the abbreviation + table is reached. */ + if ((unsigned int) (abbrev_ptr - dwarf_abbrev_buffer) + >= dwarf_abbrev_size) + break; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL) + break; + } +} + +/* Empty the abbrev table for a new compilation unit. */ + +static void +dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table) +{ + int i; + struct abbrev_info *abbrev, *next; + struct abbrev_info **abbrevs; + + abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table; + + for (i = 0; i < ABBREV_HASH_SIZE; ++i) + { + next = NULL; + abbrev = abbrevs[i]; + while (abbrev) + { + next = abbrev->next; + xfree (abbrev->attrs); + xfree (abbrev); + abbrev = next; + } + abbrevs[i] = NULL; + } +} + +/* Lookup an abbrev_info structure in the abbrev hash table. */ + +static struct abbrev_info * +dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int hash_number; + struct abbrev_info *abbrev; + + hash_number = number % ABBREV_HASH_SIZE; + abbrev = cu_header->dwarf2_abbrevs[hash_number]; + + while (abbrev) + { + if (abbrev->number == number) + return abbrev; + else + abbrev = abbrev->next; + } + return NULL; +} + +/* Read a minimal amount of information into the minimal die structure. */ + +static char * +read_partial_die (struct partial_die_info *part_die, bfd *abfd, + char *info_ptr, struct dwarf2_cu *cu) +{ + unsigned int abbrev_number, bytes_read, i; + struct abbrev_info *abbrev; + struct attribute attr; + struct attribute spec_attr; + int found_spec_attr = 0; + int has_low_pc_attr = 0; + int has_high_pc_attr = 0; + + *part_die = zeroed_partial_die; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + return info_ptr; + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + bfd_get_filename (abfd)); + } + part_die->offset = info_ptr - dwarf_info_buffer; + part_die->tag = abbrev->tag; + part_die->has_children = abbrev->has_children; + part_die->abbrev = abbrev_number; + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu); + + /* Store the data if it is of an attribute we want to keep in a + partial symbol table. */ + switch (attr.name) + { + case DW_AT_name: + + /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ + if (part_die->name == NULL) + part_die->name = DW_STRING (&attr); + break; + case DW_AT_MIPS_linkage_name: + part_die->name = DW_STRING (&attr); + break; + case DW_AT_low_pc: + has_low_pc_attr = 1; + part_die->lowpc = DW_ADDR (&attr); + break; + case DW_AT_high_pc: + has_high_pc_attr = 1; + part_die->highpc = DW_ADDR (&attr); + break; + case DW_AT_location: + /* Support the .debug_loc offsets */ + if (attr_form_is_block (&attr)) + { + part_die->locdesc = DW_BLOCK (&attr); + } + else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "partial symbol information"); + } + break; + case DW_AT_language: + part_die->language = DW_UNSND (&attr); + break; + case DW_AT_external: + part_die->is_external = DW_UNSND (&attr); + break; + case DW_AT_declaration: + part_die->is_declaration = DW_UNSND (&attr); + break; + case DW_AT_type: + part_die->has_type = 1; + break; + case DW_AT_abstract_origin: + case DW_AT_specification: + found_spec_attr = 1; + spec_attr = attr; + break; + case DW_AT_sibling: + /* Ignore absolute siblings, they might point outside of + the current compile unit. */ + if (attr.form == DW_FORM_ref_addr) + complaint (&symfile_complaints, "ignoring absolute DW_AT_sibling"); + else + part_die->sibling = + dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu); + break; + default: + break; + } + } + + /* If we found a reference attribute and the die has no name, try + to find a name in the referred to die. */ + + if (found_spec_attr && part_die->name == NULL) + { + struct partial_die_info spec_die; + char *spec_ptr; + + spec_ptr = dwarf_info_buffer + + dwarf2_get_ref_die_offset (&spec_attr, cu); + read_partial_die (&spec_die, abfd, spec_ptr, cu); + if (spec_die.name) + { + part_die->name = spec_die.name; + + /* Copy DW_AT_external attribute if it is set. */ + if (spec_die.is_external) + part_die->is_external = spec_die.is_external; + } + } + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (has_low_pc_attr && has_high_pc_attr + && part_die->lowpc < part_die->highpc + && (part_die->lowpc != 0 + || (bfd_get_file_flags (abfd) & HAS_RELOC))) + part_die->has_pc_info = 1; + return info_ptr; +} + +/* Read the die from the .debug_info section buffer. Set DIEP to + point to a newly allocated die with its information, except for its + child, sibling, and parent fields. Set HAS_CHILDREN to tell + whether the die has children or not. */ + +static char * +read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu, int *has_children) +{ + unsigned int abbrev_number, bytes_read, i, offset; + struct abbrev_info *abbrev; + struct die_info *die; + + offset = info_ptr - dwarf_info_buffer; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + { + die = dwarf_alloc_die (); + die->tag = 0; + die->abbrev = abbrev_number; + die->type = NULL; + *diep = die; + *has_children = 0; + return info_ptr; + } + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: could not find abbrev number %d [in module %s]", + abbrev_number, + bfd_get_filename (abfd)); + } + die = dwarf_alloc_die (); + die->offset = offset; + die->tag = abbrev->tag; + die->abbrev = abbrev_number; + die->type = NULL; + + die->num_attrs = abbrev->num_attrs; + die->attrs = (struct attribute *) + xmalloc (die->num_attrs * sizeof (struct attribute)); + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i], + abfd, info_ptr, cu); + } + + *diep = die; + *has_children = abbrev->has_children; + return info_ptr; +} + +/* Read an attribute value described by an attribute form. */ + +static char * +read_attribute_value (struct attribute *attr, unsigned form, + bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int bytes_read; + struct dwarf_block *blk; + + attr->form = form; + switch (form) + { + case DW_FORM_addr: + case DW_FORM_ref_addr: + DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block2: + blk = dwarf_alloc_block (); + blk->size = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block4: + blk = dwarf_alloc_block (); + blk->size = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_data4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_data8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_string: + DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block: + blk = dwarf_alloc_block (); + blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block1: + blk = dwarf_alloc_block (); + blk->size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_flag: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_sdata: + DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_ref1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_ref2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_ref4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_ref8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_ref_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); + break; + default: + error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + dwarf_form_name (form), + bfd_get_filename (abfd)); + } + return info_ptr; +} + +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (struct attribute *attr, struct attr_abbrev *abbrev, + bfd *abfd, char *info_ptr, struct dwarf2_cu *cu) +{ + attr->name = abbrev->name; + return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu); +} + +/* read dwarf information from a buffer */ + +static unsigned int +read_1_byte (bfd *abfd, char *buf) +{ + return bfd_get_8 (abfd, (bfd_byte *) buf); +} + +static int +read_1_signed_byte (bfd *abfd, char *buf) +{ + return bfd_get_signed_8 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_2_bytes (bfd *abfd, char *buf) +{ + return bfd_get_16 (abfd, (bfd_byte *) buf); +} + +static int +read_2_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_16 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_4_bytes (bfd *abfd, char *buf) +{ + return bfd_get_32 (abfd, (bfd_byte *) buf); +} + +static int +read_4_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_32 (abfd, (bfd_byte *) buf); +} + +static unsigned long +read_8_bytes (bfd *abfd, char *buf) +{ + return bfd_get_64 (abfd, (bfd_byte *) buf); +} + +static CORE_ADDR +read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read) +{ + struct comp_unit_head *cu_header = &cu->header; + CORE_ADDR retval = 0; + + if (cu_header->signed_addr_p) + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_signed_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_signed_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, signed [in module %s]", + bfd_get_filename (abfd)); + } + } + else + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, unsigned [in module %s]", + bfd_get_filename (abfd)); + } + } + + *bytes_read = cu_header->addr_size; + return retval; +} + +/* Read the initial length from a section. The (draft) DWARF 3 + specification allows the initial length to take up either 4 bytes + or 12 bytes. If the first 4 bytes are 0xffffffff, then the next 8 + bytes describe the length and all offsets will be 8 bytes in length + instead of 4. + + An older, non-standard 64-bit format is also handled by this + function. The older format in question stores the initial length + as an 8-byte quantity without an escape value. Lengths greater + than 2^32 aren't very common which means that the initial 4 bytes + is almost always zero. Since a length value of zero doesn't make + sense for the 32-bit format, this initial zero can be considered to + be an escape value which indicates the presence of the older 64-bit + format. As written, the code can't detect (old format) lengths + greater than 4GB. If it becomes necessary to handle lengths somewhat + larger than 4GB, we could allow other small values (such as the + non-sensical values of 1, 2, and 3) to also be used as escape values + indicating the presence of the old format. + + The value returned via bytes_read should be used to increment + the relevant pointer after calling read_initial_length(). + + As a side effect, this function sets the fields initial_length_size + and offset_size in cu_header to the values appropriate for the + length field. (The format of the initial length field determines + the width of file offsets to be fetched later with fetch_offset().) + + [ Note: read_initial_length() and read_offset() are based on the + document entitled "DWARF Debugging Information Format", revision + 3, draft 8, dated November 19, 2001. This document was obtained + from: + + http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf + + This document is only a draft and is subject to change. (So beware.) + + Details regarding the older, non-standard 64-bit format were + determined empirically by examining 64-bit ELF files produced + by the SGI toolchain on an IRIX 6.5 machine. + + - Kevin, July 16, 2002 + ] */ + +static LONGEST +read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + + if (retval == 0xffffffff) + { + retval = bfd_get_64 (abfd, (bfd_byte *) buf + 4); + *bytes_read = 12; + if (cu_header != NULL) + { + cu_header->initial_length_size = 12; + cu_header->offset_size = 8; + } + } + else if (retval == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats such as that used + by IRIX. */ + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + if (cu_header != NULL) + { + cu_header->initial_length_size = 8; + cu_header->offset_size = 8; + } + } + else + { + *bytes_read = 4; + if (cu_header != NULL) + { + cu_header->initial_length_size = 4; + cu_header->offset_size = 4; + } + } + + return retval; +} + +/* Read an offset from the data stream. The size of the offset is + given by cu_header->offset_size. */ + +static LONGEST +read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + switch (cu_header->offset_size) + { + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + *bytes_read = 4; + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + break; + default: + internal_error (__FILE__, __LINE__, + "read_offset: bad switch [in module %s]", + bfd_get_filename (abfd)); + } + + return retval; +} + +static char * +read_n_bytes (bfd *abfd, char *buf, unsigned int size) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the buffer, otherwise we have to copy the data to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + return buf; +} + +static char * +read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the string, otherwise we have to copy the string to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + if (*buf == '\0') + { + *bytes_read_ptr = 1; + return NULL; + } + *bytes_read_ptr = strlen (buf) + 1; + return buf; +} + +static char * +read_indirect_string (bfd *abfd, char *buf, + const struct comp_unit_head *cu_header, + unsigned int *bytes_read_ptr) +{ + LONGEST str_offset = read_offset (abfd, buf, cu_header, + (int *) bytes_read_ptr); + + if (dwarf_str_buffer == NULL) + { + error ("DW_FORM_strp used without .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + if (str_offset >= dwarf_str_size) + { + error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + gdb_assert (HOST_CHAR_BIT == 8); + if (dwarf_str_buffer[str_offset] == '\0') + return NULL; + return dwarf_str_buffer + str_offset; +} + +static unsigned long +read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + unsigned long result; + unsigned int num_read; + int i, shift; + unsigned char byte; + + result = 0; + shift = 0; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((unsigned long)(byte & 127) << shift); + if ((byte & 128) == 0) + { + break; + } + shift += 7; + } + *bytes_read_ptr = num_read; + return result; +} + +static long +read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + long result; + int i, shift, size, num_read; + unsigned char byte; + + result = 0; + shift = 0; + size = 32; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((long)(byte & 127) << shift); + shift += 7; + if ((byte & 128) == 0) + { + break; + } + } + if ((shift < size) && (byte & 0x40)) + { + result |= -(1 << shift); + } + *bytes_read_ptr = num_read; + return result; +} + +static void +set_cu_language (unsigned int lang, struct dwarf2_cu *cu) +{ + switch (lang) + { + case DW_LANG_C89: + case DW_LANG_C: + cu->language = language_c; + break; + case DW_LANG_C_plus_plus: + cu->language = language_cplus; + break; + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + cu->language = language_fortran; + break; + case DW_LANG_Mips_Assembler: + cu->language = language_asm; + break; + case DW_LANG_Java: + cu->language = language_java; + break; + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + default: + cu->language = language_minimal; + break; + } + cu->language_defn = language_def (cu->language); +} + +/* Return the named attribute or NULL if not there. */ + +static struct attribute * +dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) +{ + unsigned int i; + struct attribute *spec = NULL; + + for (i = 0; i < die->num_attrs; ++i) + { + if (die->attrs[i].name == name) + { + return &die->attrs[i]; + } + if (die->attrs[i].name == DW_AT_specification + || die->attrs[i].name == DW_AT_abstract_origin) + spec = &die->attrs[i]; + } + if (spec) + { + struct die_info *ref_die = + follow_die_ref (dwarf2_get_ref_die_offset (spec, cu)); + + if (ref_die) + return dwarf2_attr (ref_die, name, cu); + } + + return NULL; +} + +static int +die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) +{ + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); +} + +/* Return the die giving the specification for DIE, if there is + one. */ + +static struct die_info * +die_specification (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu); + + if (spec_attr == NULL) + return NULL; + else + return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu)); +} + +/* Free the line_header structure *LH, and any arrays and strings it + refers to. */ +static void +free_line_header (struct line_header *lh) +{ + if (lh->standard_opcode_lengths) + xfree (lh->standard_opcode_lengths); + + /* Remember that all the lh->file_names[i].name pointers are + pointers into debug_line_buffer, and don't need to be freed. */ + if (lh->file_names) + xfree (lh->file_names); + + /* Similarly for the include directory names. */ + if (lh->include_dirs) + xfree (lh->include_dirs); + + xfree (lh); +} + + +/* Add an entry to LH's include directory table. */ +static void +add_include_dir (struct line_header *lh, char *include_dir) +{ + /* Grow the array if necessary. */ + if (lh->include_dirs_size == 0) + { + lh->include_dirs_size = 1; /* for testing */ + lh->include_dirs = xmalloc (lh->include_dirs_size + * sizeof (*lh->include_dirs)); + } + else if (lh->num_include_dirs >= lh->include_dirs_size) + { + lh->include_dirs_size *= 2; + lh->include_dirs = xrealloc (lh->include_dirs, + (lh->include_dirs_size + * sizeof (*lh->include_dirs))); + } + + lh->include_dirs[lh->num_include_dirs++] = include_dir; +} + + +/* Add an entry to LH's file name table. */ +static void +add_file_name (struct line_header *lh, + char *name, + unsigned int dir_index, + unsigned int mod_time, + unsigned int length) +{ + struct file_entry *fe; + + /* Grow the array if necessary. */ + if (lh->file_names_size == 0) + { + lh->file_names_size = 1; /* for testing */ + lh->file_names = xmalloc (lh->file_names_size + * sizeof (*lh->file_names)); + } + else if (lh->num_file_names >= lh->file_names_size) + { + lh->file_names_size *= 2; + lh->file_names = xrealloc (lh->file_names, + (lh->file_names_size + * sizeof (*lh->file_names))); + } + + fe = &lh->file_names[lh->num_file_names++]; + fe->name = name; + fe->dir_index = dir_index; + fe->mod_time = mod_time; + fe->length = length; +} + + +/* Read the statement program header starting at OFFSET in + dwarf_line_buffer, according to the endianness of ABFD. Return a + pointer to a struct line_header, allocated using xmalloc. + + NOTE: the strings in the include directory and file name tables of + the returned object point into debug_line_buffer, and must not be + freed. */ +static struct line_header * +dwarf_decode_line_header (unsigned int offset, bfd *abfd, + struct dwarf2_cu *cu) +{ + struct cleanup *back_to; + struct line_header *lh; + char *line_ptr; + int bytes_read; + int i; + char *cur_dir, *cur_file; + + if (dwarf_line_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_line section"); + return 0; + } + + /* Make sure that at least there's room for the total_length field. That + could be 12 bytes long, but we're just going to fudge that. */ + if (offset + 4 >= dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + + lh = xmalloc (sizeof (*lh)); + memset (lh, 0, sizeof (*lh)); + back_to = make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) lh); + + line_ptr = dwarf_line_buffer + offset; + + /* read in the header */ + lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read); + line_ptr += bytes_read; + if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + lh->statement_program_end = line_ptr + lh->total_length; + lh->version = read_2_bytes (abfd, line_ptr); + line_ptr += 2; + lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read); + line_ptr += bytes_read; + lh->minimum_instruction_length = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->default_is_stmt = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_base = read_1_signed_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_range = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->opcode_base = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->standard_opcode_lengths + = (unsigned char *) xmalloc (lh->opcode_base * sizeof (unsigned char)); + + lh->standard_opcode_lengths[0] = 1; /* This should never be used anyway. */ + for (i = 1; i < lh->opcode_base; ++i) + { + lh->standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + line_ptr += 1; + } + + /* Read directory table */ + while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + line_ptr += bytes_read; + add_include_dir (lh, cur_dir); + } + line_ptr += bytes_read; + + /* Read file name table */ + while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + unsigned int dir_index, mod_time, length; + + line_ptr += bytes_read; + dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + line_ptr += bytes_read; + lh->statement_program_start = line_ptr; + + if (line_ptr > dwarf_line_buffer + dwarf_line_size) + complaint (&symfile_complaints, + "line number info header doesn't fit in `.debug_line' section"); + + discard_cleanups (back_to); + return lh; +} + +/* This function exists to work around a bug in certain compilers + (particularly GCC 2.95), in which the first line number marker of a + function does not show up until after the prologue, right before + the second line number marker. This function shifts ADDRESS down + to the beginning of the function if necessary, and is called on + addresses passed to record_line. */ + +static CORE_ADDR +check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu) +{ + struct function_range *fn; + + /* Find the function_range containing address. */ + if (!cu->first_fn) + return address; + + if (!cu->cached_fn) + cu->cached_fn = cu->first_fn; + + fn = cu->cached_fn; + while (fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + fn = cu->first_fn; + while (fn && fn != cu->cached_fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + return address; + + found: + if (fn->seen_line) + return address; + if (address != fn->lowpc) + complaint (&symfile_complaints, + "misplaced first line number at 0x%lx for '%s'", + (unsigned long) address, fn->name); + fn->seen_line = 1; + return fn->lowpc; +} + +/* Decode the line number information for the compilation unit whose + line number info is at OFFSET in the .debug_line section. + The compilation directory of the file is passed in COMP_DIR. */ + +static void +dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *line_ptr; + char *line_end; + unsigned int bytes_read; + unsigned char op_code, extended_op, adj_opcode; + CORE_ADDR baseaddr; + struct objfile *objfile = cu->objfile; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + line_ptr = lh->statement_program_start; + line_end = lh->statement_program_end; + + /* Read the statement sequences until there's nothing left. */ + while (line_ptr < line_end) + { + /* state machine registers */ + CORE_ADDR address = 0; + unsigned int file = 1; + unsigned int line = 1; + unsigned int column = 0; + int is_stmt = lh->default_is_stmt; + int basic_block = 0; + int end_sequence = 0; + + /* Start a subfile for the current file of the state machine. */ + if (lh->num_file_names >= file) + { + /* lh->include_dirs and lh->file_names are 0-based, but the + directory and file name numbers in the statement program + are 1-based. */ + struct file_entry *fe = &lh->file_names[file - 1]; + char *dir; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + + /* Decode the table. */ + while (!end_sequence) + { + op_code = read_1_byte (abfd, line_ptr); + line_ptr += 1; + + if (op_code >= lh->opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh->opcode_base; + address += (adj_opcode / lh->line_range) + * lh->minimum_instruction_length; + line += lh->line_base + (adj_opcode % lh->line_range); + /* append row to matrix using current values */ + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 1; + } + else switch (op_code) + { + case DW_LNS_extended_op: + line_ptr += 1; /* ignore length */ + extended_op = read_1_byte (abfd, line_ptr); + line_ptr += 1; + switch (extended_op) + { + case DW_LNE_end_sequence: + end_sequence = 1; + record_line (current_subfile, 0, address); + break; + case DW_LNE_set_address: + address = read_address (abfd, line_ptr, cu, &bytes_read); + line_ptr += bytes_read; + address += baseaddr; + break; + case DW_LNE_define_file: + { + char *cur_file; + unsigned int dir_index, mod_time, length; + + cur_file = read_string (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + dir_index = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + break; + default: + complaint (&symfile_complaints, + "mangled .debug_line section"); + return; + } + break; + case DW_LNS_copy: + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 0; + break; + case DW_LNS_advance_pc: + address += lh->minimum_instruction_length + * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_advance_line: + line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_set_file: + { + /* lh->include_dirs and lh->file_names are 0-based, + but the directory and file name numbers in the + statement program are 1-based. */ + struct file_entry *fe; + char *dir; + file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + fe = &lh->file_names[file - 1]; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + break; + case DW_LNS_set_column: + column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_negate_stmt: + is_stmt = (!is_stmt); + break; + case DW_LNS_set_basic_block: + basic_block = 1; + break; + /* Add to the address register of the state machine the + address increment value corresponding to special opcode + 255. Ie, this value is scaled by the minimum instruction + length since special opcode 255 would have scaled the + the increment. */ + case DW_LNS_const_add_pc: + address += (lh->minimum_instruction_length + * ((255 - lh->opcode_base) / lh->line_range)); + break; + case DW_LNS_fixed_advance_pc: + address += read_2_bytes (abfd, line_ptr); + line_ptr += 2; + break; + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh->standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } + } + } + } +} + +/* Start a subfile for DWARF. FILENAME is the name of the file and + DIRNAME the name of the source directory which contains FILENAME + or NULL if not known. + This routine tries to keep line numbers from identical absolute and + relative file names in a common subfile. + + Using the `list' example from the GDB testsuite, which resides in + /srcdir and compiling it with Irix6.2 cc in /compdir using a filename + of /srcdir/list0.c yields the following debugging information for list0.c: + + DW_AT_name: /srcdir/list0.c + DW_AT_comp_dir: /compdir + files.files[0].name: list0.h + files.files[0].dir: /srcdir + files.files[1].name: list0.c + files.files[1].dir: /srcdir + + The line number information for list0.c has to end up in a single + subfile, so that `break /srcdir/list0.c:1' works as expected. */ + +static void +dwarf2_start_subfile (char *filename, char *dirname) +{ + /* If the filename isn't absolute, try to match an existing subfile + with the full pathname. */ + + if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) + { + struct subfile *subfile; + char *fullname = concat (dirname, "/", filename, NULL); + + for (subfile = subfiles; subfile; subfile = subfile->next) + { + if (FILENAME_CMP (subfile->name, fullname) == 0) + { + current_subfile = subfile; + xfree (fullname); + return; + } + } + xfree (fullname); + } + start_subfile (filename, dirname); +} + +static void +var_decode_location (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + + /* NOTE drow/2003-01-30: There used to be a comment and some special + code here to turn a symbol with DW_AT_external and a + SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was + necessary for platforms (maybe Alpha, certainly PowerPC GNU/Linux + with some versions of binutils) where shared libraries could have + relocations against symbols in their debug information - the + minimal symbol would have the right address, but the debug info + would not. It's no longer necessary, because we will explicitly + apply relocations when we read in the debug information now. */ + + /* A DW_AT_location attribute with no contents indicates that a + variable has been optimized away. */ + if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0) + { + SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; + return; + } + + /* Handle one degenerate form of location expression specially, to + preserve GDB's previous behavior when section offsets are + specified. If this is just a DW_OP_addr then mark this symbol + as LOC_STATIC. */ + + if (attr_form_is_block (attr) + && DW_BLOCK (attr)->size == 1 + cu_header->addr_size + && DW_BLOCK (attr)->data[0] == DW_OP_addr) + { + int dummy; + + SYMBOL_VALUE_ADDRESS (sym) = + read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy); + fixup_symbol_section (sym, objfile); + SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, + SYMBOL_SECTION (sym)); + SYMBOL_CLASS (sym) = LOC_STATIC; + return; + } + + /* NOTE drow/2002-01-30: It might be worthwhile to have a static + expression evaluator, and use LOC_COMPUTED only when necessary + (i.e. when the value of a register or memory location is + referenced, or a thread-local block, etc.). Then again, it might + not be worthwhile. I'm assuming that it isn't unless performance + or memory numbers show me otherwise. */ + + dwarf2_symbol_mark_computed (attr, sym, cu); + SYMBOL_CLASS (sym) = LOC_COMPUTED; +} + +/* Given a pointer to a DWARF information entry, figure out if we need + to make a symbol table entry for it, and if so, create a new entry + and return a pointer to it. + If TYPE is NULL, determine symbol type from the die, otherwise + used the passed type. */ + +static struct symbol * +new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct symbol *sym = NULL; + char *name; + struct attribute *attr = NULL; + struct attribute *attr2 = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + + if (name) + { + sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + OBJSTAT (objfile, n_syms++); + memset (sym, 0, sizeof (struct symbol)); + + /* Cache this symbol's name and the name's demangled form (if any). */ + SYMBOL_LANGUAGE (sym) = cu->language; + SYMBOL_SET_NAMES (sym, name, strlen (name), objfile); + + /* Default assumptions. + Use the passed type or decode it from the die. */ + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_CLASS (sym) = LOC_STATIC; + if (type != NULL) + SYMBOL_TYPE (sym) = type; + else + SYMBOL_TYPE (sym) = die_type (die, cu); + attr = dwarf2_attr (die, DW_AT_decl_line, cu); + if (attr) + { + SYMBOL_LINE (sym) = DW_UNSND (attr); + } + switch (die->tag) + { + case DW_TAG_label: + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = DW_ADDR (attr) + baseaddr; + } + SYMBOL_CLASS (sym) = LOC_LABEL; + break; + case DW_TAG_subprogram: + /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by + finish_block. */ + SYMBOL_CLASS (sym) = LOC_BLOCK; + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + { + add_symbol_to_list (sym, &global_symbols); + } + else + { + add_symbol_to_list (sym, cu->list_in_scope); + } + break; + case DW_TAG_variable: + /* Compilation with minimal debug info may result in variables + with missing type entries. Change the misleading `void' type + to something sensible. */ + if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID) + SYMBOL_TYPE (sym) = init_type (TYPE_CODE_INT, + TARGET_INT_BIT / HOST_CHAR_BIT, 0, + "", + objfile); + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + break; + } + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + } + else + { + /* We do not know the address of this symbol. + If it is an external symbol and we have type information + for it, enter the symbol as a LOC_UNRESOLVED symbol. + The address of the variable will then be determined from + the minimal symbol table whenever the variable is + referenced. */ + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0) + && dwarf2_attr (die, DW_AT_type, cu) != NULL) + { + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; + add_symbol_to_list (sym, &global_symbols); + } + } + break; + case DW_TAG_formal_parameter: + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_unspecified_parameters: + /* From varargs functions; gdb doesn't seem to have any + interest in this information, so just ignore it for now. + (FIXME?) */ + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; + + /* Make sure that the symbol includes appropriate enclosing + classes/namespaces in its name. These are calculated in + read_structure_type, and the correct name is saved in + the type. */ + + if (cu->language == language_cplus) + { + struct type *type = SYMBOL_TYPE (sym); + + if (TYPE_TAG_NAME (type) != NULL) + { + /* FIXME: carlton/2003-11-10: Should this use + SYMBOL_SET_NAMES instead? (The same problem also + arises a further down in the function.) */ + SYMBOL_LINKAGE_NAME (sym) + = obsavestring (TYPE_TAG_NAME (type), + strlen (TYPE_TAG_NAME (type)), + &objfile->objfile_obstack); + } + } + + { + /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't + really ever be static objects: otherwise, if you try + to, say, break of a class's method and you're in a file + which doesn't mention that class, it won't work unless + the check for all static symbols in lookup_symbol_aux + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + + /* The semantics of C++ state that "struct foo { ... }" also + defines a typedef for "foo". Synthesize a typedef symbol so + that "ptype foo" works as expected. */ + if (cu->language == language_cplus) + { + struct symbol *typedef_sym = (struct symbol *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + *typedef_sym = *sym; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; + if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + TYPE_NAME (SYMBOL_TYPE (sym)) = + obsavestring (SYMBOL_NATURAL_NAME (sym), + strlen (SYMBOL_NATURAL_NAME (sym)), + &objfile->objfile_obstack); + add_symbol_to_list (typedef_sym, list_to_add); + } + } + break; + case DW_TAG_typedef: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_enumerator: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + { + /* NOTE: carlton/2003-11-10: See comment above in the + DW_TAG_class_type, etc. block. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + } + break; + case DW_TAG_namespace: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + add_symbol_to_list (sym, &global_symbols); + break; + default: + /* Not a tag we recognize. Hopefully we aren't processing + trash data, but since we must specifically ignore things + we don't recognize, there is nothing else we should do at + this point. */ + complaint (&symfile_complaints, "unsupported tag: '%s'", + dwarf_tag_name (die->tag)); + break; + } + } + return (sym); +} + +/* Copy constant value from an attribute to a symbol. */ + +static void +dwarf2_const_value (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct dwarf_block *blk; + + switch (attr->form) + { + case DW_FORM_addr: + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + cu_header->addr_size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); + /* NOTE: cagney/2003-05-09: In-lined store_address call with + it's body - store_unsigned_integer. */ + store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, + DW_ADDR (attr)); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + blk = DW_BLOCK (attr); + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + blk->size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, blk->size); + memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + + /* The DW_AT_const_value attributes are supposed to carry the + symbol's value "represented as it would be on the target + architecture." By the time we get here, it's already been + converted to host endianness, so we just need to sign- or + zero-extend it as appropriate. */ + case DW_FORM_data1: + dwarf2_const_value_data (attr, sym, 8); + break; + case DW_FORM_data2: + dwarf2_const_value_data (attr, sym, 16); + break; + case DW_FORM_data4: + dwarf2_const_value_data (attr, sym, 32); + break; + case DW_FORM_data8: + dwarf2_const_value_data (attr, sym, 64); + break; + + case DW_FORM_sdata: + SYMBOL_VALUE (sym) = DW_SND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + case DW_FORM_udata: + SYMBOL_VALUE (sym) = DW_UNSND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + default: + complaint (&symfile_complaints, + "unsupported const value attribute form: '%s'", + dwarf_form_name (attr->form)); + SYMBOL_VALUE (sym) = 0; + SYMBOL_CLASS (sym) = LOC_CONST; + break; + } +} + + +/* Given an attr with a DW_FORM_dataN value in host byte order, sign- + or zero-extend it as appropriate for the symbol's type. */ +static void +dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits) +{ + LONGEST l = DW_UNSND (attr); + + if (bits < sizeof (l) * 8) + { + if (TYPE_UNSIGNED (SYMBOL_TYPE (sym))) + l &= ((LONGEST) 1 << bits) - 1; + else + l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits); + } + + SYMBOL_VALUE (sym) = l; + SYMBOL_CLASS (sym) = LOC_CONST; +} + + +/* Return the type of the die in question using its DW_AT_type attribute. */ + +static struct type * +die_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *type_attr; + struct die_info *type_die; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_type, cu); + if (!type_attr) + { + /* A missing DW_AT_type represents a void type. */ + return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu); + } + else + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", + ref, cu->objfile->name); + return NULL; + } + } + type = tag_type_to_type (type_die, cu); + if (!type) + { + dump_die (type_die); + error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +/* Return the containing type of the die in question using its + DW_AT_containing_type attribute. */ + +static struct type * +die_containing_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type = NULL; + struct attribute *type_attr; + struct die_info *type_die = NULL; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_containing_type, cu); + if (type_attr) + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref, + cu->objfile->name); + return NULL; + } + type = tag_type_to_type (type_die, cu); + } + if (!type) + { + if (type_die) + dump_die (type_die); + error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +#if 0 +static struct type * +type_at_offset (unsigned int offset, struct dwarf2_cu *cu) +{ + struct die_info *die; + struct type *type; + + die = follow_die_ref (offset); + if (!die) + { + error ("Dwarf Error: Cannot find type referent at offset %d.", offset); + return NULL; + } + type = tag_type_to_type (die, cu); + return type; +} +#endif + +static struct type * +tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) +{ + if (die->type) + { + return die->type; + } + else + { + read_type_die (die, cu); + if (!die->type) + { + dump_die (die); + error ("Dwarf Error: Cannot find type of die [in module %s]", + cu->objfile->name); + } + return die->type; + } +} + +static void +read_type_die (struct die_info *die, struct dwarf2_cu *cu) +{ + char *prefix = determine_prefix (die, cu); + const char *old_prefix = processing_current_prefix; + struct cleanup *back_to = make_cleanup (xfree, prefix); + processing_current_prefix = prefix; + + switch (die->tag) + { + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +#ifdef CRASH_MERGE + process_structure_scope (die, cu); +#endif + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); +#ifdef CRASH_MERGE + process_enumeration_scope (die, cu); +#endif + break; + case DW_TAG_subprogram: + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_const_type: + read_tag_const_type (die, cu); + break; + case DW_TAG_volatile_type: + read_tag_volatile_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + case DW_TAG_typedef: + read_typedef (die, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + break; + case DW_TAG_base_type: + read_base_type (die, cu); +#ifdef CRASH_MERGE + new_symbol (die, die->type, cu); +#endif + break; + default: + complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'", + dwarf_tag_name (die->tag)); + break; + } + + processing_current_prefix = old_prefix; + do_cleanups (back_to); +} + +/* Return the name of the namespace/class that DIE is defined within, + or "" if we can't tell. The caller should xfree the result. */ + +/* NOTE: carlton/2004-01-23: See read_func_scope (and the comment + therein) for an example of how to use this function to deal with + DW_AT_specification. */ + +static char * +determine_prefix (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *parent; + + if (cu->language != language_cplus) + return NULL; + + parent = die->parent; + + if (parent == NULL) + { + return xstrdup (""); + } + else + { + switch (parent->tag) { + case DW_TAG_namespace: + { + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } + } + default: + return determine_prefix (parent, cu); + } + } +} + +/* Return a newly-allocated string formed by concatenating PREFIX, + "::", and SUFFIX, except that if PREFIX is NULL or the empty + string, just return a copy of SUFFIX. */ + +static char * +typename_concat (const char *prefix, const char *suffix) +{ + if (prefix == NULL || prefix[0] == '\0') + return xstrdup (suffix); + else + { + char *retval = xmalloc (strlen (prefix) + 2 + strlen (suffix) + 1); + + strcpy (retval, prefix); + strcat (retval, "::"); + strcat (retval, suffix); + + return retval; + } +} + +static struct type * +dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + + /* FIXME - this should not produce a new (struct type *) + every time. It should cache base types. */ + struct type *type; + switch (encoding) + { + case DW_ATE_address: + type = dwarf2_fundamental_type (objfile, FT_VOID, cu); + return type; + case DW_ATE_boolean: + type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu); + return type; + case DW_ATE_complex_float: + if (size == 16) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu); + } + return type; + case DW_ATE_float: + if (size == 8) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + return type; + case DW_ATE_signed: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_signed_char: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + return type; + case DW_ATE_unsigned: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_unsigned_char: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + return type; + default: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + return type; + } +} + +#if 0 +struct die_info * +copy_die (struct die_info *old_die) +{ + struct die_info *new_die; + int i, num_attrs; + + new_die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (new_die, 0, sizeof (struct die_info)); + + new_die->tag = old_die->tag; + new_die->has_children = old_die->has_children; + new_die->abbrev = old_die->abbrev; + new_die->offset = old_die->offset; + new_die->type = NULL; + + num_attrs = old_die->num_attrs; + new_die->num_attrs = num_attrs; + new_die->attrs = (struct attribute *) + xmalloc (num_attrs * sizeof (struct attribute)); + + for (i = 0; i < old_die->num_attrs; ++i) + { + new_die->attrs[i].name = old_die->attrs[i].name; + new_die->attrs[i].form = old_die->attrs[i].form; + new_die->attrs[i].u.addr = old_die->attrs[i].u.addr; + } + + new_die->next = NULL; + return new_die; +} +#endif + +/* Return sibling of die, NULL if no sibling. */ + +static struct die_info * +sibling_die (struct die_info *die) +{ + return die->sibling; +} + +/* Get linkage name of a die, return NULL if not found. */ + +static char * +dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Get name of a die, return NULL if not found. */ + +static char * +dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Return the die that this die in an extension of, or NULL if there + is none. */ + +static struct die_info * +dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + struct die_info *extension_die; + unsigned int ref; + + attr = dwarf2_attr (die, DW_AT_extension, cu); + if (attr == NULL) + return NULL; + + ref = dwarf2_get_ref_die_offset (attr, cu); + extension_die = follow_die_ref (ref); + if (!extension_die) + { + error ("Dwarf Error: Cannot find referent at offset %d.", ref); + } + + return extension_die; +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (unsigned tag) +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_dwarf_procedure: + return "DW_TAG_dwarf_procedure"; + case DW_TAG_restrict_type: + return "DW_TAG_restrict_type"; + case DW_TAG_interface_type: + return "DW_TAG_interface_type"; + case DW_TAG_namespace: + return "DW_TAG_namespace"; + case DW_TAG_imported_module: + return "DW_TAG_imported_module"; + case DW_TAG_unspecified_type: + return "DW_TAG_unspecified_type"; + case DW_TAG_partial_unit: + return "DW_TAG_partial_unit"; + case DW_TAG_imported_unit: + return "DW_TAG_imported_unit"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (unsigned attr) +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + case DW_AT_allocated: + return "DW_AT_allocated"; + case DW_AT_associated: + return "DW_AT_associated"; + case DW_AT_data_location: + return "DW_AT_data_location"; + case DW_AT_stride: + return "DW_AT_stride"; + case DW_AT_entry_pc: + return "DW_AT_entry_pc"; + case DW_AT_use_UTF8: + return "DW_AT_use_UTF8"; + case DW_AT_extension: + return "DW_AT_extension"; + case DW_AT_ranges: + return "DW_AT_ranges"; + case DW_AT_trampoline: + return "DW_AT_trampoline"; + case DW_AT_call_column: + return "DW_AT_call_column"; + case DW_AT_call_file: + return "DW_AT_call_file"; + case DW_AT_call_line: + return "DW_AT_call_line"; +#ifdef MIPS + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; +#endif + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + default: + return "DW_AT_"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (unsigned form) +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (unsigned op) +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + /* DWARF 3 extensions. */ + case DW_OP_push_object_address: + return "DW_OP_push_object_address"; + case DW_OP_call2: + return "DW_OP_call2"; + case DW_OP_call4: + return "DW_OP_call4"; + case DW_OP_call_ref: + return "DW_OP_call_ref"; + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + return "DW_OP_GNU_push_tls_address"; + default: + return "OP_"; + } +} + +static char * +dwarf_bool_name (unsigned mybool) +{ + if (mybool) + return "TRUE"; + else + return "FALSE"; +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (unsigned enc) +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + case DW_ATE_imaginary_float: + return "DW_ATE_imaginary_float"; + default: + return "DW_ATE_"; + } +} + +/* Convert a DWARF call frame info operation to its string name. */ + +#if 0 +static char * +dwarf_cfi_name (unsigned cfi_opc) +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ + case DW_CFA_def_cfa_expression: + return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + case DW_CFA_GNU_negative_offset_extended: + return "DW_CFA_GNU_negative_offset_extended"; + + default: + return "DW_CFA_"; + } +} +#endif + +static void +dump_die (struct die_info *die) +{ + unsigned int i; + + fprintf_unfiltered (gdb_stderr, "Die: %s (abbrev = %d, offset = %d)\n", + dwarf_tag_name (die->tag), die->abbrev, die->offset); + fprintf_unfiltered (gdb_stderr, "\thas children: %s\n", + dwarf_bool_name (die->child != NULL)); + + fprintf_unfiltered (gdb_stderr, "\tattributes:\n"); + for (i = 0; i < die->num_attrs; ++i) + { + fprintf_unfiltered (gdb_stderr, "\t\t%s (%s) ", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); + switch (die->attrs[i].form) + { + case DW_FORM_ref_addr: + case DW_FORM_addr: + fprintf_unfiltered (gdb_stderr, "address: "); + print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr); + break; + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_block1: + fprintf_unfiltered (gdb_stderr, "block: size %d", DW_BLOCK (&die->attrs[i])->size); + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_udata: + case DW_FORM_sdata: + fprintf_unfiltered (gdb_stderr, "constant: %ld", DW_UNSND (&die->attrs[i])); + break; + case DW_FORM_string: + case DW_FORM_strp: + fprintf_unfiltered (gdb_stderr, "string: \"%s\"", + DW_STRING (&die->attrs[i]) + ? DW_STRING (&die->attrs[i]) : ""); + break; + case DW_FORM_flag: + if (DW_UNSND (&die->attrs[i])) + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + else + fprintf_unfiltered (gdb_stderr, "flag: FALSE"); + break; + case DW_FORM_indirect: + /* the reader will have reduced the indirect form to + the "base form" so this form should not occur */ + fprintf_unfiltered (gdb_stderr, "unexpected attribute form: DW_FORM_indirect"); + break; + default: + fprintf_unfiltered (gdb_stderr, "unsupported attribute form: %d.", + die->attrs[i].form); + } + fprintf_unfiltered (gdb_stderr, "\n"); + } +} + +static void +dump_die_list (struct die_info *die) +{ + while (die) + { + dump_die (die); + if (die->child != NULL) + dump_die_list (die->child); + if (die->sibling != NULL) + dump_die_list (die->sibling); + } +} + +static void +store_in_ref_table (unsigned int offset, struct die_info *die) +{ + int h; + struct die_info *old; + + h = (offset % REF_HASH_SIZE); + old = die_ref_table[h]; + die->next_ref = old; + die_ref_table[h] = die; +} + + +static void +dwarf2_empty_hash_tables (void) +{ + memset (die_ref_table, 0, sizeof (die_ref_table)); +} + +static unsigned int +dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu) +{ + unsigned int result = 0; + + switch (attr->form) + { + case DW_FORM_ref_addr: + result = DW_ADDR (attr); + break; + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_ref8: + case DW_FORM_ref_udata: + result = cu->header.offset + DW_UNSND (attr); + break; + default: + complaint (&symfile_complaints, + "unsupported die ref attribute form: '%s'", + dwarf_form_name (attr->form)); + } + return result; +} + +/* Return the constant value held by the given attribute. Return -1 + if the value held by the attribute is not constant. */ + +static int +dwarf2_get_attr_constant_value (struct attribute *attr, int default_value) +{ + if (attr->form == DW_FORM_sdata) + return DW_SND (attr); + else if (attr->form == DW_FORM_udata + || attr->form == DW_FORM_data1 + || attr->form == DW_FORM_data2 + || attr->form == DW_FORM_data4 + || attr->form == DW_FORM_data8) + return DW_UNSND (attr); + else + { + complaint (&symfile_complaints, "Attribute value is not a constant (%s)", + dwarf_form_name (attr->form)); + return default_value; + } +} + +static struct die_info * +follow_die_ref (unsigned int offset) +{ + struct die_info *die; + int h; + + h = (offset % REF_HASH_SIZE); + die = die_ref_table[h]; + while (die) + { + if (die->offset == offset) + { + return die; + } + die = die->next_ref; + } + return NULL; +} + +static struct type * +dwarf2_fundamental_type (struct objfile *objfile, int typeid, + struct dwarf2_cu *cu) +{ + if (typeid < 0 || typeid >= FT_NUM_MEMBERS) + { + error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + typeid, objfile->name); + } + + /* Look for this particular type in the fundamental type vector. If + one is not found, create and install one appropriate for the + current language and the current target machine. */ + + if (cu->ftypes[typeid] == NULL) + { + cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid); + } + + return (cu->ftypes[typeid]); +} + +/* Decode simple location descriptions. + Given a pointer to a dwarf block that defines a location, compute + the location and return the value. + + NOTE drow/2003-11-18: This function is called in two situations + now: for the address of static or global variables (partial symbols + only) and for offsets into structures which are expected to be + (more or less) constant. The partial symbol case should go away, + and only the constant case should remain. That will let this + function complain more accurately. A few special modes are allowed + without complaint for global variables (for instance, global + register values and thread-local values). + + A location description containing no operations indicates that the + object is optimized out. The return value is 0 for that case. + FIXME drow/2003-11-16: No callers check for this case any more; soon all + callers will only want a very basic result and this can become a + complaint. + + When the result is a register number, the global isreg flag is set, + otherwise it is cleared. + + Note that stack[0] is unused except as a default error return. + Note that stack overflow is not yet handled. */ + +static CORE_ADDR +decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + int i; + int size = blk->size; + char *data = blk->data; + CORE_ADDR stack[64]; + int stacki; + unsigned int bytes_read, unsnd; + unsigned char op; + + i = 0; + stacki = 0; + stack[stacki] = 0; + isreg = 0; + + while (i < size) + { + op = data[i++]; + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + stack[++stacki] = op - DW_OP_lit0; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + isreg = 1; + stack[++stacki] = op - DW_OP_reg0; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_regx: + isreg = 1; + unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + stack[++stacki] = unsnd; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_addr: + stack[++stacki] = read_address (objfile->obfd, &data[i], + cu, &bytes_read); + i += bytes_read; + break; + + case DW_OP_const1u: + stack[++stacki] = read_1_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const1s: + stack[++stacki] = read_1_signed_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const2u: + stack[++stacki] = read_2_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const2s: + stack[++stacki] = read_2_signed_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const4u: + stack[++stacki] = read_4_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_const4s: + stack[++stacki] = read_4_signed_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_constu: + stack[++stacki] = read_unsigned_leb128 (NULL, (data + i), + &bytes_read); + i += bytes_read; + break; + + case DW_OP_consts: + stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_dup: + stack[stacki + 1] = stack[stacki]; + stacki++; + break; + + case DW_OP_plus: + stack[stacki - 1] += stack[stacki]; + stacki--; + break; + + case DW_OP_plus_uconst: + stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_minus: + stack[stacki - 1] -= stack[stacki]; + stacki--; + break; + + case DW_OP_deref: + /* If we're not the last op, then we definitely can't encode + this using GDB's address_class enum. This is valid for partial + global symbols, although the variable's address will be bogus + in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_GNU_push_tls_address: + /* The top of the stack has the offset from the beginning + of the thread control block at which the variable is located. */ + /* Nothing should follow this operator, so the top of stack would + be returned. */ + /* This is valid for partial global symbols, but the variable's + address will be bogus in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + default: + complaint (&symfile_complaints, "unsupported stack op: '%s'", + dwarf_stack_op_name (op)); + return (stack[stacki]); + } + } + return (stack[stacki]); +} + +/* memory allocation interface */ + +static void +dwarf2_free_tmp_obstack (void *ignore) +{ + obstack_free (&dwarf2_tmp_obstack, NULL); +} + +static struct dwarf_block * +dwarf_alloc_block (void) +{ + struct dwarf_block *blk; + + blk = (struct dwarf_block *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct dwarf_block)); + return (blk); +} + +static struct abbrev_info * +dwarf_alloc_abbrev (void) +{ + struct abbrev_info *abbrev; + + abbrev = (struct abbrev_info *) xmalloc (sizeof (struct abbrev_info)); + memset (abbrev, 0, sizeof (struct abbrev_info)); + return (abbrev); +} + +static struct die_info * +dwarf_alloc_die (void) +{ + struct die_info *die; + + die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (die, 0, sizeof (struct die_info)); + return (die); +} + + +/* Macro support. */ + + +/* Return the full name of file number I in *LH's file name table. + Use COMP_DIR as the name of the current directory of the + compilation. The result is allocated using xmalloc; the caller is + responsible for freeing it. */ +static char * +file_full_name (int file, struct line_header *lh, const char *comp_dir) +{ + struct file_entry *fe = &lh->file_names[file - 1]; + + if (IS_ABSOLUTE_PATH (fe->name)) + return xstrdup (fe->name); + else + { + const char *dir; + int dir_len; + char *full_name; + + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + + if (dir) + { + dir_len = strlen (dir); + full_name = xmalloc (dir_len + 1 + strlen (fe->name) + 1); + strcpy (full_name, dir); + full_name[dir_len] = '/'; + strcpy (full_name + dir_len + 1, fe->name); + return full_name; + } + else + return xstrdup (fe->name); + } +} + + +static struct macro_source_file * +macro_start_file (int file, int line, + struct macro_source_file *current_file, + const char *comp_dir, + struct line_header *lh, struct objfile *objfile) +{ + /* The full name of this source file. */ + char *full_name = file_full_name (file, lh, comp_dir); + + /* We don't create a macro table for this compilation unit + at all until we actually get a filename. */ + if (! pending_macros) + pending_macros = new_macro_table (&objfile->objfile_obstack, + objfile->macro_cache); + + if (! current_file) + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + else + current_file = macro_include (current_file, line, full_name); + + xfree (full_name); + + return current_file; +} + + +/* Copy the LEN characters at BUF to a xmalloc'ed block of memory, + followed by a null byte. */ +static char * +copy_string (const char *buf, int len) +{ + char *s = xmalloc (len + 1); + memcpy (s, buf, len); + s[len] = '\0'; + + return s; +} + + +static const char * +consume_improper_spaces (const char *p, const char *body) +{ + if (*p == ' ') + { + complaint (&symfile_complaints, + "macro definition contains spaces in formal argument list:\n`%s'", + body); + + while (*p == ' ') + p++; + } + + return p; +} + + +static void +parse_macro_definition (struct macro_source_file *file, int line, + const char *body) +{ + const char *p; + + /* The body string takes one of two forms. For object-like macro + definitions, it should be: + + " " + + For function-like macro definitions, it should be: + + "() " + or + "(" ( "," ) * ") " + + Spaces may appear only where explicitly indicated, and in the + . + + The Dwarf 2 spec says that an object-like macro's name is always + followed by a space, but versions of GCC around March 2002 omit + the space when the macro's definition is the empty string. + + The Dwarf 2 spec says that there should be no spaces between the + formal arguments in a function-like macro's formal argument list, + but versions of GCC around March 2002 include spaces after the + commas. */ + + + /* Find the extent of the macro name. The macro name is terminated + by either a space or null character (for an object-like macro) or + an opening paren (for a function-like macro). */ + for (p = body; *p; p++) + if (*p == ' ' || *p == '(') + break; + + if (*p == ' ' || *p == '\0') + { + /* It's an object-like macro. */ + int name_len = p - body; + char *name = copy_string (body, name_len); + const char *replacement; + + if (*p == ' ') + replacement = body + name_len + 1; + else + { + dwarf2_macro_malformed_definition_complaint (body); + replacement = body + name_len; + } + + macro_define_object (file, line, name, replacement); + + xfree (name); + } + else if (*p == '(') + { + /* It's a function-like macro. */ + char *name = copy_string (body, p - body); + int argc = 0; + int argv_size = 1; + char **argv = xmalloc (argv_size * sizeof (*argv)); + + p++; + + p = consume_improper_spaces (p, body); + + /* Parse the formal argument list. */ + while (*p && *p != ')') + { + /* Find the extent of the current argument name. */ + const char *arg_start = p; + + while (*p && *p != ',' && *p != ')' && *p != ' ') + p++; + + if (! *p || p == arg_start) + dwarf2_macro_malformed_definition_complaint (body); + else + { + /* Make sure argv has room for the new argument. */ + if (argc >= argv_size) + { + argv_size *= 2; + argv = xrealloc (argv, argv_size * sizeof (*argv)); + } + + argv[argc++] = copy_string (arg_start, p - arg_start); + } + + p = consume_improper_spaces (p, body); + + /* Consume the comma, if present. */ + if (*p == ',') + { + p++; + + p = consume_improper_spaces (p, body); + } + } + + if (*p == ')') + { + p++; + + if (*p == ' ') + /* Perfectly formed definition, no complaints. */ + macro_define_function (file, line, name, + argc, (const char **) argv, + p + 1); + else if (*p == '\0') + { + /* Complain, but do define it. */ + dwarf2_macro_malformed_definition_complaint (body); + macro_define_function (file, line, name, + argc, (const char **) argv, + p); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + + xfree (name); + { + int i; + + for (i = 0; i < argc; i++) + xfree (argv[i]); + } + xfree (argv); + } + else + dwarf2_macro_malformed_definition_complaint (body); +} + + +static void +dwarf_decode_macros (struct line_header *lh, unsigned int offset, + char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *mac_ptr, *mac_end; + struct macro_source_file *current_file = 0; + + if (dwarf_macinfo_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_macinfo section"); + return; + } + + mac_ptr = dwarf_macinfo_buffer + offset; + mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size; + + for (;;) + { + enum dwarf_macinfo_record_type macinfo_type; + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + macinfo_type = read_1_byte (abfd, mac_ptr); + mac_ptr++; + + switch (macinfo_type) + { + /* A zero macinfo type indicates the end of the macro + information. */ + case 0: + return; + + case DW_MACINFO_define: + case DW_MACINFO_undef: + { + int bytes_read; + int line; + char *body; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + body = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + if (! current_file) + complaint (&symfile_complaints, + "debug info gives macro %s outside of any file: %s", + macinfo_type == + DW_MACINFO_define ? "definition" : macinfo_type == + DW_MACINFO_undef ? "undefinition" : + "something-or-other", body); + else + { + if (macinfo_type == DW_MACINFO_define) + parse_macro_definition (current_file, line, body); + else if (macinfo_type == DW_MACINFO_undef) + macro_undef (current_file, line, body); + } + } + break; + + case DW_MACINFO_start_file: + { + int bytes_read; + int line, file; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + current_file = macro_start_file (file, line, + current_file, comp_dir, + lh, cu->objfile); + } + break; + + case DW_MACINFO_end_file: + if (! current_file) + complaint (&symfile_complaints, + "macro debug info has an unmatched `close_file' directive"); + else + { + current_file = current_file->included_by; + if (! current_file) + { + enum dwarf_macinfo_record_type next_type; + + /* GCC circa March 2002 doesn't produce the zero + type byte marking the end of the compilation + unit. Complain if it's not there, but exit no + matter what. */ + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + /* We don't increment mac_ptr here, so this is just + a look-ahead. */ + next_type = read_1_byte (abfd, mac_ptr); + if (next_type != 0) + complaint (&symfile_complaints, + "no terminating 0-type entry for macros in `.debug_macinfo' section"); + + return; + } + } + break; + + case DW_MACINFO_vendor_ext: + { + int bytes_read; + int constant; + char *string; + + constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + string = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + /* We don't recognize any vendor extensions. */ + } + break; + } + } +} + +/* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ +static int +attr_form_is_block (struct attribute *attr) +{ + return (attr == NULL ? 0 : + attr->form == DW_FORM_block1 + || attr->form == DW_FORM_block2 + || attr->form == DW_FORM_block4 + || attr->form == DW_FORM_block); +} + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + struct dwarf2_loclist_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_loclist_baton)); + baton->objfile = cu->objfile; + + /* We don't know how long the location list is, but make sure we + don't run off the edge of the section. */ + baton->size = dwarf_loc_size - DW_UNSND (attr); + baton->data = dwarf_loc_buffer + DW_UNSND (attr); + baton->base_address = cu->header.base_address; + if (cu->header.base_known == 0) + complaint (&symfile_complaints, + "Location list used without specifying the CU base address."); + + SYMBOL_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } + else + { + struct dwarf2_locexpr_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_locexpr_baton)); + baton->objfile = cu->objfile; + + if (attr_form_is_block (attr)) + { + /* Note that we're just copying the block's data pointer + here, not the actual data. We're still pointing into the + dwarf_info_buffer for SYM's objfile; right now we never + release that buffer, but when we do clean up properly + this may need to change. */ + baton->size = DW_BLOCK (attr)->size; + baton->data = DW_BLOCK (attr)->data; + } + else + { + dwarf2_invalid_attrib_class_complaint ("location description", + SYMBOL_NATURAL_NAME (sym)); + baton->size = 0; + baton->data = NULL; + } + + SYMBOL_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/elfread.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/elfread.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/elfread.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/elfread.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,754 @@ +/* Read ELF (Executable and Linking Format) object files for GDB. + + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Written by Fred Fish at Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "gdb_string.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "symtab.h" +#include "symfile.h" +#include "objfiles.h" +#include "buildsym.h" +#include "stabsread.h" +#include "gdb-stabs.h" +#include "complaints.h" +#include "demangle.h" + +extern void _initialize_elfread (void); + +/* The struct elfinfo is available only during ELF symbol table and + psymtab reading. It is destroyed at the completion of psymtab-reading. + It's local to elf_symfile_read. */ + +struct elfinfo + { + file_ptr dboffset; /* Offset to dwarf debug section */ + unsigned int dbsize; /* Size of dwarf debug section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ + unsigned int lnsize; /* Size of dwarf line number section */ + asection *stabsect; /* Section pointer for .stab section */ + asection *stabindexsect; /* Section pointer for .stab.index section */ + asection *mdebugsect; /* Section pointer for .mdebug section */ + }; + +static void free_elfinfo (void *); + +/* We are called once per section from elf_symfile_read. We + need to examine each section we are passed, check to see + if it is something we are interested in processing, and + if so, stash away some access information for the section. + + For now we recognize the dwarf debug information sections and + line number sections from matching their section names. The + ELF definition is no real help here since it has no direct + knowledge of DWARF (by design, so any debugging format can be + used). + + We also recognize the ".stab" sections used by the Sun compilers + released with Solaris 2. + + FIXME: The section names should not be hardwired strings (what + should they be? I don't think most object file formats have enough + section flags to specify what kind of debug section it is + -kingdon). */ + +static void +elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) +{ + struct elfinfo *ei; + + ei = (struct elfinfo *) eip; + if (strcmp (sectp->name, ".debug") == 0) + { + ei->dboffset = sectp->filepos; + ei->dbsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".line") == 0) + { + ei->lnoffset = sectp->filepos; + ei->lnsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".stab") == 0) + { + ei->stabsect = sectp; + } + else if (strcmp (sectp->name, ".stab.index") == 0) + { + ei->stabindexsect = sectp; + } + else if (strcmp (sectp->name, ".mdebug") == 0) + { + ei->mdebugsect = sectp; + } +} + +static struct minimal_symbol * +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) +{ + if (ms_type == mst_text || ms_type == mst_file_text) + address = SMASH_TEXT_ADDRESS (address); + + return prim_record_minimal_symbol_and_info + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); +} + +/* + + LOCAL FUNCTION + + elf_symtab_read -- read the symbol table of an ELF file + + SYNOPSIS + + void elf_symtab_read (struct objfile *objfile, int dynamic) + + DESCRIPTION + + Given an objfile and a flag that specifies whether or not the objfile + is for an executable or not (may be shared library for example), add + all the global function and data symbols to the minimal symbol table. + + In stabs-in-ELF, as implemented by Sun, there are some local symbols + defined in the ELF symbol table, which can be used to locate + the beginnings of sections from each ".o" file that was linked to + form the executable objfile. We gather any such info and record it + in data structures hung off the objfile's private data. + + */ + +static void +elf_symtab_read (struct objfile *objfile, int dynamic) +{ + long storage_needed; + asymbol *sym; + asymbol **symbol_table; + long number_of_symbols; + long i; + struct cleanup *back_to; + CORE_ADDR symaddr; + CORE_ADDR offset; + enum minimal_symbol_type ms_type; + /* If sectinfo is nonNULL, it contains section info that should end up + filed in the objfile. */ + struct stab_section_info *sectinfo = NULL; + /* If filesym is nonzero, it points to a file symbol, but we haven't + seen any section info for it yet. */ + asymbol *filesym = 0; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + /* Name of filesym, as saved on the objfile_obstack. */ + char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); +#endif + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + int stripped = (bfd_get_symcount (objfile->obfd) == 0); + + if (dynamic) + { + storage_needed = bfd_get_dynamic_symtab_upper_bound (objfile->obfd); + + /* Nothing to be done if there is no dynamic symtab. */ + if (storage_needed < 0) + return; + } + else + { + storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); + if (storage_needed < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + } + if (storage_needed > 0) + { + symbol_table = (asymbol **) xmalloc (storage_needed); + back_to = make_cleanup (xfree, symbol_table); + if (dynamic) + number_of_symbols = bfd_canonicalize_dynamic_symtab (objfile->obfd, + symbol_table); + else + number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); + if (number_of_symbols < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + + for (i = 0; i < number_of_symbols; i++) + { + sym = symbol_table[i]; + if (sym->name == NULL || *sym->name == '\0') + { + /* Skip names that don't exist (shouldn't happen), or names + that are null strings (may happen). */ + continue; + } + + offset = ANOFFSET (objfile->section_offsets, sym->section->index); + if (dynamic + && sym->section == &bfd_und_section + && (sym->flags & BSF_FUNCTION)) + { + struct minimal_symbol *msym; + + /* Symbol is a reference to a function defined in + a shared library. + If its value is non zero then it is usually the address + of the corresponding entry in the procedure linkage table, + plus the desired section offset. + If its value is zero then the dynamic linker has to resolve + the symbol. We are unable to find any meaningful address + for this symbol in the executable file, so we skip it. */ + symaddr = sym->value; + if (symaddr == 0) + continue; + symaddr += offset; + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + mst_solib_trampoline, sym->section, objfile); +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + continue; + } + + /* If it is a nonstripped executable, do not enter dynamic + symbols, as the dynamic symbol table is usually a subset + of the main symbol table. */ + if (dynamic && !stripped) + continue; + if (sym->flags & BSF_FILE) + { + /* STT_FILE debugging symbol that helps stabs-in-elf debugging. + Chain any old one onto the objfile; remember new sym. */ + if (sectinfo != NULL) + { + sectinfo->next = dbx->stab_section_info; + dbx->stab_section_info = sectinfo; + sectinfo = NULL; + } + filesym = sym; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + filesymname = + obsavestring ((char *) filesym->name, strlen (filesym->name), + &objfile->objfile_obstack); +#endif + } + else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) + { + struct minimal_symbol *msym; + + /* Select global/local/weak symbols. Note that bfd puts abs + symbols in their own section, so all symbols we are + interested in will have a section. */ + /* Bfd symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate all non-absolute symbols by the section offset. */ + if (sym->section != &bfd_abs_section) + { + symaddr += offset; + } + /* For non-absolute symbols, use the type of the section + they are relative to, to intuit text/data. Bfd provides + no way of figuring this out for absolute symbols. */ + if (sym->section == &bfd_abs_section) + { + /* This is a hack to get the minimal symbol type + right for Irix 5, which has absolute addresses + with special section indices for dynamic symbols. */ + unsigned short shndx = + ((elf_symbol_type *) sym)->internal_elf_sym.st_shndx; + + switch (shndx) + { + case SHN_MIPS_TEXT: + ms_type = mst_text; + break; + case SHN_MIPS_DATA: + ms_type = mst_data; + break; + case SHN_MIPS_ACOMMON: + ms_type = mst_bss; + break; + default: + ms_type = mst_abs; + } + + /* If it is an Irix dynamic symbol, skip section name + symbols, relocate all others by section offset. */ + if (ms_type != mst_abs) + { + if (sym->name[0] == '.') + continue; + symaddr += offset; + } + } + else if (sym->section->flags & SEC_CODE) + { + if (sym->flags & BSF_GLOBAL) + { + ms_type = mst_text; + } + else if ((sym->name[0] == '.' && sym->name[1] == 'L') + || ((sym->flags & BSF_LOCAL) + && sym->name[0] == '$' + && sym->name[1] == 'L')) + /* Looks like a compiler-generated label. Skip + it. The assembler should be skipping these (to + keep executables small), but apparently with + gcc on the (deleted) delta m88k SVR4, it loses. + So to have us check too should be harmless (but + I encourage people to fix this in the assembler + instead of adding checks here). */ + continue; + else + { + ms_type = mst_file_text; + } + } + else if (sym->section->flags & SEC_ALLOC) + { + if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) + { + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_data; + } + else + { + ms_type = mst_bss; + } + } + else if (sym->flags & BSF_LOCAL) + { + /* Named Local variable in a Data section. + Check its name for stabs-in-elf. */ + int special_local_sect; + if (strcmp ("Bbss.bss", sym->name) == 0) + special_local_sect = SECT_OFF_BSS (objfile); + else if (strcmp ("Ddata.data", sym->name) == 0) + special_local_sect = SECT_OFF_DATA (objfile); + else if (strcmp ("Drodata.rodata", sym->name) == 0) + special_local_sect = SECT_OFF_RODATA (objfile); + else + special_local_sect = -1; + if (special_local_sect >= 0) + { + /* Found a special local symbol. Allocate a + sectinfo, if needed, and fill it in. */ + if (sectinfo == NULL) + { + int max_index; + size_t size; + + max_index + = max (SECT_OFF_BSS (objfile), + max (SECT_OFF_DATA (objfile), + SECT_OFF_RODATA (objfile))); + + /* max_index is the largest index we'll + use into this array, so we must + allocate max_index+1 elements for it. + However, 'struct stab_section_info' + already includes one element, so we + need to allocate max_index aadditional + elements. */ + size = (sizeof (struct stab_section_info) + + (sizeof (CORE_ADDR) + * max_index)); + sectinfo = (struct stab_section_info *) + xmmalloc (objfile->md, size); + memset (sectinfo, 0, size); + sectinfo->num_sections = max_index; + if (filesym == NULL) + { + complaint (&symfile_complaints, + "elf/stab section information %s without a preceding file symbol", + sym->name); + } + else + { + sectinfo->filename = + (char *) filesym->name; + } + } + if (sectinfo->sections[special_local_sect] != 0) + complaint (&symfile_complaints, + "duplicated elf/stab section information for %s", + sectinfo->filename); + /* BFD symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate non-absolute symbols by the + section offset. */ + if (sym->section != &bfd_abs_section) + symaddr += offset; + sectinfo->sections[special_local_sect] = symaddr; + /* The special local symbols don't go in the + minimal symbol table, so ignore this one. */ + continue; + } + /* Not a special stabs-in-elf symbol, do regular + symbol processing. */ + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_file_data; + } + else + { + ms_type = mst_file_bss; + } + } + else + { + ms_type = mst_unknown; + } + } + else + { + /* FIXME: Solaris2 shared libraries include lots of + odd "absolute" and "undefined" symbols, that play + hob with actions like finding what function the PC + is in. Ignore them if they aren't text, data, or bss. */ + /* ms_type = mst_unknown; */ + continue; /* Skip this symbol. */ + } + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, + struct minimal_symbol *); + patch_load_module(objfile, msym); + } +#endif +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + } + } + do_cleanups (back_to); + } +} + +/* Scan and build partial symbols for a symbol file. + We have been initialized by a call to elf_symfile_init, which + currently does nothing. + + SECTION_OFFSETS is a set of offsets to apply to relocate the symbols + in each section. We simplify it down to a single offset for all + symbols. FIXME. + + MAINLINE is true if we are reading the main symbol + table (as opposed to a shared lib or dynamically loaded file). + + This function only does the minimum work necessary for letting the + user "name" things symbolically; it does not read the entire symtab. + Instead, it reads the external and static symbols and puts them in partial + symbol tables. When more extensive information is requested of a + file, the corresponding partial symbol table is mutated into a full + fledged symbol table by going back and reading the symbols + for real. + + We look for sections with specific names, to tell us what debug + format to look for: FIXME!!! + + dwarf_build_psymtabs() builds psymtabs for DWARF symbols; + elfstab_build_psymtabs() handles STABS symbols; + mdebug_build_psymtabs() handles ECOFF debugging information. + + Note that ELF files have a "minimal" symbol table, which looks a lot + like a COFF symbol table, but has only the minimal information necessary + for linking. We process this also, and use the information to + build gdb's minimal symbol table. This gives us some minimal debugging + capability even for files compiled without -g. */ + +static void +elf_symfile_read (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + struct elfinfo ei; + struct cleanup *back_to; + CORE_ADDR offset; + + init_minimal_symbol_collection (); + back_to = make_cleanup_discard_minimal_symbols (); + + memset ((char *) &ei, 0, sizeof (ei)); + + /* Allocate struct to keep track of the symfile */ + objfile->sym_stab_info = (struct dbx_symfile_info *) + xmmalloc (objfile->md, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + make_cleanup (free_elfinfo, (void *) objfile); + + /* Process the normal ELF symbol table first. This may write some + chain of info into the dbx_symfile_info in objfile->sym_stab_info, + which can later be used by elfstab_offset_sections. */ + + elf_symtab_read (objfile, 0); + + /* Add the dynamic symbols. */ + + elf_symtab_read (objfile, 1); + + /* Install any minimal symbols that have been collected as the current + minimal symbols for this objfile. The debug readers below this point + should not generate new minimal symbols; if they do it's their + responsibility to install them. "mdebug" appears to be the only one + which will do this. */ + + install_minimal_symbols (objfile); + do_cleanups (back_to); + + /* Now process debugging information, which is contained in + special ELF sections. */ + + /* If we are reinitializing, or if we have never loaded syms yet, + set table to empty. MAINLINE is cleared so that *_read_psymtab + functions do not all also re-initialize the psymbol table. */ + if (mainline) + { + init_psymbol_list (objfile, 0); + mainline = 0; + } + + /* We first have to find them... */ + bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei); + + /* ELF debugging information is inserted into the psymtab in the + order of least informative first - most informative last. Since + the psymtab table is searched `most recent insertion first' this + increases the probability that more detailed debug information + for a section is found. + + For instance, an object file might contain both .mdebug (XCOFF) + and .debug_info (DWARF2) sections then .mdebug is inserted first + (searched last) and DWARF2 is inserted last (searched first). If + we don't do this then the XCOFF info is found first - for code in + an included file XCOFF info is useless. */ + + if (ei.mdebugsect) + { + const struct ecoff_debug_swap *swap; + + /* .mdebug section, presumably holding ECOFF debugging + information. */ + swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; + if (swap) + elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect); + } + if (ei.stabsect) + { + asection *str_sect; + + /* Stab sections have an associated string table that looks like + a separate section. */ + str_sect = bfd_get_section_by_name (abfd, ".stabstr"); + + /* FIXME should probably warn about a stab section without a stabstr. */ + if (str_sect) + elfstab_build_psymtabs (objfile, + mainline, + ei.stabsect, + str_sect->filepos, + bfd_section_size (abfd, str_sect)); + } + if (dwarf2_has_info (abfd)) + { + /* DWARF 2 sections */ + dwarf2_build_psymtabs (objfile, mainline); + } + else if (ei.dboffset && ei.lnoffset) + { + /* DWARF sections */ + dwarf_build_psymtabs (objfile, + mainline, + ei.dboffset, ei.dbsize, + ei.lnoffset, ei.lnsize); + } + + /* FIXME: kettenis/20030504: This still needs to be integrated with + dwarf2read.c in a better way. */ + dwarf2_build_frame_info (objfile); +} + +/* This cleans up the objfile's sym_stab_info pointer, and the chain of + stab_section_info's, that might be dangling from it. */ + +static void +free_elfinfo (void *objp) +{ + struct objfile *objfile = (struct objfile *) objp; + struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct stab_section_info *ssi, *nssi; + + ssi = dbxinfo->stab_section_info; + while (ssi) + { + nssi = ssi->next; + xmfree (objfile->md, ssi); + ssi = nssi; + } + + dbxinfo->stab_section_info = 0; /* Just say No mo info about this. */ +} + + +/* Initialize anything that needs initializing when a completely new symbol + file is specified (not just adding some symbols from another file, e.g. a + shared library). + + We reinitialize buildsym, since we may be reading stabs from an ELF file. */ + +static void +elf_new_init (struct objfile *ignore) +{ + stabsread_new_init (); + buildsym_new_init (); +} + +/* Perform any local cleanups required when we are done with a particular + objfile. I.E, we are in the process of discarding all symbol information + for an objfile, freeing up all memory held for it, and unlinking the + objfile struct from the global list of known objfiles. */ + +static void +elf_symfile_finish (struct objfile *objfile) +{ + if (objfile->sym_stab_info != NULL) + { + xmfree (objfile->md, objfile->sym_stab_info); + } +} + +/* ELF specific initialization routine for reading symbols. + + It is passed a pointer to a struct sym_fns which contains, among other + things, the BFD for the file whose symbols are being read, and a slot for + a pointer to "private data" which we can fill with goodies. + + For now at least, we have nothing in particular to do, so this function is + just a stub. */ + +static void +elf_symfile_init (struct objfile *objfile) +{ + /* ELF objects may be reordered, so set OBJF_REORDERED. If we + find this causes a significant slowdown in gdb then we could + set it in the debug symbol readers only when necessary. */ + objfile->flags |= OBJF_REORDERED; +} + +/* When handling an ELF file that contains Sun STABS debug info, + some of the debug info is relative to the particular chunk of the + section that was generated in its individual .o file. E.g. + offsets to static variables are relative to the start of the data + segment *for that module before linking*. This information is + painfully squirreled away in the ELF symbol table as local symbols + with wierd names. Go get 'em when needed. */ + +void +elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +{ + char *filename = pst->filename; + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct stab_section_info *maybe = dbx->stab_section_info; + struct stab_section_info *questionable = 0; + int i; + char *p; + + /* The ELF symbol info doesn't include path names, so strip the path + (if any) from the psymtab filename. */ + while (0 != (p = strchr (filename, '/'))) + filename = p + 1; + + /* FIXME: This linear search could speed up significantly + if it was chained in the right order to match how we search it, + and if we unchained when we found a match. */ + for (; maybe; maybe = maybe->next) + { + if (filename[0] == maybe->filename[0] + && strcmp (filename, maybe->filename) == 0) + { + /* We found a match. But there might be several source files + (from different directories) with the same name. */ + if (0 == maybe->found) + break; + questionable = maybe; /* Might use it later. */ + } + } + + if (maybe == 0 && questionable != 0) + { + complaint (&symfile_complaints, + "elf/stab section information questionable for %s", filename); + maybe = questionable; + } + + if (maybe) + { + /* Found it! Allocate a new psymtab struct, and fill it in. */ + maybe->found++; + pst->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + for (i = 0; i < maybe->num_sections; i++) + (pst->section_offsets)->offsets[i] = maybe->sections[i]; + return; + } + + /* We were unable to find any offsets for this file. Complain. */ + if (dbx->stab_section_info) /* If there *is* any info, */ + complaint (&symfile_complaints, + "elf/stab section information missing for %s", filename); +} + +/* Register that we are able to handle ELF object file formats. */ + +static struct sym_fns elf_sym_fns = +{ + bfd_target_elf_flavour, + elf_new_init, /* sym_new_init: init anything gbl to entire symtab */ + elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */ + elf_symfile_read, /* sym_read: read a symbol file into symtab */ + elf_symfile_finish, /* sym_finish: finished with file, cleanup */ + default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */ + NULL /* next: pointer to next struct sym_fns */ +}; + +void +_initialize_elfread (void) +{ + add_symtab_fns (&elf_sym_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/main.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/main.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,924 @@ +/* Top level stuff for GDB, the GNU debugger. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "top.h" +#include "target.h" +#include "inferior.h" +#include "symfile.h" +#include "gdbcore.h" + +#include "getopt.h" + +#include +#include "gdb_stat.h" +#include + +#include "gdb_string.h" +#include "event-loop.h" +#include "ui-out.h" + +#include "interps.h" +#include "main.h" + +/* If nonzero, display time usage both at startup and for each command. */ + +int display_time; + +/* If nonzero, display space usage both at startup and for each command. */ + +int display_space; + +/* Whether this is the async version or not. The async version is + invoked on the command line with the -nw --async options. In this + version, the usual command_loop is substituted by and event loop which + processes UI events asynchronously. */ +int event_loop_p = 1; + +/* The selected interpreter. This will be used as a set command + variable, so it should always be malloc'ed - since + do_setshow_command will free it. */ +char *interpreter_p; + +/* Whether xdb commands will be handled */ +int xdb_commands = 0; + +/* Whether dbx commands will be handled */ +int dbx_commands = 0; + +/* System root path, used to find libraries etc. */ +char *gdb_sysroot = 0; + +struct ui_file *gdb_stdout; +struct ui_file *gdb_stderr; +struct ui_file *gdb_stdlog; +struct ui_file *gdb_stdin; +/* target IO streams */ +struct ui_file *gdb_stdtargin; +struct ui_file *gdb_stdtarg; +struct ui_file *gdb_stdtargerr; + +/* Whether to enable writing into executable and core files */ +extern int write_files; + +static void print_gdb_help (struct ui_file *); + +/* These two are used to set the external editor commands when gdb is farming + out files to be edited by another program. */ + +extern char *external_editor_command; + +/* Call command_loop. If it happens to return, pass that through as a + non-zero return status. */ + +static int +captured_command_loop (void *data) +{ + current_interp_command_loop (); + /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton + would clean things up (restoring the cleanup chain) to the state + they were just prior to the call. Technically, this means that + the do_cleanups() below is redundant. Unfortunately, many FUNCs + are not that well behaved. do_cleanups should either be replaced + with a do_cleanups call (to cover the problem) or an assertion + check to detect bad FUNCs code. */ + do_cleanups (ALL_CLEANUPS); + /* If the command_loop returned, normally (rather than threw an + error) we try to quit. If the quit is aborted, catch_errors() + which called this catch the signal and restart the command + loop. */ + quit_command (NULL, instream == stdin); + return 1; +} + +static int +captured_main (void *data) +{ + struct captured_main_args *context = data; + int argc = context->argc; + char **argv = context->argv; + int count; + static int quiet = 0; + static int batch = 0; + static int set_args = 0; + + /* Pointers to various arguments from command line. */ + char *symarg = NULL; + char *execarg = NULL; + char *corearg = NULL; + char *cdarg = NULL; + char *ttyarg = NULL; + + /* These are static so that we can take their address in an initializer. */ + static int print_help; + static int print_version; + + /* Pointers to all arguments of --command option. */ + char **cmdarg; + /* Allocated size of cmdarg. */ + int cmdsize; + /* Number of elements of cmdarg used. */ + int ncmd; + + /* Indices of all arguments of --directory option. */ + char **dirarg; + /* Allocated size. */ + int dirsize; + /* Number of elements used. */ + int ndir; + + struct stat homebuf, cwdbuf; + char *homedir, *homeinit; + + int i; + + long time_at_startup = get_run_time (); + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* This needs to happen before the first use of malloc. */ + init_malloc (NULL); + +#ifdef HAVE_SBRK + lim_at_start = (char *) sbrk (0); +#endif + +#if defined (ALIGN_STACK_ON_STARTUP) + i = (int) &count & 0x3; + if (i != 0) + alloca (4 - i); +#endif + + cmdsize = 1; + cmdarg = (char **) xmalloc (cmdsize * sizeof (*cmdarg)); + ncmd = 0; + dirsize = 1; + dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg)); + ndir = 0; + + quit_flag = 0; + line = (char *) xmalloc (linesize); + line[0] = '\0'; /* Terminate saved (now empty) cmd line */ + instream = stdin; + + getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); + current_directory = gdb_dirbuf; + + gdb_stdout = stdio_fileopen (stdout); + gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ + gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdin = stdio_fileopen (stdin); + gdb_stdtargerr = gdb_stderr; /* for moment */ + gdb_stdtargin = gdb_stdin; /* for moment */ + + /* initialize error() */ + error_init (); + + /* Set the sysroot path. */ +#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE + gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT); + if (gdb_sysroot) + { + struct stat s; + int res = 0; + + if (stat (gdb_sysroot, &s) == 0) + if (S_ISDIR (s.st_mode)) + res = 1; + + if (res == 0) + { + xfree (gdb_sysroot); + gdb_sysroot = TARGET_SYSTEM_ROOT; + } + } + else + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else +#if defined (TARGET_SYSTEM_ROOT) + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else + gdb_sysroot = ""; +#endif +#endif + + /* There will always be an interpreter. Either the one passed into + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); + + /* Parse arguments and options. */ + { + int c; + /* When var field is 0, use flag field to record the equivalent + short option (or arbitrary numbers starting at 10 for those + with no equivalent). */ + enum { + OPT_SE = 10, + OPT_CD, + OPT_ANNOTATE, + OPT_STATISTICS, + OPT_TUI, + OPT_NOWINDOWS, + OPT_WINDOWS + }; + static struct option long_options[] = + { + {"async", no_argument, &event_loop_p, 1}, + {"noasync", no_argument, &event_loop_p, 0}, +#if defined(TUI) + {"tui", no_argument, 0, OPT_TUI}, +#endif + {"xdb", no_argument, &xdb_commands, 1}, + {"dbx", no_argument, &dbx_commands, 1}, + {"readnow", no_argument, &readnow_symbol_files, 1}, + {"r", no_argument, &readnow_symbol_files, 1}, + {"quiet", no_argument, &quiet, 1}, + {"q", no_argument, &quiet, 1}, + {"silent", no_argument, &quiet, 1}, + {"nx", no_argument, &inhibit_gdbinit, 1}, + {"n", no_argument, &inhibit_gdbinit, 1}, + {"batch", no_argument, &batch, 1}, + {"epoch", no_argument, &epoch_interface, 1}, + + /* This is a synonym for "--annotate=1". --annotate is now preferred, + but keep this here for a long time because people will be running + emacses which use --fullname. */ + {"fullname", no_argument, 0, 'f'}, + {"f", no_argument, 0, 'f'}, + + {"annotate", required_argument, 0, OPT_ANNOTATE}, + {"help", no_argument, &print_help, 1}, + {"se", required_argument, 0, OPT_SE}, + {"symbols", required_argument, 0, 's'}, + {"s", required_argument, 0, 's'}, + {"exec", required_argument, 0, 'e'}, + {"e", required_argument, 0, 'e'}, + {"core", required_argument, 0, 'c'}, + {"c", required_argument, 0, 'c'}, + {"pid", required_argument, 0, 'p'}, + {"p", required_argument, 0, 'p'}, + {"command", required_argument, 0, 'x'}, + {"version", no_argument, &print_version, 1}, + {"x", required_argument, 0, 'x'}, +#ifdef GDBTK + {"tclcommand", required_argument, 0, 'z'}, + {"enable-external-editor", no_argument, 0, 'y'}, + {"editor-command", required_argument, 0, 'w'}, +#endif + {"ui", required_argument, 0, 'i'}, + {"interpreter", required_argument, 0, 'i'}, + {"i", required_argument, 0, 'i'}, + {"directory", required_argument, 0, 'd'}, + {"d", required_argument, 0, 'd'}, + {"cd", required_argument, 0, OPT_CD}, + {"tty", required_argument, 0, 't'}, + {"baud", required_argument, 0, 'b'}, + {"b", required_argument, 0, 'b'}, + {"nw", no_argument, NULL, OPT_NOWINDOWS}, + {"nowindows", no_argument, NULL, OPT_NOWINDOWS}, + {"w", no_argument, NULL, OPT_WINDOWS}, + {"windows", no_argument, NULL, OPT_WINDOWS}, + {"statistics", no_argument, 0, OPT_STATISTICS}, + {"write", no_argument, &write_files, 1}, + {"args", no_argument, &set_args, 1}, + {0, no_argument, 0, 0} + }; + + while (1) + { + int option_index; + + c = getopt_long_only (argc, argv, "", + long_options, &option_index); + if (c == EOF || set_args) + break; + + /* Long option that takes an argument. */ + if (c == 0 && long_options[option_index].flag == 0) + c = long_options[option_index].val; + + switch (c) + { + case 0: + /* Long option that just sets a flag. */ + break; + case OPT_SE: + symarg = optarg; + execarg = optarg; + break; + case OPT_CD: + cdarg = optarg; + break; + case OPT_ANNOTATE: + /* FIXME: what if the syntax is wrong (e.g. not digits)? */ + annotation_level = atoi (optarg); + break; + case OPT_STATISTICS: + /* Enable the display of both time and space usage. */ + display_time = 1; + display_space = 1; + break; + case OPT_TUI: + /* --tui is equivalent to -i=tui. */ + xfree (interpreter_p); + interpreter_p = xstrdup ("tui"); + break; + case OPT_WINDOWS: + /* FIXME: cagney/2003-03-01: Not sure if this option is + actually useful, and if it is, what it should do. */ + use_windows = 1; + break; + case OPT_NOWINDOWS: + /* -nw is equivalent to -i=console. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_CONSOLE); + use_windows = 0; + break; + case 'f': + annotation_level = 1; +/* We have probably been invoked from emacs. Disable window interface. */ + use_windows = 0; + break; + case 's': + symarg = optarg; + break; + case 'e': + execarg = optarg; + break; + case 'c': + corearg = optarg; + break; + case 'p': + /* "corearg" is shared by "--core" and "--pid" */ + corearg = optarg; + break; + case 'x': + cmdarg[ncmd++] = optarg; + if (ncmd >= cmdsize) + { + cmdsize *= 2; + cmdarg = (char **) xrealloc ((char *) cmdarg, + cmdsize * sizeof (*cmdarg)); + } + break; +#ifdef GDBTK + case 'z': + { +extern int gdbtk_test (char *); + if (!gdbtk_test (optarg)) + { + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), + argv[0], optarg); + exit (1); + } + break; + } + case 'y': + /* Backwards compatibility only. */ + break; + case 'w': + { + external_editor_command = xstrdup (optarg); + break; + } +#endif /* GDBTK */ + case 'i': + xfree (interpreter_p); + interpreter_p = xstrdup (optarg); + break; + case 'd': + dirarg[ndir++] = optarg; + if (ndir >= dirsize) + { + dirsize *= 2; + dirarg = (char **) xrealloc ((char *) dirarg, + dirsize * sizeof (*dirarg)); + } + break; + case 't': + ttyarg = optarg; + break; + case 'q': + quiet = 1; + break; + case 'b': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set baud rate to `%s'.\n"), optarg); + else + baud_rate = i; + } + break; + case 'l': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set timeout limit to `%s'.\n"), optarg); + else + remote_timeout = i; + } + break; + + case '?': + fprintf_unfiltered (gdb_stderr, + _("Use `%s --help' for a complete list of options.\n"), + argv[0]); + exit (1); + } + } + + /* If --help or --version, disable window interface. */ + if (print_help || print_version) + { + use_windows = 0; + } + + if (set_args) + { + /* The remaining options are the command-line options for the + inferior. The first one is the sym/exec file, and the rest + are arguments. */ + if (optind >= argc) + { + fprintf_unfiltered (gdb_stderr, + _("%s: `--args' specified but no program specified\n"), + argv[0]); + exit (1); + } + symarg = argv[optind]; + execarg = argv[optind]; + ++optind; + set_inferior_args_vector (argc - optind, &argv[optind]); + } + else + { + /* OK, that's all the options. The other arguments are filenames. */ + count = 0; + for (; optind < argc; optind++) + switch (++count) + { + case 1: + symarg = argv[optind]; + execarg = argv[optind]; + break; + case 2: + /* The documentation says this can be a "ProcID" as well. + We will try it as both a corefile and a pid. */ + corearg = argv[optind]; + break; + case 3: + fprintf_unfiltered (gdb_stderr, + _("Excess command line arguments ignored. (%s%s)\n"), + argv[optind], (optind == argc - 1) ? "" : " ..."); + break; + } + } + if (batch) + quiet = 1; + } + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ + gdb_init (argv[0]); + + /* Do these (and anything which might call wrap_here or *_filtered) + after initialize_all_files() but before the interpreter has been + installed. Otherwize the help/version messages will be eaten by + the interpreter's output handler. */ + + if (print_version) + { + print_gdb_version (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + + if (print_help) + { + print_gdb_help (gdb_stdout); + fputs_unfiltered ("\n", gdb_stdout); + exit (0); + } + + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message before the interpreter is installed. That way + it isn't encapsulated in MI output. */ + if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + + /* Install the default UI. All the interpreters should have had a + look at things by now. Initialize the default interpreter. */ + + { + /* Find it. */ + struct interp *interp = interp_lookup (interpreter_p); + if (interp == NULL) + error ("Interpreter `%s' unrecognized", interpreter_p); + /* Install it. */ + if (!interp_set (interp)) + { + fprintf_unfiltered (gdb_stderr, + "Interpreter `%s' failed to initialize.\n", + interpreter_p); + exit (1); + } + } +#ifdef CRASH_MERGE +{ + extern void update_gdb_hooks(void); + update_gdb_hooks(); +} +#endif + + /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message after the interpreter is installed when it is + any sane interpreter. */ + if (!quiet && !current_interp_named_p (INTERP_MI1)) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + error_pre_print = "\n\n"; + quit_pre_print = error_pre_print; + + /* We may get more than one warning, don't double space all of them... */ + warning_pre_print = _("\nwarning: "); + + /* Read and execute $HOME/.gdbinit file, if it exists. This is done + *before* all the command line arguments are processed; it sets + global parameters, which are independent of what file you are + debugging or what directory you are in. */ + homedir = getenv ("HOME"); + if (homedir) + { + homeinit = (char *) alloca (strlen (homedir) + + strlen (gdbinit) + 10); + strcpy (homeinit, homedir); + strcat (homeinit, "/"); + strcat (homeinit, gdbinit); + + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only + need them if homedir is set. Make sure that they are + zero in case one of them fails (this guarantees that they + won't match if either exists). */ + + memset (&homebuf, 0, sizeof (struct stat)); + memset (&cwdbuf, 0, sizeof (struct stat)); + + stat (homeinit, &homebuf); + stat (gdbinit, &cwdbuf); /* We'll only need this if + homedir was set. */ + } + + /* Now perform all the actions indicated by the arguments. */ + if (cdarg != NULL) + { + catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ndir; i++) + catch_command_errors (directory_command, dirarg[i], 0, RETURN_MASK_ALL); + xfree (dirarg); + + if (execarg != NULL + && symarg != NULL + && strcmp (execarg, symarg) == 0) + { + /* The exec file and the symbol-file are the same. If we can't + open it, better only print one error message. + catch_command_errors returns non-zero on success! */ + if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL)) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + else + { + if (execarg != NULL) + catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL); + if (symarg != NULL) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + + /* After the symbol file has been read, print a newline to get us + beyond the copyright line... But errors should still set off + the error message with a (single) blank line. */ + if (!quiet) + printf_filtered ("\n"); + error_pre_print = "\n"; + quit_pre_print = error_pre_print; + warning_pre_print = _("\nwarning: "); + + if (corearg != NULL) + { + /* corearg may be either a corefile or a pid. + If its first character is a digit, try attach first + and then corefile. Otherwise try corefile first. */ + + if (isdigit (corearg[0])) + { + if (catch_command_errors (attach_command, corearg, + !batch, RETURN_MASK_ALL) == 0) + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + else /* Can't be a pid, better be a corefile. */ + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + + if (ttyarg != NULL) + catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL); + + /* Error messages should no longer be distinguished with extra output. */ + error_pre_print = NULL; + quit_pre_print = NULL; + warning_pre_print = _("warning: "); + + /* Read the .gdbinit file in the current directory, *if* it isn't + the same as the $HOME/.gdbinit file (it should exist, also). */ + + if (!homedir + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) + { +#if 0 + /* NOTE: cagney/1999-11-03: SET_TOP_LEVEL() was a macro that + expanded into a call to setjmp(). */ + if (!SET_TOP_LEVEL ()) /* NB: This is #if 0'd out */ + { + /* NOTE: I am commenting this out, because it is not clear + where this feature is used. It is very old and + undocumented. ezannoni: 1999-05-04 */ +#if 0 + if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0') + read_command_file (stdin); + else +#endif + source_command (cmdarg[i], !batch); + do_cleanups (ALL_CLEANUPS); + } +#endif + catch_command_errors (source_command, cmdarg[i], !batch, RETURN_MASK_ALL); + } + xfree (cmdarg); + + /* Read in the old history after all the command files have been read. */ + init_history (); + + if (batch) + { + /* We have hit the end of the batch file. */ + exit (0); + } + + /* Do any host- or target-specific hacks. This is used for i960 targets + to force the user to set a nindy target and spec its parameters. */ + +#ifdef BEFORE_MAIN_LOOP_HOOK + BEFORE_MAIN_LOOP_HOOK; +#endif + + /* Show time and/or space usage. */ + + if (display_time) + { + long init_time = get_run_time () - time_at_startup; + + printf_unfiltered (_("Startup time: %ld.%06ld\n"), + init_time / 1000000, init_time % 1000000); + } + + if (display_space) + { +#ifdef HAVE_SBRK + extern char **environ; + char *lim = (char *) sbrk (0); + + printf_unfiltered (_("Startup size: data size %ld\n"), + (long) (lim - (char *) &environ)); +#endif + } + +#if 0 + /* FIXME: cagney/1999-11-06: The original main loop was like: */ + while (1) + { + if (!SET_TOP_LEVEL ()) + { + do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ + /* GUIs generally have their own command loop, mainloop, or whatever. + This is a good place to gain control because many error + conditions will end up here via longjmp(). */ + if (command_loop_hook) + command_loop_hook (); + else + command_loop (); + quit_command ((char *) 0, instream == stdin); + } + } + /* NOTE: If the command_loop() returned normally, the loop would + attempt to exit by calling the function quit_command(). That + function would either call exit() or throw an error returning + control to SET_TOP_LEVEL. */ + /* NOTE: The function do_cleanups() was called once each time round + the loop. The usefulness of the call isn't clear. If an error + was thrown, everything would have already been cleaned up. If + command_loop() returned normally and quit_command() was called, + either exit() or error() (again cleaning up) would be called. */ +#endif + /* NOTE: cagney/1999-11-07: There is probably no reason for not + moving this loop and the code found in captured_command_loop() + into the command_loop() proper. The main thing holding back that + change - SET_TOP_LEVEL() - has been eliminated. */ + while (1) + { + catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); +#ifdef CRASH_MERGE + { + int console(char *, ...); + console("\n"); + } +#endif + } + /* No exit -- exit is through quit_command. */ +} + +int +gdb_main (struct captured_main_args *args) +{ + use_windows = args->use_windows; +#ifdef CRASH_MERGE + event_loop_p = 0; +#endif + catch_errors (captured_main, args, "", RETURN_MASK_ALL); + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; +} + +#ifdef CRASH_MERGE +/* + * NOTE: adapted from gdb.c, which is no longer built in; changed name of + * original main() to gdb_main_entry() for use as crash entry point + */ +int +gdb_main_entry (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; + return gdb_main (&args); +} +#endif + +/* Don't use *_filtered for printing help. We don't want to prompt + for continue no matter how small the screen or how much we're going + to print. */ + +static void +print_gdb_help (struct ui_file *stream) +{ + fputs_unfiltered (_("\ +This is the GNU debugger. Usage:\n\n\ + gdb [options] [executable-file [core-file or process-id]]\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ +Options:\n\n\ +"), stream); + fputs_unfiltered (_("\ + --args Arguments after executable-file are passed to inferior\n\ +"), stream); + fputs_unfiltered (_("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +"), stream); + fputs_unfiltered (_("\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + --batch Exit after processing options.\n\ + --cd=DIR Change current directory to DIR.\n\ + --command=FILE Execute GDB commands from FILE.\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --pid=PID Attach to running process PID.\n\ +"), stream); + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --directory=DIR Search for source files in DIR.\n\ + --epoch Output information used by epoch emacs-GDB interface.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --fullname Output information used by emacs-GDB interface.\n\ + --help Print this message.\n\ +"), stream); + fputs_unfiltered (_("\ + --interpreter=INTERP\n\ + Select a specific interpreter / user interface\n\ +"), stream); + fputs_unfiltered (_("\ + --mapped Use mapped symbol files if supported on this system.\n\ + --nw Do not use a window interface.\n\ + --nx Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file.\n\ + --quiet Do not print version number on startup.\n\ + --readnow Fully read symbol files on first access.\n\ +"), stream); + fputs_unfiltered (_("\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --tty=TTY Use TTY for input/output by the program being debugged.\n\ +"), stream); +#if defined(TUI) + fputs_unfiltered (_("\ + --tui Use a terminal user interface.\n\ +"), stream); +#endif + fputs_unfiltered (_("\ + --version Print version information and then exit.\n\ + -w Use a window interface.\n\ + --write Set writing into executable and core files.\n\ + --xdb XDB compatibility mode.\n\ +"), stream); + fputs_unfiltered (_("\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n\ +Report bugs to \"bug-gdb@gnu.org\".\ +"), stream); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2882 @@ +# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +# 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, +# Inc. +# Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. +# Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + +# This file is part of GDB. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +bindir = @bindir@ +libdir = @libdir@ +tooldir = $(libdir)/$(target_alias) + +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 +infodir = @infodir@ +htmldir = $(prefix)/html +includedir = @includedir@ + +# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT. +top_builddir = . + +SHELL = @SHELL@ +EXEEXT = @EXEEXT@ + +AWK = @AWK@ +LN_S = @LN_S@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DESTDIR = + +AR = @AR@ +AR_FLAGS = qv +RANLIB = @RANLIB@ +DLLTOOL = @DLLTOOL@ +WINDRES = @WINDRES@ +MIG = @MIG@ + +# If you are compiling with GCC, make sure that either 1) You have the +# fixed include files where GCC can reach them, or 2) You use the +# -traditional flag. Otherwise the ioctl calls in inflow.c +# will be incorrectly compiled. The "fixincludes" script in the gcc +# distribution will fix your include files up. +CC=@CC@ + +# Directory containing source files. +srcdir = @srcdir@ +VPATH = @srcdir@ + +YACC=@YACC@ + +# This is used to rebuild ada-lex.c from ada-lex.l. If the program is +# not defined, but ada-lex.c is present, compilation will continue, +# possibly with a warning. +FLEX = flex + +YLWRAP = $(srcdir)/../ylwrap + +# where to find makeinfo, preferably one designed for texinfo-2 +MAKEINFO=makeinfo + +MAKEHTML = texi2html + +MAKEHTMLFLAGS = -glossary -menu -split_chapter + +# Set this up with gcc if you have gnu ld and the loader will print out +# line numbers for undefined references. +#CC_LD=gcc -static +CC_LD=$(CC) + +# Where is our "include" directory? Typically $(srcdir)/../include. +# This is essentially the header file directory for the library +# routines in libiberty. +INCLUDE_DIR = $(srcdir)/../include +INCLUDE_CFLAGS = -I$(INCLUDE_DIR) + +# Where is the "-liberty" library? Typically in ../libiberty. +LIBIBERTY = ../libiberty/libiberty.a + +# Where is the BFD library? Typically in ../bfd. +BFD_DIR = ../bfd +BFD = $(BFD_DIR)/libbfd.a +BFD_SRC = $(srcdir)/$(BFD_DIR) +BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + +# Where is the READLINE library? Typically in ../readline. +READLINE_DIR = ../readline +READLINE = $(READLINE_DIR)/libreadline.a +READLINE_SRC = $(srcdir)/$(READLINE_DIR) +READLINE_CFLAGS = -I$(READLINE_SRC)/.. + +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ +GDB_WARN_CFLAGS = $(WARN_CFLAGS) +GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) + +# Where is the INTL library? Typically in ../intl. +INTL_DIR = ../intl +INTL = @INTLLIBS@ +INTL_DEPS = @INTLDEPS@ +INTL_SRC = $(srcdir)/$(INTL_DIR) +INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC) + +# Where is the ICONV library? This can be empty if libc has iconv. +LIBICONV = @LIBICONV@ + +# Did the user give us a --with-sysroot option? +TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + +# +# CLI sub directory definitons +# +SUBDIR_CLI_OBS = \ + cli-dump.o \ + cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ + cli-interp.o +SUBDIR_CLI_SRCS = \ + cli/cli-dump.c \ + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ + cli/cli-interp.c \ + cli/cli-utils.c +SUBDIR_CLI_DEPS = +SUBDIR_CLI_LDFLAGS= +SUBDIR_CLI_CFLAGS= + +# +# MI sub directory definitons +# +SUBDIR_MI_OBS = \ + mi-out.o mi-console.o \ + mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ + mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o \ + mi-interp.o \ + mi-main.o mi-parse.o mi-getopt.o +SUBDIR_MI_SRCS = \ + mi/mi-out.c mi/mi-console.c \ + mi/mi-cmds.c mi/mi-cmd-env.c \ + mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ + mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \ + mi/mi-interp.c \ + mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c +SUBDIR_MI_DEPS = +SUBDIR_MI_LDFLAGS= +SUBDIR_MI_CFLAGS= \ + -DMI_OUT=1 + +# +# TUI sub directory definitions +# + +# Name of the TUI program +TUI=gdbtui + +SUBDIR_TUI_OBS = \ + tui-command.o \ + tui-data.o \ + tui-disasm.o \ + tui-file.o tui.o \ + tui-hooks.o \ + tui-interp.o \ + tui-io.o \ + tui-layout.o \ + tui-out.o \ + tui-regs.o \ + tui-source.o \ + tui-stack.o \ + tui-win.o \ + tui-windata.o \ + tui-wingeneral.o \ + tui-winsource.o +SUBDIR_TUI_SRCS = \ + tui/tui-command.c \ + tui/tui-data.c \ + tui/tui-disasm.c \ + tui/tui-file.c \ + tui/tui-hooks.c \ + tui/tui-interp.c \ + tui/tui-io.c \ + tui/tui-layout.c \ + tui/tui-out.c \ + tui/tui-regs.c \ + tui/tui-source.c \ + tui/tui-stack.c \ + tui/tui-win.c \ + tui/tui-windata.c \ + tui/tui-wingeneral.c \ + tui/tui-winsource.c \ + tui/tui.c +SUBDIR_TUI_DEPS = +SUBDIR_TUI_LDFLAGS= +SUBDIR_TUI_CFLAGS= \ + -DTUI=1 + + +# Opcodes currently live in one of two places. Either they are in the +# opcode library, typically ../opcodes, or they are in a header file +# in INCLUDE_DIR. +# Where is the "-lopcodes" library, with (some of) the opcode tables and +# disassemblers? +OPCODES_DIR = ../opcodes +OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) +OPCODES = $(OPCODES_DIR)/libopcodes.a +# Where are the other opcode tables which only have header file +# versions? +OP_INCLUDE = $(INCLUDE_DIR)/opcode +OPCODES_CFLAGS = -I$(OP_INCLUDE) + +# The simulator is usually nonexistent; targets that include one +# should set this to list all the .o or .a files to be linked in. +SIM = + +WIN32LIBS = @WIN32LIBS@ + +# Where is the TCL library? Typically in ../tcl. +LIB_INSTALL_DIR = $(libdir) +# This variable is needed when doing dynamic linking. +LIB_RUNTIME_DIR = $(libdir) +TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ +TCL_CFLAGS = @TCLHDIR@ +GDBTKLIBS = @GDBTKLIBS@ +# Extra flags that the GDBTK files need: +GDBTK_CFLAGS = @GDBTK_CFLAGS@ + +# Where is the TK library? Typically in ../tk. +TK = @TK_BUILD_LIB_SPEC@ +TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@ + +# Where is Itcl? Typically in ../itcl/itcl. +ITCL_CFLAGS = @ITCLHDIR@ +ITCL = @ITCLLIB@ + +# Where is Itk? Typically in ../itcl/itk. +ITK_CFLAGS = @ITKHDIR@ +ITK = @ITKLIB@ + +X11_CFLAGS = @TK_XINCLUDES@ +X11_LDFLAGS = +X11_LIBS = + +WIN32LDAPP = @WIN32LDAPP@ + +LIBGUI = @LIBGUI@ +GUI_CFLAGS_X = @GUI_CFLAGS_X@ +IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) + +# The version of gdbtk we're building. This should be kept +# in sync with GDBTK_VERSION and friends in gdbtk.h. +GDBTK_VERSION = 1.0 +GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) + +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + +SUBDIR_GDBTK_OBS = \ + gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \ + gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o +SUBDIR_GDBTK_SRCS = \ + gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \ + gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \ + gdbtk/generic/gdbtk-interp.c \ + gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \ + gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \ + gdbtk/generic/gdbtk-main.c +SUBDIR_GDBTK_DEPS = \ + $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS) +SUBDIR_GDBTK_LDFLAGS= +SUBDIR_GDBTK_CFLAGS= -DGDBTK + +CONFIG_OBS= @CONFIG_OBS@ +CONFIG_SRCS= @CONFIG_SRCS@ +CONFIG_DEPS= @CONFIG_DEPS@ +CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ +ENABLE_CFLAGS= @ENABLE_CFLAGS@ +# CONFIG_ALL= @CONFIG_ALL@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_INSTALL = @CONFIG_INSTALL@ +CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ + +# -I. for config files. +# -I$(srcdir) for gdb internal headers. +# -I$(srcdir)/config for more generic config files. + +# It is also possible that you will need to add -I/usr/include/sys if +# your system doesn't have fcntl.h in /usr/include (which is where it +# should be according to Posix). +DEFS = -DCRASH_MERGE @DEFS@ +GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS) + +# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS +# from the config directory. +GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS) + +PROFILE_CFLAGS = @PROFILE_CFLAGS@ + +# CFLAGS is specifically reserved for setting from the command line +# when running make. I.E. "make CFLAGS=-Wmissing-prototypes". +CFLAGS = @CFLAGS@ + +# Need to pass this to testsuite for "make check". Probably should be +# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in +# so "make check" has the same result no matter where it is run. +CXXFLAGS = -g -O + +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_WARN_CFLAGS = \ + $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) $(ENABLE_CFLAGS) \ + $(GDB_WARN_CFLAGS) +INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) + +# LDFLAGS is specifically reserved for setting from the command line +# when running make. +LDFLAGS = @LDFLAGS@ + +# Profiling options need to go here to work. +# I think it's perfectly reasonable for a user to set -pg in CFLAGS +# and have it work; that's why CFLAGS is here. +# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. +INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) + +# If your system is missing alloca(), or, more likely, it's there but +# it doesn't work, then refer to libiberty. + +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# LIBIBERTY appears twice on purpose. +# If you have the Cygnus libraries installed, +# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' +INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + -lintl -liberty +CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + $(LIBICONV) \ + $(LIBIBERTY) $(WIN32LIBS) +CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) + +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) + +DIST=gdb + +LINT=/usr/5bin/lint +LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) + +RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \ + echo $${rootsrc}/../dejagnu/runtest ; else echo runtest; \ + fi` + +RUNTESTFLAGS= + +# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX +# interface to the serial port. Hopefully if get ported to OS/2, VMS, +# etc., then there will be (as part of the C library or perhaps as +# part of libiberty) a POSIX interface. But at least for now the +# host-dependent makefile fragment might need to use something else +# besides ser-unix.o +SER_HARDWIRE = @SER_HARDWIRE@ + +# The `remote' debugging target is supported for most architectures, +# but not all (e.g. 960) +REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o + +# This is remote-sim.o if a simulator is to be linked in. +SIM_OBS = + +# Host and target-dependent makefile fragments come in here. +@host_makefile_frag@ +@target_makefile_frag@ +# End of host and target-dependent makefile fragments + +# Possibly ignore the simulator. If the simulator is being ignored, +# these expand into SIM= and SIM_OBJ=, overriding the entries from +# target_makefile_frag +# +@IGNORE_SIM@ +@IGNORE_SIM_OBS@ + +FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "mandir=$(mandir)" \ + "datadir=$(datadir)" \ + "includedir=$(includedir)" \ + "against=$(against)" \ + "DESTDIR=$(DESTDIR)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "CXX=$(CXX)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "DLLTOOL=$(DLLTOOL)" \ + "LDFLAGS=$(LDFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# Flags that we pass when building the testsuite. + +# empty for native, $(target_alias)/ for cross +target_subdir = @target_subdir@ + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +# The use of $$(x_FOR_TARGET) reduces the command line length by not +# duplicating the lengthy definition. +TARGET_FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "against=$(against)" \ + 'CC=$$(CC_FOR_TARGET)' \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + 'CXX=$$(CXX_FOR_TARGET)' \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# All source files that go into linking GDB. +# Links made at configuration time should not be specified here, since +# SFILES is used in building the distribution archive. + +SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ + ax-general.c ax-gdb.c \ + bcache.c \ + bfd-target.c \ + block.c blockframe.c breakpoint.c buildsym.c \ + c-exp.y c-lang.c c-typeprint.c c-valprint.c \ + charset.c cli-out.c coffread.c coff-pe-read.c \ + complaints.c completer.c corefile.c \ + cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ + dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \ + dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \ + elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ + f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ + frame-base.c \ + frame-unwind.c \ + gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ + hpacc-abi.c \ + inf-loop.c \ + infcall.c \ + infcmd.c inflow.c infrun.c \ + interps.c \ + jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ + kod.c kod-cisco.c \ + language.c linespec.c \ + m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \ + macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \ + mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \ + nlmread.c \ + objc-exp.y objc-lang.c \ + objfiles.c osabi.c observer.c \ + p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \ + regcache.c reggroups.c remote.c remote-fileio.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + serial.c ser-unix.c source.c \ + stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \ + target.c thread.c top.c tracepoint.c \ + trad-frame.c \ + typeprint.c \ + ui-out.c utils.c ui-file.h ui-file.c \ + user-regs.c \ + valarith.c valops.c valprint.c values.c varobj.c \ + wrapper.c + +LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c + +# "system" headers. Using these in dependencies is a rather personal +# choice. (-rich, summer 1993) +# (Why would we not want to depend on them? If one of these changes in a +# non-binary-compatible way, it is a real pain to remake the right stuff +# without these dependencies -kingdon, 13 Mar 1994) +aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h +aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h +getopt_h = $(INCLUDE_DIR)/getopt.h +floatformat_h = $(INCLUDE_DIR)/floatformat.h +bfd_h = $(BFD_DIR)/bfd.h +callback_h = $(INCLUDE_DIR)/gdb/callback.h +coff_sym_h = $(INCLUDE_DIR)/coff/sym.h +coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h +coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h +coff_internal_h = $(INCLUDE_DIR)/coff/internal.h +dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h) +elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h +elf_sh_h = $(INCLUDE_DIR)/elf/sh.h +elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) +elf_bfd_h = $(BFD_SRC)/elf-bfd.h +libaout_h = $(BFD_SRC)/libaout.h +libbfd_h = $(BFD_SRC)/libbfd.h +remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h +demangle_h = $(INCLUDE_DIR)/demangle.h +obstack_h = $(INCLUDE_DIR)/obstack.h +opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h +readline_h = $(READLINE_SRC)/readline.h +readline_tilde_h = $(READLINE_SRC)/tilde.h +readline_history_h = $(READLINE_SRC)/history.h +frv_desc_h = $(OPCODES_SRC)/frv-desc.h +sh_opc_h = $(OPCODES_SRC)/sh-opc.h +gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h +gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h +gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h +gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h +splay_tree_h = $(INCLUDE_DIR)/splay-tree.h + +# +# $BUILD/ headers +# + +config_h = config.h +exc_request_U_h = exc_request_U.h +exc_request_S_h = exc_request_S.h +msg_reply_S_h = msg_reply_S.h +msg_U_h = msg_U.h +notify_S_h = notify_S.h +process_reply_S_h = process_reply_S.h + +# +# config/ headers +# + +xm_h = @xm_h@ +tm_h = @tm_h@ +nm_h = @nm_h@ + +# +# gdb/ headers +# + +ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) +alphabsd_tdep_h = alphabsd-tdep.h +alpha_tdep_h = alpha-tdep.h +amd64_linux_tdep_h = amd64-linux-tdep.h +amd64_nat_h = amd64-nat.h +amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) +annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) +arch_utils_h = arch-utils.h +arm_tdep_h = arm-tdep.h +auxv_h = auxv.h +ax_gdb_h = ax-gdb.h +ax_h = ax.h $(doublest_h) +bcache_h = bcache.h +bfd_target_h = bfd-target.h +block_h = block.h +breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) +buildsym_h = buildsym.h +call_cmds_h = call-cmds.h +charset_h = charset.h +c_lang_h = c-lang.h $(value_h) $(macroexp_h) +cli_out_h = cli-out.h +coff_pe_read_h = coff-pe-read.h +coff_solib_h = coff-solib.h +command_h = command.h +complaints_h = complaints.h +completer_h = completer.h +cp_abi_h = cp-abi.h +cp_support_h = cp-support.h $(symtab_h) +dcache_h = dcache.h +defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) +dictionary_h = dictionary.h +disasm_h = disasm.h +doublest_h = doublest.h $(floatformat_h) +dummy_frame_h = dummy-frame.h +dwarf2expr_h = dwarf2expr.h +dwarf2_frame_h = dwarf2-frame.h +dwarf2loc_h = dwarf2loc.h +environ_h = environ.h +event_loop_h = event-loop.h +event_top_h = event-top.h +exec_h = exec.h $(target_h) +expression_h = expression.h $(symtab_h) $(doublest_h) +f_lang_h = f-lang.h +frame_base_h = frame-base.h +frame_h = frame.h +frame_unwind_h = frame-unwind.h $(frame_h) +gdbarch_h = gdbarch.h +gdb_assert_h = gdb_assert.h +gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) +gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h +gdb_dirent_h = gdb_dirent.h +gdb_events_h = gdb-events.h +gdb_h = gdb.h +gdb_locale_h = gdb_locale.h +gdb_obstack_h = gdb_obstack.h $(obstack_h) +gdb_proc_service_h = gdb_proc_service.h $(gregset_h) +gdb_regex_h = gdb_regex.h $(xregex_h) +gdb_stabs_h = gdb-stabs.h +gdb_stat_h = gdb_stat.h +gdb_string_h = gdb_string.h +gdb_thread_db_h = gdb_thread_db.h +gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) +gdbtypes_h = gdbtypes.h +gdb_vfork_h = gdb_vfork.h +gdb_wait_h = gdb_wait.h +glibc_tdep_h = glibc-tdep.h +gnu_nat_h = gnu-nat.h +gregset_h = gregset.h +hppa_tdep_h = hppa-tdep.h +i386_linux_tdep_h = i386-linux-tdep.h +i386_tdep_h = i386-tdep.h +i387_tdep_h = i387-tdep.h +ia64_tdep_h = ia64-tdep.h +infcall_h = infcall.h +inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h) +inf_loop_h = inf-loop.h +inflow_h = inflow.h $(terminal_h) +infttrace_h = infttrace.h +interps_h = interps.h +jv_lang_h = jv-lang.h +kod_h = kod.h +language_h = language.h +libunwind_frame_h = libunwind-frame.h $(libunwind_h) +linespec_h = linespec.h +linux_nat_h = linux-nat.h +m2_lang_h = m2-lang.h +m68k_tdep_h = m68k-tdep.h +macroexp_h = macroexp.h +macroscope_h = macroscope.h $(macrotab_h) $(symtab_h) +macrotab_h = macrotab.h +main_h = main.h +memattr_h = memattr.h +minimon_h = minimon.h +mipsnbsd_tdep_h = mipsnbsd-tdep.h +mips_tdep_h = mips-tdep.h +monitor_h = monitor.h +nbsd_tdep_h = nbsd-tdep.h +ns32k_tdep_h = ns32k-tdep.h +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +objc_lang_h = objc-lang.h +objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) +observer_h = observer.h +ocd_h = ocd.h +osabi_h = osabi.h +pa64solib_h = pa64solib.h +parser_defs_h = parser-defs.h $(doublest_h) +p_lang_h = p-lang.h +ppcnbsd_tdep_h = ppcnbsd-tdep.h +ppc_tdep_h = ppc-tdep.h +proc_utils_h = proc-utils.h +regcache_h = regcache.h +reggroups_h = reggroups.h +regset_h = regset.h +remote_fileio_h = remote-fileio.h +remote_h = remote.h +remote_utils_h = remote-utils.h $(target_h) +s390_tdep_h = s390-tdep.h +scm_lang_h = scm-lang.h $(scm_tags_h) +scm_tags_h = scm-tags.h +sentinel_frame_h = sentinel-frame.h +serial_h = serial.h +ser_unix_h = ser-unix.h +shnbsd_tdep_h = shnbsd-tdep.h +sh_tdep_h = sh-tdep.h +sim_regno_h = sim-regno.h +solib_h = solib.h +solib_svr4_h = solib-svr4.h +solist_h = solist.h +somsolib_h = somsolib.h +source_h = source.h +sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) +sparc_nat_h = sparc-nat.h +sparc_tdep_h = sparc-tdep.h +srec_h = srec.h +stabsread_h = stabsread.h +stack_h = stack.h +symfile_h = symfile.h +symtab_h = symtab.h +target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) +terminal_h = terminal.h +top_h = top.h +tracepoint_h = tracepoint.h +trad_frame_h = trad-frame.h +typeprint_h = typeprint.h +ui_file_h = ui-file.h +ui_out_h = ui-out.h +user_regs_h = user-regs.h +valprint_h = valprint.h +value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) +varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) +vax_tdep_h = vax-tdep.h +version_h = version.h +wince_stub_h = wince-stub.h +wrapper_h = wrapper.h $(gdb_h) +xcoffsolib_h = xcoffsolib.h +xmodem_h = xmodem.h + +# +# gdb/cli/ headers +# + +cli_cmds_h = $(srcdir)/cli/cli-cmds.h +cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h) +cli_dump_h = $(srcdir)/cli/cli-dump.h +cli_script_h = $(srcdir)/cli/cli-script.h +cli_setshow_h = $(srcdir)/cli/cli-setshow.h +cli_utils_h = $(srcdir)/cli/cli-utils.h + +# +# gdb/mi/ headers +# + +mi_cmds_h = $(srcdir)/mi/mi-cmds.h +mi_console_h = $(srcdir)/mi/mi-console.h +mi_getopt_h = $(srcdir)/mi/mi-getopt.h +mi_main_h = $(srcdir)/mi/mi-main.h +mi_out_h = $(srcdir)/mi/mi-out.h +mi_parse_h = $(srcdir)/mi/mi-parse.h + +# +# gdb/tui/ headers +# + +tui_command_h = $(srcdir)/tui/tui-command.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) +tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) +tui_file_h = $(srcdir)/tui/tui-file.h +tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h +tui_io_h = $(srcdir)/tui/tui-io.h +tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) +tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) +tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h) +tui_stack_h = $(srcdir)/tui/tui-stack.h +tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h) +tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h +tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h) +tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) + +# Header files that need to have srcdir added. Note that in the cases +# where we use a macro like $(gdbcmd_h), things are carefully arranged +# so that each .h file is listed exactly once (M-x tags-search works +# wrong if TAGS has files twice). Because this is tricky to get +# right, it is probably easiest just to list .h files here directly. + +HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + environ.h $(gdbcmd_h) gdb.h gdbcore.h \ + gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ + objfiles.h parser-defs.h serial.h solib.h \ + symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \ + macrotab.h macroexp.h macroscope.h \ + c-lang.h f-lang.h \ + jv-lang.h \ + m2-lang.h p-lang.h \ + complaints.h valprint.h \ + vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \ + vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \ + dcache.h remote-utils.h top.h somsolib.h + +# Header files that already have srcdir in them, or which are in objdir. + +HFILES_WITH_SRCDIR = ../bfd/bfd.h + + +# GDB "info" files, which should be included in their entirety +INFOFILES = gdb.info* + +REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar + +# {X,T,NAT}DEPFILES are something of a pain in that it's hard to +# default their values the way we do for SER_HARDWIRE; in the future +# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other +# variables analogous to SER_HARDWIRE which get defaulted in this +# Makefile.in + +DEPFILES = $(TDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \ + $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS) + +SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) +# Don't include YYFILES (*.c) because we already include *.y in SFILES, +# and it's more useful to see it in the .y file. +TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ + $(SUBDIR_CLI_SRCS) +TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) + +COMMON_OBS = $(DEPFILES) $(YYOBJ) \ + version.o \ + annotate.o \ + auxv.o \ + bfd-target.o \ + blockframe.o breakpoint.o findvar.o regcache.o \ + charset.o disasm.o dummy-frame.o \ + source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ + block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \ + infcall.o \ + infcmd.o infrun.o \ + expprint.o environ.o stack.o thread.o \ + interps.o \ + main.o \ + macrotab.o macrocmd.o macroexp.o macroscope.o \ + event-loop.o event-top.o inf-loop.o completer.o \ + gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \ + memattr.o mem-break.o target.o parse.o language.o buildsym.o \ + std-regs.o \ + signals.o \ + kod.o kod-cisco.o \ + gdb-events.o \ + exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \ + dbxread.o coffread.o coff-pe-read.o elfread.o \ + dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + dwarf2expr.o dwarf2loc.o dwarf2-frame.o \ + c-lang.o f-lang.o objc-lang.o \ + ui-out.o cli-out.o \ + varobj.o wrapper.o \ + jv-lang.o jv-valprint.o jv-typeprint.o \ + m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ + scm-exp.o scm-lang.o scm-valprint.o \ + sentinel-frame.o \ + complaints.o typeprint.o \ + c-typeprint.o f-typeprint.o m2-typeprint.o \ + c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \ + nlmread.o serial.o mdebugread.o top.o utils.o \ + ui-file.o \ + user-regs.o \ + frame.o frame-unwind.o doublest.o \ + frame-base.o \ + gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ + cp-namespace.o \ + reggroups.o \ + trad-frame.o + +TSOBS = inflow.o + +SUBDIRS = build_no_subdirs + +# For now, shortcut the "configure GDB for fewer languages" stuff. +YYFILES = c-exp.c \ + objc-exp.c \ + ada-exp.c \ + jv-exp.c \ + f-exp.c m2-exp.c p-exp.c +YYOBJ = c-exp.o \ + objc-exp.o \ + jv-exp.o \ + f-exp.o m2-exp.o p-exp.o + +# Things which need to be built when making a distribution. + +DISTSTUFF = $(YYFILES) + +# Prevent Sun make from putting in the machine type. Setting +# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. +.c.o: + $(CC) -c $(INTERNAL_CFLAGS) $< + +all: gdb$(EXEEXT) $(CONFIG_ALL) + @$(MAKE) -s $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) + +installcheck: + +# The check target can not use subdir_do, because subdir_do does not +# use TARGET_FLAGS_TO_PASS. +check: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ + else true; fi + +info dvi install-info clean-info html install-html: force + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do + +gdb.z:gdb.1 + nroff -man $(srcdir)/gdb.1 | col -b > gdb.t + pack gdb.t ; rm -f gdb.t + mv gdb.t.z gdb.z + +# Traditionally "install" depends on "all". But it may be useful +# not to; for example, if the user has made some trivial change to a +# source file and doesn't care about rebuilding or just wants to save the +# time it takes for make to check that all is up to date. +# install-only is intended to address that need. +install: all install-only +install-only: $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + + +uninstall: force $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (top.o -> _initialize_top, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +# FIXME: There is a problem with this approach - init.c may force +# unnecessary files to be linked in. + +# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that +# the first call is to _initialize_gdbtypes (implemented by explicitly +# putting that function's name first in the init.l-tmp file). This is +# a hack to ensure that all the architecture dependant global +# builtin_type_* variables are initialized before anything else +# (per-architecture code is called in the same order that it is +# registered). The ``correct fix'' is to have all the builtin types +# made part of the architecture and initialize them on-demand (using +# gdbarch_data) just like everything else. The catch is that other +# modules still take the address of these builtin types forcing them +# to be variables, sigh! + +# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is +# anchored on the first column and excludes the ``/'' character so +# that it doesn't add the $(srcdir) prefix to any file that already +# has an absolute path. It turns out that $(DEC)'s True64 make +# automatically adds the $(srcdir) prefixes when it encounters files +# in sub-directories such as cli/ and mi/. + +# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates +# duplicates. Files in the gdb/ directory can end up appearing in +# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file). + +INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) +init.c: $(INIT_FILES) + @echo Making init.c + @rm -f init.c-tmp init.l-tmp + @touch init.c-tmp + @echo gdbtypes > init.l-tmp + @-echo $(INIT_FILES) | \ + tr ' ' '\012' | \ + sed \ + -e '/^gdbtypes.[co]$$/d' \ + -e '/^init.[co]$$/d' \ + -e '/xdr_ld.[co]$$/d' \ + -e '/xdr_ptrace.[co]$$/d' \ + -e '/xdr_rdb.[co]$$/d' \ + -e '/udr.[co]$$/d' \ + -e '/udip2soc.[co]$$/d' \ + -e '/udi2go32.[co]$$/d' \ + -e '/version.[co]$$/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \ + -e 's/\.[co]$$/.c/' \ + -e 's,signals\.c,signals/signals\.c,' \ + -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ + while read f; do \ + sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ + done | \ + while read f; do \ + case " $$fs " in \ + *" $$f "* ) ;; \ + * ) echo $$f ; fs="$$fs $$f";; \ + esac; \ + done >> init.l-tmp + @echo '/* Do not modify this file. */' >>init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp + @echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp + @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' >init.c-tmp + @echo 'void' >>init.c-tmp + @echo 'initialize_all_files (void)' >>init.c-tmp + @echo '{' >>init.c-tmp + @sed -e 's/\(.*\)/ _initialize_\1 ();/' >init.c-tmp + @echo '}' >>init.c-tmp + @rm init.l-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c + +init.o: init.c $(defs_h) $(call_cmds_h) + +# Removing the old gdb first works better if it is running, at least on SunOS. +gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + @(cd ../..; make --no-print-directory GDB_FLAGS=-DGDB_6_1 library) + @rm -f gdb$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o `cat mergeobj` libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) `cat mergelibs` + +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +nlm: force + rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do + +# Create a library of the gdb object files and build GDB by linking +# against that. +# +# init.o is very important. It pulls in the rest of GDB. +LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o +libgdb.a: $(LIBGDB_OBS) + -rm -f libgdb.a + $(AR) q libgdb.a $(LIBGDB_OBS) + $(RANLIB) libgdb.a + +# A Mach 3.0 program to force gdb back to command level + +stop-gdb: stop-gdb.o + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + stop-gdb.o $(CLIBS) $(LOADLIBES) + +# This is useful when debugging GDB, because some Unix's don't let you run GDB +# on itself without copying the executable. So "make gdb1" will make +# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". +# Removing gdb1 before the copy is the right thing if gdb1 is open +# in another process. +gdb1$(EXEEXT): gdb$(EXEEXT) + rm -f gdb1$(EXEEXT) + cp gdb$(EXEEXT) gdb1$(EXEEXT) + +# FIXME. These are not generated by "make depend" because they only are there +# for some machines. +# But these rules don't do what we want; we want to hack the foo.o: tm.h +# dependency to do the right thing. +tm-sun3.h tm-altos.h: tm-m68k.h +tm-sun2.h tm-3b1.h: tm-m68k.h +xm-vaxult.h: xm-vax.h +xm-vaxbsd.h: xm-vax.h + +# Put the proper machine-specific files first, so M-. on a machine +# specific routine gets the one for the correct machine. (FIXME: those +# files go in twice; we should be removing them from the main list). + +# TAGS depends on all the files that go into it so you can rebuild TAGS +# with `make TAGS' and not have to say `rm TAGS' first. + +TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) + @echo Making TAGS + @etags $(srcdir)/$(TM_FILE) \ + $(srcdir)/$(XM_FILE) \ + $(srcdir)/$(NAT_FILE) \ + `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ + echo $(srcdir)/$$i ; \ + done ; for i in $(TAGFILES_WITH_SRCDIR); do \ + echo $$i ; \ + done) | sed -e 's/\.o$$/\.c/'` \ + `find $(srcdir)/config -name '*.h' -print` + +tags: TAGS + +clean mostlyclean: $(CONFIG_CLEAN) + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do + rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp + rm -f init.c version.c + rm -f gdb$(EXEEXT) core make.log + rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) + +# This used to depend on c-exp.c m2-exp.c TAGS +# I believe this is wrong; the makefile standards for distclean just +# describe removing files; the only sort of "re-create a distribution" +# functionality described is if the distributed files are unmodified. +# NB: While GDBSERVER might be configured on native systems, it isn't +# always included in SUBDIRS. Remove the gdbserver files explictly. +distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do + rm -f gdbserver/config.status gdbserver/config.log + rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h + rm -f gdbserver/Makefile gdbserver/config.cache + rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit + rm -f y.output yacc.acts yacc.tmp y.tab.h + rm -f config.log config.cache + rm -f Makefile + +maintainer-clean: local-maintainer-clean do-maintainer-clean distclean +realclean: maintainer-clean + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f c-exp.c \ + ada-lex.c ada-exp.c \ + objc-exp.c \ + jv-exp.tab \ + f-exp.c m2-exp.c p-exp.c + rm -f TAGS $(INFOFILES) + rm -f $(YYFILES) + rm -f nm.h tm.h xm.h config.status + +do-maintainer-clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \ + subdir_do + +diststuff: $(DISTSTUFF) + cd doc; $(MAKE) $(MFLAGS) diststuff + +subdir_do: force + @for i in $(DODIRS); do \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + +Makefile: Makefile.in config.status @frags@ + $(SHELL) config.status + +config.h: stamp-h ; @true +stamp-h: config.in config.status + CONFIG_HEADERS=config.h:config.in $(SHELL) config.status + +config.status: configure configure.tgt configure.host + $(SHELL) config.status --recheck + +force: + +# Documentation! +# GDB QUICK REFERENCE (TeX dvi file, CM fonts) +doc/refcard.dvi: + cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) + +# GDB QUICK REFERENCE (PostScript output, common PS fonts) +doc/refcard.ps: + cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) + +# GDB MANUAL: TeX dvi file +doc/gdb.dvi: + cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) + +# GDB MANUAL: info file +doc/gdb.info: + cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) + +# Make copying.c from COPYING +$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \ + $(srcdir)/COPYING $(srcdir)/copying.awk + awk -f $(srcdir)/copying.awk \ + < $(srcdir)/COPYING > $(srcdir)/copying.tmp + mv $(srcdir)/copying.tmp $(srcdir)/copying.c + +version.c: Makefile version.in + @rm -f version.c-tmp version.c + @echo '#include "version.h"' >> version.c-tmp + @echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp + @echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp + @echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp + @mv version.c-tmp version.c +version.o: version.c $(version_h) + + +lint: $(LINTFILES) + $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ + `echo $(DEPFILES) | sed 's/\.o /\.c /g'` + +gdb.cxref: $(SFILES) + cxref -I. $(SFILES) >gdb.cxref + +force_update: + +# GNU Make has an annoying habit of putting *all* the Makefile variables +# into the environment, unless you include this target as a circumvention. +# Rumor is that this will be fixed (and this target can be removed) +# in GNU Make 4.0. +.NOEXPORT: + +# GNU Make 3.63 has a different problem: it keeps tacking command line +# overrides onto the definition of $(MAKE). This variable setting +# will remove them. +MAKEOVERRIDES= + +ALLDEPFILES = \ + aix-thread.c \ + alpha-nat.c alphabsd-nat.c \ + alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \ + alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \ + amd64-nat.c amd64-tdep.c \ + amd64bsd-nat.c amdfbsd-nat.c amd64fbsd-tdep.c \ + amd64nbsd-nat.c amd64nbsd-tdep.c \ + amd64obsd-nat.c amd64obsd-tdep.c \ + amd64-linux-nat.c amd64-linux-tdep.c \ + arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \ + armnbsd-nat.c armnbsd-tdep.c \ + avr-tdep.c \ + coff-solib.c \ + core-regset.c core-aout.c corelow.c \ + dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \ + glibc-tdep.c \ + go32-nat.c h8300-tdep.c \ + hppa-tdep.c hppa-hpux-tdep.c \ + hppah-nat.c hpread.c \ + i386-tdep.c i386v-nat.c i386-linux-nat.c \ + i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \ + i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \ + i387-tdep.c \ + i386-linux-tdep.c i386-nat.c \ + i386gnu-nat.c i386gnu-tdep.c \ + ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ + libunwind-frame.c \ + lynx-nat.c m3-nat.c \ + m68hc11-tdep.c \ + m68k-tdep.c \ + mcore-tdep.c \ + mips-linux-nat.c mips-linux-tdep.c \ + mips-nat.c \ + mips-irix-tdep.c \ + mips-tdep.c mipsm3-nat.c mipsv4-nat.c \ + mipsnbsd-nat.c mipsnbsd-tdep.c \ + nbsd-tdep.c \ + ns32k-tdep.c solib-osf.c \ + somread.c somsolib.c $(HPREAD_SOURCE) \ + ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \ + ppcnbsd-nat.o ppcnbsd-tdep.o \ + procfs.c \ + remote-e7000.c \ + remote-hms.c remote-m32r-sdi.c remote-mips.c \ + remote-rdp.c remote-sim.c \ + remote-st.c remote-utils.c dcache.c \ + remote-vx.c \ + rs6000-nat.c rs6000-tdep.c \ + s390-tdep.c s390-nat.c \ + ser-go32.c ser-pipe.c ser-tcp.c \ + sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ + solib.c solib-irix.c solib-svr4.c solib-sunos.c \ + sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \ + sparc-tdep.c sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-linux-nat.c \ + sparc64-linux-tdep.c sparc64-nat.c sparc64-sol2-tdep.c \ + sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ + sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ + sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + sun3-nat.c \ + symm-tdep.c symm-nat.c \ + vax-tdep.c \ + vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ + win32-nat.c \ + xcoffread.c xcoffsolib.c \ + xstormy16-tdep.c + +# Some files need explict build rules (due to -Werror problems) or due +# to sub-directory fun 'n' games. + +# Provide explicit rule/dependency - works for more makes. +copying.o: $(srcdir)/copying.c + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c + +hpux-thread.o: $(srcdir)/hpux-thread.c + $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \ + -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \ + $(srcdir)/hpux-thread.c + +# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. +main.o: main.c + $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \ + -DBINDIR=\"$(bindir)\" $(srcdir)/main.c + +# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral +# errors. It turns out that that is the least of monitor.c's +# problems. The function print_vsprintf appears to be using +# va_arg(long) to extract CORE_ADDR parameters - something that +# definitly will not work. "monitor.c" needs to be rewritten so that +# it doesn't use format strings and instead uses callbacks. +monitor.o: $(srcdir)/monitor.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/monitor.c + +# FIXME: cagney/2003-08-10: Do not try to build "printcmd.c" with +# -Wformat-nonliteral. It needs to be overhauled so that it doesn't +# pass user input strings as the format parameter to host printf +# function calls. +printcmd.o: $(srcdir)/printcmd.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/printcmd.c + +# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't +# match output format strings. +procfs.o: $(srcdir)/procfs.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c + +# FIXME: Thread-db.o gets warnings because the definitions of the register +# sets are different from kernel to kernel. +thread-db.o: $(srcdir)/thread-db.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \ + $(srcdir)/thread-db.c + +v850ice.o: $(srcdir)/v850ice.c + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) \ + $(srcdir)/v850ice.c + +# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with +# -Wformat-nonliteral. It relies on local_hex_format et.al. and +# that's a mess. It needs a serious overhaul. +valprint.o: $(srcdir)/valprint.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c + +# +# YACC/LEX dependencies +# +# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't +# exist in srcdir, then compiled in objdir to LANG-exp.o. If we +# said LANG-exp.c rather than ./c-exp.c some makes would +# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus +# decls for malloc/realloc/free which conflict with everything else. +# Strictly speaking c-exp.c should therefore depend on +# Makefile.in, but that was a pretty big annoyance. + +.SUFFIXES: .y .l +.y.c: + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $@.tmp -- $(YFLAGS) + -sed -e '/extern.*malloc/d' \ + -e '/extern.*realloc/d' \ + -e '/extern.*free/d' \ + -e '/include.*malloc.h/d' \ + -e 's/malloc/xmalloc/g' \ + -e 's/realloc/xrealloc/g' \ + -e '/^#line.*y.tab.c/d' \ + < $@.tmp > $@.new + -rm $@.tmp + mv $@.new ./$*.c +.l.c: + @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ + echo $(FLEX) -Isit $< ">" $@; \ + $(FLEX) -Isit $< > $@; \ + elif [ ! -f $@ -a ! -f $< ]; then \ + echo "ada-lex.c missing and flex not available."; \ + false; \ + elif [ ! -f $@ ]; then \ + echo "Warning: $*.c older than $*.l and flex not available."; \ + fi + +.PRECIOUS: ada-exp.c ada-lex.c +.PRECIOUS: c-exp.c +.PRECIOUS: f-exp.c +.PRECIOUS: jv-exp.c +.PRECIOUS: m2-exp.c +.PRECIOUS: objc-exp.c +.PRECIOUS: p-exp.c + +# +# gdb/ dependencies +# + +abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \ + $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(frame_h) $(block_h) $(ada_lex_c) +ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \ + $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \ + $(infcall_h) $(dictionary_h) +ada-lex.o: ada-lex.c +ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \ + $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \ + $(gregset_h) $(ada_lang_h) +ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ + $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ + $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) +ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \ + $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) +aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ + $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \ + $(ppc_tdep_h) +alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h) +alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) +alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(alpha_tdep_h) +alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \ + $(osabi_h) $(alpha_tdep_h) +alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ + $(block_h) $(gdb_assert_h) $(alpha_tdep_h) +alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) +alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) $(nbsd_tdep_h) +alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h) +alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \ + $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \ + $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \ + $(elf_bfd_h) $(alpha_tdep_h) +amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(solib_svr4_h) +amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) +amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ + $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) +amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ + $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \ + $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(i387_tdep_h) +annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ + $(gdbtypes_h) $(breakpoint_h) +arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ + $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ + $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \ + $(floatformat_h) +arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) +arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \ + $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \ + $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \ + $(glibc_tdep_h) +armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \ + $(regcache_h) $(gdbcore_h) +armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \ + $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \ + $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \ + $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) +auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \ + $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \ + $(elf_common_h) +avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_string_h) $(dis_asm_h) +ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \ + $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \ + $(regcache_h) +ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h) +bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \ + $(gdb_assert_h) +bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \ + $(gdb_assert_h) $(gdb_string_h) +block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \ + $(gdb_obstack_h) $(cp_support_h) +blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \ + $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \ + $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \ + $(command_h) $(gdbcmd_h) $(block_h) +breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \ + $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ + $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \ + $(gdb_events_h) +buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ + $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \ + $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) +c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) +charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \ + $(gdb_string_h) +c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \ + $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \ + $(demangle_h) $(cp_support_h) +cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \ + $(gdb_assert_h) +coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \ + $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h) +coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \ + $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \ + $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \ + $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \ + $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h) +coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) +complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \ + $(command_h) $(gdbcmd_h) +completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \ + $(readline_h) $(completer_h) +copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h) +core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_dirent_h) $(gdb_stat_h) +corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ + $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ + $(dis_asm_h) $(gdb_stat_h) $(completer_h) +corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ + $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ + $(exec_h) $(readline_h) $(gdb_assert_h) +core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) +cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ + $(ui_out_h) $(gdb_string_h) +cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \ + $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \ + $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h) +cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \ + $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \ + $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \ + $(gdbtypes_h) +cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h) +cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \ + $(cp_abi_h) $(valprint_h) +cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \ + $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \ + $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \ + $(gdb_string_h) $(dis_asm_h) +c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \ + $(gdb_string_h) +c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(c_lang_h) $(cp_abi_h) $(target_h) +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ + $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ + $(disasm_h) $(trad_frame_h) $(gdb_assert_h) +dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ + $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ + $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ + $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \ + $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) +dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ + $(gdbcore_h) $(target_h) +delta68-nat.o: delta68-nat.c $(defs_h) +demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ + $(gdb_string_h) +dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(buildsym_h) $(gdb_assert_h) $(dictionary_h) +dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h) +disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \ + $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h) +doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h) +dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) +dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \ + $(gdb_string_h) +dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \ + $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \ + $(command_h) $(gdbcmd_h) +dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \ + $(mips_tdep_h) +dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ + $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) +dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \ + $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) +dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \ + $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \ + $(dwarf2loc_h) $(gdb_string_h) +dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \ + $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \ + $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \ + $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) +dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \ + $(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \ + $(language_h) $(complaints_h) $(gdb_string_h) +elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \ + $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) +environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h) +eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ + $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ + $(parser_defs_h) +event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ + $(gdb_string_h) +event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ + $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ + $(gdbcmd_h) $(readline_h) $(readline_history_h) +exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ + $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ + $(xcoffsolib_h) +expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ + $(gdb_string_h) $(block_h) +fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(gdb_string_h) $(elf_bfd_h) $(gregset_h) +f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \ + $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \ + $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \ + $(user_regs_h) $(block_h) +f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \ + $(valprint_h) $(value_h) +fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ + $(terminal_h) $(gdbthread_h) $(command_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ + $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ + $(command_h) $(gdbcmd_h) +frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdb_assert_h) $(dummy_frame_h) +frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) +f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(f_lang_h) $(gdb_string_h) +f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h) +gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \ + $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \ + $(gdb_assert_h) +gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ + $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) +gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) +gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \ + $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \ + $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) +glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(glibc_tdep_h) +gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \ + $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \ + $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \ + $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) +gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) +gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \ + $(demangle_h) $(gdb_assert_h) $(gdb_string_h) +go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ + $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ + $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ + $(gdb_string_h) +h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ + $(gdb_assert_h) $(dis_asm_h) +hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ + $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) +hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(gdb_wait_h) $(regcache_h) $(gdb_string_h) +hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(osabi_h) $(gdb_string_h) $(frame_h) +hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \ + $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \ + $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \ + $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \ + $(hppa_tdep_h) +hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ + $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ + $(somsolib_h) $(gdb_assert_h) $(gdb_string_h) +hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) +i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) +i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h) +i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \ + $(i386_tdep_h) +i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) +i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \ + $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \ + $(i387_tdep_h) $(gregset_h) +i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h) +i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \ + $(gdbcore_h) $(gregset_h) $(regcache_h) +i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \ + $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \ + $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) +i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(gdb_proc_service_h) +i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ + $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(glibc_tdep_h) +i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) +i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) +i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ + $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ + $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) +i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \ + $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(i386_tdep_h) +i386-stub.o: i386-stub.c +i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \ + $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \ + $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \ + $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) +i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(gregset_h) +i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \ + $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(i386_tdep_h) +i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \ + $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) +ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stat_h) +ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h) +ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) +ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \ + $(arch_utils_h) $(gdbcore_h) $(regcache_h) +ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ + $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ + $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \ + $(libunwind_frame_h) $(libunwind_ia64_h) +infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ + $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ + $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) +infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \ + $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \ + $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \ + $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ + $(gdb_assert_h) +inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ + $(event_top_h) $(inf_loop_h) $(remote_h) +inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ + $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ + $(inflow_h) +infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ + $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) +infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ + $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ + $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ + $(observer_h) $(language_h) $(gdb_assert_h) +inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) +infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \ + $(gdbcore_h) +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ + $(gdb_events_h) $(gdb_assert_h) $(top_h) +irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h) +jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \ + $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) +jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \ + $(c_lang_h) $(cp_abi_h) +jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ + $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) +kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \ + $(kod_h) +kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h) +language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ + $(parser_defs_h) $(jv_lang_h) $(demangle_h) +libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ + $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \ + $(gdb_string_h) $(libunwind_frame_h) $(complaints_h) +linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ + $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \ + $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \ + $(objc_lang_h) $(linespec_h) +lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ + $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \ + $(linux_nat_h) +linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \ + $(linux_nat_h) +linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \ + $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ + $(cli_decode_h) $(gdb_string_h) $(linux_nat_h) +lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \ + $(valprint_h) +m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h) +m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(m2_lang_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ + $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) +m32r-stub.o: m32r-stub.c $(syscall_h) +m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \ + $(dis_asm_h) $(gdb_assert_h) +m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ + $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \ + $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h) +m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ + $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \ + $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(gregset_h) +m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ + $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ + $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ + $(m68k_tdep_h) +m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) +m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) +m68k-stub.o: m68k-stub.c +m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \ + $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \ + $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \ + $(gregset_h) +macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \ + $(command_h) $(gdbcmd_h) +macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \ + $(macroexp_h) $(gdb_assert_h) +macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \ + $(target_h) $(frame_h) $(inferior_h) $(complaints_h) +macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ + $(bcache_h) $(complaints_h) +main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ + $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ + $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) +maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ + $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) +mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(gdb_string_h) $(regcache_h) $(serial_h) +mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ + $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ + $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) +mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ + $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ + $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) \ + $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \ + $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h) +memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \ + $(target_h) $(value_h) $(language_h) $(gdb_string_h) +mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \ + $(target_h) +minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) +mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) +mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) +mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ + $(gdb_assert_h) $(frame_h) +mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(mipsnbsd_tdep_h) +mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ + $(solib_svr4_h) +mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ + $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ + $(elf_common_h) $(elf_mips_h) +mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ + $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) +mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gregset_h) +mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \ + $(objfiles_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \ + $(dis_asm_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ + $(gdb_regex_h) $(srec_h) $(regcache_h) +nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) +nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) +ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ + $(gdb_string_h) +ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ + $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ + $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ + $(nto_tdep_h) $(command_h) $(regcache_h) +nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ + $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ + $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) +objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ + $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \ + $(block_h) +objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ + $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ + $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ + $(gdb_assert_h) +objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \ + $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \ + $(breakpoint_h) $(block_h) $(dictionary_h) +observer.o: observer.c $(defs_h) $(observer_h) +ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ + $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) +osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ + $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) +parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ + $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ + $(doublest_h) $(gdb_assert_h) $(block_h) +p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \ + $(valprint_h) $(value_h) +ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \ + $(regcache_h) +ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \ + $(ppc_tdep_h) +ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ + $(ppc_tdep_h) +ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) +ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ + $(ppc_tdep_h) $(target_h) $(objfiles_h) +printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ + $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ + $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) +proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ + $(proc_utils_h) +proc-events.o: proc-events.c $(defs_h) +proc-flags.o: proc-flags.c $(defs_h) +procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \ + $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \ + $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) $(gregset_h) +proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gregset_h) +proc-why.o: proc-why.c $(defs_h) $(proc_utils_h) +p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h) +p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \ + $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) +regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \ + $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \ + $(gdb_string_h) $(gdbcmd_h) +reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ + $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) +remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ + $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ + $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ + $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ + $(gdbcore_h) $(remote_fileio_h) +remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ + $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ + $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) +remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ + $(remote_fileio_h) +remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) +remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) +remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \ + $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h) +remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) +remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(regcache_h) $(serial_h) +remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ + $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \ + $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) +remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(serial_h) $(regcache_h) +remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \ + $(regcache_h) +remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \ + $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \ + $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \ + $(vx_share_dbgRpcLib_h) +remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \ + $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \ + $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \ + $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \ + $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \ + $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \ + $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(regcache_h) $(gdb_string_h) \ + $(sparc_tdep_h) $(vx_share_ptrace_h) $(vx_share_regPacket_h) +rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) +rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ + $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) +rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ + $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ + $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ + $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ + $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ + $(gdb_assert_h) $(dis_asm_h) +s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ + $(s390_tdep_h) +s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \ + $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ + $(solib_svr4_h) $(s390_tdep_h) +scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) +scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h) +scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \ + $(scm_lang_h) $(valprint_h) $(gdbcore_h) +sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \ + $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h) +ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h) +ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h) +serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h) +ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \ + $(gdb_string_h) +ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h) +ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \ + $(gdb_string_h) $(event_loop_h) +sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \ + $(sh_tdep_h) +sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(objfiles_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \ + $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \ + $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ + $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +sh-stub.o: sh-stub.c +sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \ + $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \ + $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ + $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \ + $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ + $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) +solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ + $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ + $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) +solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ + $(bcache_h) $(regcache_h) +solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \ + $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \ + $(bfd_target_h) $(exec_h) +sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \ + $(symfile_h) $(gdb_string_h) $(gregset_h) +somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ + $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) +source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ + $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ + $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ + $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \ + $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) +sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ + $(solib_svr4_h) $(sparc64_tdep_h) +sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) +sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \ + $(sparc_nat_h) +sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h) +sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \ + $(sparc_tdep_h) $(sparc64_tdep_h) +sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc_tdep_h) +sparc-stub.o: sparc-stub.c +sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ + $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \ + $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ + $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ + $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \ + $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) +stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ + $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ + $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) +standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(gdb_wait_h) +std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ + $(value_h) $(gdb_string_h) +stop-gdb.o: stop-gdb.c $(defs_h) +sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \ + $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ + $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ + $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ + $(gdb_string_h) $(gdb_stat_h) +symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ + $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ + $(dictionary_h) $(gdb_string_h) +symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ + $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ + $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ + $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) +target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ + $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) +thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ + $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) +thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \ + $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) +top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ + $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ + $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ + $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ + $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ + $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) +tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ + $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ + $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \ + $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \ + $(readline_history_h) +trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ + $(regcache_h) +typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ + $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ + $(gdb_string_h) +ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) +ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(ui_out_h) $(gdb_assert_h) +user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ + $(gdb_string_h) $(gdb_assert_h) $(frame_h) +utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ + $(filenames_h) $(inferior_h) $(readline_h) +uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ + $(regcache_h) $(gregset_h) +v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ + $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) +v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) +valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ + $(doublest_h) $(infcall_h) +valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \ + $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \ + $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \ + $(cp_support_h) +valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \ + $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) +values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \ + $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \ + $(gdb_assert_h) $(regcache_h) $(block_h) +varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ + $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) +vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \ + $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h) +win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ + $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ + $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ + $(regcache_h) $(mips_tdep_h) +wince-stub.o: wince-stub.c $(wince_stub_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ + $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ + $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \ + $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h) +xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \ + $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h) +xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h) +xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \ + $(dis_asm_h) + +# +# gdb/cli/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \ + $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \ + $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ + $(tui_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c +cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ + $(cli_decode_h) $(tui_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c +cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ + $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ + $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c +cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ + $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ + $(cli_script_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c +cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \ + $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \ + $(cli_setshow_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c +cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c + +# +# GDBTK sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +all-gdbtk: insight$(EXEEXT) + +install-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ + $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/help \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ + cd $(srcdir)/gdbtk/library ; \ + for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \ + do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ + done ; + +uninstall-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + rm -rf $(DESTDIR)$(GDBTK_LIBRARY) + +clean-gdbtk: + rm -f insight$(EXEEXT) + +# Removing the old gdb first works better if it is running, at least on SunOS. +insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \ + $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico + $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o + +gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) $(top_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(ITK_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" + +gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(breakpoint_h) $(tracepoint_h) \ + $(symfile_h) $(symtab_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \ + $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(dis_asm_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \ + $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \ + $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \ + $(srcdir)/gdbtk/generic/gdbtk.h + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \ + $(srcdir)/gdbtk/generic/gdbtk-interp.c + +gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(frame_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \ + $(block_h) $(dictionary_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-varobj.c + +gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(frame_h) $(value_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.c + +# +# gdb/mi/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ + $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c +mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ + $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c +mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \ + $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \ + $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \ + $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c +mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \ + $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c +mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c +mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ + $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \ + $(stack_h) $(dictionary_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c +mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c +mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c +mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ + $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c +mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ + $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ + $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ + $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_h) $(frame_h) $(mi_main_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c +mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c +mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c +mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \ + $(symtab_h) $(ui_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c + +# +# rdi-share sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +rdi-share/libangsd.a: force + @dir=rdi-share; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ + else \ + true; \ + fi + +# +# gdb/signals/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c + +# +# gdb/tui/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ + $(source_h) $(gdb_curses_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c +tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c +tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c +tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c +tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ + $(tui_io_h) $(tui_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c +tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ + $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ + $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ + $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c +tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ + $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ + $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c +tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ + $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c +tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ + $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ + $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ + $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c +tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ + $(gdb_string_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c +tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c +tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ + $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c +tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ + $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c +tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ + $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ + $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c +tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c +tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c +tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ + $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ + $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c + +# +# vx-share sub-directory +# + +xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ld.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c + +xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ptrace.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c + +xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_rdb.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c + +### end of the gdb Makefile.in. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1116 @@ +/* Target-dependent code for GDB, the GNU debugger. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "symtab.h" +#include "target.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "symfile.h" +#include "objfiles.h" +#include "regcache.h" +#include "value.h" +#include "osabi.h" + +#include "solib-svr4.h" +#include "ppc-tdep.h" + +/* The following instructions are used in the signal trampoline code + on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and + 0x7777 but now uses the sigreturn syscalls. We check for both. */ +#define INSTR_LI_R0_0x6666 0x38006666 +#define INSTR_LI_R0_0x7777 0x38007777 +#define INSTR_LI_R0_NR_sigreturn 0x38000077 +#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC + +#define INSTR_SC 0x44000002 + +/* Since the *-tdep.c files are platform independent (i.e, they may be + used to build cross platform debuggers), we can't include system + headers. Therefore, details concerning the sigcontext structure + must be painstakingly rerecorded. What's worse, if these details + ever change in the header files, they'll have to be changed here + as well. */ + +/* __SIGNAL_FRAMESIZE from */ +#define PPC_LINUX_SIGNAL_FRAMESIZE 64 + +/* From , offsetof(struct sigcontext_struct, regs) == 0x1c */ +#define PPC_LINUX_REGS_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x1c) + +/* From , + offsetof(struct sigcontext_struct, handler) == 0x14 */ +#define PPC_LINUX_HANDLER_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x14) + +/* From , values for PT_NIP, PT_R1, and PT_LNK */ +#define PPC_LINUX_PT_R0 0 +#define PPC_LINUX_PT_R1 1 +#define PPC_LINUX_PT_R2 2 +#define PPC_LINUX_PT_R3 3 +#define PPC_LINUX_PT_R4 4 +#define PPC_LINUX_PT_R5 5 +#define PPC_LINUX_PT_R6 6 +#define PPC_LINUX_PT_R7 7 +#define PPC_LINUX_PT_R8 8 +#define PPC_LINUX_PT_R9 9 +#define PPC_LINUX_PT_R10 10 +#define PPC_LINUX_PT_R11 11 +#define PPC_LINUX_PT_R12 12 +#define PPC_LINUX_PT_R13 13 +#define PPC_LINUX_PT_R14 14 +#define PPC_LINUX_PT_R15 15 +#define PPC_LINUX_PT_R16 16 +#define PPC_LINUX_PT_R17 17 +#define PPC_LINUX_PT_R18 18 +#define PPC_LINUX_PT_R19 19 +#define PPC_LINUX_PT_R20 20 +#define PPC_LINUX_PT_R21 21 +#define PPC_LINUX_PT_R22 22 +#define PPC_LINUX_PT_R23 23 +#define PPC_LINUX_PT_R24 24 +#define PPC_LINUX_PT_R25 25 +#define PPC_LINUX_PT_R26 26 +#define PPC_LINUX_PT_R27 27 +#define PPC_LINUX_PT_R28 28 +#define PPC_LINUX_PT_R29 29 +#define PPC_LINUX_PT_R30 30 +#define PPC_LINUX_PT_R31 31 +#define PPC_LINUX_PT_NIP 32 +#define PPC_LINUX_PT_MSR 33 +#define PPC_LINUX_PT_CTR 35 +#define PPC_LINUX_PT_LNK 36 +#define PPC_LINUX_PT_XER 37 +#define PPC_LINUX_PT_CCR 38 +#define PPC_LINUX_PT_MQ 39 +#define PPC_LINUX_PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ +#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31) +#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1) + +static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); + +/* Determine if pc is in a signal trampoline... + + Ha! That's not what this does at all. wait_for_inferior in + infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a + signal trampoline just after delivery of a signal. But on + GNU/Linux, signal trampolines are used for the return path only. + The kernel sets things up so that the signal handler is called + directly. + + If we use in_sigtramp2() in place of in_sigtramp() (see below) + we'll (often) end up with stop_pc in the trampoline and prev_pc in + the (now exited) handler. The code there will cause a temporary + breakpoint to be set on prev_pc which is not very likely to get hit + again. + + If this is confusing, think of it this way... the code in + wait_for_inferior() needs to be able to detect entry into a signal + trampoline just after a signal is delivered, not after the handler + has been run. + + So, we define in_sigtramp() below to return 1 if the following is + true: + + 1) The previous frame is a real signal trampoline. + + - and - + + 2) pc is at the first or second instruction of the corresponding + handler. + + Why the second instruction? It seems that wait_for_inferior() + never sees the first instruction when single stepping. When a + signal is delivered while stepping, the next instruction that + would've been stepped over isn't, instead a signal is delivered and + the first instruction of the handler is stepped over instead. That + puts us on the second instruction. (I added the test for the + first instruction long after the fact, just in case the observed + behavior is ever fixed.) + + PC_IN_SIGTRAMP is called from blockframe.c as well in order to set + the frame's type (if a SIGTRAMP_FRAME). Because of our strange + definition of in_sigtramp below, we can't rely on the frame's type + getting set correctly from within blockframe.c. This is why we + take pains to set it in init_extra_frame_info(). + + NOTE: cagney/2002-11-10: I suspect the real problem here is that + the get_prev_frame() only initializes the frame's type after the + call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this + code shouldn't be working its way around a bug :-(. */ + +int +ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) +{ + CORE_ADDR lr; + CORE_ADDR sp; + CORE_ADDR tramp_sp; + char buf[4]; + CORE_ADDR handler; + + lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); + if (!ppc_linux_at_sigtramp_return_path (lr)) + return 0; + + sp = read_register (SP_REGNUM); + + if (target_read_memory (sp, buf, sizeof (buf)) != 0) + return 0; + + tramp_sp = extract_unsigned_integer (buf, 4); + + if (target_read_memory (tramp_sp + PPC_LINUX_HANDLER_PTR_OFFSET, buf, + sizeof (buf)) != 0) + return 0; + + handler = extract_unsigned_integer (buf, 4); + + return (pc == handler || pc == handler + 4); +} + +static int +insn_is_sigreturn (unsigned long pcinsn) +{ + switch(pcinsn) + { + case INSTR_LI_R0_0x6666: + case INSTR_LI_R0_0x7777: + case INSTR_LI_R0_NR_sigreturn: + case INSTR_LI_R0_NR_rt_sigreturn: + return 1; + default: + return 0; + } +} + +/* + * The signal handler trampoline is on the stack and consists of exactly + * two instructions. The easiest and most accurate way of determining + * whether the pc is in one of these trampolines is by inspecting the + * instructions. It'd be faster though if we could find a way to do this + * via some simple address comparisons. + */ +static int +ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) +{ + char buf[12]; + unsigned long pcinsn; + if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) + return 0; + + /* extract the instruction at the pc */ + pcinsn = extract_unsigned_integer (buf + 4, 4); + + return ( + (insn_is_sigreturn (pcinsn) + && extract_unsigned_integer (buf + 8, 4) == INSTR_SC) + || + (pcinsn == INSTR_SC + && insn_is_sigreturn (extract_unsigned_integer (buf, 4)))); +} + +static CORE_ADDR +ppc_linux_skip_trampoline_code (CORE_ADDR pc) +{ + char buf[4]; + struct obj_section *sect; + struct objfile *objfile; + unsigned long insn; + CORE_ADDR plt_start = 0; + CORE_ADDR symtab = 0; + CORE_ADDR strtab = 0; + int num_slots = -1; + int reloc_index = -1; + CORE_ADDR plt_table; + CORE_ADDR reloc; + CORE_ADDR sym; + long symidx; + char symname[1024]; + struct minimal_symbol *msymbol; + + /* Find the section pc is in; return if not in .plt */ + sect = find_pc_section (pc); + if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0) + return 0; + + objfile = sect->objfile; + + /* Pick up the instruction at pc. It had better be of the + form + li r11, IDX + + where IDX is an index into the plt_table. */ + + if (target_read_memory (pc, buf, 4) != 0) + return 0; + insn = extract_unsigned_integer (buf, 4); + + if ((insn & 0xffff0000) != 0x39600000 /* li r11, VAL */ ) + return 0; + + reloc_index = (insn << 16) >> 16; + + /* Find the objfile that pc is in and obtain the information + necessary for finding the symbol name. */ + for (sect = objfile->sections; sect < objfile->sections_end; ++sect) + { + const char *secname = sect->the_bfd_section->name; + if (strcmp (secname, ".plt") == 0) + plt_start = sect->addr; + else if (strcmp (secname, ".rela.plt") == 0) + num_slots = ((int) sect->endaddr - (int) sect->addr) / 12; + else if (strcmp (secname, ".dynsym") == 0) + symtab = sect->addr; + else if (strcmp (secname, ".dynstr") == 0) + strtab = sect->addr; + } + + /* Make sure we have all the information we need. */ + if (plt_start == 0 || num_slots == -1 || symtab == 0 || strtab == 0) + return 0; + + /* Compute the value of the plt table */ + plt_table = plt_start + 72 + 8 * num_slots; + + /* Get address of the relocation entry (Elf32_Rela) */ + if (target_read_memory (plt_table + reloc_index, buf, 4) != 0) + return 0; + reloc = extract_unsigned_integer (buf, 4); + + sect = find_pc_section (reloc); + if (!sect) + return 0; + + if (strcmp (sect->the_bfd_section->name, ".text") == 0) + return reloc; + + /* Now get the r_info field which is the relocation type and symbol + index. */ + if (target_read_memory (reloc + 4, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Shift out the relocation type leaving just the symbol index */ + /* symidx = ELF32_R_SYM(symidx); */ + symidx = symidx >> 8; + + /* compute the address of the symbol */ + sym = symtab + symidx * 4; + + /* Fetch the string table index */ + if (target_read_memory (sym, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Fetch the string; we don't know how long it is. Is it possible + that the following will fail because we're trying to fetch too + much? */ + if (target_read_memory (strtab + symidx, symname, sizeof (symname)) != 0) + return 0; + + /* This might not work right if we have multiple symbols with the + same name; the only way to really get it right is to perform + the same sort of lookup as the dynamic linker. */ + msymbol = lookup_minimal_symbol_text (symname, NULL); + if (!msymbol) + return 0; + + return SYMBOL_VALUE_ADDRESS (msymbol); +} + +/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The + signal handler details are different, so we'll handle those here + and call the rs6000 version to do the rest. */ +CORE_ADDR +ppc_linux_frame_saved_pc (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return the NIP in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); + } + else if (get_next_frame (fi) + && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (get_next_frame (fi)) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return LNK in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); + } + else + return rs6000_frame_saved_pc (fi); +} + +void +ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) +{ + rs6000_init_extra_frame_info (fromleaf, fi); + + if (get_next_frame (fi) != 0) + { + /* We're called from get_prev_frame_info; check to see if + this is a signal frame by looking to see if the pc points + at trampoline code */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + deprecated_set_frame_type (fi, SIGTRAMP_FRAME); + else + /* FIXME: cagney/2002-11-10: Is this double bogus? What + happens if the frame has previously been marked as a dummy? */ + deprecated_set_frame_type (fi, NORMAL_FRAME); + } +} + +int +ppc_linux_frameless_function_invocation (struct frame_info *fi) +{ + /* We'll find the wrong thing if we let + rs6000_frameless_function_invocation () search for a signal trampoline */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + return 0; + else + return rs6000_frameless_function_invocation (fi); +} + +void +ppc_linux_frame_init_saved_regs (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr; + int i; + if (deprecated_get_frame_saved_regs (fi)) + return; + + frame_saved_regs_zalloc (fi); + + regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MSR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CCR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_LNK; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CTR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = + regs_addr + 4 * PPC_LINUX_PT_XER; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MQ; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = + regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; + } + else + rs6000_frame_init_saved_regs (fi); +} + +CORE_ADDR +ppc_linux_frame_chain (struct frame_info *thisframe) +{ + /* Kernel properly constructs the frame chain for the handler */ + if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) + return read_memory_integer (get_frame_base (thisframe), 4); + else + return rs6000_frame_chain (thisframe); +} + +/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint + in much the same fashion as memory_remove_breakpoint in mem-break.c, + but is careful not to write back the previous contents if the code + in question has changed in between inserting the breakpoint and + removing it. + + Here is the problem that we're trying to solve... + + Once upon a time, before introducing this function to remove + breakpoints from the inferior, setting a breakpoint on a shared + library function prior to running the program would not work + properly. In order to understand the problem, it is first + necessary to understand a little bit about dynamic linking on + this platform. + + A call to a shared library function is accomplished via a bl + (branch-and-link) instruction whose branch target is an entry + in the procedure linkage table (PLT). The PLT in the object + file is uninitialized. To gdb, prior to running the program, the + entries in the PLT are all zeros. + + Once the program starts running, the shared libraries are loaded + and the procedure linkage table is initialized, but the entries in + the table are not (necessarily) resolved. Once a function is + actually called, the code in the PLT is hit and the function is + resolved. In order to better illustrate this, an example is in + order; the following example is from the gdb testsuite. + + We start the program shmain. + + [kev@arroyo testsuite]$ ../gdb gdb.base/shmain + [...] + + We place two breakpoints, one on shr1 and the other on main. + + (gdb) b shr1 + Breakpoint 1 at 0x100409d4 + (gdb) b main + Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44. + + Examine the instruction (and the immediatly following instruction) + upon which the breakpoint was placed. Note that the PLT entry + for shr1 contains zeros. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : .long 0x0 + 0x100409d8 : .long 0x0 + + Now run 'til main. + + (gdb) r + Starting program: gdb.base/shmain + Breakpoint 1 at 0xffaf790: file gdb.base/shr1.c, line 19. + + Breakpoint 2, main () + at gdb.base/shmain.c:44 + 44 g = 1; + + Examine the PLT again. Note that the loading of the shared + library has initialized the PLT to code which loads a constant + (which I think is an index into the GOT) into r11 and then + branchs a short distance to the code which actually does the + resolving. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : li r11,4 + 0x100409d8 : b 0x10040984 + (gdb) c + Continuing. + + Breakpoint 1, shr1 (x=1) + at gdb.base/shr1.c:19 + 19 l = 1; + + Now we've hit the breakpoint at shr1. (The breakpoint was + reset from the PLT entry to the actual shr1 function after the + shared library was loaded.) Note that the PLT entry has been + resolved to contain a branch that takes us directly to shr1. + (The real one, not the PLT entry.) + + (gdb) x/2i 0x100409d4 + 0x100409d4 : b 0xffaf76c + 0x100409d8 : b 0x10040984 + + The thing to note here is that the PLT entry for shr1 has been + changed twice. + + Now the problem should be obvious. GDB places a breakpoint (a + trap instruction) on the zero value of the PLT entry for shr1. + Later on, after the shared library had been loaded and the PLT + initialized, GDB gets a signal indicating this fact and attempts + (as it always does when it stops) to remove all the breakpoints. + + The breakpoint removal was causing the former contents (a zero + word) to be written back to the now initialized PLT entry thus + destroying a portion of the initialization that had occurred only a + short time ago. When execution continued, the zero word would be + executed as an instruction an an illegal instruction trap was + generated instead. (0 is not a legal instruction.) + + The fix for this problem was fairly straightforward. The function + memory_remove_breakpoint from mem-break.c was copied to this file, + modified slightly, and renamed to ppc_linux_memory_remove_breakpoint. + In tm-linux.h, MEMORY_REMOVE_BREAKPOINT is defined to call this new + function. + + The differences between ppc_linux_memory_remove_breakpoint () and + memory_remove_breakpoint () are minor. All that the former does + that the latter does not is check to make sure that the breakpoint + location actually contains a breakpoint (trap instruction) prior + to attempting to write back the old contents. If it does contain + a trap instruction, we allow the old contents to be written back. + Otherwise, we silently do nothing. + + The big question is whether memory_remove_breakpoint () should be + changed to have the same functionality. The downside is that more + traffic is generated for remote targets since we'll have an extra + fetch of a memory word each time a breakpoint is removed. + + For the time being, we'll leave this self-modifying-code-friendly + version in ppc-linux-tdep.c, but it ought to be migrated somewhere + else in the event that some other platform has similar needs with + regard to removing breakpoints in some potentially self modifying + code. */ +int +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +{ + const unsigned char *bp; + int val; + int bplen; + char old_contents[BREAKPOINT_MAX]; + + /* Determine appropriate breakpoint contents and size for this address. */ + bp = BREAKPOINT_FROM_PC (&addr, &bplen); + if (bp == NULL) + error ("Software breakpoints not implemented for this target."); + + val = target_read_memory (addr, old_contents, bplen); + + /* If our breakpoint is no longer at the address, this means that the + program modified the code on us, so it is wrong to put back the + old value */ + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) + val = target_write_memory (addr, contents_cache, bplen); + + return val; +} + +/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather + than the 32 bit SYSV R4 ABI structure return convention - all + structures, no matter their size, are put in memory. Vectors, + which were added later, do get returned in a register though. */ + +static enum return_value_convention +ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, + struct regcache *regcache, void *readbuf, + const void *writebuf) +{ + if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT + || TYPE_CODE (valtype) == TYPE_CODE_UNION) + && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8) + && TYPE_VECTOR (valtype))) + return RETURN_VALUE_STRUCT_CONVENTION; + else + return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf, + writebuf); +} + +/* Fetch (and possibly build) an appropriate link_map_offsets + structure for GNU/Linux PPC targets using the struct offsets + defined in link.h (but without actual reference to that file). + + This makes it possible to access GNU/Linux PPC shared libraries + from a GDB that was not built on an GNU/Linux PPC host (for cross + debugging). */ + +struct link_map_offsets * +ppc_linux_svr4_fetch_link_map_offsets (void) +{ + static struct link_map_offsets lmo; + static struct link_map_offsets *lmp = NULL; + + if (lmp == NULL) + { + lmp = &lmo; + + lmo.r_debug_size = 8; /* The actual size is 20 bytes, but + this is all we need. */ + lmo.r_map_offset = 4; + lmo.r_map_size = 4; + + lmo.link_map_size = 20; /* The actual size is 560 bytes, but + this is all we need. */ + lmo.l_addr_offset = 0; + lmo.l_addr_size = 4; + + lmo.l_name_offset = 4; + lmo.l_name_size = 4; + + lmo.l_next_offset = 12; + lmo.l_next_size = 4; + + lmo.l_prev_offset = 16; + lmo.l_prev_size = 4; + } + + return lmp; +} + + +/* Macros for matching instructions. Note that, since all the + operands are masked off before they're or-ed into the instruction, + you can use -1 to make masks. */ + +#define insn_d(opcd, rts, ra, d) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xffff)) + +#define insn_ds(opcd, rts, ra, d, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xfffc) \ + | ((xo) & 0x3)) + +#define insn_xfx(opcd, rts, spr, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((spr) & 0x1f) << 16) \ + | (((spr) & 0x3e0) << 6) \ + | (((xo) & 0x3ff) << 1)) + +/* Read a PPC instruction from memory. PPC instructions are always + big-endian, no matter what endianness the program is running in, so + we can't use read_memory_integer or one of its friends here. */ +static unsigned int +read_insn (CORE_ADDR pc) +{ + unsigned char buf[4]; + + read_memory (pc, buf, 4); + return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; +} + + +/* An instruction to match. */ +struct insn_pattern +{ + unsigned int mask; /* mask the insn with this... */ + unsigned int data; /* ...and see if it matches this. */ + int optional; /* If non-zero, this insn may be absent. */ +}; + +/* Return non-zero if the instructions at PC match the series + described in PATTERN, or zero otherwise. PATTERN is an array of + 'struct insn_pattern' objects, terminated by an entry whose mask is + zero. + + When the match is successful, fill INSN[i] with what PATTERN[i] + matched. If PATTERN[i] is optional, and the instruction wasn't + present, set INSN[i] to 0 (which is not a valid PPC instruction). + INSN should have as many elements as PATTERN. Note that, if + PATTERN contains optional instructions which aren't present in + memory, then INSN will have holes, so INSN[i] isn't necessarily the + i'th instruction in memory. */ +static int +insns_match_pattern (CORE_ADDR pc, + struct insn_pattern *pattern, + unsigned int *insn) +{ + int i; + + for (i = 0; pattern[i].mask; i++) + { + insn[i] = read_insn (pc); + if ((insn[i] & pattern[i].mask) == pattern[i].data) + pc += 4; + else if (pattern[i].optional) + insn[i] = 0; + else + return 0; + } + + return 1; +} + + +/* Return the 'd' field of the d-form instruction INSN, properly + sign-extended. */ +static CORE_ADDR +insn_d_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000); +} + + +/* Return the 'ds' field of the ds-form instruction INSN, with the two + zero bits concatenated at the right, and properly + sign-extended. */ +static CORE_ADDR +insn_ds_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000); +} + + +/* If DESC is the address of a 64-bit PowerPC GNU/Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + +/* Pattern for the standard linkage function. These are built by + build_plt_stub in elf64-ppc.c, whose GLINK argument is always + zero. */ +static struct insn_pattern ppc64_standard_linkage[] = + { + /* addis r12, r2, */ + { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 }, + + /* std r2, 40(r1) */ + { -1, insn_ds (62, 2, 1, 40, 0), 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* ld r2, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* mtctr r11 */ + { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), + 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* bctr */ + { -1, 0x4e800420, 0 }, + + { 0, 0, 0 } + }; +#define PPC64_STANDARD_LINKAGE_LEN \ + (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0])) + + +/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB + calls a "solib trampoline". */ +static int +ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name) +{ + /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain. + + It's not specifically solib call trampolines that are the issue. + Any call from one function to another function that uses a + different TOC requires a trampoline, to save the caller's TOC + pointer and then load the callee's TOC. An executable or shared + library may have more than one TOC, so even intra-object calls + may require a trampoline. Since executable and shared libraries + will all have their own distinct TOCs, every inter-object call is + also an inter-TOC call, and requires a trampoline --- so "solib + call trampolines" are just a special case. + + The 64-bit PowerPC GNU/Linux ABI calls these call trampolines + "linkage functions". Since they need to be near the functions + that call them, they all appear in .text, not in any special + section. The .plt section just contains an array of function + descriptors, from which the linkage functions load the callee's + entry point, TOC value, and environment pointer. So + in_plt_section is useless. The linkage functions don't have any + special linker symbols to name them, either. + + The only way I can see to recognize them is to actually look at + their code. They're generated by ppc_build_one_stub and some + other functions in bfd/elf64-ppc.c, so that should show us all + the instruction sequences we need to recognize. */ + unsigned int insn[PPC64_STANDARD_LINKAGE_LEN]; + + return insns_match_pattern (pc, ppc64_standard_linkage, insn); +} + + +/* When the dynamic linker is doing lazy symbol resolution, the first + call to a function in another object will go like this: + + - The user's function calls the linkage function: + + 100007c4: 4b ff fc d5 bl 10000498 + 100007c8: e8 41 00 28 ld r2,40(r1) + + - The linkage function loads the entry point (and other stuff) from + the function descriptor in the PLT, and jumps to it: + + 10000498: 3d 82 00 00 addis r12,r2,0 + 1000049c: f8 41 00 28 std r2,40(r1) + 100004a0: e9 6c 80 98 ld r11,-32616(r12) + 100004a4: e8 4c 80 a0 ld r2,-32608(r12) + 100004a8: 7d 69 03 a6 mtctr r11 + 100004ac: e9 6c 80 a8 ld r11,-32600(r12) + 100004b0: 4e 80 04 20 bctr + + - But since this is the first time that PLT entry has been used, it + sends control to its glink entry. That loads the number of the + PLT entry and jumps to the common glink0 code: + + 10000c98: 38 00 00 00 li r0,0 + 10000c9c: 4b ff ff dc b 10000c78 + + - The common glink0 code then transfers control to the dynamic + linker's fixup code: + + 10000c78: e8 41 00 28 ld r2,40(r1) + 10000c7c: 3d 82 00 00 addis r12,r2,0 + 10000c80: e9 6c 80 80 ld r11,-32640(r12) + 10000c84: e8 4c 80 88 ld r2,-32632(r12) + 10000c88: 7d 69 03 a6 mtctr r11 + 10000c8c: e9 6c 80 90 ld r11,-32624(r12) + 10000c90: 4e 80 04 20 bctr + + Eventually, this code will figure out how to skip all of this, + including the dynamic linker. At the moment, we just get through + the linkage function. */ + +/* If the current thread is about to execute a series of instructions + at PC matching the ppc64_standard_linkage pattern, and INSN is the result + from that pattern match, return the code address to which the + standard linkage function will send them. (This doesn't deal with + dynamic linker lazy symbol resolution stubs.) */ +static CORE_ADDR +ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + /* The address of the function descriptor this linkage function + references. */ + CORE_ADDR desc + = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2) + + (insn_d_field (insn[0]) << 16) + + insn_ds_field (insn[2])); + + /* The first word of the descriptor is the entry point. Return that. */ + return ppc64_desc_entry_point (desc); +} + + +/* Given that we've begun executing a call trampoline at PC, return + the entry point of the function the trampoline will go to. */ +static CORE_ADDR +ppc64_skip_trampoline_code (CORE_ADDR pc) +{ + unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN]; + + if (insns_match_pattern (pc, ppc64_standard_linkage, + ppc64_standard_linkage_insn)) + return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn); + else + return 0; +} + + +/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64 + GNU/Linux. + + Usually a function pointer's representation is simply the address + of the function. On GNU/Linux on the 64-bit PowerPC however, a + function pointer is represented by a pointer to a TOC entry. This + TOC entry contains three words, the first word is the address of + the function, the second word is the TOC pointer (r2), and the + third word is the static chain value. Throughout GDB it is + currently assumed that a function pointer contains the address of + the function, which is not easy to fix. In addition, the + conversion of a function address to a function pointer would + require allocation of a TOC entry in the inferior's memory space, + with all its drawbacks. To be able to call C++ virtual methods in + the inferior (which are called via function pointers), + find_function_addr uses this function to get the function address + from a function pointer. */ + +/* If ADDR points at what is clearly a function descriptor, transform + it into the address of the corresponding function. Be + conservative, otherwize GDB will do the transformation on any + random addresses such as occures when there is no symbol table. */ + +static CORE_ADDR +ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + struct section_table *s = target_section_by_addr (targ, addr); + + /* Check if ADDR points to a function descriptor. */ + if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) + return get_target_memory_unsigned (targ, addr, 8); + + return addr; +} + +#ifdef CRASH_MERGE +enum { + PPC_ELF_NGREG = 48, + PPC_ELF_NFPREG = 33, + PPC_ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (PPC_ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (PPC_ELF_NFPREG * 8) +}; +#else +enum { + ELF_NGREG = 48, + ELF_NFPREG = 33, + ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) +}; +#endif + +void +ppc_linux_supply_gregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (regi, buf + 4 * regi); + + supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); + supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); + supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); + supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); + supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); + if (tdep->ppc_mq_regnum != -1) + supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); + supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); +} + +void +ppc_linux_supply_fpregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (FP0_REGNUM + regi, buf + 8 * regi); + + /* The FPSCR is stored in the low order word of the last doubleword in the + fpregset. */ + supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); +} + +/* + Use a local version of this function to get the correct types for regsets. +*/ + +static void +fetch_core_registers (char *core_reg_sect, + unsigned core_reg_size, + int which, + CORE_ADDR reg_addr) +{ + if (which == 0) + { + if (core_reg_size == ELF_GREGSET_SIZE) + ppc_linux_supply_gregset (core_reg_sect); + else + warning ("wrong size gregset struct in core file"); + } + else if (which == 2) + { + if (core_reg_size == ELF_FPREGSET_SIZE) + ppc_linux_supply_fpregset (core_reg_sect); + else + warning ("wrong size fpregset struct in core file"); + } +} + +/* Register that we are able to handle ELF file formats using standard + procfs "regset" structures. */ + +static struct core_fns ppc_linux_regset_core_fns = +{ + bfd_target_elf_flavour, /* core_flavour */ + default_check_format, /* check_format */ + default_core_sniffer, /* core_sniffer */ + fetch_core_registers, /* core_read_registers */ + NULL /* next */ +}; + +static void +ppc_linux_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if (tdep->wordsize == 4) + { + /* Until November 2001, gcc did not comply with the 32 bit SysV + R4 ABI requirement that structures less than or equal to 8 + bytes should be returned in registers. Instead GCC was using + the the AIX/PowerOpen ABI - everything returned in memory + (well ignoring vectors that is). When this was corrected, it + wasn't fixed for GNU/Linux native platform. Use the + PowerOpen struct convention. */ + set_gdbarch_return_value (gdbarch, ppc_linux_return_value); + + /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding + *_push_arguments(). The same remarks hold for the methods below. */ + set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); + set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); + set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); + + set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, + ppc_linux_frame_init_saved_regs); + set_gdbarch_deprecated_init_extra_frame_info (gdbarch, + ppc_linux_init_extra_frame_info); + + set_gdbarch_memory_remove_breakpoint (gdbarch, + ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, + ppc_linux_skip_trampoline_code); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); + } + + if (tdep->wordsize == 8) + { + /* Handle PPC64 GNU/Linux function pointers (which are really + function descriptors). */ + set_gdbarch_convert_from_func_ptr_addr + (gdbarch, ppc64_linux_convert_from_func_ptr_addr); + + set_gdbarch_in_solib_call_trampoline + (gdbarch, ppc64_in_solib_call_trampoline); + set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); + + /* PPC64 malloc's entry-point is called ".malloc". */ + set_gdbarch_name_of_malloc (gdbarch, ".malloc"); + } +} + +void +_initialize_ppc_linux_tdep (void) +{ + /* Register for all sub-familes of the POWER/PowerPC: 32-bit and + 64-bit PowerPC, and the older rs6k. */ + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, + ppc_linux_init_abi); + add_core_fns (&ppc_linux_regset_core_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/symfile.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/symfile.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/symfile.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/symfile.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3644 @@ +/* Generic symbol file reading for the GNU debugger, GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support, using pieces from other GDB modules. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfdlink.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "source.h" +#include "gdbcmd.h" +#include "breakpoint.h" +#include "language.h" +#include "complaints.h" +#include "demangle.h" +#include "inferior.h" /* for write_pc */ +#include "filenames.h" /* for DOSish file names */ +#include "gdb-stabs.h" +#include "gdb_obstack.h" +#include "completer.h" +#include "bcache.h" +#include "hashtab.h" +#include "readline/readline.h" +#include "gdb_assert.h" +#include "block.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifdef HPUXHPPA + +/* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + +extern int hp_som_som_object_present; +extern int hp_cxx_exception_support_initialized; +#define RESET_HP_UX_GLOBALS() do {\ + hp_som_som_object_present = 0; /* indicates HP-compiled code */ \ + hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \ + } while (0) +#endif + +int (*ui_load_progress_hook) (const char *section, unsigned long num); +void (*show_load_progress) (const char *section, + unsigned long section_sent, + unsigned long section_size, + unsigned long total_sent, + unsigned long total_size); +void (*pre_add_symbol_hook) (char *); +void (*post_add_symbol_hook) (void); +void (*target_new_objfile_hook) (struct objfile *); + +static void clear_symtab_users_cleanup (void *ignore); + +/* Global variables owned by this file */ +int readnow_symbol_files; /* Read full symbols immediately */ + +/* External variables and functions referenced. */ + +extern void report_transfer_performance (unsigned long, time_t, time_t); + +/* Functions this file defines */ + +#if 0 +static int simple_read_overlay_region_table (void); +static void simple_free_overlay_region_table (void); +#endif + +static void set_initial_language (void); + +static void load_command (char *, int); + +static void symbol_file_add_main_1 (char *args, int from_tty, int flags); + +static void add_symbol_file_command (char *, int); + +static void add_shared_symbol_files_command (char *, int); + +static void reread_separate_symbols (struct objfile *objfile); + +static void cashier_psymtab (struct partial_symtab *); + +bfd *symfile_bfd_open (char *); + +int get_section_index (struct objfile *, char *); + +static void find_sym_fns (struct objfile *); + +static void decrement_reading_symtab (void *); + +static void overlay_invalidate_all (void); + +static int overlay_is_mapped (struct obj_section *); + +void list_overlays_command (char *, int); + +void map_overlay_command (char *, int); + +void unmap_overlay_command (char *, int); + +static void overlay_auto_command (char *, int); + +static void overlay_manual_command (char *, int); + +static void overlay_off_command (char *, int); + +static void overlay_load_command (char *, int); + +static void overlay_command (char *, int); + +static void simple_free_overlay_table (void); + +static void read_target_long_array (CORE_ADDR, unsigned int *, int); + +static int simple_read_overlay_table (void); + +static int simple_overlay_update_1 (struct obj_section *); + +static void add_filename_language (char *ext, enum language lang); + +static void set_ext_lang_command (char *args, int from_tty); + +static void info_ext_lang_command (char *args, int from_tty); + +static char *find_separate_debug_file (struct objfile *objfile); + +static void init_filename_language_table (void); + +void _initialize_symfile (void); + +/* List of all available sym_fns. On gdb startup, each object file reader + calls add_symtab_fns() to register information on each format it is + prepared to read. */ + +static struct sym_fns *symtab_fns = NULL; + +/* Flag for whether user will be reloading symbols multiple times. + Defaults to ON for VxWorks, otherwise OFF. */ + +#ifdef SYMBOL_RELOADING_DEFAULT +int symbol_reloading = SYMBOL_RELOADING_DEFAULT; +#else +int symbol_reloading = 0; +#endif + +/* If non-zero, shared library symbols will be added automatically + when the inferior is created, new libraries are loaded, or when + attaching to the inferior. This is almost always what users will + want to have happen; but for very large programs, the startup time + will be excessive, and so if this is a problem, the user can clear + this flag and then add the shared library symbols as needed. Note + that there is a potential for confusion, since if the shared + library symbols are not loaded, commands like "info fun" will *not* + report all the functions that are actually present. */ + +int auto_solib_add = 1; + +/* For systems that support it, a threshold size in megabytes. If + automatically adding a new library's symbol table to those already + known to the debugger would cause the total shared library symbol + size to exceed this threshhold, then the shlib's symbols are not + added. The threshold is ignored if the user explicitly asks for a + shlib to be added, such as when using the "sharedlibrary" + command. */ + +int auto_solib_limit; + + +/* This compares two partial symbols by names, using strcmp_iw_ordered + for the comparison. */ + +static int +compare_psymbols (const void *s1p, const void *s2p) +{ + struct partial_symbol *const *s1 = s1p; + struct partial_symbol *const *s2 = s2p; + + return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1), + SYMBOL_NATURAL_NAME (*s2)); +} + +void +sort_pst_symbols (struct partial_symtab *pst) +{ + /* Sort the global list; don't sort the static list */ + + qsort (pst->objfile->global_psymbols.list + pst->globals_offset, + pst->n_global_syms, sizeof (struct partial_symbol *), + compare_psymbols); +} + +/* Make a null terminated copy of the string at PTR with SIZE characters in + the obstack pointed to by OBSTACKP . Returns the address of the copy. + Note that the string at PTR does not have to be null terminated, I.E. it + may be part of a larger string and we are only saving a substring. */ + +char * +obsavestring (const char *ptr, int size, struct obstack *obstackp) +{ + char *p = (char *) obstack_alloc (obstackp, size + 1); + /* Open-coded memcpy--saves function call time. These strings are usually + short. FIXME: Is this really still true with a compiler that can + inline memcpy? */ + { + const char *p1 = ptr; + char *p2 = p; + const char *end = ptr + size; + while (p1 != end) + *p2++ = *p1++; + } + p[size] = 0; + return p; +} + +/* Concatenate strings S1, S2 and S3; return the new string. Space is found + in the obstack pointed to by OBSTACKP. */ + +char * +obconcat (struct obstack *obstackp, const char *s1, const char *s2, + const char *s3) +{ + int len = strlen (s1) + strlen (s2) + strlen (s3) + 1; + char *val = (char *) obstack_alloc (obstackp, len); + strcpy (val, s1); + strcat (val, s2); + strcat (val, s3); + return val; +} + +/* True if we are nested inside psymtab_to_symtab. */ + +int currently_reading_symtab = 0; + +static void +decrement_reading_symtab (void *dummy) +{ + currently_reading_symtab--; +} + +/* Get the symbol table that corresponds to a partial_symtab. + This is fast after the first time you do it. In fact, there + is an even faster macro PSYMTAB_TO_SYMTAB that does the fast + case inline. */ + +struct symtab * +psymtab_to_symtab (struct partial_symtab *pst) +{ + /* If it's been looked up before, return it. */ + if (pst->symtab) + return pst->symtab; + + /* If it has not yet been read in, read it. */ + if (!pst->readin) + { + struct cleanup *back_to = make_cleanup (decrement_reading_symtab, NULL); + currently_reading_symtab++; + (*pst->read_symtab) (pst); + do_cleanups (back_to); + } + + return pst->symtab; +} + +/* Remember the lowest-addressed loadable section we've seen. + This function is called via bfd_map_over_sections. + + In case of equal vmas, the section with the largest size becomes the + lowest-addressed loadable section. + + If the vmas and sizes are equal, the last section is considered the + lowest-addressed loadable section. */ + +void +find_lowest_section (bfd *abfd, asection *sect, void *obj) +{ + asection **lowest = (asection **) obj; + + if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD)) + return; + if (!*lowest) + *lowest = sect; /* First loadable section */ + else if (bfd_section_vma (abfd, *lowest) > bfd_section_vma (abfd, sect)) + *lowest = sect; /* A lower loadable section */ + else if (bfd_section_vma (abfd, *lowest) == bfd_section_vma (abfd, sect) + && (bfd_section_size (abfd, (*lowest)) + <= bfd_section_size (abfd, sect))) + *lowest = sect; +} + +/* Create a new section_addr_info, with room for NUM_SECTIONS. */ + +struct section_addr_info * +alloc_section_addr_info (size_t num_sections) +{ + struct section_addr_info *sap; + size_t size; + + size = (sizeof (struct section_addr_info) + + sizeof (struct other_sections) * (num_sections - 1)); + sap = (struct section_addr_info *) xmalloc (size); + memset (sap, 0, size); + sap->num_sections = num_sections; + + return sap; +} + +/* Build (allocate and populate) a section_addr_info struct from + an existing section table. */ + +extern struct section_addr_info * +build_section_addr_info_from_section_table (const struct section_table *start, + const struct section_table *end) +{ + struct section_addr_info *sap; + const struct section_table *stp; + int oidx; + + sap = alloc_section_addr_info (end - start); + + for (stp = start, oidx = 0; stp != end; stp++) + { + if (bfd_get_section_flags (stp->bfd, + stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD) + && oidx < end - start) + { + sap->other[oidx].addr = stp->addr; + sap->other[oidx].name + = xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section)); + sap->other[oidx].sectindex = stp->the_bfd_section->index; + oidx++; + } + } + + return sap; +} + + +/* Free all memory allocated by build_section_addr_info_from_section_table. */ + +extern void +free_section_addr_info (struct section_addr_info *sap) +{ + int idx; + + for (idx = 0; idx < sap->num_sections; idx++) + if (sap->other[idx].name) + xfree (sap->other[idx].name); + xfree (sap); +} + + +/* Initialize OBJFILE's sect_index_* members. */ +static void +init_objfile_sect_indices (struct objfile *objfile) +{ + asection *sect; + int i; + + sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (sect) + objfile->sect_index_text = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".data"); + if (sect) + objfile->sect_index_data = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".bss"); + if (sect) + objfile->sect_index_bss = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".rodata"); + if (sect) + objfile->sect_index_rodata = sect->index; + + /* This is where things get really weird... We MUST have valid + indices for the various sect_index_* members or gdb will abort. + So if for example, there is no ".text" section, we have to + accomodate that. Except when explicitly adding symbol files at + some address, section_offsets contains nothing but zeros, so it + doesn't matter which slot in section_offsets the individual + sect_index_* members index into. So if they are all zero, it is + safe to just point all the currently uninitialized indices to the + first slot. */ + + for (i = 0; i < objfile->num_sections; i++) + { + if (ANOFFSET (objfile->section_offsets, i) != 0) + { + break; + } + } + if (i == objfile->num_sections) + { + if (objfile->sect_index_text == -1) + objfile->sect_index_text = 0; + if (objfile->sect_index_data == -1) + objfile->sect_index_data = 0; + if (objfile->sect_index_bss == -1) + objfile->sect_index_bss = 0; + if (objfile->sect_index_rodata == -1) + objfile->sect_index_rodata = 0; + } +} + + +/* Parse the user's idea of an offset for dynamic linking, into our idea + of how to represent it for fast symbol reading. This is the default + version of the sym_fns.sym_offsets function for symbol readers that + don't need to do anything special. It allocates a section_offsets table + for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */ + +void +default_symfile_offsets (struct objfile *objfile, + struct section_addr_info *addrs) +{ + int i; + + objfile->num_sections = bfd_count_sections (objfile->obfd); + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + memset (objfile->section_offsets, 0, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + + /* Now calculate offsets for section that were specified by the + caller. */ + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + struct other_sections *osp ; + + osp = &addrs->other[i] ; + if (osp->addr == 0) + continue; + + /* Record all sections in offsets */ + /* The section_offsets in the objfile are here filled in using + the BFD index. */ + (objfile->section_offsets)->offsets[osp->sectindex] = osp->addr; + } + + /* Remember the bfd indexes for the .text, .data, .bss and + .rodata sections. */ + init_objfile_sect_indices (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + OBJFILE is where the symbols are to be read from. + + ADDRS is the list of section load addresses. If the user has given + an 'add-symbol-file' command, then this is the list of offsets and + addresses he or she provided as arguments to the command; or, if + we're handling a shared library, these are the actual addresses the + sections are loaded at, according to the inferior's dynamic linker + (as gleaned by GDB's shared library code). We convert each address + into an offset from the section VMA's as it appears in the object + file, and then call the file's sym_offsets function to convert this + into a format-specific offset table --- a `struct section_offsets'. + If ADDRS is non-zero, OFFSETS must be zero. + + OFFSETS is a table of section offsets already in the right + format-specific representation. NUM_OFFSETS is the number of + elements present in OFFSETS->offsets. If OFFSETS is non-zero, we + assume this is the proper table the call to sym_offsets described + above would produce. Instead of calling sym_offsets, we just dump + it right into objfile->section_offsets. (When we're re-reading + symbols from an objfile, we don't have the original load address + list any more; all we have is the section offset table.) If + OFFSETS is non-zero, ADDRS must be zero. + + MAINLINE is nonzero if this is the main symbol file, or zero if + it's an extra symbol file such as dynamically loaded code. + + VERBO is nonzero if the caller has printed a verbose message about + the symbol reading (and complaints can be more terse about it). */ + +void +syms_from_objfile (struct objfile *objfile, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, + int verbo) +{ + struct section_addr_info *local_addr = NULL; + struct cleanup *old_chain; + + gdb_assert (! (addrs && offsets)); + + init_entry_point_info (objfile); + find_sym_fns (objfile); + + if (objfile->sf == NULL) + return; /* No symbols. */ + + /* Make sure that partially constructed symbol tables will be cleaned up + if an error occurs during symbol reading. */ + old_chain = make_cleanup_free_objfile (objfile); + + /* If ADDRS and OFFSETS are both NULL, put together a dummy address + list. We now establish the convention that an addr of zero means + no load address was specified. */ + if (! addrs && ! offsets) + { + local_addr + = alloc_section_addr_info (bfd_count_sections (objfile->obfd)); + make_cleanup (xfree, local_addr); + addrs = local_addr; + } + + /* Now either addrs or offsets is non-zero. */ + + if (mainline) + { + /* We will modify the main symbol table, make sure that all its users + will be cleaned up if an error occurs during symbol reading. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Since no error yet, throw away the old symbol table. */ + + if (symfile_objfile != NULL) + { + free_objfile (symfile_objfile); + symfile_objfile = NULL; + } + + /* Currently we keep symbols from the add-symbol-file command. + If the user wants to get rid of them, they should do "symbol-file" + without arguments first. Not sure this is the best behavior + (PR 2207). */ + + (*objfile->sf->sym_new_init) (objfile); + } + + /* Convert addr into an offset rather than an absolute address. + We find the lowest address of a loaded segment in the objfile, + and assume that is where that got loaded. + + We no longer warn if the lowest section is not a text segment (as + happens for the PA64 port. */ + if (!mainline && addrs && addrs->other[0].name) + { + asection *lower_sect; + asection *sect; + CORE_ADDR lower_offset; + int i; + + /* Find lowest loadable section to be used as starting point for + continguous sections. FIXME!! won't work without call to find + .text first, but this assumes text is lowest section. */ + lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (lower_sect == NULL) + bfd_map_over_sections (objfile->obfd, find_lowest_section, + &lower_sect); + if (lower_sect == NULL) + warning ("no loadable sections found in added symbol-file %s", + objfile->name); + else + if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) + warning ("Lowest section in %s is %s at %s", + objfile->name, + bfd_section_name (objfile->obfd, lower_sect), + paddr (bfd_section_vma (objfile->obfd, lower_sect))); + if (lower_sect != NULL) + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); + else + lower_offset = 0; + + /* Calculate offsets for the loadable sections. + FIXME! Sections must be in order of increasing loadable section + so that contiguous sections can use the lower-offset!!! + + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to + the offset of the highest loadable section lower than it + (the loadable section directly below it in memory). + this_offset = lower_offset = lower_addr - lower_orig_addr */ + + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + if (addrs->other[i].addr != 0) + { + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); + if (sect) + { + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); + lower_offset = addrs->other[i].addr; + /* This is the index used by BFD. */ + addrs->other[i].sectindex = sect->index ; + } + else + { + warning ("section %s not found in %s", + addrs->other[i].name, + objfile->name); + addrs->other[i].addr = 0; + } + } + else + addrs->other[i].addr = lower_offset; + } + } + + /* Initialize symbol reading routines for this objfile, allow complaints to + appear for this new file, and record how verbose to be, then do the + initial symbol reading for this file. */ + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, verbo); + + if (addrs) + (*objfile->sf->sym_offsets) (objfile, addrs); + else + { + size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets); + + /* Just copy in the offset table directly as given to us. */ + objfile->num_sections = num_offsets; + objfile->section_offsets + = ((struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, size)); + memcpy (objfile->section_offsets, offsets, size); + + init_objfile_sect_indices (objfile); + } + +#ifndef DEPRECATED_IBM6000_TARGET + /* This is a SVR4/SunOS specific hack, I think. In any event, it + screws RS/6000. sym_offsets should be doing this sort of thing, + because it knows the mapping between bfd sections and + section_offsets. */ + /* This is a hack. As far as I can tell, section offsets are not + target dependent. They are all set to addr with a couple of + exceptions. The exceptions are sysvr4 shared libraries, whose + offsets are kept in solib structures anyway and rs6000 xcoff + which handles shared libraries in a completely unique way. + + Section offsets are built similarly, except that they are built + by adding addr in all cases because there is no clear mapping + from section_offsets into actual sections. Note that solib.c + has a different algorithm for finding section offsets. + + These should probably all be collapsed into some target + independent form of shared library support. FIXME. */ + + if (addrs) + { + struct obj_section *s; + + /* Map section offsets in "addr" back to the object's + sections by comparing the section names with bfd's + section names. Then adjust the section address by + the offset. */ /* for gdb/13815 */ + + ALL_OBJFILE_OSECTIONS (objfile, s) + { + CORE_ADDR s_addr = 0; + int i; + + for (i = 0; + !s_addr && i < addrs->num_sections && addrs->other[i].name; + i++) + if (strcmp (bfd_section_name (s->objfile->obfd, + s->the_bfd_section), + addrs->other[i].name) == 0) + s_addr = addrs->other[i].addr; /* end added for gdb/13815 */ + + s->addr -= s->offset; + s->addr += s_addr; + s->endaddr -= s->offset; + s->endaddr += s_addr; + s->offset += s_addr; + } + } + +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, struct minimal_symbol *); + patch_load_module(objfile, NULL); + } +#endif +#endif /* not DEPRECATED_IBM6000_TARGET */ + + (*objfile->sf->sym_read) (objfile, mainline); + + /* Don't allow char * to have a typename (else would get caddr_t). + Ditto void *. FIXME: Check whether this is now done by all the + symbol readers themselves (many of them now do), and if so remove + it from here. */ + + TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0; + TYPE_NAME (lookup_pointer_type (builtin_type_void)) = 0; + + /* Mark the objfile has having had initial symbol read attempted. Note + that this does not mean we found any symbols... */ + + objfile->flags |= OBJF_SYMS; + + /* Discard cleanups as symbol reading was successful. */ + + discard_cleanups (old_chain); +} + +/* Perform required actions after either reading in the initial + symbols for a new objfile, or mapping in the symbols from a reusable + objfile. */ + +void +new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) +{ + + /* If this is the main symbol file we have to clean up all users of the + old main symbol file. Otherwise it is sufficient to fixup all the + breakpoints that may have been redefined by this symbol file. */ + if (mainline) + { + /* OK, make it the "real" symbol file. */ + symfile_objfile = objfile; + + clear_symtab_users (); + } + else + { + breakpoint_re_set (); + } + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, verbo); +} + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + NAME is the file name (which will be tilde-expanded and made + absolute herein) (but we don't free or modify NAME itself). + + FROM_TTY says how verbose to be. + + MAINLINE specifies whether this is the main symbol file, or whether + it's an extra symbol file such as dynamically loaded code. + + ADDRS, OFFSETS, and NUM_OFFSETS are as described for + syms_from_objfile, above. ADDRS is ignored when MAINLINE is + non-zero. + + Upon success, returns a pointer to the objfile that was added. + Upon failure, jumps back to command level (never returns). */ +static struct objfile * +symbol_file_add_with_addrs_or_offsets (char *name, int from_tty, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, int flags) +{ + struct objfile *objfile; + struct partial_symtab *psymtab; + char *debugfile; + bfd *abfd; + struct section_addr_info *orig_addrs; + struct cleanup *my_cleanups; + + /* Open a bfd for the file, and give user a chance to burp if we'd be + interactively wiping out any existing symbols. */ + + abfd = symfile_bfd_open (name); + + if ((have_full_symbols () || have_partial_symbols ()) + && mainline + && from_tty + && !query ("Load new symbol table from \"%s\"? ", name)) + error ("Not confirmed."); + + objfile = allocate_objfile (abfd, flags); + + orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); + my_cleanups = make_cleanup (xfree, orig_addrs); + if (addrs) + { + int i; + orig_addrs->num_sections = addrs->num_sections; + for (i = 0; i < addrs->num_sections; i++) + orig_addrs->other[i] = addrs->other[i]; + } + + /* We either created a new mapped symbol table, mapped an existing + symbol table file which has not had initial symbol reading + performed, or need to read an unmapped symbol table. */ + if (from_tty || info_verbose) + { + if (pre_add_symbol_hook) + pre_add_symbol_hook (name); + else + { + printf_unfiltered ("Reading symbols from %s...", name); + wrap_here (""); + gdb_flush (gdb_stdout); + } + } + syms_from_objfile (objfile, addrs, offsets, num_offsets, + mainline, from_tty); + + /* We now have at least a partial symbol table. Check to see if the + user requested that all symbols be read on initial access via either + the gdb startup command line or on a per symbol file basis. Expand + all partial symbol tables for this objfile if so. */ + + if ((flags & OBJF_READNOW) || readnow_symbol_files) + { + if (from_tty || info_verbose) + { + printf_unfiltered ("expanding to full symbols..."); + wrap_here (""); + gdb_flush (gdb_stdout); + } + + for (psymtab = objfile->psymtabs; + psymtab != NULL; + psymtab = psymtab->next) + { + psymtab_to_symtab (psymtab); + } + } + + debugfile = find_separate_debug_file (objfile); + if (debugfile) + { + if (addrs != NULL) + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags); + } + else + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, NULL, 0, flags); + } + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + + /* Put the separate debug object before the normal one, this is so that + usage of the ALL_OBJFILES_SAFE macro will stay safe. */ + put_objfile_before (objfile->separate_debug_objfile, objfile); + + xfree (debugfile); + } + + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)..."); + wrap_here (""); + } + + if (from_tty || info_verbose) + { + if (post_add_symbol_hook) + post_add_symbol_hook (); + else + { + printf_unfiltered ("done.\n"); + } + } + + /* We print some messages regardless of whether 'from_tty || + info_verbose' is true, so make sure they go out at the right + time. */ + gdb_flush (gdb_stdout); + + do_cleanups (my_cleanups); + + if (objfile->sf == NULL) + return objfile; /* No symbols. */ + + new_symfile_objfile (objfile, mainline, from_tty); + + if (target_new_objfile_hook) + target_new_objfile_hook (objfile); + + return (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. See symbol_file_add_with_addrs_or_offsets's comments + for details. */ +struct objfile * +symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs, + int mainline, int flags) +{ + return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0, + mainline, flags); +} + + +/* Call symbol_file_add() with default values and update whatever is + affected by the loading of a new main(). + Used when the file is supplied in the gdb command line + and by some targets with special loading requirements. + The auxiliary function, symbol_file_add_main_1(), has the flags + argument for the switches that can only be specified in the symbol_file + command itself. */ + +void +symbol_file_add_main (char *args, int from_tty) +{ + symbol_file_add_main_1 (args, from_tty, 0); +} + +static void +symbol_file_add_main_1 (char *args, int from_tty, int flags) +{ + symbol_file_add (args, from_tty, NULL, 1, flags); + +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + + /* Getting new symbols may change our opinion about + what is frameless. */ + reinit_frame_cache (); + + set_initial_language (); +} + +void +symbol_file_clear (int from_tty) +{ + if ((have_full_symbols () || have_partial_symbols ()) + && from_tty + && !query ("Discard symbol table from `%s'? ", + symfile_objfile->name)) + error ("Not confirmed."); + free_all_objfiles (); + + /* solib descriptors may have handles to objfiles. Since their + storage has just been released, we'd better wipe the solib + descriptors as well. + */ +#if defined(SOLIB_RESTART) + SOLIB_RESTART (); +#endif + + symfile_objfile = NULL; + if (from_tty) + printf_unfiltered ("No symbol file now.\n"); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif +} + +static char * +get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) +{ + asection *sect; + bfd_size_type debuglink_size; + unsigned long crc32; + char *contents; + int crc_offset; + unsigned char *p; + + sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); + + if (sect == NULL) + return NULL; + + debuglink_size = bfd_section_size (objfile->obfd, sect); + + contents = xmalloc (debuglink_size); + bfd_get_section_contents (objfile->obfd, sect, contents, + (file_ptr)0, (bfd_size_type)debuglink_size); + + /* Crc value is stored after the filename, aligned up to 4 bytes. */ + crc_offset = strlen (contents) + 1; + crc_offset = (crc_offset + 3) & ~3; + + crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); + + *crc32_out = crc32; + return contents; +} + +static int +separate_debug_file_exists (const char *name, unsigned long crc) +{ + unsigned long file_crc = 0; + int fd; + char buffer[8*1024]; + int count; + + fd = open (name, O_RDONLY | O_BINARY); + if (fd < 0) + return 0; + + while ((count = read (fd, buffer, sizeof (buffer))) > 0) + file_crc = gnu_debuglink_crc32 (file_crc, buffer, count); + + close (fd); + + return crc == file_crc; +} + +static char *debug_file_directory = NULL; + +#if ! defined (DEBUG_SUBDIRECTORY) +#define DEBUG_SUBDIRECTORY ".debug" +#endif + +static char * +find_separate_debug_file (struct objfile *objfile) +{ + asection *sect; + char *basename; + char *dir; + char *debugfile; + char *name_copy; + bfd_size_type debuglink_size; + unsigned long crc32; + int i; + + basename = get_debug_link_info (objfile, &crc32); + + if (basename == NULL) + return NULL; + + dir = xstrdup (objfile->name); + + /* Strip off the final filename part, leaving the directory name, + followed by a slash. Objfile names should always be absolute and + tilde-expanded, so there should always be a slash in there + somewhere. */ + for (i = strlen(dir) - 1; i >= 0; i--) + { + if (IS_DIR_SEPARATOR (dir[i])) + break; + } + gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i])); + dir[i+1] = '\0'; + + debugfile = alloca (strlen (debug_file_directory) + 1 + + strlen (dir) + + strlen (DEBUG_SUBDIRECTORY) + + strlen ("/") + + strlen (basename) + + 1); + + /* First try in the same directory as the original file. */ + strcpy (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */ + strcpy (debugfile, dir); + strcat (debugfile, DEBUG_SUBDIRECTORY); + strcat (debugfile, "/"); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the global debugfile directory. */ + strcpy (debugfile, debug_file_directory); + strcat (debugfile, "/"); + strcat (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + xfree (basename); + xfree (dir); +#ifdef CRASH_MERGE +{ + extern char *check_specified_debug_file(); + name_copy = check_specified_debug_file(); + return (name_copy ? xstrdup (name_copy) : NULL); +} +#else + return NULL; +#endif +} + + +/* This is the symbol-file command. Read the file, analyze its + symbols, and add a struct symtab to a symtab list. The syntax of + the command is rather bizarre--(1) buildargv implements various + quoting conventions which are undocumented and have little or + nothing in common with the way things are quoted (or not quoted) + elsewhere in GDB, (2) options are used, which are not generally + used in GDB (perhaps "set mapped on", "set readnow on" would be + better), (3) the order of options matters, which is contrary to GNU + conventions (because it is confusing and inconvenient). */ +/* Note: ezannoni 2000-04-17. This function used to have support for + rombug (see remote-os9k.c). It consisted of a call to target_link() + (target.c) to get the address of the text segment from the target, + and pass that to symbol_file_add(). This is no longer supported. */ + +void +symbol_file_command (char *args, int from_tty) +{ + char **argv; + char *name = NULL; + struct cleanup *cleanups; + int flags = OBJF_USERLOADED; + + dont_repeat (); + + if (args == NULL) + { + symbol_file_clear (from_tty); + } + else + { + if ((argv = buildargv (args)) == NULL) + { + nomem (0); + } + cleanups = make_cleanup_freeargv (argv); + while (*argv != NULL) + { + if (strcmp (*argv, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (**argv == '-') + error ("unknown option `%s'", *argv); + else + { + name = *argv; + + symbol_file_add_main_1 (name, from_tty, flags); + } + argv++; + } + + if (name == NULL) + { + error ("no symbol file name was specified"); + } + do_cleanups (cleanups); + } +} + +/* Set the initial language. + + A better solution would be to record the language in the psymtab when reading + partial symbols, and then use it (if known) to set the language. This would + be a win for formats that encode the language in an easily discoverable place, + such as DWARF. For stabs, we can jump through hoops looking for specially + named symbols or try to intuit the language from the specific type of stabs + we find, but we can't do that until later when we read in full symbols. + FIXME. */ + +static void +set_initial_language (void) +{ + struct partial_symtab *pst; + enum language lang = language_unknown; + + pst = find_main_psymtab (); + if (pst != NULL) + { + if (pst->filename != NULL) + { + lang = deduce_language_from_filename (pst->filename); + } + if (lang == language_unknown) + { + /* Make C the default language */ + lang = language_c; + } + set_language (lang); + expected_language = current_language; /* Don't warn the user */ + } +} + +/* Open file specified by NAME and hand it off to BFD for preliminary + analysis. Result is a newly initialized bfd *, which includes a newly + malloc'd` copy of NAME (tilde-expanded and made absolute). + In case of trouble, error() is called. */ + +bfd * +symfile_bfd_open (char *name) +{ + bfd *sym_bfd; + int desc; + char *absolute_name; + + + + name = tilde_expand (name); /* Returns 1st new malloc'd copy */ + + /* Look down path for it, allocate 2nd new malloc'd copy. */ + desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); +#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) + if (desc < 0) + { + char *exename = alloca (strlen (name) + 5); + strcat (strcpy (exename, name), ".exe"); + desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, + 0, &absolute_name); + } +#endif + if (desc < 0) + { + make_cleanup (xfree, name); + perror_with_name (name); + } + xfree (name); /* Free 1st new malloc'd copy */ + name = absolute_name; /* Keep 2nd malloc'd copy in bfd */ + /* It'll be freed in free_objfile(). */ + + sym_bfd = bfd_fdopenr (name, gnutarget, desc); + if (!sym_bfd) + { + close (desc); + make_cleanup (xfree, name); + error ("\"%s\": can't open to read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + bfd_set_cacheable (sym_bfd, 1); + + if (!bfd_check_format (sym_bfd, bfd_object)) + { + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + bfd_close (sym_bfd); /* This also closes desc */ + make_cleanup (xfree, name); + error ("\"%s\": can't read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + return (sym_bfd); +} + +/* Return the section index for the given section name. Return -1 if + the section was not found. */ +int +get_section_index (struct objfile *objfile, char *section_name) +{ + asection *sect = bfd_get_section_by_name (objfile->obfd, section_name); + if (sect) + return sect->index; + else + return -1; +} + +/* Link a new symtab_fns into the global symtab_fns list. Called on gdb + startup by the _initialize routine in each object file format reader, + to register information about each format the the reader is prepared + to handle. */ + +void +add_symtab_fns (struct sym_fns *sf) +{ + sf->next = symtab_fns; + symtab_fns = sf; +} + + +/* Initialize to read symbols from the symbol file sym_bfd. It either + returns or calls error(). The result is an initialized struct sym_fns + in the objfile structure, that contains cached information about the + symbol file. */ + +static void +find_sym_fns (struct objfile *objfile) +{ + struct sym_fns *sf; + enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd); + char *our_target = bfd_get_target (objfile->obfd); + + if (our_flavour == bfd_target_srec_flavour + || our_flavour == bfd_target_ihex_flavour + || our_flavour == bfd_target_tekhex_flavour) + return; /* No symbols. */ + + for (sf = symtab_fns; sf != NULL; sf = sf->next) + { + if (our_flavour == sf->sym_flavour) + { + objfile->sf = sf; + return; + } + } + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (objfile->obfd)); +} + +/* This function runs the load command of our current target. */ + +static void +load_command (char *arg, int from_tty) +{ + if (arg == NULL) + arg = get_exec_file (1); + target_load (arg, from_tty); + + /* After re-loading the executable, we don't really know which + overlays are mapped any more. */ + overlay_cache_invalid = 1; +} + +/* This version of "load" should be usable for any target. Currently + it is just used for remote targets, not inftarg.c or core files, + on the theory that only in that case is it useful. + + Avoiding xmodem and the like seems like a win (a) because we don't have + to worry about finding it, and (b) On VMS, fork() is very slow and so + we don't want to run a subprocess. On the other hand, I'm not sure how + performance compares. */ + +static int download_write_size = 512; +static int validate_download = 0; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +add_section_size_callback (bfd *abfd, asection *asec, void *data) +{ + bfd_size_type *sum = data; + + *sum += bfd_get_section_size_before_reloc (asec); +} + +/* Opaque data for load_section_callback. */ +struct load_section_data { + unsigned long load_offset; + unsigned long write_count; + unsigned long data_count; + bfd_size_type total_size; +}; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +load_section_callback (bfd *abfd, asection *asec, void *data) +{ + struct load_section_data *args = data; + + if (bfd_get_section_flags (abfd, asec) & SEC_LOAD) + { + bfd_size_type size = bfd_get_section_size_before_reloc (asec); + if (size > 0) + { + char *buffer; + struct cleanup *old_chain; + CORE_ADDR lma = bfd_section_lma (abfd, asec) + args->load_offset; + bfd_size_type block_size; + int err; + const char *sect_name = bfd_get_section_name (abfd, asec); + bfd_size_type sent; + + if (download_write_size > 0 && size > download_write_size) + block_size = download_write_size; + else + block_size = size; + + buffer = xmalloc (size); + old_chain = make_cleanup (xfree, buffer); + + /* Is this really necessary? I guess it gives the user something + to look at during a long download. */ + ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n", + sect_name, paddr_nz (size), paddr_nz (lma)); + + bfd_get_section_contents (abfd, asec, buffer, 0, size); + + sent = 0; + do + { + int len; + bfd_size_type this_transfer = size - sent; + + if (this_transfer >= block_size) + this_transfer = block_size; + len = target_write_memory_partial (lma, buffer, + this_transfer, &err); + if (err) + break; + if (validate_download) + { + /* Broken memories and broken monitors manifest + themselves here when bring new computers to + life. This doubles already slow downloads. */ + /* NOTE: cagney/1999-10-18: A more efficient + implementation might add a verify_memory() + method to the target vector and then use + that. remote.c could implement that method + using the ``qCRC'' packet. */ + char *check = xmalloc (len); + struct cleanup *verify_cleanups = + make_cleanup (xfree, check); + + if (target_read_memory (lma, check, len) != 0) + error ("Download verify read failed at 0x%s", + paddr (lma)); + if (memcmp (buffer, check, len) != 0) + error ("Download verify compare failed at 0x%s", + paddr (lma)); + do_cleanups (verify_cleanups); + } + args->data_count += len; + lma += len; + buffer += len; + args->write_count += 1; + sent += len; + if (quit_flag + || (ui_load_progress_hook != NULL + && ui_load_progress_hook (sect_name, sent))) + error ("Canceled the download"); + + if (show_load_progress != NULL) + show_load_progress (sect_name, sent, size, + args->data_count, args->total_size); + } + while (sent < size); + + if (err != 0) + error ("Memory access error while loading section %s.", sect_name); + + do_cleanups (old_chain); + } + } +} + +void +generic_load (char *args, int from_tty) +{ + asection *s; + bfd *loadfile_bfd; + time_t start_time, end_time; /* Start and end times of download */ + char *filename; + struct cleanup *old_cleanups; + char *offptr; + struct load_section_data cbdata; + CORE_ADDR entry; + + cbdata.load_offset = 0; /* Offset to add to vma for each section. */ + cbdata.write_count = 0; /* Number of writes needed. */ + cbdata.data_count = 0; /* Number of bytes written to target memory. */ + cbdata.total_size = 0; /* Total size of all bfd sectors. */ + + /* Parse the input argument - the user can specify a load offset as + a second argument. */ + filename = xmalloc (strlen (args) + 1); + old_cleanups = make_cleanup (xfree, filename); + strcpy (filename, args); + offptr = strchr (filename, ' '); + if (offptr != NULL) + { + char *endptr; + + cbdata.load_offset = strtoul (offptr, &endptr, 0); + if (offptr == endptr) + error ("Invalid download offset:%s\n", offptr); + *offptr = '\0'; + } + else + cbdata.load_offset = 0; + + /* Open the file for loading. */ + loadfile_bfd = bfd_openr (filename, gnutarget); + if (loadfile_bfd == NULL) + { + perror_with_name (filename); + return; + } + + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + make_cleanup_bfd_close (loadfile_bfd); + + if (!bfd_check_format (loadfile_bfd, bfd_object)) + { + error ("\"%s\" is not an object file: %s", filename, + bfd_errmsg (bfd_get_error ())); + } + + bfd_map_over_sections (loadfile_bfd, add_section_size_callback, + (void *) &cbdata.total_size); + + start_time = time (NULL); + + bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata); + + end_time = time (NULL); + + entry = bfd_get_start_address (loadfile_bfd); + ui_out_text (uiout, "Start address "); + ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry)); + ui_out_text (uiout, ", load size "); + ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count); + ui_out_text (uiout, "\n"); + /* We were doing this in remote-mips.c, I suspect it is right + for other targets too. */ + write_pc (entry); + + /* FIXME: are we supposed to call symbol_file_add or not? According + to a comment from remote-mips.c (where a call to symbol_file_add + was commented out), making the call confuses GDB if more than one + file is loaded in. Some targets do (e.g., remote-vx.c) but + others don't (or didn't - perhaphs they have all been deleted). */ + + print_transfer_performance (gdb_stdout, cbdata.data_count, + cbdata.write_count, end_time - start_time); + + do_cleanups (old_cleanups); +} + +/* Report how fast the transfer went. */ + +/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being + replaced by print_transfer_performance (with a very different + function signature). */ + +void +report_transfer_performance (unsigned long data_count, time_t start_time, + time_t end_time) +{ + print_transfer_performance (gdb_stdout, data_count, + end_time - start_time, 0); +} + +void +print_transfer_performance (struct ui_file *stream, + unsigned long data_count, + unsigned long write_count, + unsigned long time_count) +{ + ui_out_text (uiout, "Transfer rate: "); + if (time_count > 0) + { + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (data_count * 8) / time_count); + ui_out_text (uiout, " bits/sec"); + } + else + { + ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); + ui_out_text (uiout, " bits in <1 sec"); + } + if (write_count > 0) + { + ui_out_text (uiout, ", "); + ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); + ui_out_text (uiout, " bytes/write"); + } + ui_out_text (uiout, ".\n"); +} + +/* This function allows the addition of incrementally linked object files. + It does not modify any state in the target, only in the debugger. */ +/* Note: ezannoni 2000-04-13 This function/command used to have a + special case syntax for the rombug target (Rombug is the boot + monitor for Microware's OS-9 / OS-9000, see remote-os9k.c). In the + rombug case, the user doesn't need to supply a text address, + instead a call to target_link() (in target.c) would supply the + value to use. We are now discontinuing this type of ad hoc syntax. */ + +static void +add_symbol_file_command (char *args, int from_tty) +{ + char *filename = NULL; + int flags = OBJF_USERLOADED; + char *arg; + int expecting_option = 0; + int section_index = 0; + int argcnt = 0; + int sec_num = 0; + int i; + int expecting_sec_name = 0; + int expecting_sec_addr = 0; + + struct sect_opt + { + char *name; + char *value; + }; + + struct section_addr_info *section_addrs; + struct sect_opt *sect_opts = NULL; + size_t num_sect_opts = 0; + struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL); + + num_sect_opts = 16; + sect_opts = (struct sect_opt *) xmalloc (num_sect_opts + * sizeof (struct sect_opt)); + + dont_repeat (); + + if (args == NULL) + error ("add-symbol-file takes a file name and an address"); + + /* Make a copy of the string that we can safely write into. */ + args = xstrdup (args); + + while (*args != '\000') + { + /* Any leading spaces? */ + while (isspace (*args)) + args++; + + /* Point arg to the beginning of the argument. */ + arg = args; + + /* Move args pointer over the argument. */ + while ((*args != '\000') && !isspace (*args)) + args++; + + /* If there are more arguments, terminate arg and + proceed past it. */ + if (*args != '\000') + *args++ = '\000'; + + /* Now process the argument. */ + if (argcnt == 0) + { + /* The first argument is the file name. */ + filename = tilde_expand (arg); + make_cleanup (xfree, filename); + } + else + if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) + { + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + error ("USAGE: add-symbol-file [-mapped] [-readnow] [-s ]*"); + } + } + argcnt++; + } + + /* Print the prompt for the query below. And save the arguments into + a sect_addr_info structure to be passed around to other + functions. We have to split this up into separate print + statements because local_hex_string returns a local static + string. */ + + printf_unfiltered ("add symbol table from file \"%s\" at\n", filename); + section_addrs = alloc_section_addr_info (section_index); + make_cleanup (xfree, section_addrs); + for (i = 0; i < section_index; i++) + { + CORE_ADDR addr; + char *val = sect_opts[i].value; + char *sec = sect_opts[i].name; + + addr = parse_and_eval_address (val); + + /* Here we store the section offsets in the order they were + entered on the command line. */ + section_addrs->other[sec_num].name = sec; + section_addrs->other[sec_num].addr = addr; + printf_unfiltered ("\t%s_addr = %s\n", + sec, + local_hex_string ((unsigned long)addr)); + sec_num++; + + /* The object's sections are initialized when a + call is made to build_objfile_section_table (objfile). + This happens in reread_symbols. + At this point, we don't know what file type this is, + so we can't determine what section names are valid. */ + } + +#ifndef CRASH_MERGE + if (from_tty && (!query ("%s", ""))) + error ("Not confirmed."); +#endif + + symbol_file_add (filename, from_tty, section_addrs, 0, flags); + + /* Getting new symbols may change our opinion about what is + frameless. */ + reinit_frame_cache (); + do_cleanups (my_cleanups); +} + +static void +add_shared_symbol_files_command (char *args, int from_tty) +{ +#ifdef ADD_SHARED_SYMBOL_FILES + ADD_SHARED_SYMBOL_FILES (args, from_tty); +#else + error ("This command is not available in this configuration of GDB."); +#endif +} + +/* Re-read symbols if a symbol-file has changed. */ +void +reread_symbols (void) +{ + struct objfile *objfile; + long new_modtime; + int reread_one = 0; + struct stat new_statbuf; + int res; + + /* With the addition of shared libraries, this should be modified, + the load time should be saved in the partial symbol tables, since + different tables may come from different source files. FIXME. + This routine should then walk down each partial symbol table + and see if the symbol table that it originates from has been changed */ + + for (objfile = object_files; objfile; objfile = objfile->next) + { + if (objfile->obfd) + { +#ifdef DEPRECATED_IBM6000_TARGET + /* If this object is from a shared library, then you should + stat on the library name, not member name. */ + + if (objfile->obfd->my_archive) + res = stat (objfile->obfd->my_archive->filename, &new_statbuf); + else +#endif + res = stat (objfile->name, &new_statbuf); + if (res != 0) + { + /* FIXME, should use print_sys_errmsg but it's not filtered. */ + printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n", + objfile->name); + continue; + } + new_modtime = new_statbuf.st_mtime; + if (new_modtime != objfile->mtime) + { + struct cleanup *old_cleanups; + struct section_offsets *offsets; + int num_offsets; + char *obfd_filename; + + printf_unfiltered ("`%s' has changed; re-reading symbols.\n", + objfile->name); + + /* There are various functions like symbol_file_add, + symfile_bfd_open, syms_from_objfile, etc., which might + appear to do what we want. But they have various other + effects which we *don't* want. So we just do stuff + ourselves. We don't worry about mapped files (for one thing, + any mapped file will be out of date). */ + + /* If we get an error, blow away this objfile (not sure if + that is the correct response for things like shared + libraries). */ + old_cleanups = make_cleanup_free_objfile (objfile); + /* We need to do this whenever any symbols go away. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Clean up any state BFD has sitting around. We don't need + to close the descriptor but BFD lacks a way of closing the + BFD without closing the descriptor. */ + obfd_filename = bfd_get_filename (objfile->obfd); + if (!bfd_close (objfile->obfd)) + error ("Can't close BFD for %s: %s", objfile->name, + bfd_errmsg (bfd_get_error ())); + objfile->obfd = bfd_openr (obfd_filename, gnutarget); + if (objfile->obfd == NULL) + error ("Can't open %s to read symbols.", objfile->name); + /* bfd_openr sets cacheable to true, which is what we want. */ + if (!bfd_check_format (objfile->obfd, bfd_object)) + error ("Can't read symbols from %s: %s.", objfile->name, + bfd_errmsg (bfd_get_error ())); + + /* Save the offsets, we will nuke them with the rest of the + objfile_obstack. */ + num_offsets = objfile->num_sections; + offsets = ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets))); + memcpy (offsets, objfile->section_offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + + /* Nuke all the state that we will re-read. Much of the following + code which sets things to NULL really is necessary to tell + other parts of GDB that there is nothing currently there. */ + + /* FIXME: Do we have to free a whole linked list, or is this + enough? */ + if (objfile->global_psymbols.list) + xmfree (objfile->md, objfile->global_psymbols.list); + memset (&objfile->global_psymbols, 0, + sizeof (objfile->global_psymbols)); + if (objfile->static_psymbols.list) + xmfree (objfile->md, objfile->static_psymbols.list); + memset (&objfile->static_psymbols, 0, + sizeof (objfile->static_psymbols)); + + /* Free the obstacks for non-reusable objfiles */ + bcache_xfree (objfile->psymbol_cache); + objfile->psymbol_cache = bcache_xmalloc (); + bcache_xfree (objfile->macro_cache); + objfile->macro_cache = bcache_xmalloc (); + if (objfile->demangled_names_hash != NULL) + { + htab_delete (objfile->demangled_names_hash); + objfile->demangled_names_hash = NULL; + } + obstack_free (&objfile->objfile_obstack, 0); + objfile->sections = NULL; + objfile->symtabs = NULL; + objfile->psymtabs = NULL; + objfile->free_psymtabs = NULL; + objfile->cp_namespace_symtab = NULL; + objfile->msymbols = NULL; + objfile->sym_private = NULL; + objfile->minimal_symbol_count = 0; + memset (&objfile->msymbol_hash, 0, + sizeof (objfile->msymbol_hash)); + memset (&objfile->msymbol_demangled_hash, 0, + sizeof (objfile->msymbol_demangled_hash)); + objfile->fundamental_types = NULL; + clear_objfile_data (objfile); + if (objfile->sf != NULL) + { + (*objfile->sf->sym_finish) (objfile); + } + + /* We never make this a mapped file. */ + objfile->md = NULL; + objfile->psymbol_cache = bcache_xmalloc (); + objfile->macro_cache = bcache_xmalloc (); + /* obstack_init also initializes the obstack so it is + empty. We could use obstack_specify_allocation but + gdb_obstack.h specifies the alloc/dealloc + functions. */ + obstack_init (&objfile->objfile_obstack); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile->name, bfd_errmsg (bfd_get_error ())); + } + terminate_minimal_symbol_table (objfile); + + /* We use the same section offsets as from last time. I'm not + sure whether that is always correct for shared libraries. */ + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + memcpy (objfile->section_offsets, offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + objfile->num_sections = num_offsets; + + /* What the hell is sym_new_init for, anyway? The concept of + distinguishing between the main file and additional files + in this way seems rather dubious. */ + if (objfile == symfile_objfile) + { + (*objfile->sf->sym_new_init) (objfile); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + } + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, 1); + /* The "mainline" parameter is a hideous hack; I think leaving it + zero is OK since dbxread.c also does what it needs to do if + objfile->global_psymbols.size is 0. */ + (*objfile->sf->sym_read) (objfile, 0); + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)\n"); + wrap_here (""); + } + objfile->flags |= OBJF_SYMS; + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, 1); + + /* Getting new symbols may change our opinion about what is + frameless. */ + + reinit_frame_cache (); + + /* Discard cleanups as symbol reading was successful. */ + discard_cleanups (old_cleanups); + + /* If the mtime has changed between the time we set new_modtime + and now, we *want* this to be out of date, so don't call stat + again now. */ + objfile->mtime = new_modtime; + reread_one = 1; + reread_separate_symbols (objfile); + } + } + } + + if (reread_one) + clear_symtab_users (); +} + + +/* Handle separate debug info for OBJFILE, which has just been + re-read: + - If we had separate debug info before, but now we don't, get rid + of the separated objfile. + - If we didn't have separated debug info before, but now we do, + read in the new separated debug info file. + - If the debug link points to a different file, toss the old one + and read the new one. + This function does *not* handle the case where objfile is still + using the same separate debug info file, but that file's timestamp + has changed. That case should be handled by the loop in + reread_symbols already. */ +static void +reread_separate_symbols (struct objfile *objfile) +{ + char *debug_file; + unsigned long crc32; + + /* Does the updated objfile's debug info live in a + separate file? */ + debug_file = find_separate_debug_file (objfile); + + if (objfile->separate_debug_objfile) + { + /* There are two cases where we need to get rid of + the old separated debug info objfile: + - if the new primary objfile doesn't have + separated debug info, or + - if the new primary objfile has separate debug + info, but it's under a different filename. + + If the old and new objfiles both have separate + debug info, under the same filename, then we're + okay --- if the separated file's contents have + changed, we will have caught that when we + visited it in this function's outermost + loop. */ + if (! debug_file + || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0) + free_objfile (objfile->separate_debug_objfile); + } + + /* If the new objfile has separate debug info, and we + haven't loaded it already, do so now. */ + if (debug_file + && ! objfile->separate_debug_objfile) + { + /* Use the same section offset table as objfile itself. + Preserve the flags from objfile that make sense. */ + objfile->separate_debug_objfile + = (symbol_file_add_with_addrs_or_offsets + (debug_file, + info_verbose, /* from_tty: Don't override the default. */ + 0, /* No addr table. */ + objfile->section_offsets, objfile->num_sections, + 0, /* Not mainline. See comments about this above. */ + objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW + | OBJF_USERLOADED))); + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + } +} + + + + + +typedef struct +{ + char *ext; + enum language lang; +} +filename_language; + +static filename_language *filename_language_table; +static int fl_table_size, fl_table_next; + +static void +add_filename_language (char *ext, enum language lang) +{ + if (fl_table_next >= fl_table_size) + { + fl_table_size += 10; + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); + } + + filename_language_table[fl_table_next].ext = xstrdup (ext); + filename_language_table[fl_table_next].lang = lang; + fl_table_next++; +} + +static char *ext_args; + +static void +set_ext_lang_command (char *args, int from_tty) +{ + int i; + char *cp = ext_args; + enum language lang; + + /* First arg is filename extension, starting with '.' */ + if (*cp != '.') + error ("'%s': Filename extension must begin with '.'", ext_args); + + /* Find end of first arg. */ + while (*cp && !isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Null-terminate first arg */ + *cp++ = '\0'; + + /* Find beginning of second arg, which should be a source language. */ + while (*cp && isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Lookup the language from among those we know. */ + lang = language_enum (cp); + + /* Now lookup the filename extension: do we already know it? */ + for (i = 0; i < fl_table_next; i++) + if (0 == strcmp (ext_args, filename_language_table[i].ext)) + break; + + if (i >= fl_table_next) + { + /* new file extension */ + add_filename_language (ext_args, lang); + } + else + { + /* redefining a previously known filename extension */ + + /* if (from_tty) */ + /* query ("Really make files of type %s '%s'?", */ + /* ext_args, language_str (lang)); */ + + xfree (filename_language_table[i].ext); + filename_language_table[i].ext = xstrdup (ext_args); + filename_language_table[i].lang = lang; + } +} + +static void +info_ext_lang_command (char *args, int from_tty) +{ + int i; + + printf_filtered ("Filename extensions and the languages they represent:"); + printf_filtered ("\n\n"); + for (i = 0; i < fl_table_next; i++) + printf_filtered ("\t%s\t- %s\n", + filename_language_table[i].ext, + language_str (filename_language_table[i].lang)); +} + +static void +init_filename_language_table (void) +{ + if (fl_table_size == 0) /* protect against repetition */ + { + fl_table_size = 20; + fl_table_next = 0; + filename_language_table = + xmalloc (fl_table_size * sizeof (*filename_language_table)); + add_filename_language (".c", language_c); + add_filename_language (".C", language_cplus); + add_filename_language (".cc", language_cplus); + add_filename_language (".cp", language_cplus); + add_filename_language (".cpp", language_cplus); + add_filename_language (".cxx", language_cplus); + add_filename_language (".c++", language_cplus); + add_filename_language (".java", language_java); + add_filename_language (".class", language_java); + add_filename_language (".m", language_objc); + add_filename_language (".f", language_fortran); + add_filename_language (".F", language_fortran); + add_filename_language (".s", language_asm); + add_filename_language (".S", language_asm); + add_filename_language (".pas", language_pascal); + add_filename_language (".p", language_pascal); + add_filename_language (".pp", language_pascal); + } +} + +enum language +deduce_language_from_filename (char *filename) +{ + int i; + char *cp; + + if (filename != NULL) + if ((cp = strrchr (filename, '.')) != NULL) + for (i = 0; i < fl_table_next; i++) + if (strcmp (cp, filename_language_table[i].ext) == 0) + return filename_language_table[i].lang; + + return language_unknown; +} + +/* allocate_symtab: + + Allocate and partly initialize a new symbol table. Return a pointer + to it. error() if no space. + + Caller must set these fields: + LINETABLE(symtab) + symtab->blockvector + symtab->dirname + symtab->free_code + symtab->free_ptr + possibly free_named_symtabs (symtab->filename); + */ + +struct symtab * +allocate_symtab (char *filename, struct objfile *objfile) +{ + struct symtab *symtab; + + symtab = (struct symtab *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct symtab)); + memset (symtab, 0, sizeof (*symtab)); + symtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + symtab->fullname = NULL; + symtab->language = deduce_language_from_filename (filename); + symtab->debugformat = obsavestring ("unknown", 7, + &objfile->objfile_obstack); + + /* Hook it to the objfile it comes from */ + + symtab->objfile = objfile; + symtab->next = objfile->symtabs; + objfile->symtabs = symtab; + + /* FIXME: This should go away. It is only defined for the Z8000, + and the Z8000 definition of this macro doesn't have anything to + do with the now-nonexistent EXTRA_SYMTAB_INFO macro, it's just + here for convenience. */ +#ifdef INIT_EXTRA_SYMTAB_INFO + INIT_EXTRA_SYMTAB_INFO (symtab); +#endif + + return (symtab); +} + +struct partial_symtab * +allocate_psymtab (char *filename, struct objfile *objfile) +{ + struct partial_symtab *psymtab; + + if (objfile->free_psymtabs) + { + psymtab = objfile->free_psymtabs; + objfile->free_psymtabs = psymtab->next; + } + else + psymtab = (struct partial_symtab *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct partial_symtab)); + + memset (psymtab, 0, sizeof (struct partial_symtab)); + psymtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + psymtab->symtab = NULL; + + /* Prepend it to the psymtab list for the objfile it belongs to. + Psymtabs are searched in most recent inserted -> least recent + inserted order. */ + + psymtab->objfile = objfile; + psymtab->next = objfile->psymtabs; + objfile->psymtabs = psymtab; +#if 0 + { + struct partial_symtab **prev_pst; + psymtab->objfile = objfile; + psymtab->next = NULL; + prev_pst = &(objfile->psymtabs); + while ((*prev_pst) != NULL) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = psymtab; + } +#endif + + return (psymtab); +} + +void +discard_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab **prev_pst; + + /* From dbxread.c: + Empty psymtabs happen as a result of header files which don't + have any symbols in them. There can be a lot of them. But this + check is wrong, in that a psymtab with N_SLINE entries but + nothing else is not empty, but we don't realize that. Fixing + that without slowing things down might be tricky. */ + + /* First, snip it out of the psymtab chain */ + + prev_pst = &(pst->objfile->psymtabs); + while ((*prev_pst) != pst) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = pst->next; + + /* Next, put it on a free list for recycling */ + + pst->next = pst->objfile->free_psymtabs; + pst->objfile->free_psymtabs = pst; +} + + +/* Reset all data structures in gdb which may contain references to symbol + table data. */ + +void +clear_symtab_users (void) +{ + /* Someday, we should do better than this, by only blowing away + the things that really need to be blown. */ + clear_value_history (); + clear_displays (); + clear_internalvars (); + breakpoint_re_set (); + set_default_breakpoint (0, 0, 0, 0); + clear_current_source_symtab_and_line (); + clear_pc_function_cache (); + if (target_new_objfile_hook) + target_new_objfile_hook (NULL); +} + +static void +clear_symtab_users_cleanup (void *ignore) +{ + clear_symtab_users (); +} + +/* clear_symtab_users_once: + + This function is run after symbol reading, or from a cleanup. + If an old symbol table was obsoleted, the old symbol table + has been blown away, but the other GDB data structures that may + reference it have not yet been cleared or re-directed. (The old + symtab was zapped, and the cleanup queued, in free_named_symtab() + below.) + + This function can be queued N times as a cleanup, or called + directly; it will do all the work the first time, and then will be a + no-op until the next time it is queued. This works by bumping a + counter at queueing time. Much later when the cleanup is run, or at + the end of symbol processing (in case the cleanup is discarded), if + the queued count is greater than the "done-count", we do the work + and set the done-count to the queued count. If the queued count is + less than or equal to the done-count, we just ignore the call. This + is needed because reading a single .o file will often replace many + symtabs (one per .h file, for example), and we don't want to reset + the breakpoints N times in the user's face. + + The reason we both queue a cleanup, and call it directly after symbol + reading, is because the cleanup protects us in case of errors, but is + discarded if symbol reading is successful. */ + +#if 0 +/* FIXME: As free_named_symtabs is currently a big noop this function + is no longer needed. */ +static void clear_symtab_users_once (void); + +static int clear_symtab_users_queued; +static int clear_symtab_users_done; + +static void +clear_symtab_users_once (void) +{ + /* Enforce once-per-`do_cleanups'-semantics */ + if (clear_symtab_users_queued <= clear_symtab_users_done) + return; + clear_symtab_users_done = clear_symtab_users_queued; + + clear_symtab_users (); +} +#endif + +/* Delete the specified psymtab, and any others that reference it. */ + +static void +cashier_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab *ps, *pprev = NULL; + int i; + + /* Find its previous psymtab in the chain */ + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + if (ps == pst) + break; + pprev = ps; + } + + if (ps) + { + /* Unhook it from the chain. */ + if (ps == pst->objfile->psymtabs) + pst->objfile->psymtabs = ps->next; + else + pprev->next = ps->next; + + /* FIXME, we can't conveniently deallocate the entries in the + partial_symbol lists (global_psymbols/static_psymbols) that + this psymtab points to. These just take up space until all + the psymtabs are reclaimed. Ditto the dependencies list and + filename, which are all in the objfile_obstack. */ + + /* We need to cashier any psymtab that has this one as a dependency... */ + again: + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + for (i = 0; i < ps->number_of_dependencies; i++) + { + if (ps->dependencies[i] == pst) + { + cashier_psymtab (ps); + goto again; /* Must restart, chain has been munged. */ + } + } + } + } +} + +/* If a symtab or psymtab for filename NAME is found, free it along + with any dependent breakpoints, displays, etc. + Used when loading new versions of object modules with the "add-file" + command. This is only called on the top-level symtab or psymtab's name; + it is not called for subsidiary files such as .h files. + + Return value is 1 if we blew away the environment, 0 if not. + FIXME. The return value appears to never be used. + + FIXME. I think this is not the best way to do this. We should + work on being gentler to the environment while still cleaning up + all stray pointers into the freed symtab. */ + +int +free_named_symtabs (char *name) +{ +#if 0 + /* FIXME: With the new method of each objfile having it's own + psymtab list, this function needs serious rethinking. In particular, + why was it ever necessary to toss psymtabs with specific compilation + unit filenames, as opposed to all psymtabs from a particular symbol + file? -- fnf + Well, the answer is that some systems permit reloading of particular + compilation units. We want to blow away any old info about these + compilation units, regardless of which objfiles they arrived in. --gnu. */ + + struct symtab *s; + struct symtab *prev; + struct partial_symtab *ps; + struct blockvector *bv; + int blewit = 0; + + /* We only wack things if the symbol-reload switch is set. */ + if (!symbol_reloading) + return 0; + + /* Some symbol formats have trouble providing file names... */ + if (name == 0 || *name == '\0') + return 0; + + /* Look for a psymtab with the specified name. */ + +again2: + for (ps = partial_symtab_list; ps; ps = ps->next) + { + if (strcmp (name, ps->filename) == 0) + { + cashier_psymtab (ps); /* Blow it away...and its little dog, too. */ + goto again2; /* Must restart, chain has been munged */ + } + } + + /* Look for a symtab with the specified name. */ + + for (s = symtab_list; s; s = s->next) + { + if (strcmp (name, s->filename) == 0) + break; + prev = s; + } + + if (s) + { + if (s == symtab_list) + symtab_list = s->next; + else + prev->next = s->next; + + /* For now, queue a delete for all breakpoints, displays, etc., whether + or not they depend on the symtab being freed. This should be + changed so that only those data structures affected are deleted. */ + + /* But don't delete anything if the symtab is empty. + This test is necessary due to a bug in "dbxread.c" that + causes empty symtabs to be created for N_SO symbols that + contain the pathname of the object file. (This problem + has been fixed in GDB 3.9x). */ + + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) + { + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); + clear_symtab_users_queued++; + make_cleanup (clear_symtab_users_once, 0); + blewit = 1; + } + else + { + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); + } + + free_symtab (s); + } + else + { + /* It is still possible that some breakpoints will be affected + even though no symtab was found, since the file might have + been compiled without debugging, and hence not be associated + with a symtab. In order to handle this correctly, we would need + to keep a list of text address ranges for undebuggable files. + For now, we do nothing, since this is a fairly obscure case. */ + ; + } + + /* FIXME, what about the minimal symbol table? */ + return blewit; +#else + return (0); +#endif +} + +/* Allocate and partially fill a partial symtab. It will be + completely filled at the end of the symbol list. + + FILENAME is the name of the symbol-file we are reading from. */ + +struct partial_symtab * +start_psymtab_common (struct objfile *objfile, + struct section_offsets *section_offsets, char *filename, + CORE_ADDR textlow, struct partial_symbol **global_syms, + struct partial_symbol **static_syms) +{ + struct partial_symtab *psymtab; + + psymtab = allocate_psymtab (filename, objfile); + psymtab->section_offsets = section_offsets; + psymtab->textlow = textlow; + psymtab->texthigh = psymtab->textlow; /* default */ + psymtab->globals_offset = global_syms - objfile->global_psymbols.list; + psymtab->statics_offset = static_syms - objfile->static_psymbols.list; + return (psymtab); +} + +/* Add a symbol with a long value to a psymtab. + Since one arg is a struct, we pass in a ptr and deref it (sigh). + Return the partial symbol that has been added. */ + +/* NOTE: carlton/2003-09-11: The reason why we return the partial + symbol is so that callers can get access to the symbol's demangled + name, which they don't have any cheap way to determine otherwise. + (Currenly, dwarf2read.c is the only file who uses that information, + though it's possible that other readers might in the future.) + Elena wasn't thrilled about that, and I don't blame her, but we + couldn't come up with a better way to get that information. If + it's needed in other situations, we could consider breaking up + SYMBOL_SET_NAMES to provide access to the demangled name lookup + cache. */ + +const struct partial_symbol * +add_psymbol_to_list (char *name, int namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + + SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); + + return psym; +} + +/* Add a symbol with a long value to a psymtab. This differs from + * add_psymbol_to_list above in taking both a mangled and a demangled + * name. */ + +void +add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, + int dem_namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, + struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1, + objfile->psymbol_cache); + + buf = alloca (dem_namelength + 1); + memcpy (buf, dem_name, dem_namelength); + buf[dem_namelength] = '\0'; + + switch (language) + { + case language_c: + case language_cplus: + SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) = + deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache); + break; + /* FIXME What should be done for the default case? Ignoring for now. */ + } + + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); +} + +/* Initialize storage for partial symbols. */ + +void +init_psymbol_list (struct objfile *objfile, int total_symbols) +{ + /* Free any previously allocated psymbol lists. */ + + if (objfile->global_psymbols.list) + { + xmfree (objfile->md, objfile->global_psymbols.list); + } + if (objfile->static_psymbols.list) + { + xmfree (objfile->md, objfile->static_psymbols.list); + } + + /* Current best guess is that approximately a twentieth + of the total symbols (in a debugging file) are global or static + oriented symbols */ + + objfile->global_psymbols.size = total_symbols / 10; + objfile->static_psymbols.size = total_symbols / 10; + + if (objfile->global_psymbols.size > 0) + { + objfile->global_psymbols.next = + objfile->global_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->global_psymbols.size + * sizeof (struct partial_symbol *))); + } + if (objfile->static_psymbols.size > 0) + { + objfile->static_psymbols.next = + objfile->static_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->static_psymbols.size + * sizeof (struct partial_symbol *))); + } +} + +/* OVERLAYS: + The following code implements an abstraction for debugging overlay sections. + + The target model is as follows: + 1) The gnu linker will permit multiple sections to be mapped into the + same VMA, each with its own unique LMA (or load address). + 2) It is assumed that some runtime mechanism exists for mapping the + sections, one by one, from the load address into the VMA address. + 3) This code provides a mechanism for gdb to keep track of which + sections should be considered to be mapped from the VMA to the LMA. + This information is used for symbol lookup, and memory read/write. + For instance, if a section has been mapped then its contents + should be read from the VMA, otherwise from the LMA. + + Two levels of debugger support for overlays are available. One is + "manual", in which the debugger relies on the user to tell it which + overlays are currently mapped. This level of support is + implemented entirely in the core debugger, and the information about + whether a section is mapped is kept in the objfile->obj_section table. + + The second level of support is "automatic", and is only available if + the target-specific code provides functionality to read the target's + overlay mapping table, and translate its contents for the debugger + (by updating the mapped state information in the obj_section tables). + + The interface is as follows: + User commands: + overlay map -- tell gdb to consider this section mapped + overlay unmap -- tell gdb to consider this section unmapped + overlay list -- list the sections that GDB thinks are mapped + overlay read-target -- get the target's state of what's mapped + overlay off/manual/auto -- set overlay debugging state + Functional interface: + find_pc_mapped_section(pc): if the pc is in the range of a mapped + section, return that section. + find_pc_overlay(pc): find any overlay section that contains + the pc, either in its VMA or its LMA + overlay_is_mapped(sect): true if overlay is marked as mapped + section_is_overlay(sect): true if section's VMA != LMA + pc_in_mapped_range(pc,sec): true if pc belongs to section's VMA + pc_in_unmapped_range(...): true if pc belongs to section's LMA + sections_overlap(sec1, sec2): true if mapped sec1 and sec2 ranges overlap + overlay_mapped_address(...): map an address from section's LMA to VMA + overlay_unmapped_address(...): map an address from section's VMA to LMA + symbol_overlayed_address(...): Return a "current" address for symbol: + either in VMA or LMA depending on whether + the symbol's section is currently mapped + */ + +/* Overlay debugging state: */ + +enum overlay_debugging_state overlay_debugging = ovly_off; +int overlay_cache_invalid = 0; /* True if need to refresh mapped state */ + +/* Target vector for refreshing overlay mapped state */ +static void simple_overlay_update (struct obj_section *); +void (*target_overlay_update) (struct obj_section *) = simple_overlay_update; + +/* Function: section_is_overlay (SECTION) + Returns true if SECTION has VMA not equal to LMA, ie. + SECTION is loaded at an address different from where it will "run". */ + +int +section_is_overlay (asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section->lma != 0 && + section->vma != section->lma) + return 1; + + return 0; +} + +/* Function: overlay_invalidate_all (void) + Invalidate the mapped state of all overlay sections (mark it as stale). */ + +static void +overlay_invalidate_all (void) +{ + struct objfile *objfile; + struct obj_section *sect; + + ALL_OBJSECTIONS (objfile, sect) + if (section_is_overlay (sect->the_bfd_section)) + sect->ovly_mapped = -1; +} + +/* Function: overlay_is_mapped (SECTION) + Returns true if section is an overlay, and is currently mapped. + Private: public access is thru function section_is_mapped. + + Access to the ovly_mapped flag is restricted to this function, so + that we can do automatic update. If the global flag + OVERLAY_CACHE_INVALID is set (by wait_for_inferior), then call + overlay_invalidate_all. If the mapped state of the particular + section is stale, then call TARGET_OVERLAY_UPDATE to refresh it. */ + +static int +overlay_is_mapped (struct obj_section *osect) +{ + if (osect == 0 || !section_is_overlay (osect->the_bfd_section)) + return 0; + + switch (overlay_debugging) + { + default: + case ovly_off: + return 0; /* overlay debugging off */ + case ovly_auto: /* overlay debugging automatic */ + /* Unles there is a target_overlay_update function, + there's really nothing useful to do here (can't really go auto) */ + if (target_overlay_update) + { + if (overlay_cache_invalid) + { + overlay_invalidate_all (); + overlay_cache_invalid = 0; + } + if (osect->ovly_mapped == -1) + (*target_overlay_update) (osect); + } + /* fall thru to manual case */ + case ovly_on: /* overlay debugging manual */ + return osect->ovly_mapped == 1; + } +} + +/* Function: section_is_mapped + Returns true if section is an overlay, and is currently mapped. */ + +int +section_is_mapped (asection *section) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + ALL_OBJSECTIONS (objfile, osect) + if (osect->the_bfd_section == section) + return overlay_is_mapped (osect); + + return 0; +} + +/* Function: pc_in_unmapped_range + If PC falls into the lma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_unmapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->lma <= pc && pc < section->lma + size) + return 1; + } + return 0; +} + +/* Function: pc_in_mapped_range + If PC falls into the vma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_mapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->vma <= pc && pc < section->vma + size) + return 1; + } + return 0; +} + + +/* Return true if the mapped ranges of sections A and B overlap, false + otherwise. */ +static int +sections_overlap (asection *a, asection *b) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + CORE_ADDR a_start = a->vma; + CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a); + CORE_ADDR b_start = b->vma; + CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b); + + return (a_start < b_end && b_start < a_end); +} + +/* Function: overlay_unmapped_address (PC, SECTION) + Returns the address corresponding to PC in the unmapped (load) range. + May be the same as PC. */ + +CORE_ADDR +overlay_unmapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_mapped_range (pc, section)) + return pc + section->lma - section->vma; + + return pc; +} + +/* Function: overlay_mapped_address (PC, SECTION) + Returns the address corresponding to PC in the mapped (runtime) range. + May be the same as PC. */ + +CORE_ADDR +overlay_mapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_unmapped_range (pc, section)) + return pc + section->vma - section->lma; + + return pc; +} + + +/* Function: symbol_overlayed_address + Return one of two addresses (relative to the VMA or to the LMA), + depending on whether the section is mapped or not. */ + +CORE_ADDR +symbol_overlayed_address (CORE_ADDR address, asection *section) +{ + if (overlay_debugging) + { + /* If the symbol has no section, just return its regular address. */ + if (section == 0) + return address; + /* If the symbol's section is not an overlay, just return its address */ + if (!section_is_overlay (section)) + return address; + /* If the symbol's section is mapped, just return its address */ + if (section_is_mapped (section)) + return address; + /* + * HOWEVER: if the symbol is in an overlay section which is NOT mapped, + * then return its LOADED address rather than its vma address!! + */ + return overlay_unmapped_address (address, section); + } + return address; +} + +/* Function: find_pc_overlay (PC) + Return the best-match overlay section for PC: + If PC matches a mapped overlay section's VMA, return that section. + Else if PC matches an unmapped section's VMA, return that section. + Else if PC matches an unmapped section's LMA, return that section. */ + +asection * +find_pc_overlay (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect, *best_match = NULL; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + if (pc_in_mapped_range (pc, osect->the_bfd_section)) + { + if (overlay_is_mapped (osect)) + return osect->the_bfd_section; + else + best_match = osect; + } + else if (pc_in_unmapped_range (pc, osect->the_bfd_section)) + best_match = osect; + } + return best_match ? best_match->the_bfd_section : NULL; +} + +/* Function: find_pc_mapped_section (PC) + If PC falls into the VMA address range of an overlay section that is + currently marked as MAPPED, return that section. Else return NULL. */ + +asection * +find_pc_mapped_section (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (pc_in_mapped_range (pc, osect->the_bfd_section) && + overlay_is_mapped (osect)) + return osect->the_bfd_section; + + return NULL; +} + +/* Function: list_overlays_command + Print a list of mapped sections and their PC ranges */ + +void +list_overlays_command (char *args, int from_tty) +{ + int nmapped = 0; + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (overlay_is_mapped (osect)) + { + const char *name; + bfd_vma lma, vma; + int size; + + vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section); + lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section); + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + name = bfd_section_name (objfile->obfd, osect->the_bfd_section); + + printf_filtered ("Section %s, loaded at ", name); + print_address_numeric (lma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (lma + size, 1, gdb_stdout); + printf_filtered (", mapped at "); + print_address_numeric (vma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (vma + size, 1, gdb_stdout); + puts_filtered ("\n"); + + nmapped++; + } + if (nmapped == 0) + printf_filtered ("No sections are mapped.\n"); +} + +/* Function: map_overlay_command + Mark the named section as mapped (ie. residing at its VMA address). */ + +void +map_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile, *objfile2; + struct obj_section *sec, *sec2; + asection *bfdsec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + /* Now, check to see if the section is an overlay. */ + bfdsec = sec->the_bfd_section; + if (!section_is_overlay (bfdsec)) + continue; /* not an overlay section */ + + /* Mark the overlay as "mapped" */ + sec->ovly_mapped = 1; + + /* Next, make a pass and unmap any sections that are + overlapped by this new section: */ + ALL_OBJSECTIONS (objfile2, sec2) + if (sec2->ovly_mapped + && sec != sec2 + && sec->the_bfd_section != sec2->the_bfd_section + && sections_overlap (sec->the_bfd_section, + sec2->the_bfd_section)) + { + if (info_verbose) + printf_unfiltered ("Note: section %s unmapped by overlap\n", + bfd_section_name (objfile->obfd, + sec2->the_bfd_section)); + sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */ + } + return; + } + error ("No overlay section called %s", args); +} + +/* Function: unmap_overlay_command + Mark the overlay section as unmapped + (ie. resident in its LMA address range, rather than the VMA range). */ + +void +unmap_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile; + struct obj_section *sec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + if (!sec->ovly_mapped) + error ("Section %s is not mapped", args); + sec->ovly_mapped = 0; + return; + } + error ("No overlay section called %s", args); +} + +/* Function: overlay_auto_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_auto_command (char *args, int from_tty) +{ + overlay_debugging = ovly_auto; + enable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Automatic overlay debugging enabled."); +} + +/* Function: overlay_manual_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_manual_command (char *args, int from_tty) +{ + overlay_debugging = ovly_on; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging enabled."); +} + +/* Function: overlay_off_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_off_command (char *args, int from_tty) +{ + overlay_debugging = ovly_off; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging disabled."); +} + +static void +overlay_load_command (char *args, int from_tty) +{ + if (target_overlay_update) + (*target_overlay_update) (NULL); + else + error ("This target does not know how to read its overlay state."); +} + +/* Function: overlay_command + A place-holder for a mis-typed command */ + +/* Command list chain containing all defined "overlay" subcommands. */ +struct cmd_list_element *overlaylist; + +static void +overlay_command (char *args, int from_tty) +{ + printf_unfiltered + ("\"overlay\" must be followed by the name of an overlay command.\n"); + help_list (overlaylist, "overlay ", -1, gdb_stdout); +} + + +/* Target Overlays for the "Simplest" overlay manager: + + This is GDB's default target overlay layer. It works with the + minimal overlay manager supplied as an example by Cygnus. The + entry point is via a function pointer "target_overlay_update", + so targets that use a different runtime overlay manager can + substitute their own overlay_update function and take over the + function pointer. + + The overlay_update function pokes around in the target's data structures + to see what overlays are mapped, and updates GDB's overlay mapping with + this information. + + In this simple implementation, the target data structures are as follows: + unsigned _novlys; /# number of overlay sections #/ + unsigned _ovly_table[_novlys][4] = { + {VMA, SIZE, LMA, MAPPED}, /# one entry per overlay section #/ + {..., ..., ..., ...}, + } + unsigned _novly_regions; /# number of overlay regions #/ + unsigned _ovly_region_table[_novly_regions][3] = { + {VMA, SIZE, MAPPED_TO_LMA}, /# one entry per overlay region #/ + {..., ..., ...}, + } + These functions will attempt to update GDB's mappedness state in the + symbol section table, based on the target's mappedness state. + + To do this, we keep a cached copy of the target's _ovly_table, and + attempt to detect when the cached copy is invalidated. The main + entry point is "simple_overlay_update(SECT), which looks up SECT in + the cached table and re-reads only the entry for that section from + the target (whenever possible). + */ + +/* Cached, dynamically allocated copies of the target data structures: */ +static unsigned (*cache_ovly_table)[4] = 0; +#if 0 +static unsigned (*cache_ovly_region_table)[3] = 0; +#endif +static unsigned cache_novlys = 0; +#if 0 +static unsigned cache_novly_regions = 0; +#endif +static CORE_ADDR cache_ovly_table_base = 0; +#if 0 +static CORE_ADDR cache_ovly_region_table_base = 0; +#endif +enum ovly_index + { + VMA, SIZE, LMA, MAPPED + }; +#define TARGET_LONG_BYTES (TARGET_LONG_BIT / TARGET_CHAR_BIT) + +/* Throw away the cached copy of _ovly_table */ +static void +simple_free_overlay_table (void) +{ + if (cache_ovly_table) + xfree (cache_ovly_table); + cache_novlys = 0; + cache_ovly_table = NULL; + cache_ovly_table_base = 0; +} + +#if 0 +/* Throw away the cached copy of _ovly_region_table */ +static void +simple_free_overlay_region_table (void) +{ + if (cache_ovly_region_table) + xfree (cache_ovly_region_table); + cache_novly_regions = 0; + cache_ovly_region_table = NULL; + cache_ovly_region_table_base = 0; +} +#endif + +/* Read an array of ints from the target into a local buffer. + Convert to host order. int LEN is number of ints */ +static void +read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len) +{ + /* FIXME (alloca): Not safe if array is very large. */ + char *buf = alloca (len * TARGET_LONG_BYTES); + int i; + + read_memory (memaddr, buf, len * TARGET_LONG_BYTES); + for (i = 0; i < len; i++) + myaddr[i] = extract_unsigned_integer (TARGET_LONG_BYTES * i + buf, + TARGET_LONG_BYTES); +} + +/* Find and grab a copy of the target _ovly_table + (and _novlys, which is needed for the table's size) */ +static int +simple_read_overlay_table (void) +{ + struct minimal_symbol *novlys_msym, *ovly_table_msym; + + simple_free_overlay_table (); + novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); + if (! novlys_msym) + { + error ("Error reading inferior's overlay table: " + "couldn't find `_novlys' variable\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); + if (! ovly_table_msym) + { + error ("Error reading inferior's overlay table: couldn't find " + "`_ovly_table' array\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym), 4); + cache_ovly_table + = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); + cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym); + read_target_long_array (cache_ovly_table_base, + (int *) cache_ovly_table, + cache_novlys * 4); + + return 1; /* SUCCESS */ +} + +#if 0 +/* Find and grab a copy of the target _ovly_region_table + (and _novly_regions, which is needed for the table's size) */ +static int +simple_read_overlay_region_table (void) +{ + struct minimal_symbol *msym; + + simple_free_overlay_region_table (); + msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL); + if (msym != NULL) + cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym), 4); + else + return 0; /* failure */ + cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12); + if (cache_ovly_region_table != NULL) + { + msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL); + if (msym != NULL) + { + cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym); + read_target_long_array (cache_ovly_region_table_base, + (int *) cache_ovly_region_table, + cache_novly_regions * 3); + } + else + return 0; /* failure */ + } + else + return 0; /* failure */ + return 1; /* SUCCESS */ +} +#endif + +/* Function: simple_overlay_update_1 + A helper function for simple_overlay_update. Assuming a cached copy + of _ovly_table exists, look through it to find an entry whose vma, + lma and size match those of OSECT. Re-read the entry and make sure + it still matches OSECT (else the table may no longer be valid). + Set OSECT's mapped state to match the entry. Return: 1 for + success, 0 for failure. */ + +static int +simple_overlay_update_1 (struct obj_section *osect) +{ + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES, + (int *) cache_ovly_table[i], 4); + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + return 1; + } + else /* Warning! Warning! Target's ovly table has changed! */ + return 0; + } + return 0; +} + +/* Function: simple_overlay_update + If OSECT is NULL, then update all sections' mapped state + (after re-reading the entire target _ovly_table). + If OSECT is non-NULL, then try to find a matching entry in the + cached ovly_table and update only OSECT's mapped state. + If a cached entry can't be found or the cache isn't valid, then + re-read the entire cache, and go ahead and update all sections. */ + +static void +simple_overlay_update (struct obj_section *osect) +{ + struct objfile *objfile; + + /* Were we given an osect to look up? NULL means do all of them. */ + if (osect) + /* Have we got a cached copy of the target's overlay table? */ + if (cache_ovly_table != NULL) + /* Does its cached location match what's currently in the symtab? */ + if (cache_ovly_table_base == + SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL))) + /* Then go ahead and try to look up this single section in the cache */ + if (simple_overlay_update_1 (osect)) + /* Found it! We're done. */ + return; + + /* Cached table no good: need to read the entire table anew. + Or else we want all the sections, in which case it's actually + more efficient to read the whole table in one block anyway. */ + + if (! simple_read_overlay_table ()) + return; + + /* Now may as well update all sections, even if only one was requested. */ + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { /* obj_section matches i'th entry in ovly_table */ + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + break; /* finished with inner for loop: break out */ + } + } +} + +/* Set the output sections and output offsets for section SECTP in + ABFD. The relocation code in BFD will read these offsets, so we + need to be sure they're initialized. We map each section to itself, + with no offset; this means that SECTP->vma will be honored. */ + +static void +symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy) +{ + sectp->output_section = sectp; + sectp->output_offset = 0; +} + +/* Relocate the contents of a debug section SECTP in ABFD. The + contents are stored in BUF if it is non-NULL, or returned in a + malloc'd buffer otherwise. + + For some platforms and debug info formats, shared libraries contain + relocations against the debug sections (particularly for DWARF-2; + one affected platform is PowerPC GNU/Linux, although it depends on + the version of the linker in use). Also, ELF object files naturally + have unresolved relocations for their debug sections. We need to apply + the relocations in order to get the locations of symbols correct. */ + +bfd_byte * +symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) +{ +#ifdef CRASH_MERGE + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; +#endif + /* We're only interested in debugging sections with relocation + information. */ + if ((sectp->flags & SEC_RELOC) == 0) + return NULL; + if ((sectp->flags & SEC_DEBUGGING) == 0) + return NULL; + + /* We will handle section offsets properly elsewhere, so relocate as if + all sections begin at 0. */ + bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL); + + return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL); +} + +void +_initialize_symfile (void) +{ + struct cmd_list_element *c; + + c = add_cmd ("symbol-file", class_files, symbol_file_command, + "Load symbol table from executable file FILE.\n\ +The `file' command can also load symbol tables, as well as setting the file\n\ +to execute.", &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, + "Usage: add-symbol-file FILE ADDR [-s -s ...]\n\ +Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\ +ADDR is the starting address of the file's text.\n\ +The optional arguments are section-name section-address pairs and\n\ +should be specified if the data and bss segments are not contiguous\n\ +with the text. SECT is a section name to be loaded at SECT_ADDR.", + &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-shared-symbol-files", class_files, + add_shared_symbol_files_command, + "Load the symbols from shared objects in the dynamic linker's link map.", + &cmdlist); + c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1, + &cmdlist); + + c = add_cmd ("load", class_files, load_command, + "Dynamically load FILE into the running program, and record its symbols\n\ +for access from GDB.", &cmdlist); + set_cmd_completer (c, filename_completer); + + add_show_from_set + (add_set_cmd ("symbol-reloading", class_support, var_boolean, + (char *) &symbol_reloading, + "Set dynamic symbol table reloading multiple times in one run.", + &setlist), + &showlist); + + add_prefix_cmd ("overlay", class_support, overlay_command, + "Commands for debugging overlays.", &overlaylist, + "overlay ", 0, &cmdlist); + + add_com_alias ("ovly", "overlay", class_alias, 1); + add_com_alias ("ov", "overlay", class_alias, 1); + + add_cmd ("map-overlay", class_support, map_overlay_command, + "Assert that an overlay section is mapped.", &overlaylist); + + add_cmd ("unmap-overlay", class_support, unmap_overlay_command, + "Assert that an overlay section is unmapped.", &overlaylist); + + add_cmd ("list-overlays", class_support, list_overlays_command, + "List mappings of overlay sections.", &overlaylist); + + add_cmd ("manual", class_support, overlay_manual_command, + "Enable overlay debugging.", &overlaylist); + add_cmd ("off", class_support, overlay_off_command, + "Disable overlay debugging.", &overlaylist); + add_cmd ("auto", class_support, overlay_auto_command, + "Enable automatic overlay debugging.", &overlaylist); + add_cmd ("load-target", class_support, overlay_load_command, + "Read the overlay mapping state from the target.", &overlaylist); + + /* Filename extension to source language lookup table: */ + init_filename_language_table (); + c = add_set_cmd ("extension-language", class_files, var_string_noescape, + (char *) &ext_args, + "Set mapping between filename extension and source language.\n\ +Usage: set extension-language .foo bar", + &setlist); + set_cmd_cfunc (c, set_ext_lang_command); + + add_info ("extensions", info_ext_lang_command, + "All filename extensions associated with a source language."); + + add_show_from_set + (add_set_cmd ("download-write-size", class_obscure, + var_integer, (char *) &download_write_size, + "Set the write size used when downloading a program.\n" + "Only used when downloading a program onto a remote\n" + "target. Specify zero, or a negative value, to disable\n" + "blocked writes. The actual size of each transfer is also\n" + "limited by the size of the target packet and the memory\n" + "cache.\n", + &setlist), + &showlist); + + debug_file_directory = xstrdup (DEBUGDIR); + c = (add_set_cmd + ("debug-file-directory", class_support, var_string, + (char *) &debug_file_directory, + "Set the directory where separate debug symbols are searched for.\n" + "Separate debug symbols are first searched for in the same\n" + "directory as the binary, then in the `" DEBUG_SUBDIRECTORY + "' subdirectory,\n" + "and lastly at the path of the directory of the binary with\n" + "the global debug-file directory prepended\n", + &setlist)); + add_show_from_set (c, &showlist); + set_cmd_completer (c, filename_completer); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/symtab.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/symtab.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/symtab.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/symtab.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,4814 @@ +/* Symbol table lookup for the GNU debugger, GDB. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +/* Prototypes for local functions */ + +static void completion_list_add_name (char *, char *, int, char *, char *); + +static void rbreak_command (char *, int); + +static void types_info (char *, int); + +static void functions_info (char *, int); + +static void variables_info (char *, int); + +static void sources_info (char *, int); + +static void output_source_filename (char *, int *); + +static int find_line_common (struct linetable *, int, int *); + +/* This one is used by linespec.c */ + +char *operator_chars (char *p, char **end); + +static struct symbol *lookup_symbol_aux (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_local (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_symtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_psymtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +#if 0 +static +struct symbol *lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); +#endif + +/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ +/* Signals the presence of objects compiled by HP compilers */ +int hp_som_som_object_present = 0; + +static void fixup_section (struct general_symbol_info *, struct objfile *); + +static int file_matches (char *, char **, int); + +static void print_symbol_info (domain_enum, + struct symtab *, struct symbol *, int, char *); + +static void print_msymbol_info (struct minimal_symbol *); + +static void symtab_symbol_info (char *, domain_enum, int); + +void _initialize_symtab (void); + +/* */ + +/* The single non-language-specific builtin type */ +struct type *builtin_type_error; + +/* Block in which the most recently searched-for symbol was found. + Might be better to make this a parameter to lookup_symbol and + value_of_this. */ + +const struct block *block_found; + +/* Check for a symtab of a specific name; first in symtabs, then in + psymtabs. *If* there is no '/' in the name, a match after a '/' + in the symtab filename will also work. */ + +struct symtab * +lookup_symtab (const char *name) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + char *real_path = NULL; + char *full_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + +got_symtab: + + /* First, search for an exact match */ + + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (name, s->filename) == 0) + { + return s; + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + + if (full_path != NULL) + { + const char *fp = symtab_to_filename (s); + if (FILENAME_CMP (full_path, fp) == 0) + { + return s; + } + } + + if (real_path != NULL) + { + char *rp = gdb_realpath (symtab_to_filename (s)); + make_cleanup (xfree, rp); + if (FILENAME_CMP (real_path, rp) == 0) + { + return s; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (lbasename (s->filename), name) == 0) + return s; + } + + /* Same search rules as above apply here, but now we look thru the + psymtabs. */ + + ps = lookup_partial_symtab (name); + if (!ps) + return (NULL); + + if (ps->readin) + error ("Internal: readin %s pst for `%s' found when no symtab found.", + ps->filename, name); + + s = PSYMTAB_TO_SYMTAB (ps); + + if (s) + return s; + + /* At this point, we have located the psymtab for this file, but + the conversion to a symtab has failed. This usually happens + when we are looking up an include file. In this case, + PSYMTAB_TO_SYMTAB doesn't return a symtab, even though one has + been created. So, we need to run through the symtabs again in + order to find the file. + XXX - This is a crock, and should be fixed inside of the the + symbol parsing routines. */ + goto got_symtab; +} + +/* Lookup the partial symbol table of a source file named NAME. + *If* there is no '/' in the name, a match after a '/' + in the psymtab filename will also work. */ + +struct partial_symtab * +lookup_partial_symtab (const char *name) +{ + struct partial_symtab *pst; + struct objfile *objfile; + char *full_path = NULL; + char *real_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (name, pst->filename) == 0) + { + return (pst); + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + if (full_path != NULL) + { + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL + && FILENAME_CMP (full_path, pst->fullname) == 0) + { + return pst; + } + } + + if (real_path != NULL) + { + char *rp = NULL; + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL) + { + rp = gdb_realpath (pst->fullname); + make_cleanup (xfree, rp); + } + if (rp != NULL && FILENAME_CMP (real_path, rp) == 0) + { + return pst; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (lbasename (pst->filename), name) == 0) + return (pst); + } + + return (NULL); +} + +/* Mangle a GDB method stub type. This actually reassembles the pieces of the + full method name, which consist of the class name (from T), the unadorned + method name from METHOD_ID, and the signature for the specific overload, + specified by SIGNATURE_ID. Note that this function is g++ specific. */ + +char * +gdb_mangle_name (struct type *type, int method_id, int signature_id) +{ + int mangled_name_len; + char *mangled_name; + struct fn_field *f = TYPE_FN_FIELDLIST1 (type, method_id); + struct fn_field *method = &f[signature_id]; + char *field_name = TYPE_FN_FIELDLIST_NAME (type, method_id); + char *physname = TYPE_FN_FIELD_PHYSNAME (f, signature_id); + char *newname = type_name_no_tag (type); + + /* Does the form of physname indicate that it is the full mangled name + of a constructor (not just the args)? */ + int is_full_physname_constructor; + + int is_constructor; + int is_destructor = is_destructor_name (physname); + /* Need a new type prefix. */ + char *const_prefix = method->is_const ? "C" : ""; + char *volatile_prefix = method->is_volatile ? "V" : ""; + char buf[20]; + int len = (newname == NULL ? 0 : strlen (newname)); + + /* Nothing to do if physname already contains a fully mangled v3 abi name + or an operator name. */ + if ((physname[0] == '_' && physname[1] == 'Z') + || is_operator_name (field_name)) + return xstrdup (physname); + + is_full_physname_constructor = is_constructor_name (physname); + + is_constructor = + is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0); + + if (!is_destructor) + is_destructor = (strncmp (physname, "__dt", 4) == 0); + + if (is_destructor || is_full_physname_constructor) + { + mangled_name = (char *) xmalloc (strlen (physname) + 1); + strcpy (mangled_name, physname); + return mangled_name; + } + + if (len == 0) + { + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + } + else if (physname[0] == 't' || physname[0] == 'Q') + { + /* The physname for template and qualified methods already includes + the class name. */ + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + newname = NULL; + len = 0; + } + else + { + sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); + } + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + + strlen (buf) + len + strlen (physname) + 1); + + { + mangled_name = (char *) xmalloc (mangled_name_len); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); + } + strcat (mangled_name, buf); + /* If the class doesn't have a name, i.e. newname NULL, then we just + mangle it using 0 for the length of the class. Thus it gets mangled + as something starting with `::' rather than `classname::'. */ + if (newname != NULL) + strcat (mangled_name, newname); + + strcat (mangled_name, physname); + return (mangled_name); +} + + +/* Initialize the language dependent portion of a symbol + depending upon the language for the symbol. */ +void +symbol_init_language_specific (struct general_symbol_info *gsymbol, + enum language language) +{ + gsymbol->language = language; + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + memset (&gsymbol->language_specific, 0, + sizeof (gsymbol->language_specific)); + } +} + +/* Functions to initialize a symbol's mangled name. */ + +/* Create the hash table used for demangled names. Each hash entry is + a pair of strings; one for the mangled name and one for the demangled + name. The entry is hashed via just the mangled name. */ + +static void +create_demangled_names_hash (struct objfile *objfile) +{ + /* Choose 256 as the starting size of the hash table, somewhat arbitrarily. + The hash table code will round this up to the next prime number. + Choosing a much larger table size wastes memory, and saves only about + 1% in symbol reading. */ + + objfile->demangled_names_hash = htab_create_alloc_ex + (256, htab_hash_string, (int (*) (const void *, const void *)) streq, + NULL, objfile->md, xmcalloc, xmfree); +} + +/* Try to determine the demangled name for a symbol, based on the + language of that symbol. If the language is set to language_auto, + it will attempt to find any demangling algorithm that works and + then set the language appropriately. The returned name is allocated + by the demangler and should be xfree'd. */ + +static char * +symbol_find_demangled_name (struct general_symbol_info *gsymbol, + const char *mangled) +{ + char *demangled = NULL; + + if (gsymbol->language == language_unknown) + gsymbol->language = language_auto; + + if (gsymbol->language == language_objc + || gsymbol->language == language_auto) + { + demangled = + objc_demangle (mangled, 0); + if (demangled != NULL) + { + gsymbol->language = language_objc; + return demangled; + } + } + if (gsymbol->language == language_cplus + || gsymbol->language == language_auto) + { + demangled = + cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI); + if (demangled != NULL) + { + gsymbol->language = language_cplus; + return demangled; + } + } + if (gsymbol->language == language_java) + { + demangled = + cplus_demangle (mangled, + DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); + if (demangled != NULL) + { + gsymbol->language = language_java; + return demangled; + } + } + return NULL; +} + +/* Set both the mangled and demangled (if any) names for GSYMBOL based + on LINKAGE_NAME and LEN. The hash table corresponding to OBJFILE + is used, and the memory comes from that objfile's objfile_obstack. + LINKAGE_NAME is copied, so the pointer can be discarded after + calling this function. */ + +/* We have to be careful when dealing with Java names: when we run + into a Java minimal symbol, we don't know it's a Java symbol, so it + gets demangled as a C++ name. This is unfortunate, but there's not + much we can do about it: but when demangling partial symbols and + regular symbols, we'd better not reuse the wrong demangled name. + (See PR gdb/1039.) We solve this by putting a distinctive prefix + on Java names when storing them in the hash table. */ + +/* FIXME: carlton/2003-03-13: This is an unfortunate situation. I + don't mind the Java prefix so much: different languages have + different demangling requirements, so it's only natural that we + need to keep language data around in our demangling cache. But + it's not good that the minimal symbol has the wrong demangled name. + Unfortunately, I can't think of any easy solution to that + problem. */ + +#define JAVA_PREFIX "##JAVA$$" +#define JAVA_PREFIX_LEN 8 + +void +symbol_set_names (struct general_symbol_info *gsymbol, + const char *linkage_name, int len, struct objfile *objfile) +{ + char **slot; + /* A 0-terminated copy of the linkage name. */ + const char *linkage_name_copy; + /* A copy of the linkage name that might have a special Java prefix + added to it, for use when looking names up in the hash table. */ + const char *lookup_name; + /* The length of lookup_name. */ + int lookup_len; + + if (objfile->demangled_names_hash == NULL) + create_demangled_names_hash (objfile); + + /* The stabs reader generally provides names that are not + NUL-terminated; most of the other readers don't do this, so we + can just use the given copy, unless we're in the Java case. */ + if (gsymbol->language == language_java) + { + char *alloc_name; + lookup_len = len + JAVA_PREFIX_LEN; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN); + memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name + JAVA_PREFIX_LEN; + } + else if (linkage_name[len] != '\0') + { + char *alloc_name; + lookup_len = len; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name; + } + else + { + lookup_len = len; + lookup_name = linkage_name; + linkage_name_copy = linkage_name; + } + + slot = (char **) htab_find_slot (objfile->demangled_names_hash, + lookup_name, INSERT); + + /* If this name is not in the hash table, add it. */ + if (*slot == NULL) + { + char *demangled_name = symbol_find_demangled_name (gsymbol, + linkage_name_copy); + int demangled_len = demangled_name ? strlen (demangled_name) : 0; + + /* If there is a demangled name, place it right after the mangled name. + Otherwise, just place a second zero byte after the end of the mangled + name. */ + *slot = obstack_alloc (&objfile->objfile_obstack, + lookup_len + demangled_len + 2); + memcpy (*slot, lookup_name, lookup_len + 1); + if (demangled_name != NULL) + { + memcpy (*slot + lookup_len + 1, demangled_name, demangled_len + 1); + xfree (demangled_name); + } + else + (*slot)[lookup_len + 1] = '\0'; + } + + gsymbol->name = *slot + lookup_len - len; + if ((*slot)[lookup_len + 1] != '\0') + gsymbol->language_specific.cplus_specific.demangled_name + = &(*slot)[lookup_len + 1]; + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; +} + +/* Initialize the demangled name of GSYMBOL if possible. Any required space + to store the name is obtained from the specified obstack. The function + symbol_set_names, above, should be used instead where possible for more + efficient memory usage. */ + +void +symbol_init_demangled_name (struct general_symbol_info *gsymbol, + struct obstack *obstack) +{ + char *mangled = gsymbol->name; + char *demangled = NULL; + + demangled = symbol_find_demangled_name (gsymbol, mangled); + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + if (demangled) + { + gsymbol->language_specific.cplus_specific.demangled_name + = obsavestring (demangled, strlen (demangled), obstack); + xfree (demangled); + } + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + /* Unknown language; just clean up quietly. */ + if (demangled) + xfree (demangled); + } +} + +/* Return the source code name of a symbol. In languages where + demangling is necessary, this is the demangled name. */ + +char * +symbol_natural_name (const struct general_symbol_info *gsymbol) +{ + if ((gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + && (gsymbol->language_specific.cplus_specific.demangled_name != NULL)) + { + return gsymbol->language_specific.cplus_specific.demangled_name; + } + else + { + return gsymbol->name; + } +} + +/* Return the demangled name for a symbol based on the language for + that symbol. If no demangled name exists, return NULL. */ +char * +symbol_demangled_name (struct general_symbol_info *gsymbol) +{ + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + return gsymbol->language_specific.cplus_specific.demangled_name; + + else + return NULL; +} + +/* Initialize the structure fields to zero values. */ +void +init_sal (struct symtab_and_line *sal) +{ + sal->symtab = 0; + sal->section = 0; + sal->line = 0; + sal->pc = 0; + sal->end = 0; +} + + + +/* Find which partial symtab contains PC and SECTION. Return 0 if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ +struct partial_symtab * +find_pc_sect_psymtab (CORE_ADDR pc, asection *section) +{ + struct partial_symtab *pst; + struct objfile *objfile; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on texthigh and textlow, which do + not include the data ranges. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + ALL_PSYMTABS (objfile, pst) + { + if (pc >= pst->textlow && pc < pst->texthigh) + { + struct partial_symtab *tpst; + struct partial_symtab *best_pst = pst; + struct partial_symbol *best_psym = NULL; + + /* An objfile that has its functions reordered might have + many partial symbol tables containing the PC, but + we want the partial symbol table that contains the + function containing the PC. */ + if (!(objfile->flags & OBJF_REORDERED) && + section == 0) /* can't validate section this way */ + return (pst); + + if (msymbol == NULL) + return (pst); + + /* The code range of partial symtabs sometimes overlap, so, in + the loop below, we need to check all partial symtabs and + find the one that fits better for the given PC address. We + select the partial symtab that contains a symbol whose + address is closest to the PC address. By closest we mean + that find_pc_sect_symbol returns the symbol with address + that is closest and still less than the given PC. */ + for (tpst = pst; tpst != NULL; tpst = tpst->next) + { + if (pc >= tpst->textlow && pc < tpst->texthigh) + { + struct partial_symbol *p; + + p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && SYMBOL_VALUE_ADDRESS (p) + == SYMBOL_VALUE_ADDRESS (msymbol)) + return (tpst); + if (p != NULL) + { + /* We found a symbol in this partial symtab which + matches (or is closest to) PC, check whether it + is closer than our current BEST_PSYM. Since + this symbol address is necessarily lower or + equal to PC, the symbol closer to PC is the + symbol which address is the highest. */ + /* This way we return the psymtab which contains + such best match symbol. This can help in cases + where the symbol information/debuginfo is not + complete, like for instance on IRIX6 with gcc, + where no debug info is emitted for + statics. (See also the nodebug.exp + testcase.) */ + if (best_psym == NULL + || SYMBOL_VALUE_ADDRESS (p) + > SYMBOL_VALUE_ADDRESS (best_psym)) + { + best_psym = p; + best_pst = tpst; + } + } + + } + } + return (best_pst); + } + } + return (NULL); +} + +/* Find which partial symtab contains PC. Return 0 if none. + Backward compatibility, no section */ + +struct partial_symtab * +find_pc_psymtab (CORE_ADDR pc) +{ + return find_pc_sect_psymtab (pc, find_pc_mapped_section (pc)); +} + +/* Find which partial symbol within a psymtab matches PC and SECTION. + Return 0 if none. Check all psymtabs if PSYMTAB is 0. */ + +struct partial_symbol * +find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, + asection *section) +{ + struct partial_symbol *best = NULL, *p, **pp; + CORE_ADDR best_pc; + + if (!psymtab) + psymtab = find_pc_sect_psymtab (pc, section); + if (!psymtab) + return 0; + + /* Cope with programs that start at address 0 */ + best_pc = (psymtab->textlow != 0) ? psymtab->textlow - 1 : 0; + + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; + (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) + < psymtab->n_static_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + return best; +} + +/* Find which partial symbol within a psymtab matches PC. Return 0 if none. + Check all psymtabs if PSYMTAB is 0. Backwards compatibility, no section. */ + +struct partial_symbol * +find_pc_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc) +{ + return find_pc_sect_psymbol (psymtab, pc, find_pc_mapped_section (pc)); +} + +/* Debug symbols usually don't have section information. We need to dig that + out of the minimal symbols and stash that in the debug symbol. */ + +static void +fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile) +{ + struct minimal_symbol *msym; + msym = lookup_minimal_symbol (ginfo->name, NULL, objfile); + + if (msym) + { + ginfo->bfd_section = SYMBOL_BFD_SECTION (msym); + ginfo->section = SYMBOL_SECTION (msym); + } +} + +struct symbol * +fixup_symbol_section (struct symbol *sym, struct objfile *objfile) +{ + if (!sym) + return NULL; + + if (SYMBOL_BFD_SECTION (sym)) + return sym; + + fixup_section (&sym->ginfo, objfile); + + return sym; +} + +struct partial_symbol * +fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) +{ + if (!psym) + return NULL; + + if (SYMBOL_BFD_SECTION (psym)) + return psym; + + fixup_section (&psym->ginfo, objfile); + + return psym; +} + +/* Find the definition for a specified symbol name NAME + in domain DOMAIN, visible from lexical block BLOCK. + Returns the struct symbol pointer, or zero if no symbol is found. + If SYMTAB is non-NULL, store the symbol table in which the + symbol was found there, or NULL if not found. + C++: if IS_A_FIELD_OF_THIS is nonzero on entry, check to see if + NAME is a field of the current implied argument `this'. If so set + *IS_A_FIELD_OF_THIS to 1, otherwise set it to zero. + BLOCK_FOUND is set to the block in which NAME is found (in the case of + a field of `this', value_of_this sets BLOCK_FOUND to the proper value.) */ + +/* This function has a bunch of loops in it and it would seem to be + attractive to put in some QUIT's (though I'm not really sure + whether it can run long enough to be really important). But there + are a few calls for which it would appear to be bad news to quit + out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note + that there is C++ code below which can error(), but that probably + doesn't affect these calls since they are looking for a known + variable and thus can probably assume it will never hit the C++ + code). */ +#ifdef CRASH_MERGE +static void gdb_bait_and_switch(char *, struct symbol *); +#endif +struct symbol * +lookup_symbol (const char *name, const struct block *block, + const domain_enum domain, int *is_a_field_of_this, + struct symtab **symtab) +{ + char *demangled_name = NULL; + const char *modified_name = NULL; + const char *mangled_name = NULL; + int needtofreename = 0; + struct symbol *returnval; + + modified_name = name; + + /* If we are using C++ language, demangle the name before doing a lookup, so + we can always binary search. */ + if (current_language->la_language == language_cplus) + { + demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); + if (demangled_name) + { + mangled_name = name; + modified_name = demangled_name; + needtofreename = 1; + } + } + + if (case_sensitivity == case_sensitive_off) + { + char *copy; + int len, i; + + len = strlen (name); + copy = (char *) alloca (len + 1); + for (i= 0; i < len; i++) + copy[i] = tolower (name[i]); + copy[len] = 0; + modified_name = copy; + } + + returnval = lookup_symbol_aux (modified_name, mangled_name, block, + domain, is_a_field_of_this, symtab); + if (needtofreename) + xfree (demangled_name); + +#ifdef CRASH_MERGE + if (returnval && (domain == VAR_DOMAIN)) { + gdb_bait_and_switch((char *)modified_name, returnval); + } +#endif + + return returnval; +} + +/* Behave like lookup_symbol_aux except that NAME is the natural name + of the symbol that we're looking for and, if LINKAGE_NAME is + non-NULL, ensure that the symbol's linkage name matches as + well. */ + +static struct symbol * +lookup_symbol_aux (const char *name, const char *linkage_name, + const struct block *block, const domain_enum domain, + int *is_a_field_of_this, struct symtab **symtab) +{ + struct symbol *sym; + + /* Make sure we do something sensible with is_a_field_of_this, since + the callers that set this parameter to some non-null value will + certainly use it later and expect it to be either 0 or 1. + If we don't set it, the contents of is_a_field_of_this are + undefined. */ + if (is_a_field_of_this != NULL) + *is_a_field_of_this = 0; + + /* Search specified block and its superiors. Don't search + STATIC_BLOCK or GLOBAL_BLOCK. */ + + sym = lookup_symbol_aux_local (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + + /* If requested to do so by the caller and if appropriate for the + current language, check to see if NAME is a field of `this'. */ + + if (current_language->la_value_of_this != NULL + && is_a_field_of_this != NULL) + { + struct value *v = current_language->la_value_of_this (0); + + if (v && check_field (v, name)) + { + *is_a_field_of_this = 1; + if (symtab != NULL) + *symtab = NULL; + return NULL; + } + } + + /* Now do whatever is appropriate for the current language to look + up static and global variables. */ + + sym = current_language->la_lookup_symbol_nonlocal (name, linkage_name, + block, domain, + symtab); + if (sym != NULL) + return sym; + + /* Now search all static file-level symbols. Not strictly correct, + but more useful than an error. Do the symtabs first, then check + the psymtabs. If a psymtab indicates the existence of the + desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + if (symtab != NULL) + *symtab = NULL; + return NULL; +} + +/* Check to see if the symbol is defined in BLOCK or its superiors. + Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ + +static struct symbol * +lookup_symbol_aux_local (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + const struct block *static_block = block_static_block (block); + + /* Check if either no block is specified or it's a global block. */ + + if (static_block == NULL) + return NULL; + + while (block != static_block) + { + sym = lookup_symbol_aux_block (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + block = BLOCK_SUPERBLOCK (block); + } + + /* We've reached the static block without finding a result. */ + + return NULL; +} + +/* Look up a symbol in a block; if found, locate its symtab, fixup the + symbol, and set block_found appropriately. */ + +struct symbol * +lookup_symbol_aux_block (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile = NULL; + struct blockvector *bv; + struct block *b; + struct symtab *s = NULL; + + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + { + /* Search the list of symtabs for one which contains the + address of the start of this block. */ + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + if (BLOCK_START (b) <= BLOCK_START (block) + && BLOCK_END (b) > BLOCK_START (block)) + goto found; + } + found: + *symtab = s; + } + + return fixup_symbol_section (sym, objfile); + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the symtabs. + BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK, + depending on whether or not we want to search global symbols or + static symbols. */ + +static struct symbol * +lookup_symbol_aux_symtabs (int block_index, + const char *name, const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct symtab *s; + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the partial + symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or + STATIC_BLOCK, depending on whether or not we want to search global + symbols or static symbols. */ + +static struct symbol * +lookup_symbol_aux_psymtabs (int block_index, const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct partial_symtab *ps; + struct symtab *s; + const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin + && lookup_partial_symbol (ps, name, linkage_name, + psymtab_index, domain)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort try + looking in the statics even though the psymtab claimed + the symbol was global, or vice-versa. It's possible + that the psymtab gets it wrong in some cases. */ + + /* FIXME: carlton/2002-09-30: Should we really do that? + If that happens, isn't it likely to be a GDB error, in + which case we should fix the GDB error rather than + silently dealing with it here? So I'd vote for + removing the check for the symbol in the other + block. */ + block = BLOCKVECTOR_BLOCK (bv, + block_index == GLOBAL_BLOCK ? + STATIC_BLOCK : GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s).", + block_index == GLOBAL_BLOCK ? "global" : "static", + name, ps->filename, name, name); + } + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +#if 0 +/* Check for the possibility of the symbol being a function or a + mangled variable that is stored in one of the minimal symbol + tables. Eventually, all global symbols might be resolved in this + way. */ + +/* NOTE: carlton/2002-12-05: At one point, this function was part of + lookup_symbol_aux, and what are now 'return' statements within + lookup_symbol_aux_minsyms returned from lookup_symbol_aux, even if + sym was NULL. As far as I can tell, this was basically accidental; + it didn't happen every time that msymbol was non-NULL, but only if + some additional conditions held as well, and it caused problems + with HP-generated symbol tables. */ + +/* NOTE: carlton/2003-05-14: This function was once used as part of + lookup_symbol. It is currently unnecessary for correctness + reasons, however, and using it doesn't seem to be any faster than + using lookup_symbol_aux_psymtabs, so I'm commenting it out. */ + +static struct symbol * +lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab) +{ + struct symbol *sym; + struct blockvector *bv; + const struct block *block; + struct minimal_symbol *msymbol; + struct symtab *s; + + if (domain == VAR_DOMAIN) + { + msymbol = lookup_minimal_symbol (name, NULL, NULL); + + if (msymbol != NULL) + { + /* OK, we found a minimal symbol in spite of not finding any + symbol. There are various possible explanations for + this. One possibility is the symbol exists in code not + compiled -g. Another possibility is that the 'psymtab' + isn't doing its job. A third possibility, related to #2, + is that we were confused by name-mangling. For instance, + maybe the psymtab isn't doing its job because it only + know about demangled names, but we were given a mangled + name... */ + + /* We first use the address in the msymbol to try to locate + the appropriate symtab. Note that find_pc_sect_symtab() + has a side-effect of doing psymtab-to-symtab expansion, + for the found symtab. */ + s = find_pc_sect_symtab (SYMBOL_VALUE_ADDRESS (msymbol), + SYMBOL_BFD_SECTION (msymbol)); + if (s != NULL) + { + /* This is a function which has a symtab for its address. */ + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the + `name' argument to lookup_block_symbol. But the name + of a minimal symbol is always mangled, so that seems + to be clearly the wrong thing to pass as the + unmangled name. */ + sym = + lookup_block_symbol (block, name, linkage_name, domain); + /* We kept static functions in minimal symbol table as well as + in static scope. We want to find them in the symbol table. */ + if (!sym) + { + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, + linkage_name, domain); + } + + /* NOTE: carlton/2002-12-04: The following comment was + taken from a time when two versions of this function + were part of the body of lookup_symbol_aux: this + comment was taken from the version of the function + that was #ifdef HPUXHPPA, and the comment was right + before the 'return NULL' part of lookup_symbol_aux. + (Hence the "Fall through and return 0" comment.) + Elena did some digging into the situation for + Fortran, and she reports: + + "I asked around (thanks to Jeff Knaggs), and I think + the story for Fortran goes like this: + + "Apparently, in older Fortrans, '_' was not part of + the user namespace. g77 attached a final '_' to + procedure names as the exported symbols for linkage + (foo_) , but the symbols went in the debug info just + like 'foo'. The rationale behind this is not + completely clear, and maybe it was done to other + symbols as well, not just procedures." */ + + /* If we get here with sym == 0, the symbol was + found in the minimal symbol table + but not in the symtab. + Fall through and return 0 to use the msymbol + definition of "foo_". + (Note that outer code generally follows up a call + to this routine with a call to lookup_minimal_symbol(), + so a 0 return means we'll just flow into that other routine). + + This happens for Fortran "foo_" symbols, + which are "foo" in the symtab. + + This can also happen if "asm" is used to make a + regular symbol but not a debugging symbol, e.g. + asm(".globl _main"); + asm("_main:"); + */ + + if (symtab != NULL && sym != NULL) + *symtab = s; + return fixup_symbol_section (sym, s->objfile); + } + } + } + + return NULL; +} +#endif /* 0 */ + +/* A default version of lookup_symbol_nonlocal for use by languages + that can't think of anything better to do. This implements the C + lookup rules. */ + +struct symbol * +basic_lookup_symbol_nonlocal (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + /* NOTE: carlton/2003-05-19: The comments below were written when + this (or what turned into this) was part of lookup_symbol_aux; + I'm much less worried about these questions now, since these + decisions have turned out well, but I leave these comments here + for posterity. */ + + /* NOTE: carlton/2002-12-05: There is a question as to whether or + not it would be appropriate to search the current global block + here as well. (That's what this code used to do before the + is_a_field_of_this check was moved up.) On the one hand, it's + redundant with the lookup_symbol_aux_symtabs search that happens + next. On the other hand, if decode_line_1 is passed an argument + like filename:var, then the user presumably wants 'var' to be + searched for in filename. On the third hand, there shouldn't be + multiple global variables all of which are named 'var', and it's + not like decode_line_1 has ever restricted its search to only + global variables in a single filename. All in all, only + searching the static block here seems best: it's correct and it's + cleanest. */ + + /* NOTE: carlton/2002-12-05: There's also a possible performance + issue here: if you usually search for global symbols in the + current file, then it would be slightly better to search the + current global block before searching all the symtabs. But there + are other factors that have a much greater effect on performance + than that one, so I don't think we should worry about that for + now. */ + + sym = lookup_symbol_static (name, linkage_name, block, domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_global (name, linkage_name, domain, symtab); +} + +/* Lookup a symbol in the static block associated to BLOCK, if there + is one; do nothing if BLOCK is NULL or a global block. */ + +struct symbol * +lookup_symbol_static (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + const struct block *static_block = block_static_block (block); + + if (static_block != NULL) + return lookup_symbol_aux_block (name, linkage_name, static_block, + domain, symtab); + else + return NULL; +} + +/* Lookup a symbol in all files' global blocks (searching psymtabs if + necessary). */ + +struct symbol * +lookup_symbol_global (const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); +} + +/* Look, in partial_symtab PST, for symbol whose natural name is NAME. + If LINKAGE_NAME is non-NULL, check in addition that the symbol's + linkage name matches it. Check the global symbols if GLOBAL, the + static symbols if not */ + +struct partial_symbol * +lookup_partial_symbol (struct partial_symtab *pst, const char *name, + const char *linkage_name, int global, + domain_enum domain) +{ + struct partial_symbol *temp; + struct partial_symbol **start, **psym; + struct partial_symbol **top, **real_top, **bottom, **center; + int length = (global ? pst->n_global_syms : pst->n_static_syms); + int do_linear_search = 1; + + if (length == 0) + { + return (NULL); + } + start = (global ? + pst->objfile->global_psymbols.list + pst->globals_offset : + pst->objfile->static_psymbols.list + pst->statics_offset); + + if (global) /* This means we can use a binary search. */ + { + do_linear_search = 0; + + /* Binary search. This search is guaranteed to end with center + pointing at the earliest partial symbol whose name might be + correct. At that point *all* partial symbols with an + appropriate name will be checked against the correct + domain. */ + + bottom = start; + top = start + length - 1; + real_top = top; + while (top > bottom) + { + center = bottom + (top - bottom) / 2; + if (!(center < top)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + if (!do_linear_search + && (SYMBOL_LANGUAGE (*center) == language_java)) + { + do_linear_search = 1; + } + if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0) + { + top = center; + } + else + { + bottom = center + 1; + } + } + if (!(top == bottom)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + while (top <= real_top + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) + { + if (SYMBOL_DOMAIN (*top) == domain) + { + return (*top); + } + top++; + } + } + + /* Can't use a binary search or else we found during the binary search that + we should also do a linear search. */ + + if (do_linear_search) + { + for (psym = start; psym < start + length; psym++) + { + if (domain == SYMBOL_DOMAIN (*psym)) + { + if (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*psym, name)) + { + return (*psym); + } + } + } + } + + return (NULL); +} + +/* Look up a type named NAME in the struct_domain. The type returned + must not be opaque -- i.e., must have at least one field + defined. */ + +struct type * +lookup_transparent_type (const char *name) +{ + return current_language->la_lookup_transparent_type (name); +} + +/* The standard implementation of lookup_transparent_type. This code + was modeled on lookup_symbol -- the parts not relevant to looking + up types were just left out. In particular it's assumed here that + types are available in struct_domain and only at file-static or + global blocks. */ + +struct type * +basic_lookup_transparent_type (const char *name) +{ + struct symbol *sym; + struct symtab *s = NULL; + struct partial_symtab *ps; + struct blockvector *bv; + struct objfile *objfile; + struct block *block; + + /* Now search all the global symbols. Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a global, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, + 1, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the statics even though the psymtab + * claimed the symbol was global. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + + /* Now search the static file-level symbols. + Not strictly correct, but more useful than an error. + Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. + */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the globals even though the psymtab + * claimed the symbol was static. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + return (struct type *) 0; +} + + +/* Find the psymtab containing main(). */ +/* FIXME: What about languages without main() or specially linked + executables that have no main() ? */ + +struct partial_symtab * +find_main_psymtab (void) +{ + struct partial_symtab *pst; + struct objfile *objfile; + + ALL_PSYMTABS (objfile, pst) + { + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + { + return (pst); + } + } + return (NULL); +} + +/* Search BLOCK for symbol NAME in DOMAIN. + + Note that if NAME is the demangled form of a C++ symbol, we will fail + to find a match during the binary search of the non-encoded names, but + for now we don't worry about the slight inefficiency of looking for + a match we'll never find, since it will go pretty quick. Once the + binary search terminates, we drop through and do a straight linear + search on the symbols. Each symbol which is marked as being a ObjC/C++ + symbol (language_cplus or language_objc set) has both the encoded and + non-encoded names tested for a match. + + If LINKAGE_NAME is non-NULL, verify that any symbol we find has this + particular mangled name. +*/ + +struct symbol * +lookup_block_symbol (const struct block *block, const char *name, + const char *linkage_name, + const domain_enum domain) +{ + struct dict_iterator iter; + struct symbol *sym; + + if (!BLOCK_FUNCTION (block)) + { + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + return sym; + } + return NULL; + } + else + { + /* Note that parameter symbols do not always show up last in the + list; this loop makes sure to take anything else other than + parameter symbols first; it only uses parameter symbols as a + last resort. Note that this only takes up extra computation + time on a match. */ + + struct symbol *sym_found = NULL; + + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + { + sym_found = sym; + if (SYMBOL_CLASS (sym) != LOC_ARG && + SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && + SYMBOL_CLASS (sym) != LOC_REF_ARG && + SYMBOL_CLASS (sym) != LOC_REGPARM && + SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR && + SYMBOL_CLASS (sym) != LOC_BASEREG_ARG && + SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG) + { + break; + } + } + } + return (sym_found); /* Will be NULL if not found. */ + } +} + +/* Find the symtab associated with PC and SECTION. Look through the + psymtabs and read in another symtab if necessary. */ + +struct symtab * +find_pc_sect_symtab (CORE_ADDR pc, asection *section) +{ + struct block *b; + struct blockvector *bv; + struct symtab *s = NULL; + struct symtab *best_s = NULL; + struct partial_symtab *ps; + struct objfile *objfile; + CORE_ADDR distance = 0; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on the block's high and low code + addresses, which do not include the data ranges, and because + we call find_pc_sect_psymtab which has a similar restriction based + on the partial_symtab's texthigh and textlow. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + /* Search all symtabs for the one whose file contains our address, and which + is the smallest of all the ones containing the address. This is designed + to deal with a case like symtab a is at 0x1000-0x2000 and 0x3000-0x4000 + and symtab b is at 0x2000-0x3000. So the GLOBAL_BLOCK for a is from + 0x1000-0x4000, but for address 0x2345 we want to return symtab b. + + This happens for native ecoff format, where code from included files + gets its own symtab. The symtab for the included file should have + been read in already via the dependency mechanism. + It might be swifter to create several symtabs with the same name + like xcoff does (I'm not sure). + + It also happens for objfiles that have their functions reordered. + For these, the symtab we are looking for is not necessarily read in. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + if (BLOCK_START (b) <= pc + && BLOCK_END (b) > pc + && (distance == 0 + || BLOCK_END (b) - BLOCK_START (b) < distance)) + { + /* For an objfile that has its functions reordered, + find_pc_psymtab will find the proper partial symbol table + and we simply return its corresponding symtab. */ + /* In order to better support objfiles that contain both + stabs and coff debugging info, we continue on if a psymtab + can't be found. */ + if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs) + { + ps = find_pc_sect_psymtab (pc, section); + if (ps) + return PSYMTAB_TO_SYMTAB (ps); + } + if (section != 0) + { + struct dict_iterator iter; + struct symbol *sym = NULL; + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + fixup_symbol_section (sym, objfile); + if (section == SYMBOL_BFD_SECTION (sym)) + break; + } + if (sym == NULL) + continue; /* no symbol in this symtab matches section */ + } + distance = BLOCK_END (b) - BLOCK_START (b); + best_s = s; + } + } + + if (best_s != NULL) + return (best_s); + + s = NULL; + ps = find_pc_sect_psymtab (pc, section); + if (ps) + { + if (ps->readin) + /* Might want to error() here (in case symtab is corrupt and + will cause a core dump), but maybe we can successfully + continue, so let's not. */ + warning ("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + paddr_nz (pc)); + s = PSYMTAB_TO_SYMTAB (ps); + } + return (s); +} + +/* Find the symtab associated with PC. Look through the psymtabs and + read in another symtab if necessary. Backward compatibility, no section */ + +struct symtab * +find_pc_symtab (CORE_ADDR pc) +{ + return find_pc_sect_symtab (pc, find_pc_mapped_section (pc)); +} + + +/* Find the source file and line number for a given PC value and SECTION. + Return a structure containing a symtab pointer, a line number, + and a pc range for the entire source line. + The value's .pc field is NOT the specified pc. + NOTCURRENT nonzero means, if specified pc is on a line boundary, + use the line that ends there. Otherwise, in that case, the line + that begins there is used. */ + +/* The big complication here is that a line may start in one file, and end just + before the start of another file. This usually occurs when you #include + code in the middle of a subroutine. To properly find the end of a line's PC + range, we must search all symtabs associated with this compilation unit, and + find the one whose first PC is closer than that of the next line in this + symtab. */ + +/* If it's worth the effort, we could be using a binary search. */ + +struct symtab_and_line +find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent) +{ + struct symtab *s; + struct linetable *l; + int len; + int i; + struct linetable_entry *item; + struct symtab_and_line val; + struct blockvector *bv; + struct minimal_symbol *msymbol; + struct minimal_symbol *mfunsym; + + /* Info on best line seen so far, and where it starts, and its file. */ + + struct linetable_entry *best = NULL; + CORE_ADDR best_end = 0; + struct symtab *best_symtab = 0; + + /* Store here the first line number + of a file which contains the line at the smallest pc after PC. + If we don't find a line whose range contains PC, + we will use a line one less than this, + with a range from the start of that file to the first line's pc. */ + struct linetable_entry *alt = NULL; + struct symtab *alt_symtab = 0; + + /* Info on best line seen in this file. */ + + struct linetable_entry *prev; + + /* If this pc is not from the current frame, + it is the address of the end of a call instruction. + Quite likely that is the start of the following statement. + But what we want is the statement containing the instruction. + Fudge the pc to make sure we get that. */ + + init_sal (&val); /* initialize to zeroes */ + + /* It's tempting to assume that, if we can't find debugging info for + any function enclosing PC, that we shouldn't search for line + number info, either. However, GAS can emit line number info for + assembly files --- very helpful when debugging hand-written + assembly code. In such a case, we'd have no debug info for the + function, but we would have line info. */ + + if (notcurrent) + pc -= 1; + + /* elz: added this because this function returned the wrong + information if the pc belongs to a stub (import/export) + to call a shlib function. This stub would be anywhere between + two functions in the target, and the line info was erroneously + taken to be the one of the line before the pc. + */ + /* RT: Further explanation: + + * We have stubs (trampolines) inserted between procedures. + * + * Example: "shr1" exists in a shared library, and a "shr1" stub also + * exists in the main image. + * + * In the minimal symbol table, we have a bunch of symbols + * sorted by start address. The stubs are marked as "trampoline", + * the others appear as text. E.g.: + * + * Minimal symbol table for main image + * main: code for main (text symbol) + * shr1: stub (trampoline symbol) + * foo: code for foo (text symbol) + * ... + * Minimal symbol table for "shr1" image: + * ... + * shr1: code for shr1 (text symbol) + * ... + * + * So the code below is trying to detect if we are in the stub + * ("shr1" stub), and if so, find the real code ("shr1" trampoline), + * and if found, do the symbolization from the real-code address + * rather than the stub address. + * + * Assumptions being made about the minimal symbol table: + * 1. lookup_minimal_symbol_by_pc() will return a trampoline only + * if we're really in the trampoline. If we're beyond it (say + * we're in "foo" in the above example), it'll have a closer + * symbol (the "foo" text symbol for example) and will not + * return the trampoline. + * 2. lookup_minimal_symbol_text() will find a real text symbol + * corresponding to the trampoline, and whose address will + * be different than the trampoline address. I put in a sanity + * check for the address being the same, to avoid an + * infinite recursion. + */ + msymbol = lookup_minimal_symbol_by_pc (pc); + if (msymbol != NULL) + if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + { + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL); + if (mfunsym == NULL) + /* I eliminated this warning since it is coming out + * in the following situation: + * gdb shmain // test program with shared libraries + * (gdb) break shr1 // function in shared lib + * Warning: In stub for ... + * In the above situation, the shared lib is not loaded yet, + * so of course we can't find the real func/line info, + * but the "break" still works, and the warning is annoying. + * So I commented out the warning. RT */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) + /* Avoid infinite recursion */ + /* See above comment about why warning is commented out */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else + return find_pc_line (SYMBOL_VALUE (mfunsym), 0); + } + + + s = find_pc_sect_symtab (pc, section); + if (!s) + { + /* if no symbol information, return previous pc */ + if (notcurrent) + pc++; + val.pc = pc; + return val; + } + + bv = BLOCKVECTOR (s); + + /* Look at all the symtabs that share this blockvector. + They all have the same apriori range, that we found was right; + but they have different line tables. */ + + for (; s && BLOCKVECTOR (s) == bv; s = s->next) + { + /* Find the best line in this symtab. */ + l = LINETABLE (s); + if (!l) + continue; + len = l->nitems; + if (len <= 0) + { + /* I think len can be zero if the symtab lacks line numbers + (e.g. gcc -g1). (Either that or the LINETABLE is NULL; + I'm not sure which, and maybe it depends on the symbol + reader). */ + continue; + } + + prev = NULL; + item = l->item; /* Get first line info */ + + /* Is this file's first line closer than the first lines of other files? + If so, record this file, and its first line, as best alternate. */ + if (item->pc > pc && (!alt || item->pc < alt->pc)) + { + alt = item; + alt_symtab = s; + } + + for (i = 0; i < len; i++, item++) + { + /* Leave prev pointing to the linetable entry for the last line + that started at or before PC. */ + if (item->pc > pc) + break; + + prev = item; + } + + /* At this point, prev points at the line whose start addr is <= pc, and + item points at the next line. If we ran off the end of the linetable + (pc >= start of the last line), then prev == item. If pc < start of + the first line, prev will not be set. */ + + /* Is this file's best line closer than the best in the other files? + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ + + if (prev && prev->line && (!best || prev->pc > best->pc)) + { + best = prev; + best_symtab = s; + + /* Discard BEST_END if it's before the PC of the current BEST. */ + if (best_end <= best->pc) + best_end = 0; + } + + /* If another line (denoted by ITEM) is in the linetable and its + PC is after BEST's PC, but before the current BEST_END, then + use ITEM's PC as the new best_end. */ + if (best && i < len && item->pc > best->pc + && (best_end == 0 || best_end > item->pc)) + best_end = item->pc; + } + + if (!best_symtab) + { + if (!alt_symtab) + { /* If we didn't find any line # info, just + return zeros. */ + val.pc = pc; + } + else + { + val.symtab = alt_symtab; + val.line = alt->line - 1; + + /* Don't return line 0, that means that we didn't find the line. */ + if (val.line == 0) + ++val.line; + + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + val.end = alt->pc; + } + } + else if (best->line == 0) + { + /* If our best fit is in a range of PC's for which no line + number info is available (line number is zero) then we didn't + find any valid line information. */ + val.pc = pc; + } + else + { + val.symtab = best_symtab; + val.line = best->line; + val.pc = best->pc; + if (best_end && (!alt || best_end < alt->pc)) + val.end = best_end; + else if (alt) + val.end = alt->pc; + else + val.end = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + } + val.section = section; + return val; +} + +/* Backward compatibility (no section) */ + +struct symtab_and_line +find_pc_line (CORE_ADDR pc, int notcurrent) +{ + asection *section; + + section = find_pc_overlay (pc); + if (pc_in_unmapped_range (pc, section)) + pc = overlay_mapped_address (pc, section); + return find_pc_sect_line (pc, section, notcurrent); +} + +/* Find line number LINE in any symtab whose name is the same as + SYMTAB. + + If found, return the symtab that contains the linetable in which it was + found, set *INDEX to the index in the linetable of the best entry + found, and set *EXACT_MATCH nonzero if the value returned is an + exact match. + + If not found, return NULL. */ + +struct symtab * +find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match) +{ + int exact; + + /* BEST_INDEX and BEST_LINETABLE identify the smallest linenumber > LINE + so far seen. */ + + int best_index; + struct linetable *best_linetable; + struct symtab *best_symtab; + + /* First try looking it up in the given symtab. */ + best_linetable = LINETABLE (symtab); + best_symtab = symtab; + best_index = find_line_common (best_linetable, line, &exact); + if (best_index < 0 || !exact) + { + /* Didn't find an exact match. So we better keep looking for + another symtab with the same name. In the case of xcoff, + multiple csects for one source file (produced by IBM's FORTRAN + compiler) produce multiple symtabs (this is unavoidable + assuming csects can be at arbitrary places in memory and that + the GLOBAL_BLOCK of a symtab has a begin and end address). */ + + /* BEST is the smallest linenumber > LINE so far seen, + or 0 if none has been seen so far. + BEST_INDEX and BEST_LINETABLE identify the item for it. */ + int best; + + struct objfile *objfile; + struct symtab *s; + + if (best_index >= 0) + best = best_linetable->item[best_index].line; + else + best = 0; + + ALL_SYMTABS (objfile, s) + { + struct linetable *l; + int ind; + + if (strcmp (symtab->filename, s->filename) != 0) + continue; + l = LINETABLE (s); + ind = find_line_common (l, line, &exact); + if (ind >= 0) + { + if (exact) + { + best_index = ind; + best_linetable = l; + best_symtab = s; + goto done; + } + if (best == 0 || l->item[ind].line < best) + { + best = l->item[ind].line; + best_index = ind; + best_linetable = l; + best_symtab = s; + } + } + } + } +done: + if (best_index < 0) + return NULL; + + if (index) + *index = best_index; + if (exact_match) + *exact_match = exact; + + return best_symtab; +} + +/* Set the PC value for a given source file and line number and return true. + Returns zero for invalid line number (and sets the PC to 0). + The source file is specified with a struct symtab. */ + +int +find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc) +{ + struct linetable *l; + int ind; + + *pc = 0; + if (symtab == 0) + return 0; + + symtab = find_line_symtab (symtab, line, &ind, NULL); + if (symtab != NULL) + { + l = LINETABLE (symtab); + *pc = l->item[ind].pc; + return 1; + } + else + return 0; +} + +/* Find the range of pc values in a line. + Store the starting pc of the line into *STARTPTR + and the ending pc (start of next line) into *ENDPTR. + Returns 1 to indicate success. + Returns 0 if could not find the specified line. */ + +int +find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, + CORE_ADDR *endptr) +{ + CORE_ADDR startaddr; + struct symtab_and_line found_sal; + + startaddr = sal.pc; + if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr)) + return 0; + + /* This whole function is based on address. For example, if line 10 has + two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then + "info line *0x123" should say the line goes from 0x100 to 0x200 + and "info line *0x355" should say the line goes from 0x300 to 0x400. + This also insures that we never give a range like "starts at 0x134 + and ends at 0x12c". */ + + found_sal = find_pc_sect_line (startaddr, sal.section, 0); + if (found_sal.line != sal.line) + { + /* The specified line (sal) has zero bytes. */ + *startptr = found_sal.pc; + *endptr = found_sal.pc; + } + else + { + *startptr = found_sal.pc; + *endptr = found_sal.end; + } + return 1; +} + +/* Given a line table and a line number, return the index into the line + table for the pc of the nearest line whose number is >= the specified one. + Return -1 if none is found. The value is >= 0 if it is an index. + + Set *EXACT_MATCH nonzero if the value returned is an exact match. */ + +static int +find_line_common (struct linetable *l, int lineno, + int *exact_match) +{ + int i; + int len; + + /* BEST is the smallest linenumber > LINENO so far seen, + or 0 if none has been seen so far. + BEST_INDEX identifies the item for it. */ + + int best_index = -1; + int best = 0; + + if (lineno <= 0) + return -1; + if (l == 0) + return -1; + + len = l->nitems; + for (i = 0; i < len; i++) + { + struct linetable_entry *item = &(l->item[i]); + + if (item->line == lineno) + { + /* Return the first (lowest address) entry which matches. */ + *exact_match = 1; + return i; + } + + if (item->line > lineno && (best == 0 || item->line < best)) + { + best = item->line; + best_index = i; + } + } + + /* If we got here, we didn't get an exact match. */ + + *exact_match = 0; + return best_index; +} + +int +find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr) +{ + struct symtab_and_line sal; + sal = find_pc_line (pc, 0); + *startptr = sal.pc; + *endptr = sal.end; + return sal.symtab != 0; +} + +/* Given a function symbol SYM, find the symtab and line for the start + of the function. + If the argument FUNFIRSTLINE is nonzero, we want the first line + of real code inside the function. */ + +struct symtab_and_line +find_function_start_sal (struct symbol *sym, int funfirstline) +{ + CORE_ADDR pc; + struct symtab_and_line sal; + + pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + fixup_symbol_section (sym, NULL); + if (funfirstline) + { /* skip "first line" of function (which is actually its prologue) */ + asection *section = SYMBOL_BFD_SECTION (sym); + /* If function is in an unmapped overlay, use its unmapped LMA + address, so that SKIP_PROLOGUE has something unique to work on */ + if (section_is_overlay (section) && + !section_is_mapped (section)) + pc = overlay_unmapped_address (pc, section); + + pc += FUNCTION_START_OFFSET; + pc = SKIP_PROLOGUE (pc); + + /* For overlays, map pc back into its mapped VMA range */ + pc = overlay_mapped_address (pc, section); + } + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + + /* Check if SKIP_PROLOGUE left us in mid-line, and the next + line is still part of the same function. */ + if (sal.pc != pc + && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end + && sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym))) + { + /* First pc of next line */ + pc = sal.end; + /* Recalculate the line number (might not be N+1). */ + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + } + sal.pc = pc; + + return sal; +} + +/* If P is of the form "operator[ \t]+..." where `...' is + some legitimate operator text, return a pointer to the + beginning of the substring of the operator text. + Otherwise, return "". */ +char * +operator_chars (char *p, char **end) +{ + *end = ""; + if (strncmp (p, "operator", 8)) + return *end; + p += 8; + + /* Don't get faked out by `operator' being part of a longer + identifier. */ + if (isalpha (*p) || *p == '_' || *p == '$' || *p == '\0') + return *end; + + /* Allow some whitespace between `operator' and the operator symbol. */ + while (*p == ' ' || *p == '\t') + p++; + + /* Recognize 'operator TYPENAME'. */ + + if (isalpha (*p) || *p == '_' || *p == '$') + { + char *q = p + 1; + while (isalnum (*q) || *q == '_' || *q == '$') + q++; + *end = q; + return p; + } + + while (*p) + switch (*p) + { + case '\\': /* regexp quoting */ + if (p[1] == '*') + { + if (p[2] == '=') /* 'operator\*=' */ + *end = p + 3; + else /* 'operator\*' */ + *end = p + 2; + return p; + } + else if (p[1] == '[') + { + if (p[2] == ']') + error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + else if (p[2] == '\\' && p[3] == ']') + { + *end = p + 4; /* 'operator\[\]' */ + return p; + } + else + error ("nothing is allowed between '[' and ']'"); + } + else + { + /* Gratuitous qoute: skip it and move on. */ + p++; + continue; + } + break; + case '!': + case '=': + case '*': + case '/': + case '%': + case '^': + if (p[1] == '=') + *end = p + 2; + else + *end = p + 1; + return p; + case '<': + case '>': + case '+': + case '-': + case '&': + case '|': + if (p[0] == '-' && p[1] == '>') + { + /* Struct pointer member operator 'operator->'. */ + if (p[2] == '*') + { + *end = p + 3; /* 'operator->*' */ + return p; + } + else if (p[2] == '\\') + { + *end = p + 4; /* Hopefully 'operator->\*' */ + return p; + } + else + { + *end = p + 2; /* 'operator->' */ + return p; + } + } + if (p[1] == '=' || p[1] == p[0]) + *end = p + 2; + else + *end = p + 1; + return p; + case '~': + case ',': + *end = p + 1; + return p; + case '(': + if (p[1] != ')') + error ("`operator ()' must be specified without whitespace in `()'"); + *end = p + 2; + return p; + case '?': + if (p[1] != ':') + error ("`operator ?:' must be specified without whitespace in `?:'"); + *end = p + 2; + return p; + case '[': + if (p[1] != ']') + error ("`operator []' must be specified without whitespace in `[]'"); + *end = p + 2; + return p; + default: + error ("`operator %s' not supported", p); + break; + } + + *end = ""; + return *end; +} + + +/* If FILE is not already in the table of files, return zero; + otherwise return non-zero. Optionally add FILE to the table if ADD + is non-zero. If *FIRST is non-zero, forget the old table + contents. */ +static int +filename_seen (const char *file, int add, int *first) +{ + /* Table of files seen so far. */ + static const char **tab = NULL; + /* Allocated size of tab in elements. + Start with one 256-byte block (when using GNU malloc.c). + 24 is the malloc overhead when range checking is in effect. */ + static int tab_alloc_size = (256 - 24) / sizeof (char *); + /* Current size of tab in elements. */ + static int tab_cur_size; + const char **p; + + if (*first) + { + if (tab == NULL) + tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab)); + tab_cur_size = 0; + } + + /* Is FILE in tab? */ + for (p = tab; p < tab + tab_cur_size; p++) + if (strcmp (*p, file) == 0) + return 1; + + /* No; maybe add it to tab. */ + if (add) + { + if (tab_cur_size == tab_alloc_size) + { + tab_alloc_size *= 2; + tab = (const char **) xrealloc ((char *) tab, + tab_alloc_size * sizeof (*tab)); + } + tab[tab_cur_size++] = file; + } + + return 0; +} + +/* Slave routine for sources_info. Force line breaks at ,'s. + NAME is the name to print and *FIRST is nonzero if this is the first + name printed. Set *FIRST to zero. */ +static void +output_source_filename (char *name, int *first) +{ + /* Since a single source file can result in several partial symbol + tables, we need to avoid printing it more than once. Note: if + some of the psymtabs are read in and some are not, it gets + printed both under "Source files for which symbols have been + read" and "Source files for which symbols will be read in on + demand". I consider this a reasonable way to deal with the + situation. I'm not sure whether this can also happen for + symtabs; it doesn't hurt to check. */ + + /* Was NAME already seen? */ + if (filename_seen (name, 1, first)) + { + /* Yes; don't print it again. */ + return; + } + /* No; print it and reset *FIRST. */ + if (*first) + { + *first = 0; + } + else + { + printf_filtered (", "); + } + + wrap_here (""); + fputs_filtered (name, gdb_stdout); +} + +static void +sources_info (char *ignore, int from_tty) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first; + + if (!have_full_symbols () && !have_partial_symbols ()) + { + error ("No symbol table is loaded. Use the \"file\" command."); + } + + printf_filtered ("Source files for which symbols have been read in:\n\n"); + + first = 1; + ALL_SYMTABS (objfile, s) + { + output_source_filename (s->filename, &first); + } + printf_filtered ("\n\n"); + + printf_filtered ("Source files for which symbols will be read in on demand:\n\n"); + + first = 1; + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin) + { + output_source_filename (ps->filename, &first); + } + } + printf_filtered ("\n"); +} + +static int +file_matches (char *file, char *files[], int nfiles) +{ + int i; + + if (file != NULL && nfiles != 0) + { + for (i = 0; i < nfiles; i++) + { + if (strcmp (files[i], lbasename (file)) == 0) + return 1; + } + } + else if (nfiles == 0) + return 1; + return 0; +} + +/* Free any memory associated with a search. */ +void +free_search_symbols (struct symbol_search *symbols) +{ + struct symbol_search *p; + struct symbol_search *next; + + for (p = symbols; p != NULL; p = next) + { + next = p->next; + xfree (p); + } +} + +static void +do_free_search_symbols_cleanup (void *symbols) +{ + free_search_symbols (symbols); +} + +struct cleanup * +make_cleanup_free_search_symbols (struct symbol_search *symbols) +{ + return make_cleanup (do_free_search_symbols_cleanup, symbols); +} + +/* Helper function for sort_search_symbols and qsort. Can only + sort symbols, not minimal symbols. */ +static int +compare_search_syms (const void *sa, const void *sb) +{ + struct symbol_search **sym_a = (struct symbol_search **) sa; + struct symbol_search **sym_b = (struct symbol_search **) sb; + + return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol), + SYMBOL_PRINT_NAME ((*sym_b)->symbol)); +} + +/* Sort the ``nfound'' symbols in the list after prevtail. Leave + prevtail where it is, but update its next pointer to point to + the first of the sorted symbols. */ +static struct symbol_search * +sort_search_symbols (struct symbol_search *prevtail, int nfound) +{ + struct symbol_search **symbols, *symp, *old_next; + int i; + + symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *) + * nfound); + symp = prevtail->next; + for (i = 0; i < nfound; i++) + { + symbols[i] = symp; + symp = symp->next; + } + /* Generally NULL. */ + old_next = symp; + + qsort (symbols, nfound, sizeof (struct symbol_search *), + compare_search_syms); + + symp = prevtail; + for (i = 0; i < nfound; i++) + { + symp->next = symbols[i]; + symp = symp->next; + } + symp->next = old_next; + + xfree (symbols); + return symp; +} + +/* Search the symbol table for matches to the regular expression REGEXP, + returning the results in *MATCHES. + + Only symbols of KIND are searched: + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, + and constants (enums) + + free_search_symbols should be called when *MATCHES is no longer needed. + + The results are sorted locally; each symtab's global and static blocks are + separately alphabetized. + */ +void +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], + struct symbol_search **matches) +{ + struct symtab *s; + struct partial_symtab *ps; + struct blockvector *bv; + struct blockvector *prev_bv = 0; + struct block *b; + int i = 0; + struct dict_iterator iter; + struct symbol *sym; + struct partial_symbol **psym; + struct objfile *objfile; + struct minimal_symbol *msymbol; + char *val; + int found_misc = 0; + static enum minimal_symbol_type types[] + = + {mst_data, mst_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types2[] + = + {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = + {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = + {mst_file_bss, mst_text, mst_abs, mst_unknown}; + enum minimal_symbol_type ourtype; + enum minimal_symbol_type ourtype2; + enum minimal_symbol_type ourtype3; + enum minimal_symbol_type ourtype4; + struct symbol_search *sr; + struct symbol_search *psr; + struct symbol_search *tail; + struct cleanup *old_chain = NULL; + + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); + + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; + + sr = *matches = NULL; + tail = NULL; + + if (regexp != NULL) + { + /* Make sure spacing is right for C++ operators. + This is just a courtesy to make the matching less sensitive + to how many spaces the user leaves between 'operator' + and or . */ + char *opend; + char *opname = operator_chars (regexp, &opend); + if (*opname) + { + int fix = -1; /* -1 means ok; otherwise number of spaces needed. */ + if (isalpha (*opname) || *opname == '_' || *opname == '$') + { + /* There should 1 space between 'operator' and 'TYPENAME'. */ + if (opname[-1] != ' ' || opname[-2] == ' ') + fix = 1; + } + else + { + /* There should 0 spaces between 'operator' and 'OPERATOR'. */ + if (opname[-1] == ' ') + fix = 0; + } + /* If wrong number of spaces, fix it. */ + if (fix >= 0) + { + char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); + sprintf (tmp, "operator%.*s%s", fix, " ", opname); + regexp = tmp; + } + } + + if (0 != (val = re_comp (regexp))) + error ("Invalid regexp (%s): %s", val, regexp); + } + + /* Search through the partial symtabs *first* for all symbols + matching the regexp. That way we don't have to reproduce all of + the machinery below. */ + + ALL_PSYMTABS (objfile, ps) + { + struct partial_symbol **bound, **gbound, **sbound; + int keep_going = 1; + + if (ps->readin) + continue; + + gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms; + sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms; + bound = gbound; + + /* Go through all of the symbols stored in a partial + symtab in one loop. */ + psym = objfile->global_psymbols.list + ps->globals_offset; + while (keep_going) + { + if (psym >= bound) + { + if (bound == gbound && ps->n_static_syms != 0) + { + psym = objfile->static_psymbols.list + ps->statics_offset; + bound = sbound; + } + else + keep_going = 0; + continue; + } + else + { + QUIT; + + /* If it would match (logic taken from loop below) + load the file and go on to the next one */ + if (file_matches (ps->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && SYMBOL_CLASS (*psym) != LOC_BLOCK) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + { + PSYMTAB_TO_SYMTAB (ps); + keep_going = 0; + } + } + psym++; + } + } + + /* Here, we search through the minimal symbol tables for functions + and variables that match, and force their symbols to be read. + This is in particular necessary for demangled variable names, + which are no longer put into the partial symbol tables. + The symbol will then be found during the scan of symtabs below. + + For functions, find_pc_symtab should succeed if we have debug info + for the function, for variables we have to call lookup_symbol + to determine if the variable has debug info. + If the lookup fails, set found_misc so that we will rescan to print + any matching symbols without debug info. + */ + + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) + { + /* FIXME: carlton/2003-02-04: Given that the + semantics of lookup_symbol keeps on changing + slightly, it would be a nice idea if we had a + function lookup_symbol_minsym that found the + symbol associated to a given minimal symbol (if + any). */ + if (kind == FUNCTIONS_DOMAIN + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, + VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + found_misc = 1; + } + } + } + } + } + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + /* Often many files share a blockvector. + Scan each blockvector only once so that + we don't get every symbol many times. + It happens that the first symtab in the list + for any given blockvector is the main file. */ + if (bv != prev_bv) + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) + { + struct symbol_search *prevtail = tail; + int nfound = 0; + b = BLOCKVECTOR_BLOCK (bv, i); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + if (file_matches (s->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && SYMBOL_CLASS (sym) != LOC_BLOCK + && SYMBOL_CLASS (sym) != LOC_CONST) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->symtab = s; + psr->symbol = sym; + psr->msymbol = NULL; + psr->next = NULL; + if (tail == NULL) + sr = psr; + else + tail->next = psr; + tail = psr; + nfound ++; + } + } + if (nfound > 0) + { + if (prevtail == NULL) + { + struct symbol_search dummy; + + dummy.next = sr; + tail = sort_search_symbols (&dummy, nfound); + sr = dummy.next; + + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail = sort_search_symbols (prevtail, nfound); + } + } + prev_bv = bv; + } + + /* If there are no eyes, avoid all contact. I mean, if there are + no debug symbols, then print directly from the msymbol_vector. */ + + if (found_misc || kind != FUNCTIONS_DOMAIN) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + /* Functions: Look up by address. */ + if (kind != FUNCTIONS_DOMAIN || + (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) + { + /* Variables/Absolutes: Look up by name */ + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->msymbol = msymbol; + psr->symtab = NULL; + psr->symbol = NULL; + psr->next = NULL; + if (tail == NULL) + { + sr = psr; + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail->next = psr; + tail = psr; + } + } + } + } + } + } + + *matches = sr; + if (sr != NULL) + discard_cleanups (old_chain); +} + +/* Helper function for symtab_symbol_info, this function uses + the data returned from search_symbols() to print information + regarding the match to gdb_stdout. + */ +static void +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, + int block, char *last) +{ + if (last == NULL || strcmp (last, s->filename) != 0) + { + fputs_filtered ("\nFile ", gdb_stdout); + fputs_filtered (s->filename, gdb_stdout); + fputs_filtered (":\n", gdb_stdout); + } + + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) + printf_filtered ("static "); + + /* Typedef that is not a C++ class */ + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) + typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); + /* variable, func, or typedef-that-is-c++-class */ + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) + { + type_print (SYMBOL_TYPE (sym), + (SYMBOL_CLASS (sym) == LOC_TYPEDEF + ? "" : SYMBOL_PRINT_NAME (sym)), + gdb_stdout, 0); + + printf_filtered (";\n"); + } +} + +/* This help function for symtab_symbol_info() prints information + for non-debugging symbols to gdb_stdout. + */ +static void +print_msymbol_info (struct minimal_symbol *msymbol) +{ + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_PRINT_NAME (msymbol)); +} + +/* This is the guts of the commands "info functions", "info types", and + "info variables". It calls search_symbols to find all matches and then + print_[m]symbol_info to print out some useful information about the + matches. + */ +static void +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) +{ + static char *classnames[] + = + {"variable", "function", "type", "method"}; + struct symbol_search *symbols; + struct symbol_search *p; + struct cleanup *old_chain; + char *last_filename = NULL; + int first = 1; + + /* must make sure that if we're interrupted, symbols gets freed */ + search_symbols (regexp, kind, 0, (char **) NULL, &symbols); + old_chain = make_cleanup_free_search_symbols (symbols); + + printf_filtered (regexp + ? "All %ss matching regular expression \"%s\":\n" + : "All defined %ss:\n", + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); + + for (p = symbols; p != NULL; p = p->next) + { + QUIT; + + if (p->msymbol != NULL) + { + if (first) + { + printf_filtered ("\nNon-debugging symbols:\n"); + first = 0; + } + print_msymbol_info (p->msymbol); + } + else + { + print_symbol_info (kind, + p->symtab, + p->symbol, + p->block, + last_filename); + last_filename = p->symtab->filename; + } + } + + do_cleanups (old_chain); +} + +static void +variables_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); +} + +static void +functions_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); +} + + +static void +types_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); +} + +/* Breakpoint all functions matching regular expression. */ + +void +rbreak_command_wrapper (char *regexp, int from_tty) +{ + rbreak_command (regexp, from_tty); +} + +static void +rbreak_command (char *regexp, int from_tty) +{ + struct symbol_search *ss; + struct symbol_search *p; + struct cleanup *old_chain; + + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); + old_chain = make_cleanup_free_search_symbols (ss); + + for (p = ss; p != NULL; p = p->next) + { + if (p->msymbol == NULL) + { + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); + strcpy (string, p->symtab->filename); + strcat (string, ":'"); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); + strcat (string, "'"); + break_command (string, from_tty); + print_symbol_info (FUNCTIONS_DOMAIN, + p->symtab, + p->symbol, + p->block, + p->symtab->filename); + } + else + { + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); + printf_filtered (" %s;\n", + SYMBOL_PRINT_NAME (p->msymbol)); + } + } + + do_cleanups (old_chain); +} + + +/* Helper routine for make_symbol_completion_list. */ + +static int return_val_size; +static int return_val_index; +static char **return_val; + +#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ + completion_list_add_name \ + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) + +/* Test to see if the symbol specified by SYMNAME (which is already + demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN + characters. If so, add it to the current completion list. */ + +static void +completion_list_add_name (char *symname, char *sym_text, int sym_text_len, + char *text, char *word) +{ + int newsize; + int i; + + /* clip symbols that cannot match */ + + if (strncmp (symname, sym_text, sym_text_len) != 0) + { + return; + } + + /* We have a match for a completion, so add SYMNAME to the current list + of matches. Note that the name is moved to freshly malloc'd space. */ + + { + char *new; + if (word == sym_text) + { + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname); + } + else if (word > sym_text) + { + /* Return some portion of symname. */ + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname + (word - sym_text)); + } + else + { + /* Return some of SYM_TEXT plus symname. */ + new = xmalloc (strlen (symname) + (sym_text - word) + 5); + strncpy (new, word, sym_text - word); + new[sym_text - word] = '\0'; + strcat (new, symname); + } + + if (return_val_index + 3 > return_val_size) + { + newsize = (return_val_size *= 2) * sizeof (char *); + return_val = (char **) xrealloc ((char *) return_val, newsize); + } + return_val[return_val_index++] = new; + return_val[return_val_index] = NULL; + } +} + +/* ObjC: In case we are completing on a selector, look as the msymbol + again and feed all the selectors into the mill. */ + +static void +completion_list_objc_symbol (struct minimal_symbol *msymbol, char *sym_text, + int sym_text_len, char *text, char *word) +{ + static char *tmp = NULL; + static unsigned int tmplen = 0; + + char *method, *category, *selector; + char *tmp2 = NULL; + + method = SYMBOL_NATURAL_NAME (msymbol); + + /* Is it a method? */ + if ((method[0] != '-') && (method[0] != '+')) + return; + + if (sym_text[0] == '[') + /* Complete on shortened method method. */ + completion_list_add_name (method + 1, sym_text, sym_text_len, text, word); + + while ((strlen (method) + 1) >= tmplen) + { + if (tmplen == 0) + tmplen = 1024; + else + tmplen *= 2; + tmp = xrealloc (tmp, tmplen); + } + selector = strchr (method, ' '); + if (selector != NULL) + selector++; + + category = strchr (method, '('); + + if ((category != NULL) && (selector != NULL)) + { + memcpy (tmp, method, (category - method)); + tmp[category - method] = ' '; + memcpy (tmp + (category - method) + 1, selector, strlen (selector) + 1); + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + if (sym_text[0] == '[') + completion_list_add_name (tmp + 1, sym_text, sym_text_len, text, word); + } + + if (selector != NULL) + { + /* Complete on selector only. */ + strcpy (tmp, selector); + tmp2 = strchr (tmp, ']'); + if (tmp2 != NULL) + *tmp2 = '\0'; + + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + } +} + +/* Break the non-quoted text based on the characters which are in + symbols. FIXME: This should probably be language-specific. */ + +static char * +language_search_unquoted_string (char *text, char *p) +{ + for (; p > text; --p) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + continue; + else + { + if ((current_language->la_language == language_objc)) + { + if (p[-1] == ':') /* might be part of a method name */ + continue; + else if (p[-1] == '[' && (p[-2] == '-' || p[-2] == '+')) + p -= 2; /* beginning of a method name */ + else if (p[-1] == ' ' || p[-1] == '(' || p[-1] == ')') + { /* might be part of a method name */ + char *t = p; + + /* Seeing a ' ' or a '(' is not conclusive evidence + that we are in the middle of a method name. However, + finding "-[" or "+[" should be pretty un-ambiguous. + Unfortunately we have to find it now to decide. */ + + while (t > text) + if (isalnum (t[-1]) || t[-1] == '_' || + t[-1] == ' ' || t[-1] == ':' || + t[-1] == '(' || t[-1] == ')') + --t; + else + break; + + if (t[-1] == '[' && (t[-2] == '-' || t[-2] == '+')) + p = t - 2; /* method name detected */ + /* else we leave with p unchanged */ + } + } + break; + } + } + return p; +} + + +/* Return a NULL terminated array of all symbols (regardless of class) + which begin by matching TEXT. If the answer is no symbols, then + the return value is an array which contains only a NULL pointer. + + Problem: All of the symbols have to be copied because readline frees them. + I'm not going to worry about this; hopefully there won't be that many. */ + +char ** +make_symbol_completion_list (char *text, char *word) +{ + struct symbol *sym; + struct symtab *s; + struct partial_symtab *ps; + struct minimal_symbol *msymbol; + struct objfile *objfile; + struct block *b, *surrounding_static_block = 0; + struct dict_iterator iter; + int j; + struct partial_symbol **psym; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* It is not a quoted string. Break it based on the characters + which are in symbols. */ + while (p > text) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + --p; + else + break; + } + sym_text = p; + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 100; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Look through the partial symtabs for all symbols which begin + by matching SYM_TEXT. Add each one that you find to the list. */ + + ALL_PSYMTABS (objfile, ps) + { + /* If the psymtab's been read in we'll get it when we search + through the blockvector. */ + if (ps->readin) + continue; + + for (psym = objfile->global_psymbols.list + ps->globals_offset; + psym < (objfile->global_psymbols.list + ps->globals_offset + + ps->n_global_syms); + psym++) + { + /* If interrupted, then quit. */ + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + + for (psym = objfile->static_psymbols.list + ps->statics_offset; + psym < (objfile->static_psymbols.list + ps->statics_offset + + ps->n_static_syms); + psym++) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + } + + /* At this point scan through the misc symbol vectors and add each + symbol you find to the list. Eventually we want to ignore + anything that isn't a text symbol (everything else will be + handled by the psymtab code above). */ + + ALL_MSYMBOLS (objfile, msymbol) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text, word); + + completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text, word); + } + + /* Search upwards from currently selected frame (so that we can + complete on local vars. */ + + for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b)) + { + if (!BLOCK_SUPERBLOCK (b)) + { + surrounding_static_block = b; /* For elmin of dups */ + } + + /* Also catch fields of types defined in this places which match our + text string. Only complete on types visible from current context. */ + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + { + struct type *t = SYMBOL_TYPE (sym); + enum type_code c = TYPE_CODE (t); + + if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT) + { + for (j = TYPE_N_BASECLASSES (t); j < TYPE_NFIELDS (t); j++) + { + if (TYPE_FIELD_NAME (t, j)) + { + completion_list_add_name (TYPE_FIELD_NAME (t, j), + sym_text, sym_text_len, text, word); + } + } + } + } + } + } + + /* Go through the symtabs and check the externs and statics for + symbols which match. */ + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + /* Don't do this block twice. */ + if (b == surrounding_static_block) + continue; + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + return (return_val); +} + +/* Like make_symbol_completion_list, but returns a list of symbols + defined in a source file FILE. */ + +char ** +make_file_symbol_completion_list (char *text, char *word, char *srcfile) +{ + struct symbol *sym; + struct symtab *s; + struct block *b; + struct dict_iterator iter; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* Not a quoted string. */ + sym_text = language_search_unquoted_string (text, p); + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 10; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Find the symtab for SRCFILE (this loads it if it was not yet read + in). */ + s = lookup_symtab (srcfile); + if (s == NULL) + { + /* Maybe they typed the file with leading directories, while the + symbol tables record only its basename. */ + const char *tail = lbasename (srcfile); + + if (tail > srcfile) + s = lookup_symtab (tail); + } + + /* If we have no symtab for that file, return an empty list. */ + if (s == NULL) + return (return_val); + + /* Go through this symtab and check the externs and statics for + symbols which match. */ + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + return (return_val); +} + +/* A helper function for make_source_files_completion_list. It adds + another file name to a list of possible completions, growing the + list as necessary. */ + +static void +add_filename_to_list (const char *fname, char *text, char *word, + char ***list, int *list_used, int *list_alloced) +{ + char *new; + size_t fnlen = strlen (fname); + + if (*list_used + 1 >= *list_alloced) + { + *list_alloced *= 2; + *list = (char **) xrealloc ((char *) *list, + *list_alloced * sizeof (char *)); + } + + if (word == text) + { + /* Return exactly fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname); + } + else if (word > text) + { + /* Return some portion of fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname + (word - text)); + } + else + { + /* Return some of TEXT plus fname. */ + new = xmalloc (fnlen + (text - word) + 5); + strncpy (new, word, text - word); + new[text - word] = '\0'; + strcat (new, fname); + } + (*list)[*list_used] = new; + (*list)[++*list_used] = NULL; +} + +static int +not_interesting_fname (const char *fname) +{ + static const char *illegal_aliens[] = { + "_globals_", /* inserted by coff_symtab_read */ + NULL + }; + int i; + + for (i = 0; illegal_aliens[i]; i++) + { + if (strcmp (fname, illegal_aliens[i]) == 0) + return 1; + } + return 0; +} + +/* Return a NULL terminated array of all source files whose names + begin with matching TEXT. The file names are looked up in the + symbol tables of this program. If the answer is no matchess, then + the return value is an array which contains only a NULL pointer. */ + +char ** +make_source_files_completion_list (char *text, char *word) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first = 1; + int list_alloced = 1; + int list_used = 0; + size_t text_len = strlen (text); + char **list = (char **) xmalloc (list_alloced * sizeof (char *)); + const char *base_name; + + list[0] = NULL; + + if (!have_full_symbols () && !have_partial_symbols ()) + return list; + + ALL_SYMTABS (objfile, s) + { + if (not_interesting_fname (s->filename)) + continue; + if (!filename_seen (s->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (s->filename, text, text_len) == 0 +#else + && strncmp (s->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the current + list of matches. */ + add_filename_to_list (s->filename, text, word, + &list, &list_used, &list_alloced); + } + else + { + /* NOTE: We allow the user to type a base name when the + debug info records leading directories, but not the other + way around. This is what subroutines of breakpoint + command do when they parse file names. */ + base_name = lbasename (s->filename); + if (base_name != s->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (not_interesting_fname (ps->filename)) + continue; + if (!ps->readin) + { + if (!filename_seen (ps->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (ps->filename, text, text_len) == 0 +#else + && strncmp (ps->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the + current list of matches. */ + add_filename_to_list (ps->filename, text, word, + &list, &list_used, &list_alloced); + + } + else + { + base_name = lbasename (ps->filename); + if (base_name != ps->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + } + + return list; +} + +/* Determine if PC is in the prologue of a function. The prologue is the area + between the first instruction of a function, and the first executable line. + Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue. + + If non-zero, func_start is where we think the prologue starts, possibly + by previous examination of symbol table information. + */ + +int +in_prologue (CORE_ADDR pc, CORE_ADDR func_start) +{ + struct symtab_and_line sal; + CORE_ADDR func_addr, func_end; + + /* We have several sources of information we can consult to figure + this out. + - Compilers usually emit line number info that marks the prologue + as its own "source line". So the ending address of that "line" + is the end of the prologue. If available, this is the most + reliable method. + - The minimal symbols and partial symbols, which can usually tell + us the starting and ending addresses of a function. + - If we know the function's start address, we can call the + architecture-defined SKIP_PROLOGUE function to analyze the + instruction stream and guess where the prologue ends. + - Our `func_start' argument; if non-zero, this is the caller's + best guess as to the function's entry point. At the time of + this writing, handle_inferior_event doesn't get this right, so + it should be our last resort. */ + + /* Consult the partial symbol table, to find which function + the PC is in. */ + if (! find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + CORE_ADDR prologue_end; + + /* We don't even have minsym information, so fall back to using + func_start, if given. */ + if (! func_start) + return 1; /* We *might* be in a prologue. */ + + prologue_end = SKIP_PROLOGUE (func_start); + + return func_start <= pc && pc < prologue_end; + } + + /* If we have line number information for the function, that's + usually pretty reliable. */ + sal = find_pc_line (func_addr, 0); + + /* Now sal describes the source line at the function's entry point, + which (by convention) is the prologue. The end of that "line", + sal.end, is the end of the prologue. + + Note that, for functions whose source code is all on a single + line, the line number information doesn't always end up this way. + So we must verify that our purported end-of-prologue address is + *within* the function, not at its start or end. */ + if (sal.line == 0 + || sal.end <= func_addr + || func_end <= sal.end) + { + /* We don't have any good line number info, so use the minsym + information, together with the architecture-specific prologue + scanning code. */ + CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr); + + return func_addr <= pc && pc < prologue_end; + } + + /* We have line number info, and it looks good. */ + return func_addr <= pc && pc < sal.end; +} + +/* Given PC at the function's start address, attempt to find the + prologue end using SAL information. Return zero if the skip fails. + + A non-optimized prologue traditionally has one SAL for the function + and a second for the function body. A single line function has + them both pointing at the same line. + + An optimized prologue is similar but the prologue may contain + instructions (SALs) from the instruction body. Need to skip those + while not getting into the function body. + + The functions end point and an increasing SAL line are used as + indicators of the prologue's endpoint. + + This code is based on the function refine_prologue_limit (versions + found in both ia64 and ppc). */ + +CORE_ADDR +skip_prologue_using_sal (CORE_ADDR func_addr) +{ + struct symtab_and_line prologue_sal; + CORE_ADDR start_pc; + CORE_ADDR end_pc; + + /* Get an initial range for the function. */ + find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc); + start_pc += FUNCTION_START_OFFSET; + + prologue_sal = find_pc_line (start_pc, 0); + if (prologue_sal.line != 0) + { + while (prologue_sal.end < end_pc) + { + struct symtab_and_line sal; + + sal = find_pc_line (prologue_sal.end, 0); + if (sal.line == 0) + break; + /* Assume that a consecutive SAL for the same (or larger) + line mark the prologue -> body transition. */ + if (sal.line >= prologue_sal.line) + break; + /* The case in which compiler's optimizer/scheduler has + moved instructions into the prologue. We look ahead in + the function looking for address ranges whose + corresponding line number is less the first one that we + found for the function. This is more conservative then + refine_prologue_limit which scans a large number of SALs + looking for any in the prologue */ + prologue_sal = sal; + } + } + return prologue_sal.end; +} + +struct symtabs_and_lines +decode_line_spec (char *string, int funfirstline) +{ + struct symtabs_and_lines sals; + struct symtab_and_line cursal; + + if (string == 0) + error ("Empty line specification."); + + /* We use whatever is set as the current source line. We do not try + and get a default or it will recursively call us! */ + cursal = get_current_source_symtab_and_line (); + + sals = decode_line_1 (&string, funfirstline, + cursal.symtab, cursal.line, + (char ***) NULL, NULL); + + if (*string) + error ("Junk at end of line specification: %s", string); + return sals; +} + +/* Track MAIN */ +static char *name_of_main; + +void +set_main_name (const char *name) +{ + if (name_of_main != NULL) + { + xfree (name_of_main); + name_of_main = NULL; + } + if (name != NULL) + { + name_of_main = xstrdup (name); + } +} + +char * +main_name (void) +{ + if (name_of_main != NULL) + return name_of_main; + else + return "main"; +} + + +void +_initialize_symtab (void) +{ + add_info ("variables", variables_info, + "All global and static variable names, or those matching REGEXP."); + if (dbx_commands) + add_com ("whereis", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + + add_info ("functions", functions_info, + "All function names, or those matching REGEXP."); + + + /* FIXME: This command has at least the following problems: + 1. It prints builtin types (in a very strange and confusing fashion). + 2. It doesn't print right, e.g. with + typedef struct foo *FOO + type_print prints "FOO" when we want to make it (in this situation) + print "struct foo *". + I also think "ptype" or "whatis" is more likely to be useful (but if + there is much disagreement "info types" can be fixed). */ + add_info ("types", types_info, + "All type names, or those matching REGEXP."); + + add_info ("sources", sources_info, + "Source files in the program."); + + add_com ("rbreak", class_breakpoint, rbreak_command, + "Set a breakpoint for all functions matching REGEXP."); + + if (xdb_commands) + { + add_com ("lf", class_info, sources_info, "Source files in the program"); + add_com ("lg", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + } + + /* Initialize the one built-in type that isn't language dependent... */ + builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0, + "", (struct objfile *) NULL); +} + +#ifdef CRASH_MERGE +#include "gdb-stabs.h" +#include "version.h" +#define GDB_COMMON +#include "../../defs.h" + +static void get_member_data(struct gnu_request *, struct type *); +static void dump_enum(struct type *, struct gnu_request *); +static void eval_enum(struct type *, struct gnu_request *); +static void gdb_get_line_number(struct gnu_request *); +static void gdb_get_datatype(struct gnu_request *); +static void gdb_get_symbol_type(struct gnu_request *); +static void gdb_command_exists(struct gnu_request *); +#ifdef NEEDS_NEW_FUNCTIONALITY +static void gdb_stack_trace(struct gnu_request *); +#endif +static void gdb_debug_command(struct gnu_request *); +static void gdb_function_numargs(struct gnu_request *); +static void gdb_add_symbol_file(struct gnu_request *); +static void gdb_delete_symbol_file(struct gnu_request *); +static void gdb_patch_symbol_values(struct gnu_request *); +extern void replace_ui_file_FILE(struct ui_file *, FILE *); +extern int get_frame_offset(CORE_ADDR); + +static struct objfile *gdb_kernel_objfile = { 0 }; + +static ulong gdb_merge_flags = 0; +#define KERNEL_SYMBOLS_PATCHED (0x1) + +#undef STREQ +#define STREQ(A, B) (A && B && (strcmp(A, B) == 0)) + +/* + * All commands from above come through here. + */ +void +gdb_command_funnel(struct gnu_request *req) +{ + struct symbol *sym; + + if (req->command != GNU_VERSION) { + replace_ui_file_FILE(gdb_stdout, req->fp); + replace_ui_file_FILE(gdb_stderr, req->fp); + do_cleanups((struct cleanup *)0); + } + + switch (req->command) + { + case GNU_VERSION: + req->buf = (char *)version; + break; + + case GNU_PASS_THROUGH: + execute_command(req->buf, + req->flags & GNU_FROM_TTY_OFF ? FALSE : TRUE); + break; + + case GNU_STACK_TRACE: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * The get_current_frame() function in frame.c no longer can + * be subject of a CRASH_MERGE in which passed-in fp and pc + * value were substituted for read_fp() and read_pc() calls. + * Now there's a new unwind_to_current_frame() function and + * a new frame_info structure that are used. + */ + gdb_stack_trace(req); +#endif + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_RESOLVE_TEXT_ADDR: + sym = find_pc_function(req->addr); + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_DISASSEMBLE: + if (req->addr2) + sprintf(req->buf, "disassemble 0x%lx 0x%lx", + req->addr, req->addr2); + else + sprintf(req->buf, "disassemble 0x%lx", req->addr); + execute_command(req->buf, TRUE); + break; + + case GNU_ADD_SYMBOL_FILE: + gdb_add_symbol_file(req); + break; + + case GNU_DELETE_SYMBOL_FILE: + gdb_delete_symbol_file(req); + break; + + case GNU_GET_LINE_NUMBER: + gdb_get_line_number(req); + break; + + case GNU_GET_DATATYPE: + gdb_get_datatype(req); + break; + + case GNU_GET_SYMBOL_TYPE: + gdb_get_symbol_type(req); + break; + + case GNU_COMMAND_EXISTS: + gdb_command_exists(req); + break; + + case GNU_ALPHA_FRAME_OFFSET: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * get_frame_offset() was a CRASH_MERGE function located in + * alpha-tdep.c; going from 5.3 to 6.1 made its direct port + * impossible because of dependencies that no longer exist. + * Also changed in alpha-tdep.c, alpha_frame_chain() and + * read_next_frame_reg() no longer exist, and both of those + * contained CRASH_MERGE pieces. Until somebody gives me + * a new port of a function to calculate the size of a function + * frame, it appears that alpha back-traces may be far more + * likely to fail. + */ + req->value = get_frame_offset(req->pc); +#endif + req->value = 0; + break; + + case GNU_FUNCTION_NUMARGS: + gdb_function_numargs(req); + break; + + case GNU_DEBUG_COMMAND: + gdb_debug_command(req); + break; + + case GNU_PATCH_SYMBOL_VALUES: + gdb_patch_symbol_values(req); + break; + + default: + req->flags |= GNU_COMMAND_FAILED; + break; + } +} + +/* + * Given a PC value, return the file and line number. + */ +static void +gdb_get_line_number(struct gnu_request *req) +{ + struct symtab_and_line sal; + CORE_ADDR pc; + +#define LASTCHAR(s) (s[strlen(s)-1]) + + pc = req->addr; + + sal = find_pc_line(pc, 0); + + if (!sal.symtab) { + req->buf[0] = '\0'; + return; + } + + if (sal.symtab->filename && sal.symtab->dirname) { + if (sal.symtab->filename[0] == '/') + sprintf(req->buf, "%s: %d", + sal.symtab->filename, sal.line); + else + sprintf(req->buf, "%s%s%s: %d", + sal.symtab->dirname, + LASTCHAR(sal.symtab->dirname) == '/' ? "" : "/", sal.symtab->filename, sal.line); + } +} + + +/* + * General purpose routine for determining datatypes. + */ + +static void +gdb_get_datatype(struct gnu_request *req) +{ + register struct cleanup *old_chain = NULL; + register struct type *type; + register struct type *typedef_type; + struct expression *expr; + struct symbol *sym; + register int i; + struct field *nextfield; + struct value *val; + + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (a)\n", req->name); + + req->typecode = TYPE_CODE_UNDEF; + + /* + * lookup_symbol() will pick up struct and union names. + */ + sym = lookup_symbol(req->name, 0, STRUCT_DOMAIN, 0, + (struct symtab **) NULL); + if (sym) { + req->typecode = TYPE_CODE(sym->type); + req->length = TYPE_LENGTH(sym->type); + if (req->member) + get_member_data(req, sym->type); + + if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) { + if (req->flags & GNU_PRINT_ENUMERATORS) + dump_enum(sym->type, req); + } + + return; + } + + /* + * Otherwise parse the expression. + */ + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (b)\n", req->name); + + expr = parse_expression(req->name); + + old_chain = make_cleanup(free_current_contents, &expr); + + + switch (expr->elts[0].opcode) + { + case OP_VAR_VALUE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_VAR_VALUE\n"); + type = expr->elts[2].symbol->type; + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + req->typecode = TYPE_CODE(type); + req->value = SYMBOL_VALUE(expr->elts[2].symbol); + req->tagname = TYPE_TAG_NAME(type); + if (!req->tagname) { + val = evaluate_type(expr); + eval_enum(VALUE_TYPE(val), req); + } + } + break; + + case OP_TYPE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_TYPE\n"); + type = expr->elts[1].type; + + req->typecode = TYPE_CODE(type); + req->length = TYPE_LENGTH(type); + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + req->is_typedef = TYPE_CODE_TYPEDEF; + if ((typedef_type = check_typedef(type))) { + req->typecode = TYPE_CODE(typedef_type); + req->length = TYPE_LENGTH(typedef_type); + type = typedef_type; + } + } + + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + if (req->is_typedef) + if (req->flags & GNU_PRINT_ENUMERATORS) { + if (req->is_typedef) + fprintf_filtered(gdb_stdout, + "typedef "); + dump_enum(type, req); + } + } + + if (req->member) + get_member_data(req, type); + + break; + + default: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: %d (?)\n", + expr->elts[0].opcode); + break; + + } + + do_cleanups(old_chain); +} + +/* + * More robust enum list dump that gdb's, showing the value of each + * identifier, each on its own line. + */ +static void +dump_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, + "enum %s {\n", TYPE_TAG_NAME (type)); + else + fprintf_filtered(gdb_stdout, "enum {\n"); + + for (i = 0; i < len; i++) { + fprintf_filtered(gdb_stdout, " %s", + TYPE_FIELD_NAME (type, i)); + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + fprintf_filtered (gdb_stdout, " = %d", + TYPE_FIELD_BITPOS (type, i)); + lastval = TYPE_FIELD_BITPOS (type, i); + } else + fprintf_filtered(gdb_stdout, " = %d", lastval); + fprintf_filtered(gdb_stdout, "\n"); + lastval++; + } + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, "};\n"); + else + fprintf_filtered(gdb_stdout, "} %s;\n", req->name); +} + +/* + * Given an enum type with no tagname, determine its value. + */ +static void +eval_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + + for (i = 0; i < len; i++) { + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + lastval = TYPE_FIELD_BITPOS (type, i); + } + if (STREQ(TYPE_FIELD_NAME(type, i), req->name)) { + req->tagname = "(unknown)"; + req->value = lastval; + return; + } + lastval++; + } +} + +/* + * Walk through a struct type's list of fields looking for the desired + * member field, and when found, return its relevant data. + */ +static void +get_member_data(struct gnu_request *req, struct type *type) +{ + register short i; + struct field *nextfield; + short nfields; + struct type *typedef_type; + + req->member_offset = -1; + +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(type)->nfields; + nextfield = TYPE_MAIN_TYPE(type)->fields; +#else + nfields = type->nfields; + nextfield = type->fields; +#endif + + if (nfields == 0) { + struct type *newtype; + newtype = lookup_transparent_type(req->name); + if (newtype) { + console("get_member_data(%s.%s): switching type from %lx to %lx\n", + req->name, req->member, type, newtype); +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(newtype)->nfields; + nextfield = TYPE_MAIN_TYPE(newtype)->fields; +#else + nfields = newtype->nfields; + nextfield = newtype->fields; +#endif + } + } + + for (i = 0; i < nfields; i++) { + if (STREQ(req->member, nextfield->name)) { + req->member_offset = nextfield->loc.bitpos; + req->member_length = TYPE_LENGTH(nextfield->type); + req->member_typecode = TYPE_CODE(nextfield->type); + if ((req->member_typecode == TYPE_CODE_TYPEDEF) && + (typedef_type = check_typedef(nextfield->type))) + req->member_length = TYPE_LENGTH(typedef_type); + return; + } + nextfield++; + } +} + +#ifdef NEEDS_NEW_FUNCTIONALITY +/* + * Kick off a gdb stack trace, keeping copies of the starting frame and pc. + */ + +CORE_ADDR gdb_starting_pc; +CORE_ADDR gdb_starting_fp; + +static void +gdb_stack_trace(struct gnu_request *req) +{ + target_has_stack = TRUE; + target_has_registers = TRUE; + stop_soon_quietly = TRUE; + gdb_starting_pc = req->pc; + gdb_starting_fp = req->sp; + sprintf(req->buf, "backtrace"); + execute_command(req->buf, TRUE); +} +#endif + +/* + * Check whether a command exists. If it doesn't, the command will be + * returned indirectly via the error_hook. + */ +static void +gdb_command_exists(struct gnu_request *req) +{ + extern struct cmd_list_element *cmdlist; + register struct cmd_list_element *c; + + req->value = FALSE; + c = lookup_cmd(&req->name, cmdlist, "", 0, 1); + req->value = TRUE; +} + +static void +gdb_function_numargs(struct gnu_request *req) +{ + struct symbol *sym; + + sym = find_pc_function(req->pc); + + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) { + req->flags |= GNU_COMMAND_FAILED; + return; + } + + req->value = (ulong)TYPE_NFIELDS(sym->type); +} + +struct load_module *gdb_current_load_module = NULL; + +static void +gdb_add_symbol_file(struct gnu_request *req) +{ + register struct objfile *loaded_objfile = NULL; + register struct objfile *objfile; + register struct minimal_symbol *m; + struct load_module *lm; + struct syment *sp; + struct syment *spx; + int external, subsequent, found; + off_t offset; + ulong value, adjusted; + struct symbol *sym; + struct expression *expr; + struct cleanup *old_chain; + int i; + int allsect = 0; + char *secname; + char buf[80]; + + gdb_current_load_module = lm = (struct load_module *)req->addr; + + req->name = lm->mod_namelist; + gdb_delete_symbol_file(req); + + for (i = 0 ; i < lm->mod_sections; i++) { + if (STREQ(lm->mod_section_data[i].name, ".text") && + (lm->mod_section_data[i].flags & SEC_FOUND)) + allsect = 1; + } + + if (!allsect) { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start ? lm->mod_text_start : lm->mod_base); + if (lm->mod_data_start) { + sprintf(buf, " -s .data 0x%lx", lm->mod_data_start); + strcat(req->buf, buf); + } + if (lm->mod_bss_start) { + sprintf(buf, " -s .bss 0x%lx", lm->mod_bss_start); + strcat(req->buf, buf); + } + if (lm->mod_rodata_start) { + sprintf(buf, " -s .rodata 0x%lx", lm->mod_rodata_start); + strcat(req->buf, buf); + } + } else { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start); + for (i = 0; i < lm->mod_sections; i++) { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + strcat(req->buf, buf); + } + } + } + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, "gdb_add_symbol_file: %s\n", req->buf); + } + + execute_command(req->buf, FALSE); + + ALL_OBJFILES(objfile) { + if (same_file(objfile->name, lm->mod_namelist)) { + loaded_objfile = objfile; + break; + } + } + + if (!loaded_objfile) + req->flags |= GNU_COMMAND_FAILED; +} + +void +patch_load_module(struct objfile *objfile, struct minimal_symbol *msymbol) +{ + register int i; + struct syment *sp, *spx; + struct load_module *lm; + struct mod_section_data *msd; + struct section_offsets *section_offsets; + ulong start; + char *name; + int external; + struct obj_section *s; + extern void print_gdb_version (struct ui_file *); + + if (!gdb_kernel_objfile) { + gdb_kernel_objfile = objfile; + return; + } + + if (!(lm = gdb_current_load_module) || + (msymbol && !IN_MODULE(SYMBOL_VALUE_ADDRESS(msymbol), lm))) + return; + + if (msymbol) { + for (sp = lm->mod_load_symtable; + sp < lm->mod_load_symend; sp++) { + + if ((sp->value < lm->mod_data_start) || + !STREQ(sp->name, msymbol->ginfo.name)) + continue; + + for (external = FALSE, + spx = lm->mod_ext_symtable; + spx < lm->mod_ext_symend; + spx++) { + if (STREQ(sp->name, spx->name)) { + external = TRUE; + break; + } + } + if (external) + continue; + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, + "patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), + sp->value); + } + + console("patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), sp->value); + + SYMBOL_VALUE_ADDRESS(msymbol) = sp->value; + + break; + } + return; + } + + for (s = objfile->sections; s < objfile->sections_end; ++s) { + name = (char *)s->the_bfd_section->name; + + for (i = 0; i < lm->mod_sections; i++) { + msd = &lm->mod_section_data[i]; + if (STREQ(msd->name, name)) { + s->addr = lm->mod_base + msd->offset; + s->endaddr = s->addr + msd->size; + } + } + } + + section_offsets = objfile->section_offsets; + + if (objfile->sect_index_text != -1) + section_offsets->offsets[SECT_OFF_TEXT(objfile)] = + lm->mod_text_start; + + if (objfile->sect_index_data != -1) + section_offsets->offsets[SECT_OFF_DATA(objfile)] = + lm->mod_data_start; + + if (objfile->sect_index_bss != -1) + section_offsets->offsets[SECT_OFF_BSS(objfile)] = + lm->mod_bss_start; + + if (objfile->sect_index_rodata != -1) + section_offsets->offsets[SECT_OFF_RODATA(objfile)] = + lm->mod_rodata_start; + +#ifdef DEPRECATED_SECT_OFF_MAX + if (gdb_CRASHDEBUG(1)) { + for (i = 0; i < SECT_OFF_MAX; i++) { + if (ANOFFSET(objfile->section_offsets, i)) { + fprintf_filtered(gdb_stdout, + "section_offsets[%d]: %lx\n", i, + ANOFFSET(objfile->section_offsets, i)); + } + } + } +#endif +} + +static void +gdb_delete_symbol_file(struct gnu_request *req) +{ + register struct objfile *objfile; + + ALL_OBJFILES(objfile) { + if (STREQ(objfile->name, req->name)) { + free_objfile(objfile); + break; + } + } + + if (gdb_CRASHDEBUG(1)) + ALL_OBJFILES(objfile) + fprintf_filtered(gdb_stdout, "%s\n", objfile->name); +} + +/* + * Walk through all minimal_symbols, patching their values with the + * correct addresses. + */ +static void +gdb_patch_symbol_values(struct gnu_request *req) +{ + struct minimal_symbol *msymbol; + struct objfile *objfile; + + req->name = PATCH_KERNEL_SYMBOLS_START; + patch_kernel_symbol(req); + + ALL_MSYMBOLS (objfile, msymbol) + { + req->name = msymbol->ginfo.name; + req->addr = (ulong)(&SYMBOL_VALUE_ADDRESS(msymbol)); + if (!patch_kernel_symbol(req)) { + req->flags |= GNU_COMMAND_FAILED; + break; + } + } + + req->name = PATCH_KERNEL_SYMBOLS_STOP; + patch_kernel_symbol(req); + + clear_symtab_users(); + gdb_merge_flags |= KERNEL_SYMBOLS_PATCHED; +} + +static void +gdb_get_symbol_type(struct gnu_request *req) +{ + struct expression *expr; + struct value *val; + struct cleanup *old_chain = NULL; + struct type *type; + struct type *target_type; + + req->typecode = TYPE_CODE_UNDEF; + + expr = parse_expression (req->name); + old_chain = make_cleanup (free_current_contents, &expr); + val = evaluate_type (expr); + + type = VALUE_TYPE(val); + +#ifdef TYPE_MAIN_TYPE + req->typename = TYPE_MAIN_TYPE(type)->name; + req->typecode = TYPE_MAIN_TYPE(type)->code; + req->length = type->length; + target_type = TYPE_MAIN_TYPE(type)->target_type; +#else + req->typename = type->name; + req->typecode = type->code; + req->length = type->length; + target_type = type->target_type; +#endif + + if (target_type) { +#ifdef TYPE_MAIN_TYPE + req->target_typename = TYPE_MAIN_TYPE(target_type)->name; + req->target_typecode = TYPE_MAIN_TYPE(target_type)->code; + req->target_length = target_type->length; +#else + req->target_typename = target_type->name; + req->target_typecode = target_type->code; + req->target_length = target_type->length; +#endif + } + + if (req->member) + get_member_data(req, type); + + do_cleanups (old_chain); +} + +static void +gdb_debug_command(struct gnu_request *req) +{ + +} + +/* + * Only necessary on "patched" kernel symbol sessions, and called only by + * lookup_symbol(), pull a symbol value bait-and-switch operation by altering + * either a data symbol's address value or a text symbol's block start address. + */ +static void +gdb_bait_and_switch(char *name, struct symbol *sym) +{ + struct minimal_symbol *msym; + struct block *block; + + if ((gdb_merge_flags & KERNEL_SYMBOLS_PATCHED) && + (msym = lookup_minimal_symbol(name, NULL, gdb_kernel_objfile))) { + if (sym->aclass == LOC_BLOCK) { + block = (struct block *)SYMBOL_BLOCK_VALUE(sym); + BLOCK_START(block) = SYMBOL_VALUE_ADDRESS(msym); + } else + SYMBOL_VALUE_ADDRESS(sym) = SYMBOL_VALUE_ADDRESS(msym); + } +} + +#endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/target.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/target.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/target.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/target.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2458 @@ +/* Select target systems and architectures at runtime for GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include +#include "gdb_string.h" +#include "target.h" +#include "gdbcmd.h" +#include "symtab.h" +#include "inferior.h" +#include "bfd.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdb_wait.h" +#include "dcache.h" +#include +#include "regcache.h" +#include "gdb_assert.h" +#include "gdbcore.h" + +static void target_info (char *, int); + +static void maybe_kill_then_create_inferior (char *, char *, char **); + +static void maybe_kill_then_attach (char *, int); + +static void kill_or_be_killed (int); + +static void default_terminal_info (char *, int); + +static int default_region_size_ok_for_hw_watchpoint (int); + +static int nosymbol (char *, CORE_ADDR *); + +static void tcomplain (void); + +static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *); + +static int return_zero (void); + +static int return_one (void); + +static int return_minus_one (void); + +void target_ignore (void); + +static void target_command (char *, int); + +static struct target_ops *find_default_run_target (char *); + +static void nosupport_runtime (void); + +static LONGEST default_xfer_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, + ULONGEST offset, LONGEST len); + +/* Transfer LEN bytes between target address MEMADDR and GDB address + MYADDR. Returns 0 for success, errno code for failure (which + includes partial transfers -- if you want a more useful response to + partial transfers, try either target_read_memory_partial or + target_write_memory_partial). */ + +static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write); + +static void init_dummy_target (void); + +static void debug_to_open (char *, int); + +static void debug_to_close (int); + +static void debug_to_attach (char *, int); + +static void debug_to_detach (char *, int); + +static void debug_to_disconnect (char *, int); + +static void debug_to_resume (ptid_t, int, enum target_signal); + +static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *); + +static void debug_to_fetch_registers (int); + +static void debug_to_store_registers (int); + +static void debug_to_prepare_to_store (void); + +static int debug_to_xfer_memory (CORE_ADDR, char *, int, int, + struct mem_attrib *, struct target_ops *); + +static void debug_to_files_info (struct target_ops *); + +static int debug_to_insert_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_breakpoint (CORE_ADDR, char *); + +static int debug_to_can_use_hw_breakpoint (int, int, int); + +static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_insert_watchpoint (CORE_ADDR, int, int); + +static int debug_to_remove_watchpoint (CORE_ADDR, int, int); + +static int debug_to_stopped_by_watchpoint (void); + +static CORE_ADDR debug_to_stopped_data_address (void); + +static int debug_to_region_size_ok_for_hw_watchpoint (int); + +static void debug_to_terminal_init (void); + +static void debug_to_terminal_inferior (void); + +static void debug_to_terminal_ours_for_output (void); + +static void debug_to_terminal_save_ours (void); + +static void debug_to_terminal_ours (void); + +static void debug_to_terminal_info (char *, int); + +static void debug_to_kill (void); + +static void debug_to_load (char *, int); + +static int debug_to_lookup_symbol (char *, CORE_ADDR *); + +static void debug_to_create_inferior (char *, char *, char **); + +static void debug_to_mourn_inferior (void); + +static int debug_to_can_run (void); + +static void debug_to_notice_signals (ptid_t); + +static int debug_to_thread_alive (ptid_t); + +static void debug_to_stop (void); + +/* Pointer to array of target architecture structures; the size of the + array; the current index into the array; the allocated size of the + array. */ +struct target_ops **target_structs; +unsigned target_struct_size; +unsigned target_struct_index; +unsigned target_struct_allocsize; +#define DEFAULT_ALLOCSIZE 10 + +/* The initial current target, so that there is always a semi-valid + current target. */ + +static struct target_ops dummy_target; + +/* Top of target stack. */ + +static struct target_ops *target_stack; + +/* The target structure we are currently using to talk to a process + or file or whatever "inferior" we have. */ + +struct target_ops current_target; + +/* Command list for target. */ + +static struct cmd_list_element *targetlist = NULL; + +/* Nonzero if we are debugging an attached outside process + rather than an inferior. */ + +int attach_flag; + +/* Non-zero if we want to see trace of target level stuff. */ + +static int targetdebug = 0; + +static void setup_target_debug (void); + +DCACHE *target_dcache; + +/* The user just typed 'target' without the name of a target. */ + +static void +target_command (char *arg, int from_tty) +{ + fputs_filtered ("Argument required (target name). Try `help target'\n", + gdb_stdout); +} + +/* Add a possible target architecture to the list. */ + +void +add_target (struct target_ops *t) +{ + /* Provide default values for all "must have" methods. */ + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; + + if (!target_structs) + { + target_struct_allocsize = DEFAULT_ALLOCSIZE; + target_structs = (struct target_ops **) xmalloc + (target_struct_allocsize * sizeof (*target_structs)); + } + if (target_struct_size >= target_struct_allocsize) + { + target_struct_allocsize *= 2; + target_structs = (struct target_ops **) + xrealloc ((char *) target_structs, + target_struct_allocsize * sizeof (*target_structs)); + } + target_structs[target_struct_size++] = t; + + if (targetlist == NULL) + add_prefix_cmd ("target", class_run, target_command, + "Connect to a target machine or process.\n\ +The first argument is the type or protocol of the target machine.\n\ +Remaining arguments are interpreted by the target protocol. For more\n\ +information on the arguments for a particular protocol, type\n\ +`help target ' followed by the protocol name.", + &targetlist, "target ", 0, &cmdlist); + add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); +} + +/* Stub functions */ + +void +target_ignore (void) +{ +} + +void +target_load (char *arg, int from_tty) +{ + dcache_invalidate (target_dcache); + (*current_target.to_load) (arg, from_tty); +} + +static int +nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *t) +{ + errno = EIO; /* Can't read/write this location */ + return 0; /* No bytes handled */ +} + +static void +tcomplain (void) +{ + error ("You can't do that when your target is `%s'", + current_target.to_shortname); +} + +void +noprocess (void) +{ + error ("You can't do that without a process to debug."); +} + +static int +nosymbol (char *name, CORE_ADDR *addrp) +{ + return 1; /* Symbol does not exist in target env */ +} + +static void +nosupport_runtime (void) +{ + if (ptid_equal (inferior_ptid, null_ptid)) + noprocess (); + else + error ("No run-time support for this"); +} + + +static void +default_terminal_info (char *args, int from_tty) +{ + printf_unfiltered ("No saved terminal information.\n"); +} + +/* This is the default target_create_inferior and target_attach function. + If the current target is executing, it asks whether to kill it off. + If this function returns without calling error(), it has killed off + the target, and the operation should be attempted. */ + +static void +kill_or_be_killed (int from_tty) +{ + if (target_has_execution) + { + printf_unfiltered ("You are already running a program:\n"); + target_files_info (); + if (query ("Kill it? ")) + { + target_kill (); + if (target_has_execution) + error ("Killing the program did not help."); + return; + } + else + { + error ("Program not killed."); + } + } + tcomplain (); +} + +static void +maybe_kill_then_attach (char *args, int from_tty) +{ + kill_or_be_killed (from_tty); + target_attach (args, from_tty); +} + +static void +maybe_kill_then_create_inferior (char *exec, char *args, char **env) +{ + kill_or_be_killed (0); + target_create_inferior (exec, args, env); +} + +/* Go through the target stack from top to bottom, copying over zero + entries in current_target, then filling in still empty entries. In + effect, we are doing class inheritance through the pushed target + vectors. + + NOTE: cagney/2003-10-17: The problem with this inheritance, as it + is currently implemented, is that it discards any knowledge of + which target an inherited method originally belonged to. + Consequently, new new target methods should instead explicitly and + locally search the target stack for the target that can handle the + request. */ + +static void +update_current_target (void) +{ + struct target_ops *t; + + /* First, reset curren'ts contents. */ + memset (¤t_target, 0, sizeof (current_target)); + +#define INHERIT(FIELD, TARGET) \ + if (!current_target.FIELD) \ + current_target.FIELD = (TARGET)->FIELD + + for (t = target_stack; t; t = t->beneath) + { + INHERIT (to_shortname, t); + INHERIT (to_longname, t); + INHERIT (to_doc, t); + INHERIT (to_open, t); + INHERIT (to_close, t); + INHERIT (to_attach, t); + INHERIT (to_post_attach, t); + INHERIT (to_detach, t); + INHERIT (to_disconnect, t); + INHERIT (to_resume, t); + INHERIT (to_wait, t); + INHERIT (to_post_wait, t); + INHERIT (to_fetch_registers, t); + INHERIT (to_store_registers, t); + INHERIT (to_prepare_to_store, t); + INHERIT (to_xfer_memory, t); + INHERIT (to_files_info, t); + INHERIT (to_insert_breakpoint, t); + INHERIT (to_remove_breakpoint, t); + INHERIT (to_can_use_hw_breakpoint, t); + INHERIT (to_insert_hw_breakpoint, t); + INHERIT (to_remove_hw_breakpoint, t); + INHERIT (to_insert_watchpoint, t); + INHERIT (to_remove_watchpoint, t); + INHERIT (to_stopped_data_address, t); + INHERIT (to_stopped_by_watchpoint, t); + INHERIT (to_have_continuable_watchpoint, t); + INHERIT (to_region_size_ok_for_hw_watchpoint, t); + INHERIT (to_terminal_init, t); + INHERIT (to_terminal_inferior, t); + INHERIT (to_terminal_ours_for_output, t); + INHERIT (to_terminal_ours, t); + INHERIT (to_terminal_save_ours, t); + INHERIT (to_terminal_info, t); + INHERIT (to_kill, t); + INHERIT (to_load, t); + INHERIT (to_lookup_symbol, t); + INHERIT (to_create_inferior, t); + INHERIT (to_post_startup_inferior, t); + INHERIT (to_acknowledge_created_inferior, t); + INHERIT (to_insert_fork_catchpoint, t); + INHERIT (to_remove_fork_catchpoint, t); + INHERIT (to_insert_vfork_catchpoint, t); + INHERIT (to_remove_vfork_catchpoint, t); + INHERIT (to_follow_fork, t); + INHERIT (to_insert_exec_catchpoint, t); + INHERIT (to_remove_exec_catchpoint, t); + INHERIT (to_reported_exec_events_per_exec_call, t); + INHERIT (to_has_exited, t); + INHERIT (to_mourn_inferior, t); + INHERIT (to_can_run, t); + INHERIT (to_notice_signals, t); + INHERIT (to_thread_alive, t); + INHERIT (to_find_new_threads, t); + INHERIT (to_pid_to_str, t); + INHERIT (to_extra_thread_info, t); + INHERIT (to_stop, t); + /* Do not inherit to_xfer_partial. */ + INHERIT (to_rcmd, t); + INHERIT (to_enable_exception_callback, t); + INHERIT (to_get_current_exception_event, t); + INHERIT (to_pid_to_exec_file, t); + INHERIT (to_stratum, t); + INHERIT (to_has_all_memory, t); + INHERIT (to_has_memory, t); + INHERIT (to_has_stack, t); + INHERIT (to_has_registers, t); + INHERIT (to_has_execution, t); + INHERIT (to_has_thread_control, t); + INHERIT (to_sections, t); + INHERIT (to_sections_end, t); + INHERIT (to_can_async_p, t); + INHERIT (to_is_async_p, t); + INHERIT (to_async, t); + INHERIT (to_async_mask_value, t); + INHERIT (to_find_memory_regions, t); + INHERIT (to_make_corefile_notes, t); + INHERIT (to_get_thread_local_address, t); + INHERIT (to_magic, t); + } +#undef INHERIT + + /* Clean up a target struct so it no longer has any zero pointers in + it. Some entries are defaulted to a method that print an error, + others are hard-wired to a standard recursive default. */ + +#define de_fault(field, value) \ + if (!current_target.field) \ + current_target.field = value + + de_fault (to_open, + (void (*) (char *, int)) + tcomplain); + de_fault (to_close, + (void (*) (int)) + target_ignore); + de_fault (to_attach, + maybe_kill_then_attach); + de_fault (to_post_attach, + (void (*) (int)) + target_ignore); + de_fault (to_detach, + (void (*) (char *, int)) + target_ignore); + de_fault (to_disconnect, + (void (*) (char *, int)) + tcomplain); + de_fault (to_resume, + (void (*) (ptid_t, int, enum target_signal)) + noprocess); + de_fault (to_wait, + (ptid_t (*) (ptid_t, struct target_waitstatus *)) + noprocess); + de_fault (to_post_wait, + (void (*) (ptid_t, int)) + target_ignore); + de_fault (to_fetch_registers, + (void (*) (int)) + target_ignore); + de_fault (to_store_registers, + (void (*) (int)) + noprocess); + de_fault (to_prepare_to_store, + (void (*) (void)) + noprocess); + de_fault (to_xfer_memory, + (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) + nomemory); + de_fault (to_files_info, + (void (*) (struct target_ops *)) + target_ignore); + de_fault (to_insert_breakpoint, + memory_insert_breakpoint); + de_fault (to_remove_breakpoint, + memory_remove_breakpoint); + de_fault (to_can_use_hw_breakpoint, + (int (*) (int, int, int)) + return_zero); + de_fault (to_insert_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_remove_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_insert_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_remove_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_stopped_by_watchpoint, + (int (*) (void)) + return_zero); + de_fault (to_stopped_data_address, + (CORE_ADDR (*) (void)) + return_zero); + de_fault (to_region_size_ok_for_hw_watchpoint, + default_region_size_ok_for_hw_watchpoint); + de_fault (to_terminal_init, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_inferior, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours_for_output, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_save_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_info, + default_terminal_info); + de_fault (to_kill, + (void (*) (void)) + noprocess); + de_fault (to_load, + (void (*) (char *, int)) + tcomplain); + de_fault (to_lookup_symbol, + (int (*) (char *, CORE_ADDR *)) + nosymbol); + de_fault (to_create_inferior, + maybe_kill_then_create_inferior); + de_fault (to_post_startup_inferior, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_acknowledge_created_inferior, + (void (*) (int)) + target_ignore); + de_fault (to_insert_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_insert_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_follow_fork, + (int (*) (int)) + target_ignore); + de_fault (to_insert_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_reported_exec_events_per_exec_call, + (int (*) (void)) + return_one); + de_fault (to_has_exited, + (int (*) (int, int, int *)) + return_zero); + de_fault (to_mourn_inferior, + (void (*) (void)) + noprocess); + de_fault (to_can_run, + return_zero); + de_fault (to_notice_signals, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_thread_alive, + (int (*) (ptid_t)) + return_zero); + de_fault (to_find_new_threads, + (void (*) (void)) + target_ignore); + de_fault (to_extra_thread_info, + (char *(*) (struct thread_info *)) + return_zero); + de_fault (to_stop, + (void (*) (void)) + target_ignore); + current_target.to_xfer_partial = default_xfer_partial; + de_fault (to_rcmd, + (void (*) (char *, struct ui_file *)) + tcomplain); + de_fault (to_enable_exception_callback, + (struct symtab_and_line * (*) (enum exception_event_kind, int)) + nosupport_runtime); + de_fault (to_get_current_exception_event, + (struct exception_event_record * (*) (void)) + nosupport_runtime); + de_fault (to_pid_to_exec_file, + (char *(*) (int)) + return_zero); + de_fault (to_can_async_p, + (int (*) (void)) + return_zero); + de_fault (to_is_async_p, + (int (*) (void)) + return_zero); + de_fault (to_async, + (void (*) (void (*) (enum inferior_event_type, void*), void*)) + tcomplain); +#undef de_fault + + /* Finally, position the target-stack beneath the squashed + "current_target". That way code looking for a non-inherited + target method can quickly and simply find it. */ + current_target.beneath = target_stack; +} + +/* Push a new target type into the stack of the existing target accessors, + possibly superseding some of the existing accessors. + + Result is zero if the pushed target ended up on top of the stack, + nonzero if at least one target is on top of it. + + Rather than allow an empty stack, we always have the dummy target at + the bottom stratum, so we can call the function vectors without + checking them. */ + +int +push_target (struct target_ops *t) +{ + struct target_ops **cur; + + /* Check magic number. If wrong, it probably means someone changed + the struct definition, but not all the places that initialize one. */ + if (t->to_magic != OPS_MAGIC) + { + fprintf_unfiltered (gdb_stderr, + "Magic number of %s target struct wrong\n", + t->to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + } + + /* Find the proper stratum to install this target in. */ + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum) + break; + } + + /* If there's already targets at this stratum, remove them. */ + /* FIXME: cagney/2003-10-15: I think this should be poping all + targets to CUR, and not just those at this stratum level. */ + while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) + { + /* There's already something at this stratum level. Close it, + and un-hook it from the stack. */ + struct target_ops *tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + target_close (tmp, 0); + } + + /* We have removed all targets in our stratum, now add the new one. */ + t->beneath = (*cur); + (*cur) = t; + + update_current_target (); + + if (targetdebug) + setup_target_debug (); + + /* Not on top? */ + return (t != target_stack); +} + +/* Remove a target_ops vector from the stack, wherever it may be. + Return how many times it was removed (0 or 1). */ + +int +unpush_target (struct target_ops *t) +{ + struct target_ops **cur; + struct target_ops *tmp; + + /* Look for the specified target. Note that we assume that a target + can only occur once in the target stack. */ + + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((*cur) == t) + break; + } + + if ((*cur) == NULL) + return 0; /* Didn't find target_ops, quit now */ + + /* NOTE: cagney/2003-12-06: In '94 the close call was made + unconditional by moving it to before the above check that the + target was in the target stack (something about "Change the way + pushing and popping of targets work to support target overlays + and inheritance"). This doesn't make much sense - only open + targets should be closed. */ + target_close (t, 0); + + /* Unchain the target */ + tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + + update_current_target (); + + return 1; +} + +void +pop_target (void) +{ + target_close (¤t_target, 0); /* Let it clean up */ + if (unpush_target (target_stack) == 1) + return; + + fprintf_unfiltered (gdb_stderr, + "pop_target couldn't find target %s\n", + current_target.to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); +} + +#undef MIN +#define MIN(A, B) (((A) <= (B)) ? (A) : (B)) + +/* target_read_string -- read a null terminated string, up to LEN bytes, + from MEMADDR in target. Set *ERRNOP to the errno code, or 0 if successful. + Set *STRING to a pointer to malloc'd memory containing the data; the caller + is responsible for freeing it. Return the number of bytes successfully + read. */ + +int +target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop) +{ + int tlen, origlen, offset, i; + char buf[4]; + int errcode = 0; + char *buffer; + int buffer_allocated; + char *bufptr; + unsigned int nbytes_read = 0; + + /* Small for testing. */ + buffer_allocated = 4; + buffer = xmalloc (buffer_allocated); + bufptr = buffer; + + origlen = len; + + while (len > 0) + { + tlen = MIN (len, 4 - (memaddr & 3)); + offset = memaddr & 3; + + errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0); + if (errcode != 0) + { + /* The transfer request might have crossed the boundary to an + unallocated region of memory. Retry the transfer, requesting + a single byte. */ + tlen = 1; + offset = 0; + errcode = target_xfer_memory (memaddr, buf, 1, 0); + if (errcode != 0) + goto done; + } + + if (bufptr - buffer + tlen > buffer_allocated) + { + unsigned int bytes; + bytes = bufptr - buffer; + buffer_allocated *= 2; + buffer = xrealloc (buffer, buffer_allocated); + bufptr = buffer + bytes; + } + + for (i = 0; i < tlen; i++) + { + *bufptr++ = buf[i + offset]; + if (buf[i + offset] == '\000') + { + nbytes_read += i + 1; + goto done; + } + } + + memaddr += tlen; + len -= tlen; + nbytes_read += tlen; + } +done: + if (errnop != NULL) + *errnop = errcode; + if (string != NULL) + *string = buffer; + return nbytes_read; +} + +/* Find a section containing ADDR. */ +struct section_table * +target_section_by_addr (struct target_ops *target, CORE_ADDR addr) +{ + struct section_table *secp; + for (secp = target->to_sections; + secp < target->to_sections_end; + secp++) + { + if (addr >= secp->addr && addr < secp->endaddr) + return secp; + } + return NULL; +} + +/* Read LEN bytes of target memory at address MEMADDR, placing the results in + GDB's memory at MYADDR. Returns either 0 for success or an errno value + if any error occurs. + + If an error occurs, no guarantee is made about the contents of the data at + MYADDR. In particular, the caller should not depend upon partial reads + filling the buffer with good data. There is no way for the caller to know + how much good data might have been transfered anyway. Callers that can + deal with partial reads should call target_read_memory_partial. */ + +int +target_read_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 0); +} + +int +target_write_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 1); +} + +static int trust_readonly = 0; + +/* Move memory to or from the targets. The top target gets priority; + if it cannot handle it, it is offered to the next one down, etc. + + Result is -1 on error, or the number of bytes transfered. */ + +int +do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib) +{ + int res; + int done = 0; + struct target_ops *t; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + return 0; + + /* to_xfer_memory is not guaranteed to set errno, even when it returns + 0. */ + errno = 0; + + if (!write && trust_readonly) + { + struct section_table *secp; + /* User-settable option, "trust-readonly-sections". If true, + then memory from any SEC_READONLY bfd section may be read + directly from the bfd file. */ + secp = target_section_by_addr (¤t_target, memaddr); + if (secp != NULL + && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) + & SEC_READONLY)) + return xfer_memory (memaddr, myaddr, len, 0, attrib, ¤t_target); + } + + /* The quick case is that the top target can handle the transfer. */ + res = current_target.to_xfer_memory + (memaddr, myaddr, len, write, attrib, ¤t_target); + + /* If res <= 0 then we call it again in the loop. Ah well. */ + if (res <= 0) + { + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t); + if (res > 0) + break; /* Handled all or part of xfer */ + if (t->to_has_all_memory) + break; + } + + if (res <= 0) + return -1; + } + + return res; +} + + +/* Perform a memory transfer. Iterate until the entire region has + been transfered. + + Result is 0 or errno value. */ + +static int +target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write) +{ + int res; + int reg_len; + struct mem_region *region; + +#ifdef CRASH_MERGE + int gdb_readmem_callback(ulong, void *, int, int); + if (gdb_readmem_callback(memaddr, myaddr, len, write)) + return 0; +#endif + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + return 0; + } + + while (len > 0) + { + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write) + return EIO; + break; + + case MEM_WO: + if (!write) + return EIO; + break; + } + + while (reg_len > 0) + { + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write, + ®ion->attrib); + + if (res <= 0) + { + /* If this address is for nonexistent memory, read zeros + if reading, or do nothing if writing. Return + error. */ + if (!write) + memset (myaddr, 0, len); + if (errno == 0) + return EIO; + else + return errno; + } + + memaddr += res; + myaddr += res; + len -= res; + reg_len -= res; + } + } + + return 0; /* We managed to cover it all somehow. */ +} + + +/* Perform a partial memory transfer. + + Result is -1 on error, or the number of bytes transfered. */ + +static int +target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len, + int write_p, int *err) +{ + int res; + int reg_len; + struct mem_region *region; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + *err = 0; + return 0; + } + + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + + case MEM_WO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + } + + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write_p); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write_p, + ®ion->attrib); + + if (res <= 0) + { + if (errno != 0) + *err = errno; + else + *err = EIO; + + return -1; + } + + *err = 0; + return res; +} + +int +target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 0, err); +} + +int +target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 1, err); +} + +/* More generic transfers. */ + +static LONGEST +default_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_MEMORY + && ops->to_xfer_memory != NULL) + /* If available, fall back to the target's "to_xfer_memory" + method. */ + { + int xfered = -1; + errno = 0; + if (writebuf != NULL) + { + void *buffer = xmalloc (len); + struct cleanup *cleanup = make_cleanup (xfree, buffer); + memcpy (buffer, writebuf, len); + xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL, + ops); + do_cleanups (cleanup); + } + if (readbuf != NULL) + xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL, + ops); + if (xfered > 0) + return xfered; + else if (xfered == 0 && errno == 0) + /* "to_xfer_memory" uses 0, cross checked against ERRNO as one + indication of an error. */ + return 0; + else + return -1; + } + else if (ops->beneath != NULL) + return ops->beneath->to_xfer_partial (ops->beneath, object, annex, + readbuf, writebuf, offset, len); + else + return -1; +} + +/* Target vector read/write partial wrapper functions. + + NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial + (inbuf, outbuf)", instead of separate read/write methods, make life + easier. */ + +LONGEST +target_read_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len); +} + +LONGEST +target_write_partial (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len); +} + +/* Wrappers to perform the full transfer. */ +LONGEST +target_read (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_read_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +LONGEST +target_write (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_write_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +/* Memory transfer methods. */ + +void +get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf, + LONGEST len) +{ + if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) + != len) + memory_error (EIO, addr); +} + +ULONGEST +get_target_memory_unsigned (struct target_ops *ops, + CORE_ADDR addr, int len) +{ + char buf[sizeof (ULONGEST)]; + + gdb_assert (len <= sizeof (buf)); + get_target_memory (ops, addr, buf, len); + return extract_unsigned_integer (buf, len); +} + +static void +target_info (char *args, int from_tty) +{ + struct target_ops *t; + int has_all_mem = 0; + + if (symfile_objfile != NULL) + printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name); + +#ifdef FILES_INFO_HOOK + if (FILES_INFO_HOOK ()) + return; +#endif + + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + if ((int) (t->to_stratum) <= (int) dummy_stratum) + continue; + if (has_all_mem) + printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n"); + printf_unfiltered ("%s:\n", t->to_longname); + (t->to_files_info) (t); + has_all_mem = t->to_has_all_memory; + } +} + +/* This is to be called by the open routine before it does + anything. */ + +void +target_preopen (int from_tty) +{ + dont_repeat (); + + if (target_has_execution) + { + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) + target_kill (); + else + error ("Program not killed."); + } + + /* Calling target_kill may remove the target from the stack. But if + it doesn't (which seems like a win for UDI), remove it now. */ + + if (target_has_execution) + pop_target (); +} + +/* Detach a target after doing deferred register stores. */ + +void +target_detach (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_detach) (args, from_tty); +} + +void +target_disconnect (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_disconnect) (args, from_tty); +} + +void +target_link (char *modname, CORE_ADDR *t_reloc) +{ + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) + { + (current_target.to_lookup_symbol) (modname, t_reloc); + if (*t_reloc == 0) + error ("Unable to link to %s and get relocation in rombug", modname); + } + else + *t_reloc = (CORE_ADDR) -1; +} + +int +target_async_mask (int mask) +{ + int saved_async_masked_status = target_async_mask_value; + target_async_mask_value = mask; + return saved_async_masked_status; +} + +/* Look through the list of possible targets for a target that can + execute a run or attach command without any other data. This is + used to locate the default process stratum. + + Result is always valid (error() is called for errors). */ + +static struct target_ops * +find_default_run_target (char *do_mesg) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + if (count != 1) + error ("Don't know how to %s. Try \"help target\".", do_mesg); + + return runable; +} + +void +find_default_attach (char *args, int from_tty) +{ + struct target_ops *t; + + t = find_default_run_target ("attach"); + (t->to_attach) (args, from_tty); + return; +} + +void +find_default_create_inferior (char *exec_file, char *allargs, char **env) +{ + struct target_ops *t; + + t = find_default_run_target ("run"); + (t->to_create_inferior) (exec_file, allargs, env); + return; +} + +static int +default_region_size_ok_for_hw_watchpoint (int byte_count) +{ + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); +} + +static int +return_zero (void) +{ + return 0; +} + +static int +return_one (void) +{ + return 1; +} + +static int +return_minus_one (void) +{ + return -1; +} + +/* + * Resize the to_sections pointer. Also make sure that anyone that + * was holding on to an old value of it gets updated. + * Returns the old size. + */ + +int +target_resize_to_sections (struct target_ops *target, int num_added) +{ + struct target_ops **t; + struct section_table *old_value; + int old_count; + + old_value = target->to_sections; + + if (target->to_sections) + { + old_count = target->to_sections_end - target->to_sections; + target->to_sections = (struct section_table *) + xrealloc ((char *) target->to_sections, + (sizeof (struct section_table)) * (num_added + old_count)); + } + else + { + old_count = 0; + target->to_sections = (struct section_table *) + xmalloc ((sizeof (struct section_table)) * num_added); + } + target->to_sections_end = target->to_sections + (num_added + old_count); + + /* Check to see if anyone else was pointing to this structure. + If old_value was null, then no one was. */ + + if (old_value) + { + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_sections == old_value) + { + (*t)->to_sections = target->to_sections; + (*t)->to_sections_end = target->to_sections_end; + } + } + } + + return old_count; + +} + +/* Remove all target sections taken from ABFD. + + Scan the current target stack for targets whose section tables + refer to sections from BFD, and remove those sections. We use this + when we notice that the inferior has unloaded a shared object, for + example. */ +void +remove_target_sections (bfd *abfd) +{ + struct target_ops **t; + + for (t = target_structs; t < target_structs + target_struct_size; t++) + { + struct section_table *src, *dest; + + dest = (*t)->to_sections; + for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++) + if (src->bfd != abfd) + { + /* Keep this section. */ + if (dest < src) *dest = *src; + dest++; + } + + /* If we've dropped any sections, resize the section table. */ + if (dest < src) + target_resize_to_sections (*t, dest - src); + } +} + + + + +/* Find a single runnable target in the stack and return it. If for + some reason there is more than one, return NULL. */ + +struct target_ops * +find_run_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* Find a single core_stratum target in the list of targets and return it. + If for some reason there is more than one, return NULL. */ + +struct target_ops * +find_core_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_stratum == core_stratum) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* + * Find the next target down the stack from the specified target. + */ + +struct target_ops * +find_target_beneath (struct target_ops *t) +{ + return t->beneath; +} + + +/* The inferior process has died. Long live the inferior! */ + +void +generic_mourn_inferior (void) +{ + extern int show_breakpoint_hit_counts; + + inferior_ptid = null_ptid; + attach_flag = 0; + breakpoint_init_inferior (inf_exited); + registers_changed (); + +#ifdef CLEAR_DEFERRED_STORES + /* Delete any pending stores to the inferior... */ + CLEAR_DEFERRED_STORES; +#endif + + reopen_exec_file (); + reinit_frame_cache (); + + /* It is confusing to the user for ignore counts to stick around + from previous runs of the inferior. So clear them. */ + /* However, it is more confusing for the ignore counts to disappear when + using hit counts. So don't clear them if we're counting hits. */ + if (!show_breakpoint_hit_counts) + breakpoint_clear_ignore_counts (); + + if (detach_hook) + detach_hook (); +} + +/* Helper function for child_wait and the Lynx derivatives of child_wait. + HOSTSTATUS is the waitstatus from wait() or the equivalent; store our + translation of that in OURSTATUS. */ +void +store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus) +{ +#ifdef CHILD_SPECIAL_WAITSTATUS + /* CHILD_SPECIAL_WAITSTATUS should return nonzero and set *OURSTATUS + if it wants to deal with hoststatus. */ + if (CHILD_SPECIAL_WAITSTATUS (ourstatus, hoststatus)) + return; +#endif + + if (WIFEXITED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_EXITED; + ourstatus->value.integer = WEXITSTATUS (hoststatus); + } + else if (!WIFSTOPPED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus)); + } + else + { + ourstatus->kind = TARGET_WAITKIND_STOPPED; + ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus)); + } +} + +/* Returns zero to leave the inferior alone, one to interrupt it. */ +int (*target_activity_function) (void); +int target_activity_fd; + +/* Convert a normal process ID to a string. Returns the string in a static + buffer. */ + +char * +normal_pid_to_str (ptid_t ptid) +{ + static char buf[30]; + + sprintf (buf, "process %d", PIDGET (ptid)); + return buf; +} + +/* Error-catcher for target_find_memory_regions */ +static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) +{ + error ("No target."); + return 0; +} + +/* Error-catcher for target_make_corefile_notes */ +static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) +{ + error ("No target."); + return NULL; +} + +/* Set up the handful of non-empty slots needed by the dummy target + vector. */ + +static void +init_dummy_target (void) +{ + dummy_target.to_shortname = "None"; + dummy_target.to_longname = "None"; + dummy_target.to_doc = ""; + dummy_target.to_attach = find_default_attach; + dummy_target.to_create_inferior = find_default_create_inferior; + dummy_target.to_pid_to_str = normal_pid_to_str; + dummy_target.to_stratum = dummy_stratum; + dummy_target.to_find_memory_regions = dummy_find_memory_regions; + dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; + dummy_target.to_magic = OPS_MAGIC; +} + + +static struct target_ops debug_target; + +static void +debug_to_open (char *args, int from_tty) +{ + debug_target.to_open (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty); +} + +static void +debug_to_close (int quitting) +{ + target_close (&debug_target, quitting); + fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting); +} + +void +target_close (struct target_ops *targ, int quitting) +{ + if (targ->to_xclose != NULL) + targ->to_xclose (targ, quitting); + else if (targ->to_close != NULL) + targ->to_close (quitting); +} + +static void +debug_to_attach (char *args, int from_tty) +{ + debug_target.to_attach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty); +} + + +static void +debug_to_post_attach (int pid) +{ + debug_target.to_post_attach (pid); + + fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid); +} + +static void +debug_to_detach (char *args, int from_tty) +{ + debug_target.to_detach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty); +} + +static void +debug_to_disconnect (char *args, int from_tty) +{ + debug_target.to_disconnect (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); +} + +static void +debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal) +{ + debug_target.to_resume (ptid, step, siggnal); + + fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid), + step ? "step" : "continue", + target_signal_to_name (siggnal)); +} + +static ptid_t +debug_to_wait (ptid_t ptid, struct target_waitstatus *status) +{ + ptid_t retval; + + retval = debug_target.to_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, + "target_wait (%d, status) = %d, ", PIDGET (ptid), + PIDGET (retval)); + fprintf_unfiltered (gdb_stdlog, "status->kind = "); + switch (status->kind) + { + case TARGET_WAITKIND_EXITED: + fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n", + status->value.integer); + break; + case TARGET_WAITKIND_STOPPED: + fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_SIGNALLED: + fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_LOADED: + fprintf_unfiltered (gdb_stdlog, "loaded\n"); + break; + case TARGET_WAITKIND_FORKED: + fprintf_unfiltered (gdb_stdlog, "forked\n"); + break; + case TARGET_WAITKIND_VFORKED: + fprintf_unfiltered (gdb_stdlog, "vforked\n"); + break; + case TARGET_WAITKIND_EXECD: + fprintf_unfiltered (gdb_stdlog, "execd\n"); + break; + case TARGET_WAITKIND_SPURIOUS: + fprintf_unfiltered (gdb_stdlog, "spurious\n"); + break; + default: + fprintf_unfiltered (gdb_stdlog, "unknown???\n"); + break; + } + + return retval; +} + +static void +debug_to_post_wait (ptid_t ptid, int status) +{ + debug_target.to_post_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n", + PIDGET (ptid), status); +} + +static void +debug_print_register (const char * func, int regno) +{ + fprintf_unfiltered (gdb_stdlog, "%s ", func); + if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS + && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0') + fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno)); + else + fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + if (regno >= 0) + { + int i; + unsigned char buf[MAX_REGISTER_SIZE]; + deprecated_read_register_gen (regno, buf); + fprintf_unfiltered (gdb_stdlog, " = "); + for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++) + { + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + } + if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST)) + { + fprintf_unfiltered (gdb_stdlog, " 0x%s %s", + paddr_nz (read_register (regno)), + paddr_d (read_register (regno))); + } + } + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_fetch_registers (int regno) +{ + debug_target.to_fetch_registers (regno); + debug_print_register ("target_fetch_registers", regno); +} + +static void +debug_to_store_registers (int regno) +{ + debug_target.to_store_registers (regno); + debug_print_register ("target_store_registers", regno); + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_prepare_to_store (void) +{ + debug_target.to_prepare_to_store (); + + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); +} + +static int +debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib, + struct target_ops *target) +{ + int retval; + + retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, + attrib, target); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d", + (unsigned int) memaddr, /* possable truncate long long */ + len, write ? "write" : "read", retval); + + + + if (retval > 0) + { + int i; + + fputs_unfiltered (", bytes =", gdb_stdlog); + for (i = 0; i < retval; i++) + { + if ((((long) &(myaddr[i])) & 0xf) == 0) + fprintf_unfiltered (gdb_stdlog, "\n"); + fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + } + } + + fputc_unfiltered ('\n', gdb_stdlog); + + return retval; +} + +static void +debug_to_files_info (struct target_ops *target) +{ + debug_target.to_files_info (target); + + fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n"); +} + +static int +debug_to_insert_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty) +{ + int retval; + + retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty); + + fprintf_unfiltered (gdb_stdlog, + "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n", + (unsigned long) type, + (unsigned long) cnt, + (unsigned long) from_tty, + (unsigned long) retval); + return retval; +} + +static int +debug_to_region_size_ok_for_hw_watchpoint (int byte_count) +{ + CORE_ADDR retval; + + retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count); + + fprintf_unfiltered (gdb_stdlog, + "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n", + (unsigned long) byte_count, + (unsigned long) retval); + return retval; +} + +static int +debug_to_stopped_by_watchpoint (void) +{ + int retval; + + retval = debug_target.to_stopped_by_watchpoint (); + + fprintf_unfiltered (gdb_stdlog, + "STOPPED_BY_WATCHPOINT () = %ld\n", + (unsigned long) retval); + return retval; +} + +static CORE_ADDR +debug_to_stopped_data_address (void) +{ + CORE_ADDR retval; + + retval = debug_target.to_stopped_data_address (); + + fprintf_unfiltered (gdb_stdlog, + "target_stopped_data_address () = 0x%lx\n", + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static void +debug_to_terminal_init (void) +{ + debug_target.to_terminal_init (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n"); +} + +static void +debug_to_terminal_inferior (void) +{ + debug_target.to_terminal_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); +} + +static void +debug_to_terminal_ours_for_output (void) +{ + debug_target.to_terminal_ours_for_output (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); +} + +static void +debug_to_terminal_ours (void) +{ + debug_target.to_terminal_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n"); +} + +static void +debug_to_terminal_save_ours (void) +{ + debug_target.to_terminal_save_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n"); +} + +static void +debug_to_terminal_info (char *arg, int from_tty) +{ + debug_target.to_terminal_info (arg, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg, + from_tty); +} + +static void +debug_to_kill (void) +{ + debug_target.to_kill (); + + fprintf_unfiltered (gdb_stdlog, "target_kill ()\n"); +} + +static void +debug_to_load (char *args, int from_tty) +{ + debug_target.to_load (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty); +} + +static int +debug_to_lookup_symbol (char *name, CORE_ADDR *addrp) +{ + int retval; + + retval = debug_target.to_lookup_symbol (name, addrp); + + fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name); + + return retval; +} + +static void +debug_to_create_inferior (char *exec_file, char *args, char **env) +{ + debug_target.to_create_inferior (exec_file, args, env); + + fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n", + exec_file, args); +} + +static void +debug_to_post_startup_inferior (ptid_t ptid) +{ + debug_target.to_post_startup_inferior (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n", + PIDGET (ptid)); +} + +static void +debug_to_acknowledge_created_inferior (int pid) +{ + debug_target.to_acknowledge_created_inferior (pid); + + fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n", + pid); +} + +static int +debug_to_insert_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_insert_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_follow_fork (int follow_child) +{ + int retval = debug_target.to_follow_fork (follow_child); + + fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n", + follow_child, retval); + + return retval; +} + +static int +debug_to_insert_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_reported_exec_events_per_exec_call (void) +{ + int reported_exec_events; + + reported_exec_events = debug_target.to_reported_exec_events_per_exec_call (); + + fprintf_unfiltered (gdb_stdlog, + "target_reported_exec_events_per_exec_call () = %d\n", + reported_exec_events); + + return reported_exec_events; +} + +static int +debug_to_has_exited (int pid, int wait_status, int *exit_status) +{ + int has_exited; + + has_exited = debug_target.to_has_exited (pid, wait_status, exit_status); + + fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n", + pid, wait_status, *exit_status, has_exited); + + return has_exited; +} + +static void +debug_to_mourn_inferior (void) +{ + debug_target.to_mourn_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n"); +} + +static int +debug_to_can_run (void) +{ + int retval; + + retval = debug_target.to_can_run (); + + fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval); + + return retval; +} + +static void +debug_to_notice_signals (ptid_t ptid) +{ + debug_target.to_notice_signals (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", + PIDGET (ptid)); +} + +static int +debug_to_thread_alive (ptid_t ptid) +{ + int retval; + + retval = debug_target.to_thread_alive (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + PIDGET (ptid), retval); + + return retval; +} + +static void +debug_to_find_new_threads (void) +{ + debug_target.to_find_new_threads (); + + fputs_unfiltered ("target_find_new_threads ()\n", gdb_stdlog); +} + +static void +debug_to_stop (void) +{ + debug_target.to_stop (); + + fprintf_unfiltered (gdb_stdlog, "target_stop ()\n"); +} + +static LONGEST +debug_to_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + LONGEST retval; + + retval = debug_target.to_xfer_partial (&debug_target, object, annex, + readbuf, writebuf, offset, len); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n", + (int) object, (annex ? annex : "(null)"), + (long) readbuf, (long) writebuf, paddr_nz (offset), + paddr_d (len), paddr_d (retval)); + + return retval; +} + +static void +debug_to_rcmd (char *command, + struct ui_file *outbuf) +{ + debug_target.to_rcmd (command, outbuf); + fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); +} + +static struct symtab_and_line * +debug_to_enable_exception_callback (enum exception_event_kind kind, int enable) +{ + struct symtab_and_line *result; + result = debug_target.to_enable_exception_callback (kind, enable); + fprintf_unfiltered (gdb_stdlog, + "target get_exception_callback_sal (%d, %d)\n", + kind, enable); + return result; +} + +static struct exception_event_record * +debug_to_get_current_exception_event (void) +{ + struct exception_event_record *result; + result = debug_target.to_get_current_exception_event (); + fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n"); + return result; +} + +static char * +debug_to_pid_to_exec_file (int pid) +{ + char *exec_file; + + exec_file = debug_target.to_pid_to_exec_file (pid); + + fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n", + pid, exec_file); + + return exec_file; +} + +static void +setup_target_debug (void) +{ + memcpy (&debug_target, ¤t_target, sizeof debug_target); + + current_target.to_open = debug_to_open; + current_target.to_close = debug_to_close; + current_target.to_attach = debug_to_attach; + current_target.to_post_attach = debug_to_post_attach; + current_target.to_detach = debug_to_detach; + current_target.to_disconnect = debug_to_disconnect; + current_target.to_resume = debug_to_resume; + current_target.to_wait = debug_to_wait; + current_target.to_post_wait = debug_to_post_wait; + current_target.to_fetch_registers = debug_to_fetch_registers; + current_target.to_store_registers = debug_to_store_registers; + current_target.to_prepare_to_store = debug_to_prepare_to_store; + current_target.to_xfer_memory = debug_to_xfer_memory; + current_target.to_files_info = debug_to_files_info; + current_target.to_insert_breakpoint = debug_to_insert_breakpoint; + current_target.to_remove_breakpoint = debug_to_remove_breakpoint; + current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint; + current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint; + current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint; + current_target.to_insert_watchpoint = debug_to_insert_watchpoint; + current_target.to_remove_watchpoint = debug_to_remove_watchpoint; + current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint; + current_target.to_stopped_data_address = debug_to_stopped_data_address; + current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint; + current_target.to_terminal_init = debug_to_terminal_init; + current_target.to_terminal_inferior = debug_to_terminal_inferior; + current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output; + current_target.to_terminal_ours = debug_to_terminal_ours; + current_target.to_terminal_save_ours = debug_to_terminal_save_ours; + current_target.to_terminal_info = debug_to_terminal_info; + current_target.to_kill = debug_to_kill; + current_target.to_load = debug_to_load; + current_target.to_lookup_symbol = debug_to_lookup_symbol; + current_target.to_create_inferior = debug_to_create_inferior; + current_target.to_post_startup_inferior = debug_to_post_startup_inferior; + current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior; + current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint; + current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint; + current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint; + current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint; + current_target.to_follow_fork = debug_to_follow_fork; + current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint; + current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint; + current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call; + current_target.to_has_exited = debug_to_has_exited; + current_target.to_mourn_inferior = debug_to_mourn_inferior; + current_target.to_can_run = debug_to_can_run; + current_target.to_notice_signals = debug_to_notice_signals; + current_target.to_thread_alive = debug_to_thread_alive; + current_target.to_find_new_threads = debug_to_find_new_threads; + current_target.to_stop = debug_to_stop; + current_target.to_xfer_partial = debug_to_xfer_partial; + current_target.to_rcmd = debug_to_rcmd; + current_target.to_enable_exception_callback = debug_to_enable_exception_callback; + current_target.to_get_current_exception_event = debug_to_get_current_exception_event; + current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file; + +} + + +static char targ_desc[] = +"Names of targets and files being debugged.\n\ +Shows the entire stack of targets currently in use (including the exec-file,\n\ +core-file, and process, if any), as well as the symbol file name."; + +static void +do_monitor_command (char *cmd, + int from_tty) +{ + if ((current_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain) + || (current_target.to_rcmd == debug_to_rcmd + && (debug_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain))) + { + error ("\"monitor\" command not supported by this target.\n"); + } + target_rcmd (cmd, gdb_stdtarg); +} + +void +initialize_targets (void) +{ + init_dummy_target (); + push_target (&dummy_target); + + add_info ("target", target_info, targ_desc); + add_info ("files", target_info, targ_desc); + + add_show_from_set + (add_set_cmd ("target", class_maintenance, var_zinteger, + (char *) &targetdebug, + "Set target debugging.\n\ +When non-zero, target debugging is enabled.", &setdebuglist), + &showdebuglist); + + add_setshow_boolean_cmd ("trust-readonly-sections", class_support, + &trust_readonly, "\ +Set mode for reading from readonly sections.\n\ +When this mode is on, memory reads from readonly sections (such as .text)\n\ +will be read from the object file instead of from the target. This will\n\ +result in significant performance improvement for remote targets.", "\ +Show mode for reading from readonly sections.\n", + NULL, NULL, + &setlist, &showlist); + + add_com ("monitor", class_obscure, do_monitor_command, + "Send a command to the remote monitor (remote targets only)."); + + target_dcache = dcache_init (); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/ui-file.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/ui-file.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/ui-file.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/ui-file.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,630 @@ +/* UI_FILE - a generic STDIO like output stream. + + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Implement the ``struct ui_file'' object. */ + +#include "defs.h" +#include "ui-file.h" +#include "gdb_string.h" + +#include + +static ui_file_isatty_ftype null_file_isatty; +static ui_file_write_ftype null_file_write; +static ui_file_fputs_ftype null_file_fputs; +static ui_file_read_ftype null_file_read; +static ui_file_flush_ftype null_file_flush; +static ui_file_delete_ftype null_file_delete; +static ui_file_rewind_ftype null_file_rewind; +static ui_file_put_ftype null_file_put; + +struct ui_file + { + int *magic; + ui_file_flush_ftype *to_flush; + ui_file_write_ftype *to_write; + ui_file_fputs_ftype *to_fputs; + ui_file_read_ftype *to_read; + ui_file_delete_ftype *to_delete; + ui_file_isatty_ftype *to_isatty; + ui_file_rewind_ftype *to_rewind; + ui_file_put_ftype *to_put; + void *to_data; + }; +int ui_file_magic; + +struct ui_file * +ui_file_new (void) +{ + struct ui_file *file = xmalloc (sizeof (struct ui_file)); + file->magic = &ui_file_magic; + set_ui_file_data (file, NULL, null_file_delete); + set_ui_file_flush (file, null_file_flush); + set_ui_file_write (file, null_file_write); + set_ui_file_fputs (file, null_file_fputs); + set_ui_file_read (file, null_file_read); + set_ui_file_isatty (file, null_file_isatty); + set_ui_file_rewind (file, null_file_rewind); + set_ui_file_put (file, null_file_put); + return file; +} + +void +ui_file_delete (struct ui_file *file) +{ + file->to_delete (file); + xfree (file); +} + +static int +null_file_isatty (struct ui_file *file) +{ + return 0; +} + +static void +null_file_rewind (struct ui_file *file) +{ + return; +} + +static void +null_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + return; +} + +static void +null_file_flush (struct ui_file *file) +{ + return; +} + +static void +null_file_write (struct ui_file *file, + const char *buf, + long sizeof_buf) +{ + if (file->to_fputs == null_file_fputs) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The fputs method isn't null, slowly pass the write request + onto that. FYI, this isn't as bad as it may look - the + current (as of 1999-11-07) printf_* function calls fputc and + fputc does exactly the below. By having a write function it + is possible to clean up that code. */ + int i; + char b[2]; + b[1] = '\0'; + for (i = 0; i < sizeof_buf; i++) + { + b[0] = buf[i]; + file->to_fputs (b, file); + } + return; + } +} + +static long +null_file_read (struct ui_file *file, + char *buf, + long sizeof_buf) +{ + errno = EBADF; + return 0; +} + +static void +null_file_fputs (const char *buf, struct ui_file *file) +{ + if (file->to_write == null_file_write) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The write method was implemented, use that. */ + file->to_write (file, buf, strlen (buf)); + } +} + +static void +null_file_delete (struct ui_file *file) +{ + return; +} + +void * +ui_file_data (struct ui_file *file) +{ + if (file->magic != &ui_file_magic) + internal_error (__FILE__, __LINE__, + "ui_file_data: bad magic number"); + return file->to_data; +} + +void +gdb_flush (struct ui_file *file) +{ + file->to_flush (file); +} + +int +ui_file_isatty (struct ui_file *file) +{ + return file->to_isatty (file); +} + +void +ui_file_rewind (struct ui_file *file) +{ + file->to_rewind (file); +} + +void +ui_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + file->to_put (file, write, dest); +} + +void +ui_file_write (struct ui_file *file, + const char *buf, + long length_buf) +{ + file->to_write (file, buf, length_buf); +} + +long +ui_file_read (struct ui_file *file, char *buf, long length_buf) +{ + return file->to_read (file, buf, length_buf); +} + +void +fputs_unfiltered (const char *buf, struct ui_file *file) +{ + file->to_fputs (buf, file); +} + +void +set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush) +{ + file->to_flush = flush; +} + +void +set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty) +{ + file->to_isatty = isatty; +} + +void +set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind) +{ + file->to_rewind = rewind; +} + +void +set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put) +{ + file->to_put = put; +} + +void +set_ui_file_write (struct ui_file *file, + ui_file_write_ftype *write) +{ + file->to_write = write; +} + +void +set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read) +{ + file->to_read = read; +} + +void +set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs) +{ + file->to_fputs = fputs; +} + +void +set_ui_file_data (struct ui_file *file, void *data, + ui_file_delete_ftype *delete) +{ + file->to_data = data; + file->to_delete = delete; +} + +/* ui_file utility function for converting a ``struct ui_file'' into + a memory buffer''. */ + +struct accumulated_ui_file +{ + char *buffer; + long length; +}; + +static void +do_ui_file_xstrdup (void *context, const char *buffer, long length) +{ + struct accumulated_ui_file *acc = context; + if (acc->buffer == NULL) + acc->buffer = xmalloc (length + 1); + else + acc->buffer = xrealloc (acc->buffer, acc->length + length + 1); + memcpy (acc->buffer + acc->length, buffer, length); + acc->length += length; + acc->buffer[acc->length] = '\0'; +} + +char * +ui_file_xstrdup (struct ui_file *file, + long *length) +{ + struct accumulated_ui_file acc; + acc.buffer = NULL; + acc.length = 0; + ui_file_put (file, do_ui_file_xstrdup, &acc); + if (acc.buffer == NULL) + acc.buffer = xstrdup (""); + *length = acc.length; + return acc.buffer; +} + +/* A pure memory based ``struct ui_file'' that can be used an output + buffer. The buffers accumulated contents are available via + ui_file_put(). */ + +struct mem_file + { + int *magic; + char *buffer; + int sizeof_buffer; + int length_buffer; + }; + +static ui_file_rewind_ftype mem_file_rewind; +static ui_file_put_ftype mem_file_put; +static ui_file_write_ftype mem_file_write; +static ui_file_delete_ftype mem_file_delete; +static struct ui_file *mem_file_new (void); +static int mem_file_magic; + +static struct ui_file * +mem_file_new (void) +{ + struct mem_file *stream = XMALLOC (struct mem_file); + struct ui_file *file = ui_file_new (); + set_ui_file_data (file, stream, mem_file_delete); + set_ui_file_rewind (file, mem_file_rewind); + set_ui_file_put (file, mem_file_put); + set_ui_file_write (file, mem_file_write); + stream->magic = &mem_file_magic; + stream->buffer = NULL; + stream->sizeof_buffer = 0; + stream->length_buffer = 0; + return file; +} + +static void +mem_file_delete (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_delete: bad magic number"); + if (stream->buffer != NULL) + xfree (stream->buffer); + xfree (stream); +} + +struct ui_file * +mem_fileopen (void) +{ + return mem_file_new (); +} + +static void +mem_file_rewind (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_rewind: bad magic number"); + stream->length_buffer = 0; +} + +static void +mem_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_put: bad magic number"); + if (stream->length_buffer > 0) + write (dest, stream->buffer, stream->length_buffer); +} + +void +mem_file_write (struct ui_file *file, + const char *buffer, + long length_buffer) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_write: bad magic number"); + if (stream->buffer == NULL) + { + stream->length_buffer = length_buffer; + stream->sizeof_buffer = length_buffer; + stream->buffer = xmalloc (stream->sizeof_buffer); + memcpy (stream->buffer, buffer, length_buffer); + } + else + { + int new_length = stream->length_buffer + length_buffer; + if (new_length >= stream->sizeof_buffer) + { + stream->sizeof_buffer = new_length; + stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer); + } + memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer); + stream->length_buffer = new_length; + } +} + +/* ``struct ui_file'' implementation that maps directly onto + 's FILE. */ + +static ui_file_write_ftype stdio_file_write; +static ui_file_fputs_ftype stdio_file_fputs; +static ui_file_read_ftype stdio_file_read; +static ui_file_isatty_ftype stdio_file_isatty; +static ui_file_delete_ftype stdio_file_delete; +static struct ui_file *stdio_file_new (FILE * file, int close_p); +static ui_file_flush_ftype stdio_file_flush; + +static int stdio_file_magic; + +struct stdio_file + { + int *magic; + FILE *file; + int close_p; + }; + +static struct ui_file * +stdio_file_new (FILE *file, int close_p) +{ + struct ui_file *ui_file = ui_file_new (); + struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file)); + stdio->magic = &stdio_file_magic; + stdio->file = file; + stdio->close_p = close_p; + set_ui_file_data (ui_file, stdio, stdio_file_delete); + set_ui_file_flush (ui_file, stdio_file_flush); + set_ui_file_write (ui_file, stdio_file_write); + set_ui_file_fputs (ui_file, stdio_file_fputs); + set_ui_file_read (ui_file, stdio_file_read); + set_ui_file_isatty (ui_file, stdio_file_isatty); + return ui_file; +} + +static void +stdio_file_delete (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_delete: bad magic number"); + if (stdio->close_p) + { + fclose (stdio->file); + } + xfree (stdio); +} + +static void +stdio_file_flush (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_flush: bad magic number"); + fflush (stdio->file); +} + +static long +stdio_file_read (struct ui_file *file, char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_read: bad magic number"); + return read (fileno (stdio->file), buf, length_buf); +} + +static void +stdio_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_write: bad magic number"); + fwrite (buf, length_buf, 1, stdio->file); +} + +static void +stdio_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_fputs: bad magic number"); + fputs (linebuffer, stdio->file); +} + +static int +stdio_file_isatty (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_isatty: bad magic number"); + return (isatty (fileno (stdio->file))); +} + +/* Like fdopen(). Create a ui_file from a previously opened FILE. */ + +struct ui_file * +stdio_fileopen (FILE *file) +{ + return stdio_file_new (file, 0); +} + +struct ui_file * +gdb_fopen (char *name, char *mode) +{ + FILE *f = fopen (name, mode); + if (f == NULL) + return NULL; + return stdio_file_new (f, 1); +} + +#ifdef CRASH_MERGE +void +replace_ui_file_FILE(struct ui_file *file, FILE *fp) +{ + struct stdio_file *stdio_file; + + stdio_file = (struct stdio_file *)ui_file_data(file); + stdio_file->file = fp; +} +#endif + +/* ``struct ui_file'' implementation that maps onto two ui-file objects. */ + +static ui_file_write_ftype tee_file_write; +static ui_file_fputs_ftype tee_file_fputs; +static ui_file_isatty_ftype tee_file_isatty; +static ui_file_delete_ftype tee_file_delete; +static ui_file_flush_ftype tee_file_flush; + +static int tee_file_magic; + +struct tee_file + { + int *magic; + struct ui_file *one, *two; + int close_one, close_two; + }; + +struct ui_file * +tee_file_new (struct ui_file *one, int close_one, + struct ui_file *two, int close_two) +{ + struct ui_file *ui_file = ui_file_new (); + struct tee_file *tee = xmalloc (sizeof (struct tee_file)); + tee->magic = &tee_file_magic; + tee->one = one; + tee->two = two; + tee->close_one = close_one; + tee->close_two = close_two; + set_ui_file_data (ui_file, tee, tee_file_delete); + set_ui_file_flush (ui_file, tee_file_flush); + set_ui_file_write (ui_file, tee_file_write); + set_ui_file_fputs (ui_file, tee_file_fputs); + set_ui_file_isatty (ui_file, tee_file_isatty); + return ui_file; +} + +static void +tee_file_delete (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_delete: bad magic number"); + if (tee->close_one) + ui_file_delete (tee->one); + if (tee->close_two) + ui_file_delete (tee->two); + + xfree (tee); +} + +static void +tee_file_flush (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_flush: bad magic number"); + tee->one->to_flush (tee->one); + tee->two->to_flush (tee->two); +} + +static void +tee_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_write: bad magic number"); + ui_file_write (tee->one, buf, length_buf); + ui_file_write (tee->two, buf, length_buf); +} + +static void +tee_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_fputs: bad magic number"); + tee->one->to_fputs (linebuffer, tee->one); + tee->two->to_fputs (linebuffer, tee->two); +} + +static int +tee_file_isatty (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_isatty: bad magic number"); + return (0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/utils.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/utils.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb/utils.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb/utils.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3068 @@ +/* General utility routines for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" + +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + +#ifdef __GO32__ +#include +#endif + +/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ +#ifdef reg +#undef reg +#endif + +#include +#include "gdbcmd.h" +#include "serial.h" +#include "bfd.h" +#include "target.h" +#include "demangle.h" +#include "expression.h" +#include "language.h" +#include "charset.h" +#include "annotate.h" +#include "filenames.h" + +#include "inferior.h" /* for signed_pointer_to_address */ + +#include /* For MAXPATHLEN */ + +#ifdef HAVE_CURSES_H +#include +#endif +#ifdef HAVE_TERM_H +#include +#endif + +#include "readline/readline.h" + +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif +/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) +extern char *canonicalize_file_name (const char *); +#endif + +/* readline defines this. */ +#undef savestring + +void (*error_begin_hook) (void); + +/* Holds the last error message issued by gdb */ + +static struct ui_file *gdb_lasterr; + +/* Prototypes for local functions */ + +static void vfprintf_maybe_filtered (struct ui_file *, const char *, + va_list, int); + +static void fputs_maybe_filtered (const char *, struct ui_file *, int); + +static void do_my_cleanups (struct cleanup **, struct cleanup *); + +static void prompt_for_continue (void); + +static void set_screen_size (void); +static void set_width (void); + +/* Chain of cleanup actions established with make_cleanup, + to be executed if an error happens. */ + +static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ +static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ +static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ +static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; + +/* Pointer to what is left to do for an execution command after the + target stops. Used only in asynchronous mode, by targets that + support async execution. The finish and until commands use it. So + does the target extended-remote command. */ +struct continuation *cmd_continuation; +struct continuation *intermediate_continuation; + +/* Nonzero if we have job control. */ + +int job_control; + +/* Nonzero means a quit has been requested. */ + +int quit_flag; + +/* Nonzero means quit immediately if Control-C is typed now, rather + than waiting until QUIT is executed. Be careful in setting this; + code which executes with immediate_quit set has to be very careful + about being able to deal with being interrupted at any time. It is + almost always better to use QUIT; the only exception I can think of + is being able to quit out of a system call (using EINTR loses if + the SIGINT happens between the previous QUIT and the system call). + To immediately quit in the case in which a SIGINT happens between + the previous QUIT and setting immediate_quit (desirable anytime we + expect to block), call QUIT after setting immediate_quit. */ + +int immediate_quit; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form rather than raw. */ + +int demangle = 1; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form even in assembler language displays. If this is set, but + DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */ + +int asm_demangle = 0; + +/* Nonzero means that strings with character values >0x7F should be printed + as octal escapes. Zero means just print the value (e.g. it's an + international character, and the terminal or window can cope.) */ + +int sevenbit_strings = 0; + +/* String to be printed before error messages, if any. */ + +char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + +char *warning_pre_print = "\nwarning: "; + +int pagination_enabled = 1; + + +/* Add a new cleanup to the cleanup_chain, + and return the previous chain pointer + to be passed later to do_cleanups or discard_cleanups. + Args are FUNCTION to clean up with, and ARG to pass to it. */ + +struct cleanup * +make_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&cleanup_chain, function, arg); +} + +struct cleanup * +make_final_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&final_cleanup_chain, function, arg); +} + +struct cleanup * +make_run_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&run_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_error_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + +static void +do_freeargv (void *arg) +{ + freeargv ((char **) arg); +} + +struct cleanup * +make_cleanup_freeargv (char **arg) +{ + return make_my_cleanup (&cleanup_chain, do_freeargv, arg); +} + +static void +do_bfd_close_cleanup (void *arg) +{ + bfd_close (arg); +} + +struct cleanup * +make_cleanup_bfd_close (bfd *abfd) +{ + return make_cleanup (do_bfd_close_cleanup, abfd); +} + +static void +do_close_cleanup (void *arg) +{ + int *fd = arg; + close (*fd); + xfree (fd); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + int *saved_fd = xmalloc (sizeof (fd)); + *saved_fd = fd; + return make_cleanup (do_close_cleanup, saved_fd); +} + +static void +do_ui_file_delete (void *arg) +{ + ui_file_delete (arg); +} + +struct cleanup * +make_cleanup_ui_file_delete (struct ui_file *arg) +{ + return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg); +} + +struct cleanup * +make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function, + void *arg) +{ + struct cleanup *new + = (struct cleanup *) xmalloc (sizeof (struct cleanup)); + struct cleanup *old_chain = *pmy_chain; + + new->next = *pmy_chain; + new->function = function; + new->arg = arg; + *pmy_chain = new; + + return old_chain; +} + +/* Discard cleanups and do the actions they describe + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +do_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&cleanup_chain, old_chain); +} + +void +do_final_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +do_run_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&run_cleanup_chain, old_chain); +} + +void +do_exec_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_cleanup_chain, old_chain); +} + +void +do_exec_error_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +static void +do_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; /* Do this first incase recursion */ + (*ptr->function) (ptr->arg); + xfree (ptr); + } +} + +/* Discard cleanups, not doing the actions they describe, + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +discard_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&cleanup_chain, old_chain); +} + +void +discard_final_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +discard_exec_error_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +void +discard_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; + xfree (ptr); + } +} + +/* Set the cleanup_chain to 0, and return the old cleanup chain. */ +struct cleanup * +save_cleanups (void) +{ + return save_my_cleanups (&cleanup_chain); +} + +struct cleanup * +save_final_cleanups (void) +{ + return save_my_cleanups (&final_cleanup_chain); +} + +struct cleanup * +save_my_cleanups (struct cleanup **pmy_chain) +{ + struct cleanup *old_chain = *pmy_chain; + + *pmy_chain = 0; + return old_chain; +} + +/* Restore the cleanup chain from a previously saved chain. */ +void +restore_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&cleanup_chain, chain); +} + +void +restore_final_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&final_cleanup_chain, chain); +} + +void +restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) +{ + *pmy_chain = chain; +} + +/* This function is useful for cleanups. + Do + + foo = xmalloc (...); + old_chain = make_cleanup (free_current_contents, &foo); + + to arrange to free the object thus allocated. */ + +void +free_current_contents (void *ptr) +{ + void **location = ptr; + if (location == NULL) + internal_error (__FILE__, __LINE__, + "free_current_contents: NULL pointer"); + if (*location != NULL) + { + xfree (*location); + *location = NULL; + } +} + +/* Provide a known function that does nothing, to use as a base for + for a possibly long chain of cleanups. This is useful where we + use the cleanup chain for handling normal cleanups as well as dealing + with cleanups that need to be done as a result of a call to error(). + In such cases, we may not be certain where the first cleanup is, unless + we have a do-nothing one to always use as the base. */ + +void +null_cleanup (void *arg) +{ +} + +/* Add a continuation to the continuation list, the global list + cmd_continuation. The new continuation will be added at the front.*/ +void +add_continuation (void (*continuation_hook) (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = cmd_continuation; + cmd_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = cmd_continuation; + cmd_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_continuations (void) +{ + struct continuation *continuation_ptr; + + while (cmd_continuation) + { + continuation_ptr = cmd_continuation; + cmd_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + +/* Add a continuation to the continuation list, the global list + intermediate_continuation. The new continuation will be added at the front.*/ +void +add_intermediate_continuation (void (*continuation_hook) + (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = intermediate_continuation; + intermediate_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = intermediate_continuation; + intermediate_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + + while (intermediate_continuation) + { + continuation_ptr = intermediate_continuation; + intermediate_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + + + +/* Print a warning message. The first argument STRING is the warning + message, used as an fprintf format string, the second is the + va_list of arguments for that string. A warning is unfiltered (not + paginated) so that the user does not need to page through each + screen full of warnings when there are lots of them. */ + +void +vwarning (const char *string, va_list args) +{ + if (warning_hook) + (*warning_hook) (string, args); + else + { + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + va_end (args); + } +} + +/* Print a warning message. + The first argument STRING is the warning message, used as a fprintf string, + and the remaining args are passed as arguments to it. + The primary difference between warnings and errors is that a warning + does not force the return to command level. */ + +void +warning (const char *string, ...) +{ + va_list args; + va_start (args, string); + vwarning (string, args); + va_end (args); +} + +/* Print an error message and return to command level. + The first argument STRING is the error message, used as a fprintf string, + and the remaining args are passed as arguments to it. */ + +NORETURN void +verror (const char *string, va_list args) +{ + struct ui_file *tmp_stream = mem_fileopen (); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + error_stream (tmp_stream); +} + +NORETURN void +error (const char *string, ...) +{ + va_list args; + va_start (args, string); + verror (string, args); + va_end (args); +} + +static void +do_write (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +/* Cause a silent error to occur. Any error message is recorded + though it is not issued. */ +NORETURN void +error_silent (const char *string, ...) +{ + va_list args; + struct ui_file *tmp_stream = mem_fileopen (); + va_start (args, string); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (tmp_stream, do_write, gdb_lasterr); + va_end (args); + + throw_exception (RETURN_ERROR); +} + +/* Output an error message including any pre-print text to gdb_stderr. */ +void +error_output_message (char *pre_print, char *msg) +{ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (pre_print) + fputs_filtered (pre_print, gdb_stderr); + fputs_filtered (msg, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +} + +NORETURN void +error_stream (struct ui_file *stream) +{ + if (error_begin_hook) + error_begin_hook (); + + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (stream, do_write, gdb_lasterr); + + /* Write the message plus any error_pre_print to gdb_stderr. */ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (error_pre_print) + fputs_filtered (error_pre_print, gdb_stderr); + ui_file_put (stream, do_write, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +#ifdef CRASH_MERGE + if (error_hook) + (*error_hook)(); + else { + int console(char *, ...); + console("verror() called without error_hook\n"); + } +#endif + throw_exception (RETURN_ERROR); +} + +/* Get the last error message issued by gdb */ + +char * +error_last_message (void) +{ + long len; + return ui_file_xstrdup (gdb_lasterr, &len); +} + +/* This is to be called by main() at the very beginning */ + +void +error_init (void) +{ + gdb_lasterr = mem_fileopen (); +} + +/* Print a message reporting an internal error/warning. Ask the user + if they want to continue, dump core, or just exit. Return + something to indicate a quit. */ + +struct internal_problem +{ + const char *name; + /* FIXME: cagney/2002-08-15: There should be ``maint set/show'' + commands available for controlling these variables. */ + enum auto_boolean should_quit; + enum auto_boolean should_dump_core; +}; + +/* Report a problem, internal to GDB, to the user. Once the problem + has been reported, and assuming GDB didn't quit, the caller can + either allow execution to resume or throw an error. */ + +static void +internal_vproblem (struct internal_problem *problem, + const char *file, int line, const char *fmt, va_list ap) +{ + static int dejavu; + int quit_p; + int dump_core_p; + char *reason; + + /* Don't allow infinite error/warning recursion. */ + { + static char msg[] = "Recursive internal problem.\n"; + switch (dejavu) + { + case 0: + dejavu = 1; + break; + case 1: + dejavu = 2; + fputs_unfiltered (msg, gdb_stderr); + abort (); /* NOTE: GDB has only three calls to abort(). */ + default: + dejavu = 3; + write (STDERR_FILENO, msg, sizeof (msg)); + exit (1); + } + } + + /* Try to get the message out and at the start of a new line. */ + target_terminal_ours (); + begin_line (); + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason + (error/warning) and question become separated. Format using a + style similar to a compiler error message. Include extra detail + so that the user knows that they are living on the edge. */ + { + char *msg; + xvasprintf (&msg, fmt, ap); + xasprintf (&reason, "\ +%s:%d: %s: %s\n\ +A problem internal to GDB has been detected,\n\ +further debugging may prove unreliable.", file, line, problem->name, msg); + xfree (msg); + make_cleanup (xfree, reason); + } + + switch (problem->should_quit) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to quit GDB. When in batch mode + this lessens the likelhood of GDB going into an infinate + loop. */ + quit_p = query ("%s\nQuit this debugging session? ", reason); + break; + case AUTO_BOOLEAN_TRUE: + quit_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + quit_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + switch (problem->should_dump_core) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to dump core. This leaves a GDB + `dropping' so that it is easier to see that something went + wrong in GDB. */ + dump_core_p = query ("%s\nCreate a core file of GDB? ", reason); + break; + break; + case AUTO_BOOLEAN_TRUE: + dump_core_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + dump_core_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + if (quit_p) + { + if (dump_core_p) + abort (); /* NOTE: GDB has only three calls to abort(). */ + else + exit (1); + } + else + { + if (dump_core_p) + { + if (fork () == 0) + abort (); /* NOTE: GDB has only three calls to abort(). */ + } + } + + dejavu = 0; +} + +static struct internal_problem internal_error_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +NORETURN void +internal_verror (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_error_problem, file, line, fmt, ap); + throw_exception (RETURN_ERROR); +} + +NORETURN void +internal_error (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_verror (file, line, string, ap); + va_end (ap); +} + +static struct internal_problem internal_warning_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +void +internal_vwarning (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_warning_problem, file, line, fmt, ap); +} + +void +internal_warning (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_vwarning (file, line, string, ap); + va_end (ap); +} + +/* The strerror() function can return NULL for errno values that are + out of range. Provide a "safe" version that always returns a + printable string. */ + +char * +safe_strerror (int errnum) +{ + char *msg; + static char buf[32]; + + msg = strerror (errnum); + if (msg == NULL) + { + sprintf (buf, "(undocumented errno %d)", errnum); + msg = buf; + } + return (msg); +} + +/* Print the system error message for errno, and also mention STRING + as the file name for which the error was encountered. + Then return to command level. */ + +NORETURN void +perror_with_name (const char *string) +{ + char *err; + char *combined; + + err = safe_strerror (errno); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* I understand setting these is a matter of taste. Still, some people + may clear errno but not know about bfd_error. Doing this here is not + unreasonable. */ + bfd_set_error (bfd_error_no_error); + errno = 0; + + error ("%s.", combined); +} + +/* Print the system error message for ERRCODE, and also mention STRING + as the file name for which the error was encountered. */ + +void +print_sys_errmsg (const char *string, int errcode) +{ + char *err; + char *combined; + + err = safe_strerror (errcode); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* We want anything which was printed on stdout to come out first, before + this message. */ + gdb_flush (gdb_stdout); + fprintf_unfiltered (gdb_stderr, "%s.\n", combined); +} + +/* Control C eventually causes this to be called, at a convenient time. */ + +void +quit (void) +{ + struct serial *gdb_stdout_serial = serial_fdopen (1); + + target_terminal_ours (); + + /* We want all output to appear now, before we print "Quit". We + have 3 levels of buffering we have to flush (it's possible that + some of these should be changed to flush the lower-level ones + too): */ + + /* 1. The _filtered buffer. */ + wrap_here ((char *) 0); + + /* 2. The stdio buffer. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + + /* 3. The system-level buffer. */ + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + + annotate_error_begin (); + + /* Don't use *_filtered; we don't want to prompt the user to continue. */ + if (quit_pre_print) + fputs_unfiltered (quit_pre_print, gdb_stderr); + +#ifdef __MSDOS__ + /* No steenking SIGINT will ever be coming our way when the + program is resumed. Don't lie. */ + fprintf_unfiltered (gdb_stderr, "Quit\n"); +#else + if (job_control + /* If there is no terminal switching for this target, then we can't + possibly get screwed by the lack of job control. */ + || current_target.to_terminal_ours == NULL) + fprintf_unfiltered (gdb_stderr, "Quit\n"); + else + fprintf_unfiltered (gdb_stderr, + "Quit (expect signal SIGINT when the program is resumed)\n"); +#endif + throw_exception (RETURN_QUIT); +} + +/* Control C comes here */ +void +request_quit (int signo) +{ + quit_flag = 1; + /* Restore the signal handler. Harmless with BSD-style signals, needed + for System V-style signals. So just always do it, rather than worrying + about USG defines and stuff like that. */ + signal (signo, request_quit); + + if (immediate_quit) + quit (); +} + +/* Memory management stuff (malloc friends). */ + +static void * +mmalloc (void *md, size_t size) +{ + return malloc (size); /* NOTE: GDB's only call to malloc() */ +} + +static void * +mrealloc (void *md, void *ptr, size_t size) +{ + if (ptr == 0) /* Guard against old realloc's */ + return mmalloc (md, size); + else + return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */ +} + +static void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); /* NOTE: GDB's only call to calloc() */ +} + +static void +mfree (void *md, void *ptr) +{ + free (ptr); /* NOTE: GDB's only call to free() */ +} + +/* This used to do something interesting with USE_MMALLOC. + * It can be retired any time. -- chastain 2004-01-19. */ +void +init_malloc (void *md) +{ +} + +/* Called when a memory allocation fails, with the number of bytes of + memory requested in SIZE. */ + +NORETURN void +nomem (long size) +{ + if (size > 0) + { + internal_error (__FILE__, __LINE__, + "virtual memory exhausted: can't allocate %ld bytes.", + size); + } + else + { + internal_error (__FILE__, __LINE__, "virtual memory exhausted."); + } +} + +/* The xmmalloc() family of memory management routines. + + These are are like the mmalloc() family except that they implement + consistent semantics and guard against typical memory management + problems: if a malloc fails, an internal error is thrown; if + free(NULL) is called, it is ignored; if *alloc(0) is called, NULL + is returned. + + All these routines are implemented using the mmalloc() family. */ + +void * +xmmalloc (void *md, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmrealloc (void *md, void *ptr, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + if (ptr != NULL) + val = mrealloc (md, ptr, size); + else + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmcalloc (void *md, size_t number, size_t size) +{ + void *mem; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (number == 0 || size == 0) + { + number = 1; + size = 1; + } + + mem = mcalloc (md, number, size); + if (mem == NULL) + nomem (number * size); + + return mem; +} + +void +xmfree (void *md, void *ptr) +{ + if (ptr != NULL) + mfree (md, ptr); +} + +/* The xmalloc() (libiberty.h) family of memory management routines. + + These are like the ISO-C malloc() family except that they implement + consistent semantics and guard against typical memory management + problems. See xmmalloc() above for further information. + + All these routines are wrappers to the xmmalloc() family. */ + +/* NOTE: These are declared using PTR to ensure consistency with + "libiberty.h". xfree() is GDB local. */ + +PTR /* OK: PTR */ +xmalloc (size_t size) +{ + return xmmalloc (NULL, size); +} + +PTR /* OK: PTR */ +xrealloc (PTR ptr, size_t size) /* OK: PTR */ +{ + return xmrealloc (NULL, ptr, size); +} + +PTR /* OK: PTR */ +xcalloc (size_t number, size_t size) +{ + return xmcalloc (NULL, number, size); +} + +void +xfree (void *ptr) +{ + xmfree (NULL, ptr); +} + + +/* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + +void +xasprintf (char **ret, const char *format, ...) +{ + va_list args; + va_start (args, format); + xvasprintf (ret, format, args); + va_end (args); +} + +void +xvasprintf (char **ret, const char *format, va_list ap) +{ + int status = vasprintf (ret, format, ap); + /* NULL could be returned due to a memory allocation problem; a + badly format string; or something else. */ + if ((*ret) == NULL) + internal_error (__FILE__, __LINE__, + "vasprintf returned NULL buffer (errno %d)", errno); + /* A negative status with a non-NULL buffer shouldn't never + happen. But to be sure. */ + if (status < 0) + internal_error (__FILE__, __LINE__, + "vasprintf call failed (errno %d)", errno); +} + + +/* My replacement for the read system call. + Used like `read' but keeps going if `read' returns too soon. */ + +int +myread (int desc, char *addr, int len) +{ + int val; + int orglen = len; + + while (len > 0) + { + val = read (desc, addr, len); + if (val < 0) + return val; + if (val == 0) + return orglen - len; + len -= val; + addr += val; + } + return orglen; +} + +/* Make a copy of the string at PTR with SIZE characters + (and add a null character at the end in the copy). + Uses malloc to get the space. Returns the address of the copy. */ + +char * +savestring (const char *ptr, size_t size) +{ + char *p = (char *) xmalloc (size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +msavestring (void *md, const char *ptr, size_t size) +{ + char *p = (char *) xmmalloc (md, size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +mstrsave (void *md, const char *ptr) +{ + return (msavestring (md, ptr, strlen (ptr))); +} + +void +print_spaces (int n, struct ui_file *file) +{ + fputs_unfiltered (n_spaces (n), file); +} + +/* Print a host address. */ + +void +gdb_print_host_address (const void *addr, struct ui_file *stream) +{ + + /* We could use the %p conversion specifier to fprintf if we had any + way of knowing whether this host supports it. But the following + should work on the Alpha and on 32 bit machines. */ + + fprintf_filtered (stream, "0x%lx", (unsigned long) addr); +} + +/* Ask user a y-or-n question and return 1 iff answer is yes. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +/* VARARGS */ +int +query (const char *ctlstr, ...) +{ + va_list args; + int answer; + int ans2; + int retval; + + va_start (args, ctlstr); + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer "yes" if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return 1; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-query\n"); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(y or n) "); + + if (annotation_level > 1) + printf_filtered ("\n\032\032query\n"); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = 1; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + if (answer == 'Y') + { + retval = 1; + break; + } + if (answer == 'N') + { + retval = 0; + break; + } + printf_filtered ("Please answer y or n.\n"); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-query\n"); + return retval; +} + + +/* This function supports the nquery() and yquery() functions. + Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or default the answer to the specified default. + DEFCHAR is either 'y' or 'n' and refers to the default answer. + CTLSTR is the control string and should end in "? ". It should + not say how to answer, because we do that. + ARGS are the arguments passed along with the CTLSTR argument to + printf. */ + +static int +defaulted_query (const char *ctlstr, const char defchar, va_list args) +{ + int answer; + int ans2; + int retval; + int def_value; + char def_answer, not_def_answer; + char *y_string, *n_string; + + /* Set up according to which answer is the default. */ + if (defchar == 'y') + { + def_value = 1; + def_answer = 'Y'; + not_def_answer = 'N'; + y_string = "[y]"; + n_string = "n"; + } + else + { + def_value = 0; + def_answer = 'N'; + not_def_answer = 'Y'; + y_string = "y"; + n_string = "[n]"; + } + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer default value if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return def_value; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-%cquery\n", defchar); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(%s or %s) ", y_string, n_string); + + if (annotation_level > 1) + printf_filtered ("\n\032\032%cquery\n", defchar); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = def_value; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + /* Check answer. For the non-default, the user must specify + the non-default explicitly. */ + if (answer == not_def_answer) + { + retval = !def_value; + break; + } + /* Otherwise, for the default, the user may either specify + the required input or have it default by entering nothing. */ + if (answer == def_answer || answer == '\n' || + answer == '\r' || answer == EOF) + { + retval = def_value; + break; + } + /* Invalid entries are not defaulted and require another selection. */ + printf_filtered ("Please answer %s or %s.\n", + y_string, n_string); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-%cquery\n", defchar); + return retval; +} + + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 0 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +nquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'n', args); + va_end (args); +} + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 1 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +yquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'y', args); + va_end (args); +} + +/* Print an error message saying that we couldn't make sense of a + \^mumble sequence in a string or character constant. START and END + indicate a substring of some larger string that contains the + erroneous backslash sequence, missing the initial backslash. */ +static NORETURN int +no_control_char_error (const char *start, const char *end) +{ + int len = end - start; + char *copy = alloca (end - start + 1); + + memcpy (copy, start, len); + copy[len] = '\0'; + + error ("There is no control character `\\%s' in the `%s' character set.", + copy, target_charset ()); +} + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + should point to the character after the \. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +int +parse_escape (char **string_ptr) +{ + int target_char; + int c = *(*string_ptr)++; + if (c_parse_backslash (c, &target_char)) + return target_char; + else + switch (c) + { + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + case '^': + { + /* Remember where this escape sequence started, for reporting + errors. */ + char *sequence_start_pos = *string_ptr - 1; + + c = *(*string_ptr)++; + + if (c == '?') + { + /* XXXCHARSET: What is `delete' in the host character set? */ + c = 0177; + + if (!host_char_to_target (c, &target_char)) + error ("There is no character corresponding to `Delete' " + "in the target character set `%s'.", host_charset ()); + + return target_char; + } + else if (c == '\\') + target_char = parse_escape (string_ptr); + else + { + if (!host_char_to_target (c, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + } + + /* Now target_char is something like `c', and we want to find + its control-character equivalent. */ + if (!target_char_to_control_char (target_char, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + + return target_char; + } + + /* XXXCHARSET: we need to use isdigit and value-of-digit + methods of the host character set here. */ + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int i = c - '0'; + int count = 0; + while (++count < 3) + { + c = (**string_ptr); + if (c >= '0' && c <= '7') + { + (*string_ptr)++; + i *= 8; + i += c - '0'; + } + else + { + break; + } + } + return i; + } + default: + if (!host_char_to_target (c, &target_char)) + error + ("The escape sequence `\%c' is equivalent to plain `%c', which" + " has no equivalent\n" "in the `%s' character set.", c, c, + target_charset ()); + return target_char; + } +} + +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that this routine should only + be call for printing things which are independent of the language + of the program being debugged. */ + +static void +printchar (int c, void (*do_fputs) (const char *, struct ui_file *), + void (*do_fprintf) (struct ui_file *, const char *, ...), + struct ui_file *stream, int quoter) +{ + + c &= 0xFF; /* Avoid sign bit follies */ + + if (c < 0x20 || /* Low control chars */ + (c >= 0x7F && c < 0xA0) || /* DEL, High controls */ + (sevenbit_strings && c >= 0x80)) + { /* high order bit set */ + switch (c) + { + case '\n': + do_fputs ("\\n", stream); + break; + case '\b': + do_fputs ("\\b", stream); + break; + case '\t': + do_fputs ("\\t", stream); + break; + case '\f': + do_fputs ("\\f", stream); + break; + case '\r': + do_fputs ("\\r", stream); + break; + case '\033': + do_fputs ("\\e", stream); + break; + case '\007': + do_fputs ("\\a", stream); + break; + default: + do_fprintf (stream, "\\%.3o", (unsigned int) c); + break; + } + } + else + { + if (c == '\\' || c == quoter) + do_fputs ("\\", stream); + do_fprintf (stream, "%c", c); + } +} + +/* Print the character C on STREAM as part of the contents of a + literal string whose delimiter is QUOTER. Note that these routines + should only be call for printing things which are independent of + the language of the program being debugged. */ + +void +fputstr_filtered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter); +} + +void +fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + +void +fputstrn_unfiltered (const char *str, int n, int quoter, + struct ui_file *stream) +{ + int i; + for (i = 0; i < n; i++) + printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + + +/* Number of lines per page or UINT_MAX if paging is disabled. */ +static unsigned int lines_per_page; + +/* Number of chars per line or UINT_MAX if line folding is disabled. */ +static unsigned int chars_per_line; + +/* Current count of lines printed on this page, chars on this line. */ +static unsigned int lines_printed, chars_printed; + +/* Buffer and start column of buffered text, for doing smarter word- + wrapping. When someone calls wrap_here(), we start buffering output + that comes through fputs_filtered(). If we see a newline, we just + spit it out and forget about the wrap_here(). If we see another + wrap_here(), we spit it out and remember the newer one. If we see + the end of the line, we spit out a newline, the indent, and then + the buffered output. */ + +/* Malloc'd buffer with chars_per_line+2 bytes. Contains characters which + are waiting to be output (they have already been counted in chars_printed). + When wrap_buffer[0] is null, the buffer is empty. */ +static char *wrap_buffer; + +/* Pointer in wrap_buffer to the next character to fill. */ +static char *wrap_pointer; + +/* String to indent by if the wrap occurs. Must not be NULL if wrap_column + is non-zero. */ +static char *wrap_indent; + +/* Column number on the screen where wrap_buffer begins, or 0 if wrapping + is not in effect. */ +static int wrap_column; + + +/* Inialize the number of lines per page and chars per line. */ + +void +init_page_info (void) +{ +#if defined(TUI) + if (!tui_get_command_dimension (&chars_per_line, &lines_per_page)) +#endif + { + int rows, cols; + +#if defined(__GO32__) + rows = ScreenRows (); + cols = ScreenCols (); + lines_per_page = rows; + chars_per_line = cols; +#else + /* Make sure Readline has initialized its terminal settings. */ + rl_reset_terminal (NULL); + + /* Get the screen size from Readline. */ + rl_get_screen_size (&rows, &cols); + lines_per_page = rows; + chars_per_line = cols; + + /* Readline should have fetched the termcap entry for us. */ + if (tgetnum ("li") < 0 || getenv ("EMACS")) + { + /* The number of lines per page is not mentioned in the + terminal description. This probably means that paging is + not useful (e.g. emacs shell window), so disable paging. */ + lines_per_page = UINT_MAX; + } + + /* FIXME: Get rid of this junk. */ +#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) + SIGWINCH_HANDLER (SIGWINCH); +#endif + + /* If the output is not a terminal, don't paginate it. */ + if (!ui_file_isatty (gdb_stdout)) + lines_per_page = UINT_MAX; +#endif + } + + set_screen_size (); + set_width (); +} + +/* Set the screen size based on LINES_PER_PAGE and CHARS_PER_LINE. */ + +static void +set_screen_size (void) +{ + int rows = lines_per_page; + int cols = chars_per_line; + + if (rows <= 0) + rows = INT_MAX; + + if (cols <= 0) + rl_get_screen_size (NULL, &cols); + + /* Update Readline's idea of the terminal size. */ + rl_set_screen_size (rows, cols); +} + +/* Reinitialize WRAP_BUFFER according to the current value of + CHARS_PER_LINE. */ + +static void +set_width (void) +{ + if (chars_per_line == 0) + init_page_info (); + + if (!wrap_buffer) + { + wrap_buffer = (char *) xmalloc (chars_per_line + 2); + wrap_buffer[0] = '\0'; + } + else + wrap_buffer = (char *) xrealloc (wrap_buffer, chars_per_line + 2); + wrap_pointer = wrap_buffer; /* Start it at the beginning. */ +} + +static void +set_width_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); + set_width (); +} + +static void +set_height_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); +} + +/* Wait, so the user can read what's on the screen. Prompt the user + to continue by pressing RETURN. */ + +static void +prompt_for_continue (void) +{ + char *ignore; + char cont_prompt[120]; + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032pre-prompt-for-continue\n"); + + strcpy (cont_prompt, + "---Type to continue, or q to quit---"); + if (annotation_level > 1) + strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); + + /* We must do this *before* we call gdb_readline, else it will eventually + call us -- thinking that we're trying to print beyond the end of the + screen. */ + reinitialize_more_filter (); + + immediate_quit++; + /* On a real operating system, the user can quit with SIGINT. + But not on GO32. + + 'q' is provided on all systems so users don't have to change habits + from system to system, and because telling them what to do in + the prompt is more user-friendly than expecting them to think of + SIGINT. */ + /* Call readline, not gdb_readline, because GO32 readline handles control-C + whereas control-C to gdb_readline will cause the user to get dumped + out to DOS. */ + ignore = gdb_readline_wrapper (cont_prompt); + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032post-prompt-for-continue\n"); + + if (ignore) + { + char *p = ignore; + while (*p == ' ' || *p == '\t') + ++p; + if (p[0] == 'q') + { + if (!event_loop_p) + request_quit (SIGINT); + else + async_request_quit (0); + } + xfree (ignore); + } + immediate_quit--; + + /* Now we have to do this again, so that GDB will know that it doesn't + need to save the ---Type --- line at the top of the screen. */ + reinitialize_more_filter (); + + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ +} + +/* Reinitialize filter; ie. tell it to reset to original values. */ + +void +reinitialize_more_filter (void) +{ + lines_printed = 0; + chars_printed = 0; +} + +/* Indicate that if the next sequence of characters overflows the line, + a newline should be inserted here rather than when it hits the end. + If INDENT is non-null, it is a string to be printed to indent the + wrapped part on the next line. INDENT must remain accessible until + the next call to wrap_here() or until a newline is printed through + fputs_filtered(). + + If the line is already overfull, we immediately print a newline and + the indentation, and disable further wrapping. + + If we don't know the width of lines, but we know the page height, + we must not wrap words, but should still keep track of newlines + that were explicitly printed. + + INDENT should not contain tabs, as that will mess up the char count + on the next line. FIXME. + + This routine is guaranteed to force out any output which has been + squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be + used to force out output from the wrap_buffer. */ + +void +wrap_here (char *indent) +{ + /* This should have been allocated, but be paranoid anyway. */ + if (!wrap_buffer) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + if (wrap_buffer[0]) + { + *wrap_pointer = '\0'; + fputs_unfiltered (wrap_buffer, gdb_stdout); + } + wrap_pointer = wrap_buffer; + wrap_buffer[0] = '\0'; + if (chars_per_line == UINT_MAX) /* No line overflow checking */ + { + wrap_column = 0; + } + else if (chars_printed >= chars_per_line) + { + puts_filtered ("\n"); + if (indent != NULL) + puts_filtered (indent); + wrap_column = 0; + } + else + { + wrap_column = chars_printed; + if (indent == NULL) + wrap_indent = ""; + else + wrap_indent = indent; + } +} + +/* Print input string to gdb_stdout, filtered, with wrap, + arranging strings in columns of n chars. String can be + right or left justified in the column. Never prints + trailing spaces. String should never be longer than + width. FIXME: this could be useful for the EXAMINE + command, which currently doesn't tabulate very well */ + +void +puts_filtered_tabular (char *string, int width, int right) +{ + int spaces = 0; + int stringlen; + char *spacebuf; + + gdb_assert (chars_per_line > 0); + if (chars_per_line == UINT_MAX) + { + fputs_filtered (string, gdb_stdout); + fputs_filtered ("\n", gdb_stdout); + return; + } + + if (((chars_printed - 1) / width + 2) * width >= chars_per_line) + fputs_filtered ("\n", gdb_stdout); + + if (width >= chars_per_line) + width = chars_per_line - 1; + + stringlen = strlen (string); + + if (chars_printed > 0) + spaces = width - (chars_printed - 1) % width - 1; + if (right) + spaces += width - stringlen; + + spacebuf = alloca (spaces + 1); + spacebuf[spaces] = '\0'; + while (spaces--) + spacebuf[spaces] = ' '; + + fputs_filtered (spacebuf, gdb_stdout); + fputs_filtered (string, gdb_stdout); +} + + +/* Ensure that whatever gets printed next, using the filtered output + commands, starts at the beginning of the line. I.E. if there is + any pending output for the current line, flush it and start a new + line. Otherwise do nothing. */ + +void +begin_line (void) +{ + if (chars_printed > 0) + { + puts_filtered ("\n"); + } +} + + +/* Like fputs but if FILTER is true, pause after every screenful. + + Regardless of FILTER can wrap at points other than the final + character of a line. + + Unlike fputs, fputs_maybe_filtered does not return a value. + It is OK for LINEBUFFER to be NULL, in which case just don't print + anything. + + Note that a longjmp to top level may occur in this routine (only if + FILTER is true) (since prompt_for_continue may do so) so this + routine should not be called when cleanups are not in place. */ + +static void +fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + int filter) +{ + const char *lineptr; + + if (linebuffer == 0) + return; + + /* Don't do any filtering if it is disabled. */ + if ((stream != gdb_stdout) || !pagination_enabled + || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) + { + fputs_unfiltered (linebuffer, stream); + return; + } + + /* Go through and output each character. Show line extension + when this is necessary; prompt user for new page when this is + necessary. */ + + lineptr = linebuffer; + while (*lineptr) + { + /* Possible new page. */ + if (filter && (lines_printed >= lines_per_page - 1)) + prompt_for_continue (); + + while (*lineptr && *lineptr != '\n') + { + /* Print a single line. */ + if (*lineptr == '\t') + { + if (wrap_column) + *wrap_pointer++ = '\t'; + else + fputc_unfiltered ('\t', stream); + /* Shifting right by 3 produces the number of tab stops + we have already passed, and then adding one and + shifting left 3 advances to the next tab stop. */ + chars_printed = ((chars_printed >> 3) + 1) << 3; + lineptr++; + } + else + { + if (wrap_column) + *wrap_pointer++ = *lineptr; + else + fputc_unfiltered (*lineptr, stream); + chars_printed++; + lineptr++; + } + + if (chars_printed >= chars_per_line) + { + unsigned int save_chars = chars_printed; + + chars_printed = 0; + lines_printed++; + /* If we aren't actually wrapping, don't output newline -- + if chars_per_line is right, we probably just overflowed + anyway; if it's wrong, let us keep going. */ + if (wrap_column) + fputc_unfiltered ('\n', stream); + + /* Possible new page. */ + if (lines_printed >= lines_per_page - 1) + prompt_for_continue (); + + /* Now output indentation and wrapped string */ + if (wrap_column) + { + fputs_unfiltered (wrap_indent, stream); + *wrap_pointer = '\0'; /* Null-terminate saved stuff */ + fputs_unfiltered (wrap_buffer, stream); /* and eject it */ + /* FIXME, this strlen is what prevents wrap_indent from + containing tabs. However, if we recurse to print it + and count its chars, we risk trouble if wrap_indent is + longer than (the user settable) chars_per_line. + Note also that this can set chars_printed > chars_per_line + if we are printing a long string. */ + chars_printed = strlen (wrap_indent) + + (save_chars - wrap_column); + wrap_pointer = wrap_buffer; /* Reset buffer */ + wrap_buffer[0] = '\0'; + wrap_column = 0; /* And disable fancy wrap */ + } + } + } + + if (*lineptr == '\n') + { + chars_printed = 0; + wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */ + lines_printed++; + fputc_unfiltered ('\n', stream); + lineptr++; + } + } +} + +void +fputs_filtered (const char *linebuffer, struct ui_file *stream) +{ + fputs_maybe_filtered (linebuffer, stream, 1); +} + +int +putchar_unfiltered (int c) +{ + char buf = c; + ui_file_write (gdb_stdout, &buf, 1); + return c; +} + +/* Write character C to gdb_stdout using GDB's paging mechanism and return C. + May return nonlocally. */ + +int +putchar_filtered (int c) +{ + return fputc_filtered (c, gdb_stdout); +} + +int +fputc_unfiltered (int c, struct ui_file *stream) +{ + char buf = c; + ui_file_write (stream, &buf, 1); + return c; +} + +int +fputc_filtered (int c, struct ui_file *stream) +{ + char buf[2]; + + buf[0] = c; + buf[1] = 0; + fputs_filtered (buf, stream); + return c; +} + +/* puts_debug is like fputs_unfiltered, except it prints special + characters in printable fashion. */ + +void +puts_debug (char *prefix, char *string, char *suffix) +{ + int ch; + + /* Print prefix and suffix after each line. */ + static int new_line = 1; + static int return_p = 0; + static char *prev_prefix = ""; + static char *prev_suffix = ""; + + if (*string == '\n') + return_p = 0; + + /* If the prefix is changing, print the previous suffix, a new line, + and the new prefix. */ + if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line) + { + fputs_unfiltered (prev_suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + fputs_unfiltered (prefix, gdb_stdlog); + } + + /* Print prefix if we printed a newline during the previous call. */ + if (new_line) + { + new_line = 0; + fputs_unfiltered (prefix, gdb_stdlog); + } + + prev_prefix = prefix; + prev_suffix = suffix; + + /* Output characters in a printable format. */ + while ((ch = *string++) != '\0') + { + switch (ch) + { + default: + if (isprint (ch)) + fputc_unfiltered (ch, gdb_stdlog); + + else + fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff); + break; + + case '\\': + fputs_unfiltered ("\\\\", gdb_stdlog); + break; + case '\b': + fputs_unfiltered ("\\b", gdb_stdlog); + break; + case '\f': + fputs_unfiltered ("\\f", gdb_stdlog); + break; + case '\n': + new_line = 1; + fputs_unfiltered ("\\n", gdb_stdlog); + break; + case '\r': + fputs_unfiltered ("\\r", gdb_stdlog); + break; + case '\t': + fputs_unfiltered ("\\t", gdb_stdlog); + break; + case '\v': + fputs_unfiltered ("\\v", gdb_stdlog); + break; + } + + return_p = ch == '\r'; + } + + /* Print suffix if we printed a newline. */ + if (new_line) + { + fputs_unfiltered (suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + } +} + + +/* Print a variable number of ARGS using format FORMAT. If this + information is going to put the amount written (since the last call + to REINITIALIZE_MORE_FILTER or the last page break) over the page size, + call prompt_for_continue to get the users permision to continue. + + Unlike fprintf, this function does not return a value. + + We implement three variants, vfprintf (takes a vararg list and stream), + fprintf (takes a stream to write on), and printf (the usual). + + Note also that a longjmp to top level may occur in this routine + (since prompt_for_continue may do so) so this routine should not be + called when cleanups are not in place. */ + +static void +vfprintf_maybe_filtered (struct ui_file *stream, const char *format, + va_list args, int filter) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_maybe_filtered (linebuffer, stream, filter); + do_cleanups (old_cleanups); +} + + +void +vfprintf_filtered (struct ui_file *stream, const char *format, va_list args) +{ + vfprintf_maybe_filtered (stream, format, args, 1); +} + +void +vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_unfiltered (linebuffer, stream); + do_cleanups (old_cleanups); +} + +void +vprintf_filtered (const char *format, va_list args) +{ + vfprintf_maybe_filtered (gdb_stdout, format, args, 1); +} + +void +vprintf_unfiltered (const char *format, va_list args) +{ + vfprintf_unfiltered (gdb_stdout, format, args); +} + +void +fprintf_filtered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (stream, format, args); + va_end (args); +} + +void +fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (stream, format, args); + va_end (args); +} + +/* Like fprintf_filtered, but prints its result indented. + Called as fprintfi_filtered (spaces, stream, format, ...); */ + +void +fprintfi_filtered (int spaces, struct ui_file *stream, const char *format, + ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, stream); + + vfprintf_filtered (stream, format, args); + va_end (args); +} + + +void +printf_filtered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + + +void +printf_unfiltered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (gdb_stdout, format, args); + va_end (args); +} + +/* Like printf_filtered, but prints it's result indented. + Called as printfi_filtered (spaces, format, ...); */ + +void +printfi_filtered (int spaces, const char *format, ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, gdb_stdout); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + +/* Easy -- but watch out! + + This routine is *not* a replacement for puts()! puts() appends a newline. + This one doesn't, and had better not! */ + +void +puts_filtered (const char *string) +{ + fputs_filtered (string, gdb_stdout); +} + +void +puts_unfiltered (const char *string) +{ + fputs_unfiltered (string, gdb_stdout); +} + +/* Return a pointer to N spaces and a null. The pointer is good + until the next call to here. */ +char * +n_spaces (int n) +{ + char *t; + static char *spaces = 0; + static int max_spaces = -1; + + if (n > max_spaces) + { + if (spaces) + xfree (spaces); + spaces = (char *) xmalloc (n + 1); + for (t = spaces + n; t != spaces;) + *--t = ' '; + spaces[n] = '\0'; + max_spaces = n; + } + + return spaces + max_spaces - n; +} + +/* Print N spaces. */ +void +print_spaces_filtered (int n, struct ui_file *stream) +{ + fputs_filtered (n_spaces (n), stream); +} + +/* C++/ObjC demangler stuff. */ + +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + +void +fprintf_symbol_filtered (struct ui_file *stream, char *name, + enum language lang, int arg_mode) +{ + char *demangled; + + if (name != NULL) + { + /* If user wants to see raw output, no problem. */ + if (!demangle) + { + fputs_filtered (name, stream); + } + else + { + demangled = language_demangle (language_def (lang), name, arg_mode); + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + xfree (demangled); + } + } + } +} + +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any + differences in whitespace. Returns 0 if they match, non-zero if they + don't (slightly different than strcmp()'s range of return values). + + As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO". + This "feature" is useful when searching for matching C++ function names + (such as if the user types 'break FOO', where FOO is a mangled C++ + function). */ + +int +strcmp_iw (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0'); +} + +/* This is like strcmp except that it ignores whitespace and treats + '(' as the first non-NULL character in terms of ordering. Like + strcmp (and unlike strcmp_iw), it returns negative if STRING1 < + STRING2, 0 if STRING2 = STRING2, and positive if STRING1 > STRING2 + according to that ordering. + + If a list is sorted according to this function and if you want to + find names in the list that match some fixed NAME according to + strcmp_iw(LIST_ELT, NAME), then the place to start looking is right + where this function would put NAME. + + Here are some examples of why using strcmp to sort is a bad idea: + + Whitespace example: + + Say your partial symtab contains: "foo", "goo". Then, if + we try to do a search for "foo", strcmp will locate this + after "foo" and before "goo". Then lookup_partial_symbol + will start looking at strings beginning with "goo", and will never + see the correct match of "foo". + + Parenthesis example: + + In practice, this is less like to be an issue, but I'll give it a + shot. Let's assume that '$' is a legitimate character to occur in + symbols. (Which may well even be the case on some systems.) Then + say that the partial symbol table contains "foo$" and "foo(int)". + strcmp will put them in this order, since '$' < '('. Now, if the + user searches for "foo", then strcmp will sort "foo" before "foo$". + Then lookup_partial_symbol will notice that strcmp_iw("foo$", + "foo") is false, so it won't proceed to the actual match of + "foo(int)" with "foo". */ + +int +strcmp_iw_ordered (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + + switch (*string1) + { + /* Characters are non-equal unless they're both '\0'; we want to + make sure we get the comparison right according to our + comparison in the cases where one of them is '\0' or '('. */ + case '\0': + if (*string2 == '\0') + return 0; + else + return -1; + case '(': + if (*string2 == '\0') + return 1; + else + return -1; + default: + if (*string2 == '(') + return 1; + else + return *string1 - *string2; + } +} + +/* A simple comparison function with opposite semantics to strcmp. */ + +int +streq (const char *lhs, const char *rhs) +{ + return !strcmp (lhs, rhs); +} + + +/* + ** subset_compare() + ** Answer whether string_to_compare is a full or partial match to + ** template_string. The partial match must be in sequence starting + ** at index 0. + */ +int +subset_compare (char *string_to_compare, char *template_string) +{ + int match; + if (template_string != (char *) NULL && string_to_compare != (char *) NULL + && strlen (string_to_compare) <= strlen (template_string)) + match = + (strncmp + (template_string, string_to_compare, strlen (string_to_compare)) == 0); + else + match = 0; + return match; +} + + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_on_command (char *arg, int from_tty) +{ + pagination_enabled = 1; +} + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_off_command (char *arg, int from_tty) +{ + pagination_enabled = 0; +} + + +void +initialize_utils (void) +{ + struct cmd_list_element *c; + + c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, + "Set number of characters gdb thinks are in a line.", + &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_width_command); + + c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, + "Set number of lines gdb thinks are in a page.", &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_height_command); + + init_page_info (); + + add_show_from_set + (add_set_cmd ("demangle", class_support, var_boolean, + (char *) &demangle, + "Set demangling of encoded C++/ObjC names when displaying symbols.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("pagination", class_support, + var_boolean, (char *) &pagination_enabled, + "Set state of pagination.", &setlist), &showlist); + + if (xdb_commands) + { + add_com ("am", class_support, pagination_on_command, + "Enable pagination"); + add_com ("sm", class_support, pagination_off_command, + "Disable pagination"); + } + + add_show_from_set + (add_set_cmd ("sevenbit-strings", class_support, var_boolean, + (char *) &sevenbit_strings, + "Set printing of 8-bit characters in strings as \\nnn.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("asm-demangle", class_support, var_boolean, + (char *) &asm_demangle, + "Set demangling of C++/ObjC names in disassembly listings.", + &setprintlist), &showprintlist); +} + +/* Machine specific function to handle SIGWINCH signal. */ + +#ifdef SIGWINCH_HANDLER_BODY +SIGWINCH_HANDLER_BODY +#endif +/* print routines to handle variable size regs, etc. */ +/* temporary storage using circular buffer */ +#define NUMCELLS 16 +#define CELLSIZE 32 +static char * +get_cell (void) +{ + static char buf[NUMCELLS][CELLSIZE]; + static int cell = 0; + if (++cell >= NUMCELLS) + cell = 0; + return buf[cell]; +} + +int +strlen_paddr (void) +{ + return (TARGET_ADDR_BIT / 8 * 2); +} + +char * +paddr (CORE_ADDR addr) +{ + return phex (addr, TARGET_ADDR_BIT / 8); +} + +char * +paddr_nz (CORE_ADDR addr) +{ + return phex_nz (addr, TARGET_ADDR_BIT / 8); +} + +static void +decimal2str (char *paddr_str, char *sign, ULONGEST addr) +{ + /* steal code from valprint.c:print_decimal(). Should this worry + about the real size of addr as the above does? */ + unsigned long temp[3]; + int i = 0; + do + { + temp[i] = addr % (1000 * 1000 * 1000); + addr /= (1000 * 1000 * 1000); + i++; + } + while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); + switch (i) + { + case 1: + sprintf (paddr_str, "%s%lu", sign, temp[0]); + break; + case 2: + sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]); + break; + case 3: + sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]); + break; + default: + internal_error (__FILE__, __LINE__, + "failed internal consistency check"); + } +} + +char * +paddr_u (CORE_ADDR addr) +{ + char *paddr_str = get_cell (); + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +char * +paddr_d (LONGEST addr) +{ + char *paddr_str = get_cell (); + if (addr < 0) + decimal2str (paddr_str, "-", -addr); + else + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +/* eliminate warning from compiler on 32-bit systems */ +static int thirty_two = 32; + +char * +phex (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + str = get_cell (); + sprintf (str, "%08lx%08lx", + (unsigned long) (l >> thirty_two), + (unsigned long) (l & 0xffffffff)); + break; + case 4: + str = get_cell (); + sprintf (str, "%08lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%04x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex (l, sizeof (l)); + break; + } + return str; +} + +char * +phex_nz (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + { + unsigned long high = (unsigned long) (l >> thirty_two); + str = get_cell (); + if (high == 0) + sprintf (str, "%lx", (unsigned long) (l & 0xffffffff)); + else + sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff)); + break; + } + case 4: + str = get_cell (); + sprintf (str, "%lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex_nz (l, sizeof (l)); + break; + } + return str; +} + + +/* Convert a CORE_ADDR into a string. */ +const char * +core_addr_to_string (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex (addr, sizeof (addr))); + return str; +} + +const char * +core_addr_to_string_nz (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex_nz (addr, sizeof (addr))); + return str; +} + +/* Convert a string back into a CORE_ADDR. */ +CORE_ADDR +string_to_core_addr (const char *my_string) +{ + CORE_ADDR addr = 0; + if (my_string[0] == '0' && tolower (my_string[1]) == 'x') + { + /* Assume that it is in decimal. */ + int i; + for (i = 2; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 16); + else if (isxdigit (my_string[i])) + addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16); + else + internal_error (__FILE__, __LINE__, "invalid hex"); + } + } + else + { + /* Assume that it is in decimal. */ + int i; + for (i = 0; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 10); + else + internal_error (__FILE__, __LINE__, "invalid decimal"); + } + } + return addr; +} + +char * +gdb_realpath (const char *filename) +{ + /* Method 1: The system has a compile time upper bound on a filename + path. Use that and realpath() to canonicalize the name. This is + the most common case. Note that, if there isn't a compile time + upper bound, you want to avoid realpath() at all costs. */ +#if defined(HAVE_REALPATH) + { +# if defined (PATH_MAX) + char buf[PATH_MAX]; +# define USE_REALPATH +# elif defined (MAXPATHLEN) + char buf[MAXPATHLEN]; +# define USE_REALPATH +# endif +# if defined (USE_REALPATH) + const char *rp = realpath (filename, buf); + if (rp == NULL) + rp = filename; + return xstrdup (rp); +# endif + } +#endif /* HAVE_REALPATH */ + + /* Method 2: The host system (i.e., GNU) has the function + canonicalize_file_name() which malloc's a chunk of memory and + returns that, use that. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) + { + char *rp = canonicalize_file_name (filename); + if (rp == NULL) + return xstrdup (filename); + else + return rp; + } +#endif + + /* FIXME: cagney/2002-11-13: + + Method 2a: Use realpath() with a NULL buffer. Some systems, due + to the problems described in in method 3, have modified their + realpath() implementation so that it will allocate a buffer when + NULL is passed in. Before this can be used, though, some sort of + configure time test would need to be added. Otherwize the code + will likely core dump. */ + + /* Method 3: Now we're getting desperate! The system doesn't have a + compile time buffer size and no alternative function. Query the + OS, using pathconf(), for the buffer limit. Care is needed + though, some systems do not limit PATH_MAX (return -1 for + pathconf()) making it impossible to pass a correctly sized buffer + to realpath() (it could always overflow). On those systems, we + skip this. */ +#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA) + { + /* Find out the max path size. */ + long path_max = pathconf ("/", _PC_PATH_MAX); + if (path_max > 0) + { + /* PATH_MAX is bounded. */ + char *buf = alloca (path_max); + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); + } + } +#endif + + /* This system is a lost cause, just dup the buffer. */ + return xstrdup (filename); +} + +/* Return a copy of FILENAME, with its directory prefix canonicalized + by gdb_realpath. */ + +char * +xfullpath (const char *filename) +{ + const char *base_name = lbasename (filename); + char *dir_name; + char *real_path; + char *result; + + /* Extract the basename of filename, and return immediately + a copy of filename if it does not contain any directory prefix. */ + if (base_name == filename) + return xstrdup (filename); + + dir_name = alloca ((size_t) (base_name - filename + 2)); + /* Allocate enough space to store the dir_name + plus one extra + character sometimes needed under Windows (see below), and + then the closing \000 character */ + strncpy (dir_name, filename, base_name - filename); + dir_name[base_name - filename] = '\000'; + +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + /* We need to be careful when filename is of the form 'd:foo', which + is equivalent of d:./foo, which is totally different from d:/foo. */ + if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') + { + dir_name[2] = '.'; + dir_name[3] = '\000'; + } +#endif + + /* Canonicalize the directory prefix, and build the resulting + filename. If the dirname realpath already contains an ending + directory separator, avoid doubling it. */ + real_path = gdb_realpath (dir_name); + if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) + result = concat (real_path, base_name, NULL); + else + result = concat (real_path, SLASH_STRING, base_name, NULL); + + xfree (real_path); + return result; +} + + +/* This is the 32-bit CRC function used by the GNU separate debug + facility. An executable may contain a section named + .gnu_debuglink, which holds the name of a separate executable file + containing its debug info, and a checksum of that file's contents, + computed using this function. */ +unsigned long +gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) +{ + static const unsigned long crc32_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d + }; + unsigned char *end; + + crc = ~crc & 0xffffffff; + for (end = buf + len; buf < end; ++buf) + crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return ~crc & 0xffffffff;; +} + +ULONGEST +align_up (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v + n - 1) & -n; +} + +ULONGEST +align_down (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v & -n); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/dwarf2read.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,8077 @@ +/* DWARF 2 debugging format support for GDB. + Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology, + Inc. with support from Florida State University (under contract + with the Ada Joint Program Office), and Silicon Graphics, Inc. + Initial contribution by Brent Benson, Harris Computer Systems, Inc., + based on Fred Fish's (Cygnus Support) implementation of DWARF 1 + support in dwarfread.c + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "objfiles.h" +#include "elf/dwarf2.h" +#include "buildsym.h" +#include "demangle.h" +#include "expression.h" +#include "filenames.h" /* for DOSish file names */ +#include "macrotab.h" +#include "language.h" +#include "complaints.h" +#include "bcache.h" +#include "dwarf2expr.h" +#include "dwarf2loc.h" +#include "cp-support.h" + +#include +#include "gdb_string.h" +#include "gdb_assert.h" +#include + +#ifndef DWARF2_REG_TO_REGNUM +#define DWARF2_REG_TO_REGNUM(REG) (REG) +#endif + +#if 0 +/* .debug_info header for a compilation unit + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct comp_unit_header + { + unsigned int length; /* length of the .debug_info + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int abbrev_offset; /* offset into .debug_abbrev section */ + unsigned char addr_size; /* byte size of an address -- 4 */ + } +_COMP_UNIT_HEADER; +#define _ACTUAL_COMP_UNIT_HEADER_SIZE 11 +#endif + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct pubnames_header + { + unsigned int length; /* length of the .debug_pubnames + contribution */ + unsigned char version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned int info_size; /* byte size of .debug_info section + portion */ + } +_PUBNAMES_HEADER; +#define _ACTUAL_PUBNAMES_HEADER_SIZE 13 + +/* .debug_pubnames header + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct aranges_header + { + unsigned int length; /* byte len of the .debug_aranges + contribution */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int info_offset; /* offset into .debug_info section */ + unsigned char addr_size; /* byte size of an address */ + unsigned char seg_size; /* byte size of segment descriptor */ + } +_ARANGES_HEADER; +#define _ACTUAL_ARANGES_HEADER_SIZE 12 + +/* .debug_line statement program prologue + Because of alignment constraints, this structure has padding and cannot + be mapped directly onto the beginning of the .debug_info section. */ +typedef struct statement_prologue + { + unsigned int total_length; /* byte length of the statement + information */ + unsigned short version; /* version number -- 2 for DWARF + version 2 */ + unsigned int prologue_length; /* # bytes between prologue & + stmt program */ + unsigned char minimum_instruction_length; /* byte size of + smallest instr */ + unsigned char default_is_stmt; /* initial value of is_stmt + register */ + char line_base; + unsigned char line_range; + unsigned char opcode_base; /* number assigned to first special + opcode */ + unsigned char *standard_opcode_lengths; + } +_STATEMENT_PROLOGUE; + +/* offsets and sizes of debugging sections */ + +static unsigned int dwarf_info_size; +static unsigned int dwarf_abbrev_size; +static unsigned int dwarf_line_size; +static unsigned int dwarf_pubnames_size; +static unsigned int dwarf_aranges_size; +static unsigned int dwarf_loc_size; +static unsigned int dwarf_macinfo_size; +static unsigned int dwarf_str_size; +static unsigned int dwarf_ranges_size; +unsigned int dwarf_frame_size; +unsigned int dwarf_eh_frame_size; + +static asection *dwarf_info_section; +static asection *dwarf_abbrev_section; +static asection *dwarf_line_section; +static asection *dwarf_pubnames_section; +static asection *dwarf_aranges_section; +static asection *dwarf_loc_section; +static asection *dwarf_macinfo_section; +static asection *dwarf_str_section; +static asection *dwarf_ranges_section; +asection *dwarf_frame_section; +asection *dwarf_eh_frame_section; + +/* names of the debugging sections */ + +#define INFO_SECTION ".debug_info" +#define ABBREV_SECTION ".debug_abbrev" +#define LINE_SECTION ".debug_line" +#define PUBNAMES_SECTION ".debug_pubnames" +#define ARANGES_SECTION ".debug_aranges" +#define LOC_SECTION ".debug_loc" +#define MACINFO_SECTION ".debug_macinfo" +#define STR_SECTION ".debug_str" +#define RANGES_SECTION ".debug_ranges" +#define FRAME_SECTION ".debug_frame" +#define EH_FRAME_SECTION ".eh_frame" + +/* local data types */ + +/* We hold several abbreviation tables in memory at the same time. */ +#ifndef ABBREV_HASH_SIZE +#define ABBREV_HASH_SIZE 121 +#endif + +/* The data in a compilation unit header, after target2host + translation, looks like this. */ +struct comp_unit_head + { + unsigned long length; + short version; + unsigned int abbrev_offset; + unsigned char addr_size; + unsigned char signed_addr_p; + unsigned int offset_size; /* size of file offsets; either 4 or 8 */ + unsigned int initial_length_size; /* size of the length field; either + 4 or 12 */ + + /* Offset to the first byte of this compilation unit header in the + * .debug_info section, for resolving relative reference dies. */ + + unsigned int offset; + + /* Pointer to this compilation unit header in the .debug_info + * section */ + + char *cu_head_ptr; + + /* Pointer to the first die of this compilatio unit. This will + * be the first byte following the compilation unit header. */ + + char *first_die_ptr; + + /* Pointer to the next compilation unit header in the program. */ + + struct comp_unit_head *next; + + /* DWARF abbreviation table associated with this compilation unit */ + + struct abbrev_info *dwarf2_abbrevs[ABBREV_HASH_SIZE]; + + /* Base address of this compilation unit. */ + + CORE_ADDR base_address; + + /* Non-zero if base_address has been set. */ + + int base_known; + }; + +/* Internal state when decoding a particular compilation unit. */ +struct dwarf2_cu +{ + /* The objfile containing this compilation unit. */ + struct objfile *objfile; + + /* The header of the compilation unit. + + FIXME drow/2003-11-10: Some of the things from the comp_unit_head + should be moved to the dwarf2_cu structure; for instance the abbrevs + hash table. */ + struct comp_unit_head header; + + struct function_range *first_fn, *last_fn, *cached_fn; + + /* The language we are debugging. */ + enum language language; + const struct language_defn *language_defn; + + /* The generic symbol table building routines have separate lists for + file scope symbols and all all other scopes (local scopes). So + we need to select the right one to pass to add_symbol_to_list(). + We do it by keeping a pointer to the correct list in list_in_scope. + + FIXME: The original dwarf code just treated the file scope as the + first local scope, and all other local scopes as nested local + scopes, and worked fine. Check to see if we really need to + distinguish these in buildsym.c. */ + struct pending **list_in_scope; + + /* Maintain an array of referenced fundamental types for the current + compilation unit being read. For DWARF version 1, we have to construct + the fundamental types on the fly, since no information about the + fundamental types is supplied. Each such fundamental type is created by + calling a language dependent routine to create the type, and then a + pointer to that type is then placed in the array at the index specified + by it's FT_ value. The array has a fixed size set by the + FT_NUM_MEMBERS compile time constant, which is the number of predefined + fundamental types gdb knows how to construct. */ + struct type *ftypes[FT_NUM_MEMBERS]; /* Fundamental types */ +}; + +/* The line number information for a compilation unit (found in the + .debug_line section) begins with a "statement program header", + which contains the following information. */ +struct line_header +{ + unsigned int total_length; + unsigned short version; + unsigned int header_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + + /* standard_opcode_lengths[i] is the number of operands for the + standard opcode whose value is i. This means that + standard_opcode_lengths[0] is unused, and the last meaningful + element is standard_opcode_lengths[opcode_base - 1]. */ + unsigned char *standard_opcode_lengths; + + /* The include_directories table. NOTE! These strings are not + allocated with xmalloc; instead, they are pointers into + debug_line_buffer. If you try to free them, `free' will get + indigestion. */ + unsigned int num_include_dirs, include_dirs_size; + char **include_dirs; + + /* The file_names table. NOTE! These strings are not allocated + with xmalloc; instead, they are pointers into debug_line_buffer. + Don't try to free them directly. */ + unsigned int num_file_names, file_names_size; + struct file_entry + { + char *name; + unsigned int dir_index; + unsigned int mod_time; + unsigned int length; + } *file_names; + + /* The start and end of the statement program following this + header. These point into dwarf_line_buffer. */ + char *statement_program_start, *statement_program_end; +}; + +/* When we construct a partial symbol table entry we only + need this much information. */ +struct partial_die_info + { + enum dwarf_tag tag; + unsigned char has_children; + unsigned char is_external; + unsigned char is_declaration; + unsigned char has_type; + unsigned int offset; + unsigned int abbrev; + char *name; + int has_pc_info; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct dwarf_block *locdesc; + unsigned int language; + char *sibling; + }; + +/* This data structure holds the information of an abbrev. */ +struct abbrev_info + { + unsigned int number; /* number identifying abbrev */ + enum dwarf_tag tag; /* dwarf tag */ + int has_children; /* boolean */ + unsigned int num_attrs; /* number of attributes */ + struct attr_abbrev *attrs; /* an array of attribute descriptions */ + struct abbrev_info *next; /* next in chain */ + }; + +struct attr_abbrev + { + enum dwarf_attribute name; + enum dwarf_form form; + }; + +/* This data structure holds a complete die structure. */ +struct die_info + { + enum dwarf_tag tag; /* Tag indicating type of die */ + unsigned int abbrev; /* Abbrev number */ + unsigned int offset; /* Offset in .debug_info section */ + unsigned int num_attrs; /* Number of attributes */ + struct attribute *attrs; /* An array of attributes */ + struct die_info *next_ref; /* Next die in ref hash table */ + + /* The dies in a compilation unit form an n-ary tree. PARENT + points to this die's parent; CHILD points to the first child of + this node; and all the children of a given node are chained + together via their SIBLING fields, terminated by a die whose + tag is zero. */ + struct die_info *child; /* Its first child, if any. */ + struct die_info *sibling; /* Its next sibling, if any. */ + struct die_info *parent; /* Its parent, if any. */ + + struct type *type; /* Cached type information */ + }; + +/* Attributes have a name and a value */ +struct attribute + { + enum dwarf_attribute name; + enum dwarf_form form; + union + { + char *str; + struct dwarf_block *blk; + unsigned long unsnd; + long int snd; + CORE_ADDR addr; + } + u; + }; + +struct function_range +{ + const char *name; + CORE_ADDR lowpc, highpc; + int seen_line; + struct function_range *next; +}; + +/* Get at parts of an attribute structure */ + +#define DW_STRING(attr) ((attr)->u.str) +#define DW_UNSND(attr) ((attr)->u.unsnd) +#define DW_BLOCK(attr) ((attr)->u.blk) +#define DW_SND(attr) ((attr)->u.snd) +#define DW_ADDR(attr) ((attr)->u.addr) + +/* Blocks are a bunch of untyped bytes. */ +struct dwarf_block + { + unsigned int size; + char *data; + }; + +#ifndef ATTR_ALLOC_CHUNK +#define ATTR_ALLOC_CHUNK 4 +#endif + +/* A hash table of die offsets for following references. */ +#ifndef REF_HASH_SIZE +#define REF_HASH_SIZE 1021 +#endif + +static struct die_info *die_ref_table[REF_HASH_SIZE]; + +/* Obstack for allocating temporary storage used during symbol reading. */ +static struct obstack dwarf2_tmp_obstack; + +/* Allocate fields for structs, unions and enums in this size. */ +#ifndef DW_FIELD_ALLOC_CHUNK +#define DW_FIELD_ALLOC_CHUNK 4 +#endif + +/* Actually data from the sections. */ +static char *dwarf_info_buffer; +static char *dwarf_abbrev_buffer; +static char *dwarf_line_buffer; +static char *dwarf_str_buffer; +static char *dwarf_macinfo_buffer; +static char *dwarf_ranges_buffer; +static char *dwarf_loc_buffer; + +/* A zeroed version of a partial die for initialization purposes. */ +static struct partial_die_info zeroed_partial_die; + +/* FIXME: decode_locdesc sets these variables to describe the location + to the caller. These ought to be a structure or something. If + none of the flags are set, the object lives at the address returned + by decode_locdesc. */ + +static int isreg; /* Object lives in register. + decode_locdesc's return value is + the register number. */ + +/* We put a pointer to this structure in the read_symtab_private field + of the psymtab. + The complete dwarf information for an objfile is kept in the + objfile_obstack, so that absolute die references can be handled. + Most of the information in this structure is related to an entire + object file and could be passed via the sym_private field of the objfile. + It is however conceivable that dwarf2 might not be the only type + of symbols read from an object file. */ + +struct dwarf2_pinfo + { + /* Pointer to start of dwarf info buffer for the objfile. */ + + char *dwarf_info_buffer; + + /* Offset in dwarf_info_buffer for this compilation unit. */ + + unsigned long dwarf_info_offset; + + /* Pointer to start of dwarf abbreviation buffer for the objfile. */ + + char *dwarf_abbrev_buffer; + + /* Size of dwarf abbreviation section for the objfile. */ + + unsigned int dwarf_abbrev_size; + + /* Pointer to start of dwarf line buffer for the objfile. */ + + char *dwarf_line_buffer; + + /* Size of dwarf_line_buffer, in bytes. */ + + unsigned int dwarf_line_size; + + /* Pointer to start of dwarf string buffer for the objfile. */ + + char *dwarf_str_buffer; + + /* Size of dwarf string section for the objfile. */ + + unsigned int dwarf_str_size; + + /* Pointer to start of dwarf macro buffer for the objfile. */ + + char *dwarf_macinfo_buffer; + + /* Size of dwarf macinfo section for the objfile. */ + + unsigned int dwarf_macinfo_size; + + /* Pointer to start of dwarf ranges buffer for the objfile. */ + + char *dwarf_ranges_buffer; + + /* Size of dwarf ranges buffer for the objfile. */ + + unsigned int dwarf_ranges_size; + + /* Pointer to start of dwarf locations buffer for the objfile. */ + + char *dwarf_loc_buffer; + + /* Size of dwarf locations buffer for the objfile. */ + + unsigned int dwarf_loc_size; + }; + +#define PST_PRIVATE(p) ((struct dwarf2_pinfo *)(p)->read_symtab_private) +#define DWARF_INFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_info_buffer) +#define DWARF_INFO_OFFSET(p) (PST_PRIVATE(p)->dwarf_info_offset) +#define DWARF_ABBREV_BUFFER(p) (PST_PRIVATE(p)->dwarf_abbrev_buffer) +#define DWARF_ABBREV_SIZE(p) (PST_PRIVATE(p)->dwarf_abbrev_size) +#define DWARF_LINE_BUFFER(p) (PST_PRIVATE(p)->dwarf_line_buffer) +#define DWARF_LINE_SIZE(p) (PST_PRIVATE(p)->dwarf_line_size) +#define DWARF_STR_BUFFER(p) (PST_PRIVATE(p)->dwarf_str_buffer) +#define DWARF_STR_SIZE(p) (PST_PRIVATE(p)->dwarf_str_size) +#define DWARF_MACINFO_BUFFER(p) (PST_PRIVATE(p)->dwarf_macinfo_buffer) +#define DWARF_MACINFO_SIZE(p) (PST_PRIVATE(p)->dwarf_macinfo_size) +#define DWARF_RANGES_BUFFER(p) (PST_PRIVATE(p)->dwarf_ranges_buffer) +#define DWARF_RANGES_SIZE(p) (PST_PRIVATE(p)->dwarf_ranges_size) +#define DWARF_LOC_BUFFER(p) (PST_PRIVATE(p)->dwarf_loc_buffer) +#define DWARF_LOC_SIZE(p) (PST_PRIVATE(p)->dwarf_loc_size) + +/* FIXME: We might want to set this from BFD via bfd_arch_bits_per_byte, + but this would require a corresponding change in unpack_field_as_long + and friends. */ +static int bits_per_byte = 8; + +/* The routines that read and process dies for a C struct or C++ class + pass lists of data member fields and lists of member function fields + in an instance of a field_info structure, as defined below. */ +struct field_info + { + /* List of data member and baseclasses fields. */ + struct nextfield + { + struct nextfield *next; + int accessibility; + int virtuality; + struct field field; + } + *fields; + + /* Number of fields. */ + int nfields; + + /* Number of baseclasses. */ + int nbaseclasses; + + /* Set if the accesibility of one of the fields is not public. */ + int non_public_fields; + + /* Member function fields array, entries are allocated in the order they + are encountered in the object file. */ + struct nextfnfield + { + struct nextfnfield *next; + struct fn_field fnfield; + } + *fnfields; + + /* Member function fieldlist array, contains name of possibly overloaded + member function, number of overloaded member functions and a pointer + to the head of the member function field chain. */ + struct fnfieldlist + { + char *name; + int length; + struct nextfnfield *head; + } + *fnfieldlists; + + /* Number of entries in the fnfieldlists array. */ + int nfnfields; + }; + +/* Various complaints about symbol reading that don't abort the process */ + +static void +dwarf2_statement_list_fits_in_line_number_section_complaint (void) +{ + complaint (&symfile_complaints, + "statement list doesn't fit in .debug_line section"); +} + +static void +dwarf2_complex_location_expr_complaint (void) +{ + complaint (&symfile_complaints, "location expression too complex"); +} + +static void +dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2, + int arg3) +{ + complaint (&symfile_complaints, + "const value length mismatch for '%s', got %d, expected %d", arg1, + arg2, arg3); +} + +static void +dwarf2_macros_too_long_complaint (void) +{ + complaint (&symfile_complaints, + "macro info runs off end of `.debug_macinfo' section"); +} + +static void +dwarf2_macro_malformed_definition_complaint (const char *arg1) +{ + complaint (&symfile_complaints, + "macro debug info contains a malformed macro definition:\n`%s'", + arg1); +} + +static void +dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2) +{ + complaint (&symfile_complaints, + "invalid attribute class or form for '%s' in '%s'", arg1, arg2); +} + +/* local function prototypes */ + +static void dwarf2_locate_sections (bfd *, asection *, void *); + +#if 0 +static void dwarf2_build_psymtabs_easy (struct objfile *, int); +#endif + +static void dwarf2_build_psymtabs_hard (struct objfile *, int); + +static char *scan_partial_symbols (char *, CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *, + const char *namespace); + +static void add_partial_symbol (struct partial_die_info *, struct dwarf2_cu *, + const char *namespace); + +static int pdi_needs_namespace (enum dwarf_tag tag, const char *namespace); + +static char *add_partial_namespace (struct partial_die_info *pdi, + char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_structure (struct partial_die_info *struct_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *add_partial_enumeration (struct partial_die_info *enum_pdi, + char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace); + +static char *locate_pdi_sibling (struct partial_die_info *orig_pdi, + char *info_ptr, + bfd *abfd, + struct dwarf2_cu *cu); + +static void dwarf2_psymtab_to_symtab (struct partial_symtab *); + +static void psymtab_to_symtab_1 (struct partial_symtab *); + +char *dwarf2_read_section (struct objfile *, asection *); + +static void dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu); + +static void dwarf2_empty_abbrev_table (void *); + +static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int, + struct dwarf2_cu *); + +static char *read_partial_die (struct partial_die_info *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_full_die (struct die_info **, bfd *, char *, + struct dwarf2_cu *, int *); + +static char *read_attribute (struct attribute *, struct attr_abbrev *, + bfd *, char *, struct dwarf2_cu *); + +static char *read_attribute_value (struct attribute *, unsigned, + bfd *, char *, struct dwarf2_cu *); + +static unsigned int read_1_byte (bfd *, char *); + +static int read_1_signed_byte (bfd *, char *); + +static unsigned int read_2_bytes (bfd *, char *); + +static unsigned int read_4_bytes (bfd *, char *); + +static unsigned long read_8_bytes (bfd *, char *); + +static CORE_ADDR read_address (bfd *, char *ptr, struct dwarf2_cu *, + int *bytes_read); + +static LONGEST read_initial_length (bfd *, char *, + struct comp_unit_head *, int *bytes_read); + +static LONGEST read_offset (bfd *, char *, const struct comp_unit_head *, + int *bytes_read); + +static char *read_n_bytes (bfd *, char *, unsigned int); + +static char *read_string (bfd *, char *, unsigned int *); + +static char *read_indirect_string (bfd *, char *, const struct comp_unit_head *, + unsigned int *); + +static unsigned long read_unsigned_leb128 (bfd *, char *, unsigned int *); + +static long read_signed_leb128 (bfd *, char *, unsigned int *); + +static void set_cu_language (unsigned int, struct dwarf2_cu *); + +static struct attribute *dwarf2_attr (struct die_info *, unsigned int, + struct dwarf2_cu *); + +static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu); + +static struct die_info *die_specification (struct die_info *die, + struct dwarf2_cu *); + +static void free_line_header (struct line_header *lh); + +static struct line_header *(dwarf_decode_line_header + (unsigned int offset, + bfd *abfd, struct dwarf2_cu *cu)); + +static void dwarf_decode_lines (struct line_header *, char *, bfd *, + struct dwarf2_cu *); + +static void dwarf2_start_subfile (char *, char *); + +static struct symbol *new_symbol (struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_const_value (struct attribute *, struct symbol *, + struct dwarf2_cu *); + +static void dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits); + +static struct type *die_type (struct die_info *, struct dwarf2_cu *); + +static struct type *die_containing_type (struct die_info *, + struct dwarf2_cu *); + +#if 0 +static struct type *type_at_offset (unsigned int, struct objfile *); +#endif + +static struct type *tag_type_to_type (struct die_info *, struct dwarf2_cu *); + +static void read_type_die (struct die_info *, struct dwarf2_cu *); + +static char *determine_prefix (struct die_info *die, struct dwarf2_cu *); + +static char *typename_concat (const char *prefix, const char *suffix); + +static void read_typedef (struct die_info *, struct dwarf2_cu *); + +static void read_base_type (struct die_info *, struct dwarf2_cu *); + +static void read_subrange_type (struct die_info *die, struct dwarf2_cu *cu); + +static void read_file_scope (struct die_info *, struct dwarf2_cu *); + +static void read_func_scope (struct die_info *, struct dwarf2_cu *); + +static void read_lexical_block_scope (struct die_info *, struct dwarf2_cu *); + +static int dwarf2_get_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, struct dwarf2_cu *); + +static void get_scope_pc_bounds (struct die_info *, + CORE_ADDR *, CORE_ADDR *, + struct dwarf2_cu *); + +static void dwarf2_add_field (struct field_info *, struct die_info *, + struct dwarf2_cu *); + +static void dwarf2_attach_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void dwarf2_add_member_fn (struct field_info *, + struct die_info *, struct type *, + struct dwarf2_cu *); + +static void dwarf2_attach_fn_fields_to_type (struct field_info *, + struct type *, struct dwarf2_cu *); + +static void read_structure_type (struct die_info *, struct dwarf2_cu *); + +static void process_structure_scope (struct die_info *, struct dwarf2_cu *); + +static char *determine_class_name (struct die_info *die, struct dwarf2_cu *cu); + +static void read_common_block (struct die_info *, struct dwarf2_cu *); + +static void read_namespace (struct die_info *die, struct dwarf2_cu *); + +static const char *namespace_name (struct die_info *die, + int *is_anonymous, struct dwarf2_cu *); + +static void read_enumeration_type (struct die_info *, struct dwarf2_cu *); + +static void process_enumeration_scope (struct die_info *, struct dwarf2_cu *); + +static struct type *dwarf_base_type (int, int, struct dwarf2_cu *); + +static CORE_ADDR decode_locdesc (struct dwarf_block *, struct dwarf2_cu *); + +static void read_array_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_ptr_to_member_type (struct die_info *, + struct dwarf2_cu *); + +static void read_tag_reference_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_const_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_volatile_type (struct die_info *, struct dwarf2_cu *); + +static void read_tag_string_type (struct die_info *, struct dwarf2_cu *); + +static void read_subroutine_type (struct die_info *, struct dwarf2_cu *); + +static struct die_info *read_comp_unit (char *, bfd *, struct dwarf2_cu *); + +static struct die_info *read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static struct die_info *read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *, + char **new_info_ptr, + struct die_info *parent); + +static void free_die_list (struct die_info *); + +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + +static void process_die (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_linkage_name (struct die_info *, struct dwarf2_cu *); + +static char *dwarf2_name (struct die_info *die, struct dwarf2_cu *); + +static struct die_info *dwarf2_extension (struct die_info *die, + struct dwarf2_cu *); + +static char *dwarf_tag_name (unsigned int); + +static char *dwarf_attr_name (unsigned int); + +static char *dwarf_form_name (unsigned int); + +static char *dwarf_stack_op_name (unsigned int); + +static char *dwarf_bool_name (unsigned int); + +static char *dwarf_type_encoding_name (unsigned int); + +#if 0 +static char *dwarf_cfi_name (unsigned int); + +struct die_info *copy_die (struct die_info *); +#endif + +static struct die_info *sibling_die (struct die_info *); + +static void dump_die (struct die_info *); + +static void dump_die_list (struct die_info *); + +static void store_in_ref_table (unsigned int, struct die_info *); + +static void dwarf2_empty_hash_tables (void); + +static unsigned int dwarf2_get_ref_die_offset (struct attribute *, + struct dwarf2_cu *); + +static int dwarf2_get_attr_constant_value (struct attribute *, int); + +static struct die_info *follow_die_ref (unsigned int); + +static struct type *dwarf2_fundamental_type (struct objfile *, int, + struct dwarf2_cu *); + +/* memory allocation interface */ + +static void dwarf2_free_tmp_obstack (void *); + +static struct dwarf_block *dwarf_alloc_block (void); + +static struct abbrev_info *dwarf_alloc_abbrev (void); + +static struct die_info *dwarf_alloc_die (void); + +static void initialize_cu_func_list (struct dwarf2_cu *); + +static void add_to_cu_func_list (const char *, CORE_ADDR, CORE_ADDR, + struct dwarf2_cu *); + +static void dwarf_decode_macros (struct line_header *, unsigned int, + char *, bfd *, struct dwarf2_cu *); + +static int attr_form_is_block (struct attribute *); + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu); + +/* Try to locate the sections we need for DWARF 2 debugging + information and return true if we have enough to do something. */ + +int +dwarf2_has_info (bfd *abfd) +{ + dwarf_info_section = 0; + dwarf_abbrev_section = 0; + dwarf_line_section = 0; + dwarf_str_section = 0; + dwarf_macinfo_section = 0; + dwarf_frame_section = 0; + dwarf_eh_frame_section = 0; + dwarf_ranges_section = 0; + dwarf_loc_section = 0; + + bfd_map_over_sections (abfd, dwarf2_locate_sections, NULL); + return (dwarf_info_section != NULL && dwarf_abbrev_section != NULL); +} + +/* This function is mapped across the sections and remembers the + offset and size of each of the debugging sections we are interested + in. */ + +static void +dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr) +{ + if (strcmp (sectp->name, INFO_SECTION) == 0) + { + dwarf_info_size = bfd_get_section_size_before_reloc (sectp); + dwarf_info_section = sectp; + } + else if (strcmp (sectp->name, ABBREV_SECTION) == 0) + { + dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp); + dwarf_abbrev_section = sectp; + } + else if (strcmp (sectp->name, LINE_SECTION) == 0) + { + dwarf_line_size = bfd_get_section_size_before_reloc (sectp); + dwarf_line_section = sectp; + } + else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0) + { + dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp); + dwarf_pubnames_section = sectp; + } + else if (strcmp (sectp->name, ARANGES_SECTION) == 0) + { + dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_aranges_section = sectp; + } + else if (strcmp (sectp->name, LOC_SECTION) == 0) + { + dwarf_loc_size = bfd_get_section_size_before_reloc (sectp); + dwarf_loc_section = sectp; + } + else if (strcmp (sectp->name, MACINFO_SECTION) == 0) + { + dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp); + dwarf_macinfo_section = sectp; + } + else if (strcmp (sectp->name, STR_SECTION) == 0) + { + dwarf_str_size = bfd_get_section_size_before_reloc (sectp); + dwarf_str_section = sectp; + } + else if (strcmp (sectp->name, FRAME_SECTION) == 0) + { + dwarf_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_frame_section = sectp; + } + else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0) + { + flagword aflag = bfd_get_section_flags (ignore_abfd, sectp); + if (aflag & SEC_HAS_CONTENTS) + { + dwarf_eh_frame_size = bfd_get_section_size_before_reloc (sectp); + dwarf_eh_frame_section = sectp; + } + } + else if (strcmp (sectp->name, RANGES_SECTION) == 0) + { + dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp); + dwarf_ranges_section = sectp; + } +} + +/* Build a partial symbol table. */ + +void +dwarf2_build_psymtabs (struct objfile *objfile, int mainline) +{ + + /* We definitely need the .debug_info and .debug_abbrev sections */ + + dwarf_info_buffer = dwarf2_read_section (objfile, dwarf_info_section); + dwarf_abbrev_buffer = dwarf2_read_section (objfile, dwarf_abbrev_section); + + if (dwarf_line_section) + dwarf_line_buffer = dwarf2_read_section (objfile, dwarf_line_section); + else + dwarf_line_buffer = NULL; + + if (dwarf_str_section) + dwarf_str_buffer = dwarf2_read_section (objfile, dwarf_str_section); + else + dwarf_str_buffer = NULL; + + if (dwarf_macinfo_section) + dwarf_macinfo_buffer = dwarf2_read_section (objfile, + dwarf_macinfo_section); + else + dwarf_macinfo_buffer = NULL; + + if (dwarf_ranges_section) + dwarf_ranges_buffer = dwarf2_read_section (objfile, dwarf_ranges_section); + else + dwarf_ranges_buffer = NULL; + + if (dwarf_loc_section) + dwarf_loc_buffer = dwarf2_read_section (objfile, dwarf_loc_section); + else + dwarf_loc_buffer = NULL; + + if (mainline + || (objfile->global_psymbols.size == 0 + && objfile->static_psymbols.size == 0)) + { + init_psymbol_list (objfile, 1024); + } + +#if 0 + if (dwarf_aranges_offset && dwarf_pubnames_offset) + { + /* Things are significantly easier if we have .debug_aranges and + .debug_pubnames sections */ + + dwarf2_build_psymtabs_easy (objfile, mainline); + } + else +#endif + /* only test this case for now */ + { + /* In this case we have to work a bit harder */ + dwarf2_build_psymtabs_hard (objfile, mainline); + } +} + +#if 0 +/* Build the partial symbol table from the information in the + .debug_pubnames and .debug_aranges sections. */ + +static void +dwarf2_build_psymtabs_easy (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + char *aranges_buffer, *pubnames_buffer; + char *aranges_ptr, *pubnames_ptr; + unsigned int entry_length, version, info_offset, info_size; + + pubnames_buffer = dwarf2_read_section (objfile, + dwarf_pubnames_section); + pubnames_ptr = pubnames_buffer; + while ((pubnames_ptr - pubnames_buffer) < dwarf_pubnames_size) + { + struct comp_unit_head cu_header; + int bytes_read; + + entry_length = read_initial_length (abfd, pubnames_ptr, &cu_header, + &bytes_read); + pubnames_ptr += bytes_read; + version = read_1_byte (abfd, pubnames_ptr); + pubnames_ptr += 1; + info_offset = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + info_size = read_4_bytes (abfd, pubnames_ptr); + pubnames_ptr += 4; + } + + aranges_buffer = dwarf2_read_section (objfile, + dwarf_aranges_section); + +} +#endif + +/* Read in the comp unit header information from the debug_info at + info_ptr. */ + +static char * +read_comp_unit_head (struct comp_unit_head *cu_header, + char *info_ptr, bfd *abfd) +{ + int signed_addr; + int bytes_read; + cu_header->length = read_initial_length (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->version = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + cu_header->abbrev_offset = read_offset (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + cu_header->addr_size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + signed_addr = bfd_get_sign_extend_vma (abfd); + if (signed_addr < 0) + internal_error (__FILE__, __LINE__, + "read_comp_unit_head: dwarf from non elf file"); + cu_header->signed_addr_p = signed_addr; + return info_ptr; +} + +/* Build the partial symbol table by doing a quick pass through the + .debug_info and .debug_abbrev sections. */ + +static void +dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) +{ + /* Instead of reading this into a big buffer, we should probably use + mmap() on architectures that support it. (FIXME) */ + bfd *abfd = objfile->obfd; + char *info_ptr, *abbrev_ptr; + char *beg_of_comp_unit; + struct partial_die_info comp_unit_die; + struct partial_symtab *pst; + struct cleanup *back_to; + CORE_ADDR lowpc, highpc, baseaddr; + + info_ptr = dwarf_info_buffer; + abbrev_ptr = dwarf_abbrev_buffer; + + /* We use dwarf2_tmp_obstack for objects that don't need to survive + the partial symbol scan, like attribute values. + + We could reduce our peak memory consumption during partial symbol + table construction by freeing stuff from this obstack more often + --- say, after processing each compilation unit, or each die --- + but it turns out that this saves almost nothing. For an + executable with 11Mb of Dwarf 2 data, I found about 64k allocated + on dwarf2_tmp_obstack. Some investigation showed: + + 1) 69% of the attributes used forms DW_FORM_addr, DW_FORM_data*, + DW_FORM_flag, DW_FORM_[su]data, and DW_FORM_ref*. These are + all fixed-length values not requiring dynamic allocation. + + 2) 30% of the attributes used the form DW_FORM_string. For + DW_FORM_string, read_attribute simply hands back a pointer to + the null-terminated string in dwarf_info_buffer, so no dynamic + allocation is needed there either. + + 3) The remaining 1% of the attributes all used DW_FORM_block1. + 75% of those were DW_AT_frame_base location lists for + functions; the rest were DW_AT_location attributes, probably + for the global variables. + + Anyway, what this all means is that the memory the dwarf2 + reader uses as temporary space reading partial symbols is about + 0.5% as much as we use for dwarf_*_buffer. That's noise. */ + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ + while (info_ptr < dwarf_info_buffer + dwarf_info_size) + { + struct dwarf2_cu cu; + beg_of_comp_unit = info_ptr; + + cu.objfile = objfile; + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + if (cu.header.version != 2) + { + error ("Dwarf Error: wrong version in compilation unit header (is %d, should be %d) [in module %s]", cu.header.version, 2, bfd_get_filename (abfd)); + return; + } + if (cu.header.abbrev_offset >= dwarf_abbrev_size) + { + error ("Dwarf Error: bad offset (0x%lx) in compilation unit header (offset 0x%lx + 6) [in module %s]", + (long) cu.header.abbrev_offset, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + if (beg_of_comp_unit + cu.header.length + cu.header.initial_length_size + > dwarf_info_buffer + dwarf_info_size) + { + error ("Dwarf Error: bad length (0x%lx) in compilation unit header (offset 0x%lx + 0) [in module %s]", + (long) cu.header.length, + (long) (beg_of_comp_unit - dwarf_info_buffer), + bfd_get_filename (abfd)); + return; + } + /* Complete the cu_header */ + cu.header.offset = beg_of_comp_unit - dwarf_info_buffer; + cu.header.first_die_ptr = info_ptr; + cu.header.cu_head_ptr = beg_of_comp_unit; + + cu.list_in_scope = &file_symbols; + + /* Read the abbrevs for this compilation unit into a table */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + /* Read the compilation unit die */ + info_ptr = read_partial_die (&comp_unit_die, abfd, info_ptr, + &cu); + + /* Set the language we're debugging */ + set_cu_language (comp_unit_die.language, &cu); + + /* Allocate a new partial symbol table structure */ + pst = start_psymtab_common (objfile, objfile->section_offsets, + comp_unit_die.name ? comp_unit_die.name : "", + comp_unit_die.lowpc, + objfile->global_psymbols.next, + objfile->static_psymbols.next); + + pst->read_symtab_private = (char *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct dwarf2_pinfo)); + DWARF_INFO_BUFFER (pst) = dwarf_info_buffer; + DWARF_INFO_OFFSET (pst) = beg_of_comp_unit - dwarf_info_buffer; + DWARF_ABBREV_BUFFER (pst) = dwarf_abbrev_buffer; + DWARF_ABBREV_SIZE (pst) = dwarf_abbrev_size; + DWARF_LINE_BUFFER (pst) = dwarf_line_buffer; + DWARF_LINE_SIZE (pst) = dwarf_line_size; + DWARF_STR_BUFFER (pst) = dwarf_str_buffer; + DWARF_STR_SIZE (pst) = dwarf_str_size; + DWARF_MACINFO_BUFFER (pst) = dwarf_macinfo_buffer; + DWARF_MACINFO_SIZE (pst) = dwarf_macinfo_size; + DWARF_RANGES_BUFFER (pst) = dwarf_ranges_buffer; + DWARF_RANGES_SIZE (pst) = dwarf_ranges_size; + DWARF_LOC_BUFFER (pst) = dwarf_loc_buffer; + DWARF_LOC_SIZE (pst) = dwarf_loc_size; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Store the function that reads in the rest of the symbol table */ + pst->read_symtab = dwarf2_psymtab_to_symtab; + + /* Check if comp unit has_children. + If so, read the rest of the partial symbols from this comp unit. + If not, there's no more debug_info for this comp unit. */ + if (comp_unit_die.has_children) + { + lowpc = ((CORE_ADDR) -1); + highpc = ((CORE_ADDR) 0); + + info_ptr = scan_partial_symbols (info_ptr, &lowpc, &highpc, + &cu, NULL); + + /* If we didn't find a lowpc, set it to highpc to avoid + complaints from `maint check'. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + + /* If the compilation unit didn't have an explicit address range, + then use the information extracted from its child dies. */ + if (! comp_unit_die.has_pc_info) + { + comp_unit_die.lowpc = lowpc; + comp_unit_die.highpc = highpc; + } + } + pst->textlow = comp_unit_die.lowpc + baseaddr; + pst->texthigh = comp_unit_die.highpc + baseaddr; + + pst->n_global_syms = objfile->global_psymbols.next - + (objfile->global_psymbols.list + pst->globals_offset); + pst->n_static_syms = objfile->static_psymbols.next - + (objfile->static_psymbols.list + pst->statics_offset); + sort_pst_symbols (pst); + + /* If there is already a psymtab or symtab for a file of this + name, remove it. (If there is a symtab, more drastic things + also happen.) This happens in VxWorks. */ + free_named_symtabs (pst->filename); + + info_ptr = beg_of_comp_unit + cu.header.length + + cu.header.initial_length_size; + } + do_cleanups (back_to); +} + +/* Read in all interesting dies to the end of the compilation unit or + to the end of the current namespace. NAMESPACE is NULL if we + haven't yet encountered any DW_TAG_namespace entries; otherwise, + it's the name of the current namespace. In particular, it's the + empty string if we're currently in the global namespace but have + previously encountered a DW_TAG_namespace. */ + +static char * +scan_partial_symbols (char *info_ptr, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu, + const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + /* Now, march along the PDI's, descending into ones which have + interesting children but skipping the children of the other ones, + until we reach the end of the compilation unit. */ + + while (1) + { + /* This flag tells whether or not info_ptr has gotten updated + inside the loop. */ + int info_ptr_updated = 0; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + /* Anonymous namespaces have no name but have interesting + children, so we need to look at them. Ditto for anonymous + enums. */ + + if (pdi.name != NULL || pdi.tag == DW_TAG_namespace + || pdi.tag == DW_TAG_enumeration_type) + { + switch (pdi.tag) + { + case DW_TAG_subprogram: + if (pdi.has_pc_info) + { + if (pdi.lowpc < *lowpc) + { + *lowpc = pdi.lowpc; + } + if (pdi.highpc > *highpc) + { + *highpc = pdi.highpc; + } + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + } + break; + case DW_TAG_variable: + case DW_TAG_typedef: + case DW_TAG_union_type: + if (!pdi.is_declaration) + { + add_partial_symbol (&pdi, cu, namespace); + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_structure (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_enumeration_type: + if (!pdi.is_declaration) + { + info_ptr = add_partial_enumeration (&pdi, info_ptr, cu, + namespace); + info_ptr_updated = 1; + } + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + /* File scope base type definitions are added to the partial + symbol table. */ + add_partial_symbol (&pdi, cu, namespace); + break; + case DW_TAG_namespace: + /* We've hit a DW_TAG_namespace entry, so we know this + file has been compiled using a compiler that + generates them; update NAMESPACE to reflect that. */ + if (namespace == NULL) + namespace = ""; + info_ptr = add_partial_namespace (&pdi, info_ptr, lowpc, highpc, + cu, namespace); + info_ptr_updated = 1; + break; + default: + break; + } + } + + if (pdi.tag == 0) + break; + + /* If the die has a sibling, skip to the sibling, unless another + function has already updated info_ptr for us. */ + + /* NOTE: carlton/2003-06-16: This is a bit hackish, but whether + or not we want to update this depends on enough stuff (not + only pdi.tag but also whether or not pdi.name is NULL) that + this seems like the easiest way to handle the issue. */ + + if (!info_ptr_updated) + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } + + return info_ptr; +} + +static void +add_partial_symbol (struct partial_die_info *pdi, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + CORE_ADDR addr = 0; + char *actual_name = pdi->name; + const struct partial_symbol *psym = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* If we're not in the global namespace and if the namespace name + isn't encoded in a mangled actual_name, add it. */ + + if (pdi_needs_namespace (pdi->tag, namespace)) + { + actual_name = alloca (strlen (pdi->name) + 2 + strlen (namespace) + 1); + strcpy (actual_name, namespace); + strcat (actual_name, "::"); + strcat (actual_name, pdi->name); + } + + switch (pdi->tag) + { + case DW_TAG_subprogram: + if (pdi->is_external) + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->global_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + else + { + /*prim_record_minimal_symbol (actual_name, pdi->lowpc + baseaddr, + mst_file_text, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_BLOCK, + &objfile->static_psymbols, + 0, pdi->lowpc + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_variable: + if (pdi->is_external) + { + /* Global Variable. + Don't enter into the minimal symbol tables as there is + a minimal symbol table entry from the ELF symbols already. + Enter into partial symbol table if it has a location + descriptor or a type. + If the location descriptor is missing, new_symbol will create + a LOC_UNRESOLVED symbol, the address of the variable will then + be determined from the minimal symbol table whenever the variable + is referenced. + The address for the partial symbol table entry is not + used by GDB, but it comes in handy for debugging partial symbol + table building. */ + + if (pdi->locdesc) + addr = decode_locdesc (pdi->locdesc, cu); + if (pdi->locdesc || pdi->has_type) + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->global_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + else + { + /* Static Variable. Skip symbols without location descriptors. */ + if (pdi->locdesc == NULL) + return; + addr = decode_locdesc (pdi->locdesc, cu); + /*prim_record_minimal_symbol (actual_name, addr + baseaddr, + mst_file_data, objfile); */ + psym = add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_STATIC, + &objfile->static_psymbols, + 0, addr + baseaddr, + cu->language, objfile); + } + break; + case DW_TAG_typedef: + case DW_TAG_base_type: + case DW_TAG_subrange_type: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + /* Skip aggregate types without children, these are external + references. */ + /* NOTE: carlton/2003-10-07: See comment in new_symbol about + static vs. global. */ + if (pdi->has_children == 0) + return; + add_psymbol_to_list (actual_name, strlen (actual_name), + STRUCT_DOMAIN, LOC_TYPEDEF, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + + if (cu->language == language_cplus) + { + /* For C++, these implicitly act as typedefs as well. */ + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + } + break; + case DW_TAG_enumerator: + add_psymbol_to_list (actual_name, strlen (actual_name), + VAR_DOMAIN, LOC_CONST, + cu->language == language_cplus + ? &objfile->global_psymbols + : &objfile->static_psymbols, + 0, (CORE_ADDR) 0, cu->language, objfile); + break; + default: + break; + } + + /* Check to see if we should scan the name for possible namespace + info. Only do this if this is C++, if we don't have namespace + debugging info in the file, if the psym is of an appropriate type + (otherwise we'll have psym == NULL), and if we actually had a + mangled name to begin with. */ + + if (cu->language == language_cplus + && namespace == NULL + && psym != NULL + && SYMBOL_CPLUS_DEMANGLED_NAME (psym) != NULL) + cp_check_possible_namespace_symbols (SYMBOL_CPLUS_DEMANGLED_NAME (psym), + objfile); +} + +/* Determine whether a die of type TAG living in the C++ namespace + NAMESPACE needs to have the name of the namespace prepended to the + name listed in the die. */ + +static int +pdi_needs_namespace (enum dwarf_tag tag, const char *namespace) +{ + if (namespace == NULL || namespace[0] == '\0') + return 0; + + switch (tag) + { + case DW_TAG_typedef: + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + case DW_TAG_enumerator: + return 1; + default: + return 0; + } +} + +/* Read a partial die corresponding to a namespace; also, add a symbol + corresponding to that namespace to the symbol table. NAMESPACE is + the name of the enclosing namespace. */ + +static char * +add_partial_namespace (struct partial_die_info *pdi, char *info_ptr, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + const char *new_name = pdi->name; + char *full_name; + + /* Calculate the full name of the namespace that we just entered. */ + + if (new_name == NULL) + new_name = "(anonymous namespace)"; + full_name = alloca (strlen (namespace) + 2 + strlen (new_name) + 1); + strcpy (full_name, namespace); + if (*namespace != '\0') + strcat (full_name, "::"); + strcat (full_name, new_name); + + /* FIXME: carlton/2003-10-07: We can't just replace this by a call + to add_partial_symbol, because we don't have a way to pass in the + full name to that function; that might be a flaw in + add_partial_symbol's interface. */ + + add_psymbol_to_list (full_name, strlen (full_name), + VAR_DOMAIN, LOC_TYPEDEF, + &objfile->global_psymbols, + 0, 0, cu->language, objfile); + + /* Now scan partial symbols in that namespace. */ + + if (pdi->has_children) + info_ptr = scan_partial_symbols (info_ptr, lowpc, highpc, cu, full_name); + + return info_ptr; +} + +/* Read a partial die corresponding to a class or structure. */ + +static char * +add_partial_structure (struct partial_die_info *struct_pdi, char *info_ptr, + struct dwarf2_cu *cu, + const char *namespace) +{ + bfd *abfd = cu->objfile->obfd; + char *actual_class_name = NULL; + + if (cu->language == language_cplus + && (namespace == NULL || namespace[0] == '\0') + && struct_pdi->name != NULL + && struct_pdi->has_children) + { + /* See if we can figure out if the class lives in a namespace + (or is nested within another class.) We do this by looking + for a member function; its demangled name will contain + namespace info, if there is any. */ + + /* NOTE: carlton/2003-10-07: Getting the info this way changes + what template types look like, because the demangler + frequently doesn't give the same name as the debug info. We + could fix this by only using the demangled name to get the + prefix (but see comment in read_structure_type). */ + + /* FIXME: carlton/2004-01-23: If NAMESPACE equals "", we have + the appropriate debug information, so it would be nice to be + able to avoid this hack. But NAMESPACE may not be the + namespace where this class was defined: NAMESPACE reflects + where STRUCT_PDI occurs in the tree of dies, but because of + DW_AT_specification, that may not actually tell us where the + class is defined. (See the comment in read_func_scope for an + example of how this could occur.) + + Unfortunately, our current partial symtab data structures are + completely unable to deal with DW_AT_specification. So, for + now, the best thing to do is to get nesting information from + places other than the tree structure of dies if there's any + chance that a DW_AT_specification is involved. :-( */ + + char *next_child = info_ptr; + + while (1) + { + struct partial_die_info child_pdi; + + next_child = read_partial_die (&child_pdi, abfd, next_child, + cu); + if (!child_pdi.tag) + break; + if (child_pdi.tag == DW_TAG_subprogram) + { + actual_class_name = class_name_from_physname (child_pdi.name); + if (actual_class_name != NULL) + struct_pdi->name = actual_class_name; + break; + } + else + { + next_child = locate_pdi_sibling (&child_pdi, next_child, + abfd, cu); + } + } + } + + add_partial_symbol (struct_pdi, cu, namespace); + xfree (actual_class_name); + + return locate_pdi_sibling (struct_pdi, info_ptr, abfd, cu); +} + +/* Read a partial die corresponding to an enumeration type. */ + +static char * +add_partial_enumeration (struct partial_die_info *enum_pdi, char *info_ptr, + struct dwarf2_cu *cu, const char *namespace) +{ + struct objfile *objfile = cu->objfile; + bfd *abfd = objfile->obfd; + struct partial_die_info pdi; + + if (enum_pdi->name != NULL) + add_partial_symbol (enum_pdi, cu, namespace); + + while (1) + { + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + if (pdi.tag == 0) + break; + if (pdi.tag != DW_TAG_enumerator || pdi.name == NULL) + complaint (&symfile_complaints, "malformed enumerator DIE ignored"); + else + add_partial_symbol (&pdi, cu, namespace); + } + + return info_ptr; +} + +/* Locate ORIG_PDI's sibling; INFO_PTR should point to the next DIE + after ORIG_PDI. */ + +static char * +locate_pdi_sibling (struct partial_die_info *orig_pdi, char *info_ptr, + bfd *abfd, struct dwarf2_cu *cu) +{ + /* Do we know the sibling already? */ + + if (orig_pdi->sibling) + return orig_pdi->sibling; + + /* Are there any children to deal with? */ + + if (!orig_pdi->has_children) + return info_ptr; + + /* Okay, we don't know the sibling, but we have children that we + want to skip. So read children until we run into one without a + tag; return whatever follows it. */ + + while (1) + { + struct partial_die_info pdi; + + info_ptr = read_partial_die (&pdi, abfd, info_ptr, cu); + + if (pdi.tag == 0) + return info_ptr; + else + info_ptr = locate_pdi_sibling (&pdi, info_ptr, abfd, cu); + } +} + +/* Expand this partial symbol table into a full symbol table. */ + +static void +dwarf2_psymtab_to_symtab (struct partial_symtab *pst) +{ + /* FIXME: This is barely more than a stub. */ + if (pst != NULL) + { + if (pst->readin) + { + warning ("bug: psymtab for %s is already read in.", pst->filename); + } + else + { + if (info_verbose) + { + printf_filtered ("Reading in symbols for %s...", pst->filename); + gdb_flush (gdb_stdout); + } + + psymtab_to_symtab_1 (pst); + + /* Finish up the debug error message. */ + if (info_verbose) + printf_filtered ("done.\n"); + } + } +} + +static void +psymtab_to_symtab_1 (struct partial_symtab *pst) +{ + struct objfile *objfile = pst->objfile; + bfd *abfd = objfile->obfd; + struct dwarf2_cu cu; + struct die_info *dies; + unsigned long offset; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + char *info_ptr; + struct symtab *symtab; + struct cleanup *back_to; + struct attribute *attr; + CORE_ADDR baseaddr; + + /* Set local variables from the partial symbol table info. */ + offset = DWARF_INFO_OFFSET (pst); + dwarf_info_buffer = DWARF_INFO_BUFFER (pst); + dwarf_abbrev_buffer = DWARF_ABBREV_BUFFER (pst); + dwarf_abbrev_size = DWARF_ABBREV_SIZE (pst); + dwarf_line_buffer = DWARF_LINE_BUFFER (pst); + dwarf_line_size = DWARF_LINE_SIZE (pst); + dwarf_str_buffer = DWARF_STR_BUFFER (pst); + dwarf_str_size = DWARF_STR_SIZE (pst); + dwarf_macinfo_buffer = DWARF_MACINFO_BUFFER (pst); + dwarf_macinfo_size = DWARF_MACINFO_SIZE (pst); + dwarf_ranges_buffer = DWARF_RANGES_BUFFER (pst); + dwarf_ranges_size = DWARF_RANGES_SIZE (pst); + dwarf_loc_buffer = DWARF_LOC_BUFFER (pst); + dwarf_loc_size = DWARF_LOC_SIZE (pst); + info_ptr = dwarf_info_buffer + offset; + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* We're in the global namespace. */ + processing_current_prefix = ""; + + obstack_init (&dwarf2_tmp_obstack); + back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + + buildsym_init (); + make_cleanup (really_free_pendings, NULL); + + cu.objfile = objfile; + + /* read in the comp_unit header */ + info_ptr = read_comp_unit_head (&cu.header, info_ptr, abfd); + + /* Read the abbrevs for this compilation unit */ + dwarf2_read_abbrevs (abfd, &cu); + make_cleanup (dwarf2_empty_abbrev_table, cu.header.dwarf2_abbrevs); + + cu.header.offset = offset; + + cu.list_in_scope = &file_symbols; + + dies = read_comp_unit (info_ptr, abfd, &cu); + + make_cleanup_free_die_list (dies); + + /* Find the base address of the compilation unit for range lists and + location lists. It will normally be specified by DW_AT_low_pc. + In DWARF-3 draft 4, the base address could be overridden by + DW_AT_entry_pc. It's been removed, but GCC still uses this for + compilation units with discontinuous ranges. */ + + cu.header.base_known = 0; + cu.header.base_address = 0; + + attr = dwarf2_attr (dies, DW_AT_entry_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + else + { + attr = dwarf2_attr (dies, DW_AT_low_pc, &cu); + if (attr) + { + cu.header.base_address = DW_ADDR (attr); + cu.header.base_known = 1; + } + } + + /* Do line number decoding in read_file_scope () */ + process_die (dies, &cu); + + /* Some compilers don't define a DW_AT_high_pc attribute for the + compilation unit. If the DW_AT_high_pc is missing, synthesize + it, by scanning the DIE's below the compilation unit. */ + get_scope_pc_bounds (dies, &lowpc, &highpc, &cu); + + symtab = end_symtab (highpc + baseaddr, objfile, SECT_OFF_TEXT (objfile)); + + /* Set symtab language to language from DW_AT_language. + If the compilation is from a C file generated by language preprocessors, + do not set the language if it was already deduced by start_subfile. */ + if (symtab != NULL + && !(cu.language == language_c && symtab->language != language_c)) + { + symtab->language = cu.language; + } + pst->symtab = symtab; + pst->readin = 1; + + do_cleanups (back_to); +} + +/* Process a die and its children. */ + +static void +process_die (struct die_info *die, struct dwarf2_cu *cu) +{ + switch (die->tag) + { + case DW_TAG_padding: + break; + case DW_TAG_compile_unit: + read_file_scope (die, cu); + break; + case DW_TAG_subprogram: + read_subroutine_type (die, cu); + read_func_scope (die, cu); + break; + case DW_TAG_inlined_subroutine: + /* FIXME: These are ignored for now. + They could be used to set breakpoints on all inlined instances + of a function and make GDB `next' properly over inlined functions. */ + break; + case DW_TAG_lexical_block: + case DW_TAG_try_block: + case DW_TAG_catch_block: + read_lexical_block_scope (die, cu); + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); + process_structure_scope (die, cu); + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); + process_enumeration_scope (die, cu); + break; + + /* FIXME drow/2004-03-14: These initialize die->type, but do not create + a symbol or process any children. Therefore it doesn't do anything + that won't be done on-demand by read_type_die. */ + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + /* END FIXME */ + + case DW_TAG_base_type: + read_base_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + /* Add a typedef symbol for the type definition, if it has a + DW_AT_name. */ + new_symbol (die, die->type, cu); + break; + case DW_TAG_common_block: + read_common_block (die, cu); + break; + case DW_TAG_common_inclusion: + break; + case DW_TAG_namespace: + processing_has_namespace_info = 1; + read_namespace (die, cu); + break; + case DW_TAG_imported_declaration: + case DW_TAG_imported_module: + /* FIXME: carlton/2002-10-16: Eventually, we should use the + information contained in these. DW_TAG_imported_declaration + dies shouldn't have children; DW_TAG_imported_module dies + shouldn't in the C++ case, but conceivably could in the + Fortran case, so we'll have to replace this gdb_assert if + Fortran compilers start generating that info. */ + processing_has_namespace_info = 1; + gdb_assert (die->child == NULL); + break; + default: + new_symbol (die, NULL, cu); + break; + } +} + +static void +initialize_cu_func_list (struct dwarf2_cu *cu) +{ + cu->first_fn = cu->last_fn = cu->cached_fn = NULL; +} + +static void +read_file_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct cleanup *back_to = make_cleanup (null_cleanup, 0); + CORE_ADDR lowpc = ((CORE_ADDR) -1); + CORE_ADDR highpc = ((CORE_ADDR) 0); + struct attribute *attr; + char *name = ""; + char *comp_dir = NULL; + struct die_info *child_die; + bfd *abfd = objfile->obfd; + struct line_header *line_header = 0; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + get_scope_pc_bounds (die, &lowpc, &highpc, cu); + + /* If we didn't find a lowpc, set it to highpc to avoid complaints + from finish_block. */ + if (lowpc == ((CORE_ADDR) -1)) + lowpc = highpc; + lowpc += baseaddr; + highpc += baseaddr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr) + { + name = DW_STRING (attr); + } + attr = dwarf2_attr (die, DW_AT_comp_dir, cu); + if (attr) + { + comp_dir = DW_STRING (attr); + if (comp_dir) + { + /* Irix 6.2 native cc prepends .: to the compilation + directory, get rid of it. */ + char *cp = strchr (comp_dir, ':'); + + if (cp && cp != comp_dir && cp[-1] == '.' && cp[1] == '/') + comp_dir = cp + 1; + } + } + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.deprecated_entry_file_lowpc = lowpc; + objfile->ei.deprecated_entry_file_highpc = highpc; + } + + attr = dwarf2_attr (die, DW_AT_language, cu); + if (attr) + { + set_cu_language (DW_UNSND (attr), cu); + } + + /* We assume that we're processing GCC output. */ + processing_gcc_compilation = 2; +#if 0 + /* FIXME:Do something here. */ + if (dip->at_producer != NULL) + { + handle_producer (dip->at_producer); + } +#endif + + /* The compilation unit may be in a different language or objfile, + zero out all remembered fundamental types. */ + memset (cu->ftypes, 0, FT_NUM_MEMBERS * sizeof (struct type *)); + + start_symtab (name, comp_dir, lowpc); + record_debugformat ("DWARF 2"); + + initialize_cu_func_list (cu); + + /* Process all dies in compilation unit. */ + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + /* Decode line number information if present. */ + attr = dwarf2_attr (die, DW_AT_stmt_list, cu); + if (attr) + { + unsigned int line_offset = DW_UNSND (attr); + line_header = dwarf_decode_line_header (line_offset, abfd, cu); + if (line_header) + { + make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) line_header); + dwarf_decode_lines (line_header, comp_dir, abfd, cu); + } + } + + /* Decode macro information, if present. Dwarf 2 macro information + refers to information in the line number info statement program + header, so we can only read it if we've read the header + successfully. */ + attr = dwarf2_attr (die, DW_AT_macro_info, cu); + if (attr && line_header) + { + unsigned int macro_offset = DW_UNSND (attr); + dwarf_decode_macros (line_header, macro_offset, + comp_dir, abfd, cu); + } + do_cleanups (back_to); +} + +static void +add_to_cu_func_list (const char *name, CORE_ADDR lowpc, CORE_ADDR highpc, + struct dwarf2_cu *cu) +{ + struct function_range *thisfn; + + thisfn = (struct function_range *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct function_range)); + thisfn->name = name; + thisfn->lowpc = lowpc; + thisfn->highpc = highpc; + thisfn->seen_line = 0; + thisfn->next = NULL; + + if (cu->last_fn == NULL) + cu->first_fn = thisfn; + else + cu->last_fn->next = thisfn; + + cu->last_fn = thisfn; +} + +static void +read_func_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc; + CORE_ADDR highpc; + struct die_info *child_die; + struct attribute *attr; + char *name; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + name = dwarf2_linkage_name (die, cu); + + /* Ignore functions with missing or empty names and functions with + missing or invalid low and high pc attributes. */ + if (name == NULL || !dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + + if (cu->language == language_cplus) + { + struct die_info *spec_die = die_specification (die, cu); + + /* NOTE: carlton/2004-01-23: We have to be careful in the + presence of DW_AT_specification. For example, with GCC 3.4, + given the code + + namespace N { + void foo() { + // Definition of N::foo. + } + } + + then we'll have a tree of DIEs like this: + + 1: DW_TAG_compile_unit + 2: DW_TAG_namespace // N + 3: DW_TAG_subprogram // declaration of N::foo + 4: DW_TAG_subprogram // definition of N::foo + DW_AT_specification // refers to die #3 + + Thus, when processing die #4, we have to pretend that we're + in the context of its DW_AT_specification, namely the contex + of die #3. */ + + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + } + + lowpc += baseaddr; + highpc += baseaddr; + + /* Record the function range for dwarf_decode_lines. */ + add_to_cu_func_list (name, lowpc, highpc, cu); + + if (objfile->ei.entry_point >= lowpc && + objfile->ei.entry_point < highpc) + { + objfile->ei.entry_func_lowpc = lowpc; + objfile->ei.entry_func_highpc = highpc; + } + + new = push_context (0, lowpc); + new->name = new_symbol (die, die->type, cu); + + /* If there is a location expression for DW_AT_frame_base, record + it. */ + attr = dwarf2_attr (die, DW_AT_frame_base, cu); + if (attr) + /* FIXME: cagney/2004-01-26: The DW_AT_frame_base's location + expression is being recorded directly in the function's symbol + and not in a separate frame-base object. I guess this hack is + to avoid adding some sort of frame-base adjunct/annex to the + function's symbol :-(. The problem with doing this is that it + results in a function symbol with a location expression that + has nothing to do with the location of the function, ouch! The + relationship should be: a function's symbol has-a frame base; a + frame-base has-a location expression. */ + dwarf2_symbol_mark_computed (attr, new->name, cu); + + cu->list_in_scope = &local_symbols; + + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + new = pop_context (); + /* Make a block for the local symbols within. */ + finish_block (new->name, &local_symbols, new->old_blocks, + lowpc, highpc, objfile); + + /* In C++, we can have functions nested inside functions (e.g., when + a function declares a class that has methods). This means that + when we finish processing a function scope, we may need to go + back to building a containing block's symbol lists. */ + local_symbols = new->locals; + param_symbols = new->params; + + /* If we've finished processing a top-level function, subsequent + symbols go in the file symbol list. */ + if (outermost_context_p ()) + cu->list_in_scope = &file_symbols; + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +/* Process all the DIES contained within a lexical block scope. Start + a new scope, process the dies, and then close the scope. */ + +static void +read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct context_stack *new; + CORE_ADDR lowpc, highpc; + struct die_info *child_die; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + /* Ignore blocks with missing or invalid low and high pc attributes. */ + /* ??? Perhaps consider discontiguous blocks defined by DW_AT_ranges + as multiple lexical blocks? Handling children in a sane way would + be nasty. Might be easier to properly extend generic blocks to + describe ranges. */ + if (!dwarf2_get_pc_bounds (die, &lowpc, &highpc, cu)) + return; + lowpc += baseaddr; + highpc += baseaddr; + + push_context (0, lowpc); + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + new = pop_context (); + + if (local_symbols != NULL) + { + finish_block (0, &local_symbols, new->old_blocks, new->start_addr, + highpc, objfile); + } + local_symbols = new->locals; +} + +/* Get low and high pc attributes from a die. Return 1 if the attributes + are present and valid, otherwise, return 0. Return -1 if the range is + discontinuous, i.e. derived from DW_AT_ranges information. */ +static int +dwarf2_get_pc_bounds (struct die_info *die, CORE_ADDR *lowpc, + CORE_ADDR *highpc, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct attribute *attr; + bfd *obfd = objfile->obfd; + CORE_ADDR low = 0; + CORE_ADDR high = 0; + int ret = 0; + + attr = dwarf2_attr (die, DW_AT_high_pc, cu); + if (attr) + { + high = DW_ADDR (attr); + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + low = DW_ADDR (attr); + else + /* Found high w/o low attribute. */ + return 0; + + /* Found consecutive range of addresses. */ + ret = 1; + } + else + { + attr = dwarf2_attr (die, DW_AT_ranges, cu); + if (attr != NULL) + { + unsigned int addr_size = cu_header->addr_size; + CORE_ADDR mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1)); + /* Value of the DW_AT_ranges attribute is the offset in the + .debug_ranges section. */ + unsigned int offset = DW_UNSND (attr); + /* Base address selection entry. */ + CORE_ADDR base; + int found_base; + int dummy; + char *buffer; + CORE_ADDR marker; + int low_set; + + found_base = cu_header->base_known; + base = cu_header->base_address; + + if (offset >= dwarf_ranges_size) + { + complaint (&symfile_complaints, + "Offset %d out of bounds for DW_AT_ranges attribute", + offset); + return 0; + } + buffer = dwarf_ranges_buffer + offset; + + /* Read in the largest possible address. */ + marker = read_address (obfd, buffer, cu, &dummy); + if ((marker & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + buffer += 2 * addr_size; + offset += 2 * addr_size; + found_base = 1; + } + + low_set = 0; + + while (1) + { + CORE_ADDR range_beginning, range_end; + + range_beginning = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + range_end = read_address (obfd, buffer, cu, &dummy); + buffer += addr_size; + offset += 2 * addr_size; + + /* An end of list marker is a pair of zero addresses. */ + if (range_beginning == 0 && range_end == 0) + /* Found the end of list entry. */ + break; + + /* Each base address selection entry is a pair of 2 values. + The first is the largest possible address, the second is + the base address. Check for a base address here. */ + if ((range_beginning & mask) == mask) + { + /* If we found the largest possible address, then + read the base address. */ + base = read_address (obfd, buffer + addr_size, cu, &dummy); + found_base = 1; + continue; + } + + if (!found_base) + { + /* We have no valid base address for the ranges + data. */ + complaint (&symfile_complaints, + "Invalid .debug_ranges data (no base address)"); + return 0; + } + + range_beginning += base; + range_end += base; + + /* FIXME: This is recording everything as a low-high + segment of consecutive addresses. We should have a + data structure for discontiguous block ranges + instead. */ + if (! low_set) + { + low = range_beginning; + high = range_end; + low_set = 1; + } + else + { + if (range_beginning < low) + low = range_beginning; + if (range_end > high) + high = range_end; + } + } + + if (! low_set) + /* If the first entry is an end-of-list marker, the range + describes an empty scope, i.e. no instructions. */ + return 0; + + ret = -1; + } + } + + if (high < low) + return 0; + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (low == 0 && (bfd_get_file_flags (obfd) & HAS_RELOC) == 0) + return 0; + + *lowpc = low; + *highpc = high; + return ret; +} + +/* Get the low and high pc's represented by the scope DIE, and store + them in *LOWPC and *HIGHPC. If the correct values can't be + determined, set *LOWPC to -1 and *HIGHPC to 0. */ + +static void +get_scope_pc_bounds (struct die_info *die, + CORE_ADDR *lowpc, CORE_ADDR *highpc, + struct dwarf2_cu *cu) +{ + CORE_ADDR best_low = (CORE_ADDR) -1; + CORE_ADDR best_high = (CORE_ADDR) 0; + CORE_ADDR current_low, current_high; + + if (dwarf2_get_pc_bounds (die, ¤t_low, ¤t_high, cu)) + { + best_low = current_low; + best_high = current_high; + } + else + { + struct die_info *child = die->child; + + while (child && child->tag) + { + switch (child->tag) { + case DW_TAG_subprogram: + if (dwarf2_get_pc_bounds (child, ¤t_low, ¤t_high, cu)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + case DW_TAG_namespace: + /* FIXME: carlton/2004-01-16: Should we do this for + DW_TAG_class_type/DW_TAG_structure_type, too? I think + that current GCC's always emit the DIEs corresponding + to definitions of methods of classes as children of a + DW_TAG_compile_unit or DW_TAG_namespace (as opposed to + the DIEs giving the declarations, which could be + anywhere). But I don't see any reason why the + standards says that they have to be there. */ + get_scope_pc_bounds (child, ¤t_low, ¤t_high, cu); + + if (current_low != ((CORE_ADDR) -1)) + { + best_low = min (best_low, current_low); + best_high = max (best_high, current_high); + } + break; + default: + /* Ignore. */ + break; + } + + child = sibling_die (child); + } + } + + *lowpc = best_low; + *highpc = best_high; +} + +/* Add an aggregate field to the field list. */ + +static void +dwarf2_add_field (struct field_info *fip, struct die_info *die, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct nextfield *new_field; + struct attribute *attr; + struct field *fp; + char *fieldname = ""; + + /* Allocate a new field list entry and link it in. */ + new_field = (struct nextfield *) xmalloc (sizeof (struct nextfield)); + make_cleanup (xfree, new_field); + memset (new_field, 0, sizeof (struct nextfield)); + new_field->next = fip->fields; + fip->fields = new_field; + fip->nfields++; + + /* Handle accessibility and virtuality of field. + The default accessibility for members is public, the default + accessibility for inheritance is private. */ + if (die->tag != DW_TAG_inheritance) + new_field->accessibility = DW_ACCESS_public; + else + new_field->accessibility = DW_ACCESS_private; + new_field->virtuality = DW_VIRTUALITY_none; + + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + new_field->accessibility = DW_UNSND (attr); + if (new_field->accessibility != DW_ACCESS_public) + fip->non_public_fields = 1; + attr = dwarf2_attr (die, DW_AT_virtuality, cu); + if (attr) + new_field->virtuality = DW_UNSND (attr); + + fp = &new_field->field; + + if (die->tag == DW_TAG_member && ! die_is_declaration (die, cu)) + { + /* Data member other than a C++ static data member. */ + + /* Get type of field. */ + fp->type = die_type (die, cu); + + FIELD_STATIC_KIND (*fp) = 0; + + /* Get bit size of field (zero if none). */ + attr = dwarf2_attr (die, DW_AT_bit_size, cu); + if (attr) + { + FIELD_BITSIZE (*fp) = DW_UNSND (attr); + } + else + { + FIELD_BITSIZE (*fp) = 0; + } + + /* Get bit offset of field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + { + FIELD_BITPOS (*fp) = + decode_locdesc (DW_BLOCK (attr), cu) * bits_per_byte; + } + else + FIELD_BITPOS (*fp) = 0; + attr = dwarf2_attr (die, DW_AT_bit_offset, cu); + if (attr) + { + if (BITS_BIG_ENDIAN) + { + /* For big endian bits, the DW_AT_bit_offset gives the + additional bit offset from the MSB of the containing + anonymous object to the MSB of the field. We don't + have to do anything special since we don't need to + know the size of the anonymous object. */ + FIELD_BITPOS (*fp) += DW_UNSND (attr); + } + else + { + /* For little endian bits, compute the bit offset to the + MSB of the anonymous object, subtract off the number of + bits from the MSB of the field to the MSB of the + object, and then subtract off the number of bits of + the field itself. The result is the bit offset of + the LSB of the field. */ + int anonymous_size; + int bit_offset = DW_UNSND (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + /* The size of the anonymous object containing + the bit field is explicit, so use the + indicated size (in bytes). */ + anonymous_size = DW_UNSND (attr); + } + else + { + /* The size of the anonymous object containing + the bit field must be inferred from the type + attribute of the data member containing the + bit field. */ + anonymous_size = TYPE_LENGTH (fp->type); + } + FIELD_BITPOS (*fp) += anonymous_size * bits_per_byte + - bit_offset - FIELD_BITSIZE (*fp); + } + } + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + fp->name = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + + /* Change accessibility for artificial fields (e.g. virtual table + pointer or virtual base class pointer) to private. */ + if (dwarf2_attr (die, DW_AT_artificial, cu)) + { + new_field->accessibility = DW_ACCESS_private; + fip->non_public_fields = 1; + } + } + else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable) + { + /* C++ static member. */ + + /* NOTE: carlton/2002-11-05: It should be a DW_TAG_member that + is a declaration, but all versions of G++ as of this writing + (so through at least 3.2.1) incorrectly generate + DW_TAG_variable tags. */ + + char *physname; + + /* Get name of field. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get physical name. */ + physname = dwarf2_linkage_name (die, cu); + + SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname), + &objfile->objfile_obstack)); + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname), + &objfile->objfile_obstack); + } + else if (die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + attr = dwarf2_attr (die, DW_AT_data_member_location, cu); + if (attr) + FIELD_BITPOS (*fp) = (decode_locdesc (DW_BLOCK (attr), cu) + * bits_per_byte); + FIELD_BITSIZE (*fp) = 0; + FIELD_STATIC_KIND (*fp) = 0; + FIELD_TYPE (*fp) = die_type (die, cu); + FIELD_NAME (*fp) = type_name_no_tag (fp->type); + fip->nbaseclasses++; + } +} + +/* Create the vector of fields, and attach it to the type. */ + +static void +dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + int nfields = fip->nfields; + + /* Record the field count, allocate space for the array of fields, + and create blank accessibility bitfields if necessary. */ + TYPE_NFIELDS (type) = nfields; + TYPE_FIELDS (type) = (struct field *) + TYPE_ALLOC (type, sizeof (struct field) * nfields); + memset (TYPE_FIELDS (type), 0, sizeof (struct field) * nfields); + + if (fip->non_public_fields) + { + ALLOCATE_CPLUS_STRUCT_TYPE (type); + + TYPE_FIELD_PRIVATE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PRIVATE_BITS (type), nfields); + + TYPE_FIELD_PROTECTED_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_PROTECTED_BITS (type), nfields); + + TYPE_FIELD_IGNORE_BITS (type) = + (B_TYPE *) TYPE_ALLOC (type, B_BYTES (nfields)); + B_CLRALL (TYPE_FIELD_IGNORE_BITS (type), nfields); + } + + /* If the type has baseclasses, allocate and clear a bit vector for + TYPE_FIELD_VIRTUAL_BITS. */ + if (fip->nbaseclasses) + { + int num_bytes = B_BYTES (fip->nbaseclasses); + char *pointer; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + pointer = (char *) TYPE_ALLOC (type, num_bytes); + TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; + B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), fip->nbaseclasses); + TYPE_N_BASECLASSES (type) = fip->nbaseclasses; + } + + /* Copy the saved-up fields into the field vector. Start from the head + of the list, adding to the tail of the field array, so that they end + up in the same order in the array in which they were added to the list. */ + while (nfields-- > 0) + { + TYPE_FIELD (type, nfields) = fip->fields->field; + switch (fip->fields->accessibility) + { + case DW_ACCESS_private: + SET_TYPE_FIELD_PRIVATE (type, nfields); + break; + + case DW_ACCESS_protected: + SET_TYPE_FIELD_PROTECTED (type, nfields); + break; + + case DW_ACCESS_public: + break; + + default: + /* Unknown accessibility. Complain and treat it as public. */ + { + complaint (&symfile_complaints, "unsupported accessibility %d", + fip->fields->accessibility); + } + break; + } + if (nfields < fip->nbaseclasses) + { + switch (fip->fields->virtuality) + { + case DW_VIRTUALITY_virtual: + case DW_VIRTUALITY_pure_virtual: + SET_TYPE_FIELD_VIRTUAL (type, nfields); + break; + } + } + fip->fields = fip->fields->next; + } +} + +/* Add a member function to the proper fieldlist. */ + +static void +dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, + struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + struct fnfieldlist *flp; + int i; + struct fn_field *fnp; + char *fieldname; + char *physname; + struct nextfnfield *new_fnfield; + + /* Get name of member function. */ + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + fieldname = DW_STRING (attr); + else + return; + + /* Get the mangled name. */ + physname = dwarf2_linkage_name (die, cu); + + /* Look up member function name in fieldlist. */ + for (i = 0; i < fip->nfnfields; i++) + { + if (strcmp (fip->fnfieldlists[i].name, fieldname) == 0) + break; + } + + /* Create new list element if necessary. */ + if (i < fip->nfnfields) + flp = &fip->fnfieldlists[i]; + else + { + if ((fip->nfnfields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fip->fnfieldlists = (struct fnfieldlist *) + xrealloc (fip->fnfieldlists, + (fip->nfnfields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct fnfieldlist)); + if (fip->nfnfields == 0) + make_cleanup (free_current_contents, &fip->fnfieldlists); + } + flp = &fip->fnfieldlists[fip->nfnfields]; + flp->name = fieldname; + flp->length = 0; + flp->head = NULL; + fip->nfnfields++; + } + + /* Create a new member function field and chain it to the field list + entry. */ + new_fnfield = (struct nextfnfield *) xmalloc (sizeof (struct nextfnfield)); + make_cleanup (xfree, new_fnfield); + memset (new_fnfield, 0, sizeof (struct nextfnfield)); + new_fnfield->next = flp->head; + flp->head = new_fnfield; + flp->length++; + + /* Fill in the member function field info. */ + fnp = &new_fnfield->fnfield; + fnp->physname = obsavestring (physname, strlen (physname), + &objfile->objfile_obstack); + fnp->type = alloc_type (objfile); + if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC) + { + int nparams = TYPE_NFIELDS (die->type); + + /* TYPE is the domain of this method, and DIE->TYPE is the type + of the method itself (TYPE_CODE_METHOD). */ + smash_to_method_type (fnp->type, type, + TYPE_TARGET_TYPE (die->type), + TYPE_FIELDS (die->type), + TYPE_NFIELDS (die->type), + TYPE_VARARGS (die->type)); + + /* Handle static member functions. + Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We obtain this information + from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */ + if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (die->type, 0) == 0) + fnp->voffset = VOFFSET_STATIC; + } + else + complaint (&symfile_complaints, "member function type missing for '%s'", + physname); + + /* Get fcontext from DW_AT_containing_type if present. */ + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + fnp->fcontext = die_containing_type (die, cu); + + /* dwarf2 doesn't have stubbed physical names, so the setting of is_const + and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */ + + /* Get accessibility. */ + attr = dwarf2_attr (die, DW_AT_accessibility, cu); + if (attr) + { + switch (DW_UNSND (attr)) + { + case DW_ACCESS_private: + fnp->is_private = 1; + break; + case DW_ACCESS_protected: + fnp->is_protected = 1; + break; + } + } + + /* Check for artificial methods. */ + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr && DW_UNSND (attr) != 0) + fnp->is_artificial = 1; + + /* Get index in virtual function table if it is a virtual member function. */ + attr = dwarf2_attr (die, DW_AT_vtable_elem_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + fnp->voffset = decode_locdesc (DW_BLOCK (attr), cu) + 2; + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_vtable_elem_location", + fieldname); + } + } +} + +/* Create the vector of member function fields, and attach it to the type. */ + +static void +dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, + struct dwarf2_cu *cu) +{ + struct fnfieldlist *flp; + int total_length = 0; + int i; + + ALLOCATE_CPLUS_STRUCT_TYPE (type); + TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *) + TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * fip->nfnfields); + + for (i = 0, flp = fip->fnfieldlists; i < fip->nfnfields; i++, flp++) + { + struct nextfnfield *nfp = flp->head; + struct fn_fieldlist *fn_flp = &TYPE_FN_FIELDLIST (type, i); + int k; + + TYPE_FN_FIELDLIST_NAME (type, i) = flp->name; + TYPE_FN_FIELDLIST_LENGTH (type, i) = flp->length; + fn_flp->fn_fields = (struct fn_field *) + TYPE_ALLOC (type, sizeof (struct fn_field) * flp->length); + for (k = flp->length; (k--, nfp); nfp = nfp->next) + fn_flp->fn_fields[k] = nfp->fnfield; + + total_length += flp->length; + } + + TYPE_NFN_FIELDS (type) = fip->nfnfields; + TYPE_NFN_FIELDS_TOTAL (type) = total_length; +} + +/* Called when we find the DIE that starts a structure or union scope + (definition) to process all dies that define the members of the + structure or union. + + NOTE: we need to call struct_type regardless of whether or not the + DIE has an at_name attribute, since it might be an anonymous + structure or union. This gets the type entered into our set of + user defined types. + + However, if the structure is incomplete (an opaque struct/union) + then suppress creating a symbol table entry for it since gdb only + wants to find the one with the complete definition. Note that if + it is complete, we just call new_symbol, which does it's own + checking about whether the struct/union is anonymous or not (and + suppresses creating a symbol table entry itself). */ + +static void +read_structure_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + const char *previous_prefix = processing_current_prefix; + struct cleanup *back_to = NULL; + + if (die->type) + return; + + type = alloc_type (objfile); + + INIT_CPLUS_SPECIFIC (type); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + if (cu->language == language_cplus) + { + char *new_prefix = determine_class_name (die, cu); + TYPE_TAG_NAME (type) = obsavestring (new_prefix, + strlen (new_prefix), + &objfile->objfile_obstack); + back_to = make_cleanup (xfree, new_prefix); + processing_current_prefix = new_prefix; + } + else + { + TYPE_TAG_NAME (type) = DW_STRING (attr); + } + } + + if (die->tag == DW_TAG_structure_type) + { + TYPE_CODE (type) = TYPE_CODE_STRUCT; + } + else if (die->tag == DW_TAG_union_type) + { + TYPE_CODE (type) = TYPE_CODE_UNION; + } + else + { + /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT + in gdbtypes.h. */ + TYPE_CODE (type) = TYPE_CODE_CLASS; + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + /* We need to add the type field to the die immediately so we don't + infinitely recurse when dealing with pointers to the structure + type within the structure itself. */ + die->type = type; + + if (die->child != NULL && ! die_is_declaration (die, cu)) + { + struct field_info fi; + struct die_info *child_die; + struct cleanup *back_to = make_cleanup (null_cleanup, NULL); + + memset (&fi, 0, sizeof (struct field_info)); + + child_die = die->child; + + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable) + { + /* NOTE: carlton/2002-11-05: A C++ static data member + should be a DW_TAG_member that is a declaration, but + all versions of G++ as of this writing (so through at + least 3.2.1) incorrectly generate DW_TAG_variable + tags for them instead. */ + dwarf2_add_field (&fi, child_die, cu); + } + else if (child_die->tag == DW_TAG_subprogram) + { + /* C++ member function. */ + read_type_die (child_die, cu); + dwarf2_add_member_fn (&fi, child_die, type, cu); + } + else if (child_die->tag == DW_TAG_inheritance) + { + /* C++ base class field. */ + dwarf2_add_field (&fi, child_die, cu); + } + child_die = sibling_die (child_die); + } + + /* Attach fields and member functions to the type. */ + if (fi.nfields) + dwarf2_attach_fields_to_type (&fi, type, cu); + if (fi.nfnfields) + { + dwarf2_attach_fn_fields_to_type (&fi, type, cu); + + /* Get the type which refers to the base class (possibly this + class itself) which contains the vtable pointer for the current + class from the DW_AT_containing_type attribute. */ + + if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL) + { + struct type *t = die_containing_type (die, cu); + + TYPE_VPTR_BASETYPE (type) = t; + if (type == t) + { + static const char vptr_name[] = + {'_', 'v', 'p', 't', 'r', '\0'}; + int i; + + /* Our own class provides vtbl ptr. */ + for (i = TYPE_NFIELDS (t) - 1; + i >= TYPE_N_BASECLASSES (t); + --i) + { + char *fieldname = TYPE_FIELD_NAME (t, i); + + if ((strncmp (fieldname, vptr_name, + strlen (vptr_name) - 1) + == 0) + && is_cplus_marker (fieldname[strlen (vptr_name)])) + { + TYPE_VPTR_FIELDNO (type) = i; + break; + } + } + + /* Complain if virtual function table field not found. */ + if (i < TYPE_N_BASECLASSES (t)) + complaint (&symfile_complaints, + "virtual function table pointer not found when defining class '%s'", + TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) : + ""); + } + else + { + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (t); + } + } + } + + do_cleanups (back_to); + } + else + { + /* No children, must be stub. */ + TYPE_FLAGS (type) |= TYPE_FLAG_STUB; + } + + processing_current_prefix = previous_prefix; + if (back_to != NULL) + do_cleanups (back_to); +} + +static void +process_structure_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + struct die_info *child_die = die->child; + + if (TYPE_TAG_NAME (die->type) != NULL) + processing_current_prefix = TYPE_TAG_NAME (die->type); + + /* NOTE: carlton/2004-03-16: GCC 3.4 (or at least one of its + snapshots) has been known to create a die giving a declaration + for a class that has, as a child, a die giving a definition for a + nested class. So we have to process our children even if the + current die is a declaration. Normally, of course, a declaration + won't have any children at all. */ + + while (child_die != NULL && child_die->tag) + { + if (child_die->tag == DW_TAG_member + || child_die->tag == DW_TAG_variable + || child_die->tag == DW_TAG_inheritance) + { + /* Do nothing. */ + } + else + process_die (child_die, cu); + + child_die = sibling_die (child_die); + } + + if (die->child != NULL && ! die_is_declaration (die, cu)) + new_symbol (die, die->type, cu); + + processing_current_prefix = previous_prefix; +} + +/* Given a DW_AT_enumeration_type die, set its type. We do not + complete the type's fields yet, or create any symbols. */ + +static void +read_enumeration_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + type = alloc_type (objfile); + + TYPE_CODE (type) = TYPE_CODE_ENUM; + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + const char *name = DW_STRING (attr); + + if (processing_has_namespace_info) + { + TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + processing_current_prefix[0] == '\0' + ? "" : "::", + name); + } + else + { + TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), + &objfile->objfile_obstack); + } + } + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = 0; + } + + die->type = type; +} + +/* Determine the name of the type represented by DIE, which should be + a named C++ compound type. Return the name in question; the caller + is responsible for xfree()'ing it. */ + +static char * +determine_class_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct cleanup *back_to = NULL; + struct die_info *spec_die = die_specification (die, cu); + char *new_prefix = NULL; + + /* If this is the definition of a class that is declared by another + die, then processing_current_prefix may not be accurate; see + read_func_scope for a similar example. */ + if (spec_die != NULL) + { + char *specification_prefix = determine_prefix (spec_die, cu); + processing_current_prefix = specification_prefix; + back_to = make_cleanup (xfree, specification_prefix); + } + + /* If we don't have namespace debug info, guess the name by trying + to demangle the names of members, just like we did in + add_partial_structure. */ + if (!processing_has_namespace_info) + { + struct die_info *child; + + for (child = die->child; + child != NULL && child->tag != 0; + child = sibling_die (child)) + { + if (child->tag == DW_TAG_subprogram) + { + new_prefix = class_name_from_physname (dwarf2_linkage_name + (child, cu)); + + if (new_prefix != NULL) + break; + } + } + } + + if (new_prefix == NULL) + { + const char *name = dwarf2_name (die, cu); + new_prefix = typename_concat (processing_current_prefix, + name ? name : "<>"); + } + + if (back_to != NULL) + do_cleanups (back_to); + + return new_prefix; +} + +/* Given a pointer to a die which begins an enumeration, process all + the dies that define the members of the enumeration, and create the + symbol for the enumeration type. + + NOTE: We reverse the order of the element list. */ + +static void +process_enumeration_scope (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct field *fields; + struct attribute *attr; + struct symbol *sym; + int num_fields; + int unsigned_enum = 1; + + num_fields = 0; + fields = NULL; + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag != DW_TAG_enumerator) + { + process_die (child_die, cu); + } + else + { + attr = dwarf2_attr (child_die, DW_AT_name, cu); + if (attr) + { + sym = new_symbol (child_die, die->type, cu); + if (SYMBOL_VALUE (sym) < 0) + unsigned_enum = 0; + + if ((num_fields % DW_FIELD_ALLOC_CHUNK) == 0) + { + fields = (struct field *) + xrealloc (fields, + (num_fields + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct field)); + } + + FIELD_NAME (fields[num_fields]) = DEPRECATED_SYMBOL_NAME (sym); + FIELD_TYPE (fields[num_fields]) = NULL; + FIELD_BITPOS (fields[num_fields]) = SYMBOL_VALUE (sym); + FIELD_BITSIZE (fields[num_fields]) = 0; + FIELD_STATIC_KIND (fields[num_fields]) = 0; + + num_fields++; + } + } + + child_die = sibling_die (child_die); + } + + if (num_fields) + { + TYPE_NFIELDS (die->type) = num_fields; + TYPE_FIELDS (die->type) = (struct field *) + TYPE_ALLOC (die->type, sizeof (struct field) * num_fields); + memcpy (TYPE_FIELDS (die->type), fields, + sizeof (struct field) * num_fields); + xfree (fields); + } + if (unsigned_enum) + TYPE_FLAGS (die->type) |= TYPE_FLAG_UNSIGNED; + } + + new_symbol (die, die->type, cu); +} + +/* Extract all information from a DW_TAG_array_type DIE and put it in + the DIE's type field. For now, this only handles one dimensional + arrays. */ + +static void +read_array_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct die_info *child_die; + struct type *type = NULL; + struct type *element_type, *range_type, *index_type; + struct type **range_types = NULL; + struct attribute *attr; + int ndim = 0; + struct cleanup *back_to; + + /* Return if we've already decoded this type. */ + if (die->type) + { + return; + } + + element_type = die_type (die, cu); + + /* Irix 6.2 native cc creates array types without children for + arrays with unspecified length. */ + if (die->child == NULL) + { + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 0, -1); + die->type = create_array_type (NULL, element_type, range_type); + return; + } + + back_to = make_cleanup (null_cleanup, NULL); + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_subrange_type) + { + read_subrange_type (child_die, cu); + + if (child_die->type != NULL) + { + /* The range type was succesfully read. Save it for + the array type creation. */ + if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0) + { + range_types = (struct type **) + xrealloc (range_types, (ndim + DW_FIELD_ALLOC_CHUNK) + * sizeof (struct type *)); + if (ndim == 0) + make_cleanup (free_current_contents, &range_types); + } + range_types[ndim++] = child_die->type; + } + } + child_die = sibling_die (child_die); + } + + /* Dwarf2 dimensions are output from left to right, create the + necessary array types in backwards order. */ + type = element_type; + while (ndim-- > 0) + type = create_array_type (NULL, type, range_types[ndim]); + + /* Understand Dwarf2 support for vector types (like they occur on + the PowerPC w/ AltiVec). Gcc just adds another attribute to the + array type. This is not part of the Dwarf2/3 standard yet, but a + custom vendor extension. The main difference between a regular + array and the vector variant is that vectors are passed by value + to functions. */ + attr = dwarf2_attr (die, DW_AT_GNU_vector, cu); + if (attr) + TYPE_FLAGS (type) |= TYPE_FLAG_VECTOR; + + do_cleanups (back_to); + + /* Install the type in the die. */ + die->type = type; +} + +/* First cut: install each common block member as a global variable. */ + +static void +read_common_block (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *child_die; + struct attribute *attr; + struct symbol *sym; + CORE_ADDR base = (CORE_ADDR) 0; + + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + /* Support the .debug_loc offsets */ + if (attr_form_is_block (attr)) + { + base = decode_locdesc (DW_BLOCK (attr), cu); + } + else if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "common block member"); + } + } + if (die->child != NULL) + { + child_die = die->child; + while (child_die && child_die->tag) + { + sym = new_symbol (child_die, NULL, cu); + attr = dwarf2_attr (child_die, DW_AT_data_member_location, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = + base + decode_locdesc (DW_BLOCK (attr), cu); + add_symbol_to_list (sym, &global_symbols); + } + child_die = sibling_die (child_die); + } + } +} + +/* Read a C++ namespace. */ + +static void +read_namespace (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + const char *previous_prefix = processing_current_prefix; + const char *name; + int is_anonymous; + struct die_info *current_die; + + name = namespace_name (die, &is_anonymous, cu); + + /* Now build the name of the current namespace. */ + + if (previous_prefix[0] == '\0') + { + processing_current_prefix = name; + } + else + { + /* We need temp_name around because processing_current_prefix + is a const char *. */ + char *temp_name = alloca (strlen (previous_prefix) + + 2 + strlen(name) + 1); + strcpy (temp_name, previous_prefix); + strcat (temp_name, "::"); + strcat (temp_name, name); + + processing_current_prefix = temp_name; + } + + /* Add a symbol associated to this if we haven't seen the namespace + before. Also, add a using directive if it's an anonymous + namespace. */ + + if (dwarf2_extension (die, cu) == NULL) + { + struct type *type; + + /* FIXME: carlton/2003-06-27: Once GDB is more const-correct, + this cast will hopefully become unnecessary. */ + type = init_type (TYPE_CODE_NAMESPACE, 0, 0, + (char *) processing_current_prefix, + objfile); + TYPE_TAG_NAME (type) = TYPE_NAME (type); + + new_symbol (die, type, cu); + die->type = type; + + if (is_anonymous) + cp_add_using_directive (processing_current_prefix, + strlen (previous_prefix), + strlen (processing_current_prefix)); + } + + if (die->child != NULL) + { + struct die_info *child_die = die->child; + + while (child_die && child_die->tag) + { + process_die (child_die, cu); + child_die = sibling_die (child_die); + } + } + + processing_current_prefix = previous_prefix; +} + +/* Return the name of the namespace represented by DIE. Set + *IS_ANONYMOUS to tell whether or not the namespace is an anonymous + namespace. */ + +static const char * +namespace_name (struct die_info *die, int *is_anonymous, struct dwarf2_cu *cu) +{ + struct die_info *current_die; + const char *name = NULL; + + /* Loop through the extensions until we find a name. */ + + for (current_die = die; + current_die != NULL; + current_die = dwarf2_extension (die, cu)) + { + name = dwarf2_name (current_die, cu); + if (name != NULL) + break; + } + + /* Is it an anonymous namespace? */ + + *is_anonymous = (name == NULL); + if (*is_anonymous) + name = "(anonymous namespace)"; + + return name; +} + +/* Extract all information from a DW_TAG_pointer_type DIE and add to + the user defined type vector. */ + +static void +read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr_byte_size; + struct attribute *attr_address_class; + int byte_size, addr_class; + + if (die->type) + { + return; + } + + type = lookup_pointer_type (die_type (die, cu)); + + attr_byte_size = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr_byte_size) + byte_size = DW_UNSND (attr_byte_size); + else + byte_size = cu_header->addr_size; + + attr_address_class = dwarf2_attr (die, DW_AT_address_class, cu); + if (attr_address_class) + addr_class = DW_UNSND (attr_address_class); + else + addr_class = DW_ADDR_none; + + /* If the pointer size or address class is different than the + default, create a type variant marked as such and set the + length accordingly. */ + if (TYPE_LENGTH (type) != byte_size || addr_class != DW_ADDR_none) + { + if (ADDRESS_CLASS_TYPE_FLAGS_P ()) + { + int type_flags; + + type_flags = ADDRESS_CLASS_TYPE_FLAGS (byte_size, addr_class); + gdb_assert ((type_flags & ~TYPE_FLAG_ADDRESS_CLASS_ALL) == 0); + type = make_type_with_address_space (type, type_flags); + } + else if (TYPE_LENGTH (type) != byte_size) + { + complaint (&symfile_complaints, "invalid pointer size %d", byte_size); + } + else { + /* Should we also complain about unhandled address classes? */ + } + } + + TYPE_LENGTH (type) = byte_size; + die->type = type; +} + +/* Extract all information from a DW_TAG_ptr_to_member_type DIE and add to + the user defined type vector. */ + +static void +read_tag_ptr_to_member_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct type *to_type; + struct type *domain; + + if (die->type) + { + return; + } + + type = alloc_type (objfile); + to_type = die_type (die, cu); + domain = die_containing_type (die, cu); + smash_to_member_type (type, domain, to_type); + + die->type = type; +} + +/* Extract all information from a DW_TAG_reference_type DIE and add to + the user defined type vector. */ + +static void +read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + struct type *type; + struct attribute *attr; + + if (die->type) + { + return; + } + + type = lookup_reference_type (die_type (die, cu)); + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + TYPE_LENGTH (type) = DW_UNSND (attr); + } + else + { + TYPE_LENGTH (type) = cu_header->addr_size; + } + die->type = type; +} + +static void +read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0); +} + +static void +read_tag_volatile_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + + if (die->type) + { + return; + } + + base_type = die_type (die, cu); + die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0); +} + +/* Extract all information from a DW_TAG_string_type DIE and add to + the user defined type vector. It isn't really a user defined type, + but it behaves like one, with other DIE's using an AT_user_def_type + attribute to reference it. */ + +static void +read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type, *range_type, *index_type, *char_type; + struct attribute *attr; + unsigned int length; + + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_string_length, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + /* check for the DW_AT_byte_size attribute */ + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + length = DW_UNSND (attr); + } + else + { + length = 1; + } + } + index_type = dwarf2_fundamental_type (objfile, FT_INTEGER, cu); + range_type = create_range_type (NULL, index_type, 1, length); + if (cu->language == language_fortran) + { + /* Need to create a unique string type for bounds + information */ + type = create_string_type (0, range_type); + } + else + { + char_type = dwarf2_fundamental_type (objfile, FT_CHAR, cu); + type = create_string_type (char_type, range_type); + } + die->type = type; +} + +/* Handle DIES due to C code like: + + struct foo + { + int (*funcp)(int a, long l); + int b; + }; + + ('funcp' generates a DW_TAG_subroutine_type DIE) + */ + +static void +read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; /* Type that this function returns */ + struct type *ftype; /* Function that returns above type */ + struct attribute *attr; + + /* Decode the type that this subroutine returns */ + if (die->type) + { + return; + } + type = die_type (die, cu); + ftype = lookup_function_type (type); + + /* All functions in C++ have prototypes. */ + attr = dwarf2_attr (die, DW_AT_prototyped, cu); + if ((attr && (DW_UNSND (attr) != 0)) + || cu->language == language_cplus) + TYPE_FLAGS (ftype) |= TYPE_FLAG_PROTOTYPED; + + if (die->child != NULL) + { + struct die_info *child_die; + int nparams = 0; + int iparams = 0; + + /* Count the number of parameters. + FIXME: GDB currently ignores vararg functions, but knows about + vararg member functions. */ + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + nparams++; + else if (child_die->tag == DW_TAG_unspecified_parameters) + TYPE_FLAGS (ftype) |= TYPE_FLAG_VARARGS; + child_die = sibling_die (child_die); + } + + /* Allocate storage for parameters and fill them in. */ + TYPE_NFIELDS (ftype) = nparams; + TYPE_FIELDS (ftype) = (struct field *) + TYPE_ALLOC (ftype, nparams * sizeof (struct field)); + + child_die = die->child; + while (child_die && child_die->tag) + { + if (child_die->tag == DW_TAG_formal_parameter) + { + /* Dwarf2 has no clean way to discern C++ static and non-static + member functions. G++ helps GDB by marking the first + parameter for non-static member functions (which is the + this pointer) as artificial. We pass this information + to dwarf2_add_member_fn via TYPE_FIELD_ARTIFICIAL. */ + attr = dwarf2_attr (child_die, DW_AT_artificial, cu); + if (attr) + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = DW_UNSND (attr); + else + TYPE_FIELD_ARTIFICIAL (ftype, iparams) = 0; + TYPE_FIELD_TYPE (ftype, iparams) = die_type (child_die, cu); + iparams++; + } + child_die = sibling_die (child_die); + } + } + + die->type = ftype; +} + +static void +read_typedef (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct attribute *attr; + char *name = NULL; + + if (!die->type) + { + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + name = DW_STRING (attr); + } + die->type = init_type (TYPE_CODE_TYPEDEF, 0, TYPE_FLAG_TARGET_STUB, name, objfile); + TYPE_TARGET_TYPE (die->type) = die_type (die, cu); + } +} + +/* Find a representation of a given base type and install + it in the TYPE field of the die. */ + +static void +read_base_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct type *type; + struct attribute *attr; + int encoding = 0, size = 0; + + /* If we've already decoded this die, this is a no-op. */ + if (die->type) + { + return; + } + + attr = dwarf2_attr (die, DW_AT_encoding, cu); + if (attr) + { + encoding = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + { + size = DW_UNSND (attr); + } + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + { + enum type_code code = TYPE_CODE_INT; + int type_flags = 0; + + switch (encoding) + { + case DW_ATE_address: + /* Turn DW_ATE_address into a void * pointer. */ + code = TYPE_CODE_PTR; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_boolean: + code = TYPE_CODE_BOOL; + type_flags |= TYPE_FLAG_UNSIGNED; + break; + case DW_ATE_complex_float: + code = TYPE_CODE_COMPLEX; + break; + case DW_ATE_float: + code = TYPE_CODE_FLT; + break; + case DW_ATE_signed: + case DW_ATE_signed_char: + break; + case DW_ATE_unsigned: + case DW_ATE_unsigned_char: + type_flags |= TYPE_FLAG_UNSIGNED; + break; + default: + complaint (&symfile_complaints, "unsupported DW_AT_encoding: '%s'", + dwarf_type_encoding_name (encoding)); + break; + } + type = init_type (code, size, type_flags, DW_STRING (attr), objfile); + if (encoding == DW_ATE_address) + TYPE_TARGET_TYPE (type) = dwarf2_fundamental_type (objfile, FT_VOID, + cu); + else if (encoding == DW_ATE_complex_float) + { + if (size == 32) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_EXT_PREC_FLOAT, cu); + else if (size == 16) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + else if (size == 8) + TYPE_TARGET_TYPE (type) + = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + } + else + { + type = dwarf_base_type (encoding, size, cu); + } + die->type = type; +} + +/* Read the given DW_AT_subrange DIE. */ + +static void +read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *base_type; + struct type *range_type; + struct attribute *attr; + int low = 0; + int high = -1; + + /* If we have already decoded this die, then nothing more to do. */ + if (die->type) + return; + + base_type = die_type (die, cu); + if (base_type == NULL) + { + complaint (&symfile_complaints, + "DW_AT_type missing from DW_TAG_subrange_type"); + return; + } + + if (TYPE_CODE (base_type) == TYPE_CODE_VOID) + base_type = alloc_type (NULL); + + if (cu->language == language_fortran) + { + /* FORTRAN implies a lower bound of 1, if not given. */ + low = 1; + } + + attr = dwarf2_attr (die, DW_AT_lower_bound, cu); + if (attr) + low = dwarf2_get_attr_constant_value (attr, 0); + + attr = dwarf2_attr (die, DW_AT_upper_bound, cu); + if (attr) + { + if (attr->form == DW_FORM_block1) + { + /* GCC encodes arrays with unspecified or dynamic length + with a DW_FORM_block1 attribute. + FIXME: GDB does not yet know how to handle dynamic + arrays properly, treat them as arrays with unspecified + length for now. + + FIXME: jimb/2003-09-22: GDB does not really know + how to handle arrays of unspecified length + either; we just represent them as zero-length + arrays. Choose an appropriate upper bound given + the lower bound we've computed above. */ + high = low - 1; + } + else + high = dwarf2_get_attr_constant_value (attr, 1); + } + + range_type = create_range_type (NULL, base_type, low, high); + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + TYPE_NAME (range_type) = DW_STRING (attr); + + attr = dwarf2_attr (die, DW_AT_byte_size, cu); + if (attr) + TYPE_LENGTH (range_type) = DW_UNSND (attr); + + die->type = range_type; +} + + +/* Read a whole compilation unit into a linked list of dies. */ + +static struct die_info * +read_comp_unit (char *info_ptr, bfd *abfd, struct dwarf2_cu *cu) +{ + /* Reset die reference table; we are + building new ones now. */ + dwarf2_empty_hash_tables (); + + return read_die_and_children (info_ptr, abfd, cu, &info_ptr, NULL); +} + +/* Read a single die and all its descendents. Set the die's sibling + field to NULL; set other fields in the die correctly, and set all + of the descendents' fields correctly. Set *NEW_INFO_PTR to the + location of the info_ptr after reading all of those dies. PARENT + is the parent of the die in question. */ + +static struct die_info * +read_die_and_children (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *die; + char *cur_ptr; + int has_children; + + cur_ptr = read_full_die (&die, abfd, info_ptr, cu, &has_children); + store_in_ref_table (die->offset, die); + + if (has_children) + { + die->child = read_die_and_siblings (cur_ptr, abfd, cu, + new_info_ptr, die); + } + else + { + die->child = NULL; + *new_info_ptr = cur_ptr; + } + + die->sibling = NULL; + die->parent = parent; + return die; +} + +/* Read a die, all of its descendents, and all of its siblings; set + all of the fields of all of the dies correctly. Arguments are as + in read_die_and_children. */ + +static struct die_info * +read_die_and_siblings (char *info_ptr, bfd *abfd, + struct dwarf2_cu *cu, + char **new_info_ptr, + struct die_info *parent) +{ + struct die_info *first_die, *last_sibling; + char *cur_ptr; + + cur_ptr = info_ptr; + first_die = last_sibling = NULL; + + while (1) + { + struct die_info *die + = read_die_and_children (cur_ptr, abfd, cu, &cur_ptr, parent); + + if (!first_die) + { + first_die = die; + } + else + { + last_sibling->sibling = die; + } + + if (die->tag == 0) + { + *new_info_ptr = cur_ptr; + return first_die; + } + else + { + last_sibling = die; + } + } +} + +/* Free a linked list of dies. */ + +static void +free_die_list (struct die_info *dies) +{ + struct die_info *die, *next; + + die = dies; + while (die) + { + if (die->child != NULL) + free_die_list (die->child); + next = die->sibling; + xfree (die->attrs); + xfree (die); + die = next; + } +} + +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + +/* Read the contents of the section at OFFSET and of size SIZE from the + object file specified by OBJFILE into the objfile_obstack and return it. */ + +char * +dwarf2_read_section (struct objfile *objfile, asection *sectp) +{ + bfd *abfd = objfile->obfd; + char *buf, *retbuf; + bfd_size_type size = bfd_get_section_size_before_reloc (sectp); + + if (size == 0) + return NULL; + + buf = (char *) obstack_alloc (&objfile->objfile_obstack, size); + retbuf + = (char *) symfile_relocate_debug_section (abfd, sectp, (bfd_byte *) buf); + if (retbuf != NULL) + return retbuf; + + if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0 + || bfd_bread (buf, size, abfd) != size) + error ("Dwarf Error: Can't read DWARF data from '%s'", + bfd_get_filename (abfd)); + + return buf; +} + +/* In DWARF version 2, the description of the debugging information is + stored in a separate .debug_abbrev section. Before we read any + dies from a section we read in all abbreviations and install them + in a hash table. */ + +static void +dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + char *abbrev_ptr; + struct abbrev_info *cur_abbrev; + unsigned int abbrev_number, bytes_read, abbrev_name; + unsigned int abbrev_form, hash_number; + + /* Initialize dwarf2 abbrevs */ + memset (cu_header->dwarf2_abbrevs, 0, + ABBREV_HASH_SIZE*sizeof (struct abbrev_info *)); + + abbrev_ptr = dwarf_abbrev_buffer + cu_header->abbrev_offset; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + + /* loop until we reach an abbrev number of 0 */ + while (abbrev_number) + { + cur_abbrev = dwarf_alloc_abbrev (); + + /* read in abbrev header */ + cur_abbrev->number = abbrev_number; + cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); + abbrev_ptr += 1; + + /* now read in declarations */ + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + while (abbrev_name) + { + if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) + { + cur_abbrev->attrs = (struct attr_abbrev *) + xrealloc (cur_abbrev->attrs, + (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK) + * sizeof (struct attr_abbrev)); + } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; + cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; + abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + } + + hash_number = abbrev_number % ABBREV_HASH_SIZE; + cur_abbrev->next = cu_header->dwarf2_abbrevs[hash_number]; + cu_header->dwarf2_abbrevs[hash_number] = cur_abbrev; + + /* Get next abbreviation. + Under Irix6 the abbreviations for a compilation unit are not + always properly terminated with an abbrev number of 0. + Exit loop if we encounter an abbreviation which we have + already read (which means we are about to read the abbreviations + for the next compile unit) or if the end of the abbreviation + table is reached. */ + if ((unsigned int) (abbrev_ptr - dwarf_abbrev_buffer) + >= dwarf_abbrev_size) + break; + abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); + abbrev_ptr += bytes_read; + if (dwarf2_lookup_abbrev (abbrev_number, cu) != NULL) + break; + } +} + +/* Empty the abbrev table for a new compilation unit. */ + +static void +dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table) +{ + int i; + struct abbrev_info *abbrev, *next; + struct abbrev_info **abbrevs; + + abbrevs = (struct abbrev_info **)ptr_to_abbrevs_table; + + for (i = 0; i < ABBREV_HASH_SIZE; ++i) + { + next = NULL; + abbrev = abbrevs[i]; + while (abbrev) + { + next = abbrev->next; + xfree (abbrev->attrs); + xfree (abbrev); + abbrev = next; + } + abbrevs[i] = NULL; + } +} + +/* Lookup an abbrev_info structure in the abbrev hash table. */ + +static struct abbrev_info * +dwarf2_lookup_abbrev (unsigned int number, struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int hash_number; + struct abbrev_info *abbrev; + + hash_number = number % ABBREV_HASH_SIZE; + abbrev = cu_header->dwarf2_abbrevs[hash_number]; + + while (abbrev) + { + if (abbrev->number == number) + return abbrev; + else + abbrev = abbrev->next; + } + return NULL; +} + +/* Read a minimal amount of information into the minimal die structure. */ + +static char * +read_partial_die (struct partial_die_info *part_die, bfd *abfd, + char *info_ptr, struct dwarf2_cu *cu) +{ + unsigned int abbrev_number, bytes_read, i; + struct abbrev_info *abbrev; + struct attribute attr; + struct attribute spec_attr; + int found_spec_attr = 0; + int has_low_pc_attr = 0; + int has_high_pc_attr = 0; + + *part_die = zeroed_partial_die; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + return info_ptr; + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: Could not find abbrev number %d [in module %s]", abbrev_number, + bfd_get_filename (abfd)); + } + part_die->offset = info_ptr - dwarf_info_buffer; + part_die->tag = abbrev->tag; + part_die->has_children = abbrev->has_children; + part_die->abbrev = abbrev_number; + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&attr, &abbrev->attrs[i], abfd, info_ptr, cu); + + /* Store the data if it is of an attribute we want to keep in a + partial symbol table. */ + switch (attr.name) + { + case DW_AT_name: + + /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ + if (part_die->name == NULL) + part_die->name = DW_STRING (&attr); + break; + case DW_AT_MIPS_linkage_name: + part_die->name = DW_STRING (&attr); + break; + case DW_AT_low_pc: + has_low_pc_attr = 1; + part_die->lowpc = DW_ADDR (&attr); + break; + case DW_AT_high_pc: + has_high_pc_attr = 1; + part_die->highpc = DW_ADDR (&attr); + break; + case DW_AT_location: + /* Support the .debug_loc offsets */ + if (attr_form_is_block (&attr)) + { + part_die->locdesc = DW_BLOCK (&attr); + } + else if (attr.form == DW_FORM_data4 || attr.form == DW_FORM_data8) + { + dwarf2_complex_location_expr_complaint (); + } + else + { + dwarf2_invalid_attrib_class_complaint ("DW_AT_location", + "partial symbol information"); + } + break; + case DW_AT_language: + part_die->language = DW_UNSND (&attr); + break; + case DW_AT_external: + part_die->is_external = DW_UNSND (&attr); + break; + case DW_AT_declaration: + part_die->is_declaration = DW_UNSND (&attr); + break; + case DW_AT_type: + part_die->has_type = 1; + break; + case DW_AT_abstract_origin: + case DW_AT_specification: + found_spec_attr = 1; + spec_attr = attr; + break; + case DW_AT_sibling: + /* Ignore absolute siblings, they might point outside of + the current compile unit. */ + if (attr.form == DW_FORM_ref_addr) + complaint (&symfile_complaints, "ignoring absolute DW_AT_sibling"); + else + part_die->sibling = + dwarf_info_buffer + dwarf2_get_ref_die_offset (&attr, cu); + break; + default: + break; + } + } + + /* If we found a reference attribute and the die has no name, try + to find a name in the referred to die. */ + + if (found_spec_attr && part_die->name == NULL) + { + struct partial_die_info spec_die; + char *spec_ptr; + + spec_ptr = dwarf_info_buffer + + dwarf2_get_ref_die_offset (&spec_attr, cu); + read_partial_die (&spec_die, abfd, spec_ptr, cu); + if (spec_die.name) + { + part_die->name = spec_die.name; + + /* Copy DW_AT_external attribute if it is set. */ + if (spec_die.is_external) + part_die->is_external = spec_die.is_external; + } + } + + /* When using the GNU linker, .gnu.linkonce. sections are used to + eliminate duplicate copies of functions and vtables and such. + The linker will arbitrarily choose one and discard the others. + The AT_*_pc values for such functions refer to local labels in + these sections. If the section from that file was discarded, the + labels are not in the output, so the relocs get a value of 0. + If this is a discarded function, mark the pc bounds as invalid, + so that GDB will ignore it. */ + if (has_low_pc_attr && has_high_pc_attr + && part_die->lowpc < part_die->highpc + && (part_die->lowpc != 0 + || (bfd_get_file_flags (abfd) & HAS_RELOC))) + part_die->has_pc_info = 1; + return info_ptr; +} + +/* Read the die from the .debug_info section buffer. Set DIEP to + point to a newly allocated die with its information, except for its + child, sibling, and parent fields. Set HAS_CHILDREN to tell + whether the die has children or not. */ + +static char * +read_full_die (struct die_info **diep, bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu, int *has_children) +{ + unsigned int abbrev_number, bytes_read, i, offset; + struct abbrev_info *abbrev; + struct die_info *die; + + offset = info_ptr - dwarf_info_buffer; + abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + if (!abbrev_number) + { + die = dwarf_alloc_die (); + die->tag = 0; + die->abbrev = abbrev_number; + die->type = NULL; + *diep = die; + *has_children = 0; + return info_ptr; + } + + abbrev = dwarf2_lookup_abbrev (abbrev_number, cu); + if (!abbrev) + { + error ("Dwarf Error: could not find abbrev number %d [in module %s]", + abbrev_number, + bfd_get_filename (abfd)); + } + die = dwarf_alloc_die (); + die->offset = offset; + die->tag = abbrev->tag; + die->abbrev = abbrev_number; + die->type = NULL; + + die->num_attrs = abbrev->num_attrs; + die->attrs = (struct attribute *) + xmalloc (die->num_attrs * sizeof (struct attribute)); + + for (i = 0; i < abbrev->num_attrs; ++i) + { + info_ptr = read_attribute (&die->attrs[i], &abbrev->attrs[i], + abfd, info_ptr, cu); + } + + *diep = die; + *has_children = abbrev->has_children; + return info_ptr; +} + +/* Read an attribute value described by an attribute form. */ + +static char * +read_attribute_value (struct attribute *attr, unsigned form, + bfd *abfd, char *info_ptr, + struct dwarf2_cu *cu) +{ + struct comp_unit_head *cu_header = &cu->header; + unsigned int bytes_read; + struct dwarf_block *blk; + + attr->form = form; + switch (form) + { + case DW_FORM_addr: + case DW_FORM_ref_addr: + DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block2: + blk = dwarf_alloc_block (); + blk->size = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block4: + blk = dwarf_alloc_block (); + blk->size = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_data4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_data8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_string: + DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_strp: + DW_STRING (attr) = read_indirect_string (abfd, info_ptr, cu_header, + &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_block: + blk = dwarf_alloc_block (); + blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_block1: + blk = dwarf_alloc_block (); + blk->size = read_1_byte (abfd, info_ptr); + info_ptr += 1; + blk->data = read_n_bytes (abfd, info_ptr, blk->size); + info_ptr += blk->size; + DW_BLOCK (attr) = blk; + break; + case DW_FORM_data1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_flag: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_sdata: + DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_ref1: + DW_UNSND (attr) = read_1_byte (abfd, info_ptr); + info_ptr += 1; + break; + case DW_FORM_ref2: + DW_UNSND (attr) = read_2_bytes (abfd, info_ptr); + info_ptr += 2; + break; + case DW_FORM_ref4: + DW_UNSND (attr) = read_4_bytes (abfd, info_ptr); + info_ptr += 4; + break; + case DW_FORM_ref8: + DW_UNSND (attr) = read_8_bytes (abfd, info_ptr); + info_ptr += 8; + break; + case DW_FORM_ref_udata: + DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + break; + case DW_FORM_indirect: + form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read); + info_ptr += bytes_read; + info_ptr = read_attribute_value (attr, form, abfd, info_ptr, cu); + break; + default: + error ("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]", + dwarf_form_name (form), + bfd_get_filename (abfd)); + } + return info_ptr; +} + +/* Read an attribute described by an abbreviated attribute. */ + +static char * +read_attribute (struct attribute *attr, struct attr_abbrev *abbrev, + bfd *abfd, char *info_ptr, struct dwarf2_cu *cu) +{ + attr->name = abbrev->name; + return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu); +} + +/* read dwarf information from a buffer */ + +static unsigned int +read_1_byte (bfd *abfd, char *buf) +{ + return bfd_get_8 (abfd, (bfd_byte *) buf); +} + +static int +read_1_signed_byte (bfd *abfd, char *buf) +{ + return bfd_get_signed_8 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_2_bytes (bfd *abfd, char *buf) +{ + return bfd_get_16 (abfd, (bfd_byte *) buf); +} + +static int +read_2_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_16 (abfd, (bfd_byte *) buf); +} + +static unsigned int +read_4_bytes (bfd *abfd, char *buf) +{ + return bfd_get_32 (abfd, (bfd_byte *) buf); +} + +static int +read_4_signed_bytes (bfd *abfd, char *buf) +{ + return bfd_get_signed_32 (abfd, (bfd_byte *) buf); +} + +static unsigned long +read_8_bytes (bfd *abfd, char *buf) +{ + return bfd_get_64 (abfd, (bfd_byte *) buf); +} + +static CORE_ADDR +read_address (bfd *abfd, char *buf, struct dwarf2_cu *cu, int *bytes_read) +{ + struct comp_unit_head *cu_header = &cu->header; + CORE_ADDR retval = 0; + + if (cu_header->signed_addr_p) + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_signed_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_signed_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_signed_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, signed [in module %s]", + bfd_get_filename (abfd)); + } + } + else + { + switch (cu_header->addr_size) + { + case 2: + retval = bfd_get_16 (abfd, (bfd_byte *) buf); + break; + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + break; + default: + internal_error (__FILE__, __LINE__, + "read_address: bad switch, unsigned [in module %s]", + bfd_get_filename (abfd)); + } + } + + *bytes_read = cu_header->addr_size; + return retval; +} + +/* Read the initial length from a section. The (draft) DWARF 3 + specification allows the initial length to take up either 4 bytes + or 12 bytes. If the first 4 bytes are 0xffffffff, then the next 8 + bytes describe the length and all offsets will be 8 bytes in length + instead of 4. + + An older, non-standard 64-bit format is also handled by this + function. The older format in question stores the initial length + as an 8-byte quantity without an escape value. Lengths greater + than 2^32 aren't very common which means that the initial 4 bytes + is almost always zero. Since a length value of zero doesn't make + sense for the 32-bit format, this initial zero can be considered to + be an escape value which indicates the presence of the older 64-bit + format. As written, the code can't detect (old format) lengths + greater than 4GB. If it becomes necessary to handle lengths somewhat + larger than 4GB, we could allow other small values (such as the + non-sensical values of 1, 2, and 3) to also be used as escape values + indicating the presence of the old format. + + The value returned via bytes_read should be used to increment + the relevant pointer after calling read_initial_length(). + + As a side effect, this function sets the fields initial_length_size + and offset_size in cu_header to the values appropriate for the + length field. (The format of the initial length field determines + the width of file offsets to be fetched later with fetch_offset().) + + [ Note: read_initial_length() and read_offset() are based on the + document entitled "DWARF Debugging Information Format", revision + 3, draft 8, dated November 19, 2001. This document was obtained + from: + + http://reality.sgiweb.org/davea/dwarf3-draft8-011125.pdf + + This document is only a draft and is subject to change. (So beware.) + + Details regarding the older, non-standard 64-bit format were + determined empirically by examining 64-bit ELF files produced + by the SGI toolchain on an IRIX 6.5 machine. + + - Kevin, July 16, 2002 + ] */ + +static LONGEST +read_initial_length (bfd *abfd, char *buf, struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + + if (retval == 0xffffffff) + { + retval = bfd_get_64 (abfd, (bfd_byte *) buf + 4); + *bytes_read = 12; + if (cu_header != NULL) + { + cu_header->initial_length_size = 12; + cu_header->offset_size = 8; + } + } + else if (retval == 0) + { + /* Handle (non-standard) 64-bit DWARF2 formats such as that used + by IRIX. */ + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + if (cu_header != NULL) + { + cu_header->initial_length_size = 8; + cu_header->offset_size = 8; + } + } + else + { + *bytes_read = 4; + if (cu_header != NULL) + { + cu_header->initial_length_size = 4; + cu_header->offset_size = 4; + } + } + + return retval; +} + +/* Read an offset from the data stream. The size of the offset is + given by cu_header->offset_size. */ + +static LONGEST +read_offset (bfd *abfd, char *buf, const struct comp_unit_head *cu_header, + int *bytes_read) +{ + LONGEST retval = 0; + + switch (cu_header->offset_size) + { + case 4: + retval = bfd_get_32 (abfd, (bfd_byte *) buf); + *bytes_read = 4; + break; + case 8: + retval = bfd_get_64 (abfd, (bfd_byte *) buf); + *bytes_read = 8; + break; + default: + internal_error (__FILE__, __LINE__, + "read_offset: bad switch [in module %s]", + bfd_get_filename (abfd)); + } + + return retval; +} + +static char * +read_n_bytes (bfd *abfd, char *buf, unsigned int size) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the buffer, otherwise we have to copy the data to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + return buf; +} + +static char * +read_string (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + /* If the size of a host char is 8 bits, we can return a pointer + to the string, otherwise we have to copy the string to a buffer + allocated on the temporary obstack. */ + gdb_assert (HOST_CHAR_BIT == 8); + if (*buf == '\0') + { + *bytes_read_ptr = 1; + return NULL; + } + *bytes_read_ptr = strlen (buf) + 1; + return buf; +} + +static char * +read_indirect_string (bfd *abfd, char *buf, + const struct comp_unit_head *cu_header, + unsigned int *bytes_read_ptr) +{ + LONGEST str_offset = read_offset (abfd, buf, cu_header, + (int *) bytes_read_ptr); + + if (dwarf_str_buffer == NULL) + { + error ("DW_FORM_strp used without .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + if (str_offset >= dwarf_str_size) + { + error ("DW_FORM_strp pointing outside of .debug_str section [in module %s]", + bfd_get_filename (abfd)); + return NULL; + } + gdb_assert (HOST_CHAR_BIT == 8); + if (dwarf_str_buffer[str_offset] == '\0') + return NULL; + return dwarf_str_buffer + str_offset; +} + +static unsigned long +read_unsigned_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + unsigned long result; + unsigned int num_read; + int i, shift; + unsigned char byte; + + result = 0; + shift = 0; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((unsigned long)(byte & 127) << shift); + if ((byte & 128) == 0) + { + break; + } + shift += 7; + } + *bytes_read_ptr = num_read; + return result; +} + +static long +read_signed_leb128 (bfd *abfd, char *buf, unsigned int *bytes_read_ptr) +{ + long result; + int i, shift, size, num_read; + unsigned char byte; + + result = 0; + shift = 0; + size = 32; + num_read = 0; + i = 0; + while (1) + { + byte = bfd_get_8 (abfd, (bfd_byte *) buf); + buf++; + num_read++; + result |= ((long)(byte & 127) << shift); + shift += 7; + if ((byte & 128) == 0) + { + break; + } + } + if ((shift < size) && (byte & 0x40)) + { + result |= -(1 << shift); + } + *bytes_read_ptr = num_read; + return result; +} + +static void +set_cu_language (unsigned int lang, struct dwarf2_cu *cu) +{ + switch (lang) + { + case DW_LANG_C89: + case DW_LANG_C: + cu->language = language_c; + break; + case DW_LANG_C_plus_plus: + cu->language = language_cplus; + break; + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + cu->language = language_fortran; + break; + case DW_LANG_Mips_Assembler: + cu->language = language_asm; + break; + case DW_LANG_Java: + cu->language = language_java; + break; + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + default: + cu->language = language_minimal; + break; + } + cu->language_defn = language_def (cu->language); +} + +/* Return the named attribute or NULL if not there. */ + +static struct attribute * +dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu) +{ + unsigned int i; + struct attribute *spec = NULL; + + for (i = 0; i < die->num_attrs; ++i) + { + if (die->attrs[i].name == name) + { + return &die->attrs[i]; + } + if (die->attrs[i].name == DW_AT_specification + || die->attrs[i].name == DW_AT_abstract_origin) + spec = &die->attrs[i]; + } + if (spec) + { + struct die_info *ref_die = + follow_die_ref (dwarf2_get_ref_die_offset (spec, cu)); + + if (ref_die) + return dwarf2_attr (ref_die, name, cu); + } + + return NULL; +} + +static int +die_is_declaration (struct die_info *die, struct dwarf2_cu *cu) +{ + return (dwarf2_attr (die, DW_AT_declaration, cu) + && ! dwarf2_attr (die, DW_AT_specification, cu)); +} + +/* Return the die giving the specification for DIE, if there is + one. */ + +static struct die_info * +die_specification (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *spec_attr = dwarf2_attr (die, DW_AT_specification, cu); + + if (spec_attr == NULL) + return NULL; + else + return follow_die_ref (dwarf2_get_ref_die_offset (spec_attr, cu)); +} + +/* Free the line_header structure *LH, and any arrays and strings it + refers to. */ +static void +free_line_header (struct line_header *lh) +{ + if (lh->standard_opcode_lengths) + xfree (lh->standard_opcode_lengths); + + /* Remember that all the lh->file_names[i].name pointers are + pointers into debug_line_buffer, and don't need to be freed. */ + if (lh->file_names) + xfree (lh->file_names); + + /* Similarly for the include directory names. */ + if (lh->include_dirs) + xfree (lh->include_dirs); + + xfree (lh); +} + + +/* Add an entry to LH's include directory table. */ +static void +add_include_dir (struct line_header *lh, char *include_dir) +{ + /* Grow the array if necessary. */ + if (lh->include_dirs_size == 0) + { + lh->include_dirs_size = 1; /* for testing */ + lh->include_dirs = xmalloc (lh->include_dirs_size + * sizeof (*lh->include_dirs)); + } + else if (lh->num_include_dirs >= lh->include_dirs_size) + { + lh->include_dirs_size *= 2; + lh->include_dirs = xrealloc (lh->include_dirs, + (lh->include_dirs_size + * sizeof (*lh->include_dirs))); + } + + lh->include_dirs[lh->num_include_dirs++] = include_dir; +} + + +/* Add an entry to LH's file name table. */ +static void +add_file_name (struct line_header *lh, + char *name, + unsigned int dir_index, + unsigned int mod_time, + unsigned int length) +{ + struct file_entry *fe; + + /* Grow the array if necessary. */ + if (lh->file_names_size == 0) + { + lh->file_names_size = 1; /* for testing */ + lh->file_names = xmalloc (lh->file_names_size + * sizeof (*lh->file_names)); + } + else if (lh->num_file_names >= lh->file_names_size) + { + lh->file_names_size *= 2; + lh->file_names = xrealloc (lh->file_names, + (lh->file_names_size + * sizeof (*lh->file_names))); + } + + fe = &lh->file_names[lh->num_file_names++]; + fe->name = name; + fe->dir_index = dir_index; + fe->mod_time = mod_time; + fe->length = length; +} + + +/* Read the statement program header starting at OFFSET in + dwarf_line_buffer, according to the endianness of ABFD. Return a + pointer to a struct line_header, allocated using xmalloc. + + NOTE: the strings in the include directory and file name tables of + the returned object point into debug_line_buffer, and must not be + freed. */ +static struct line_header * +dwarf_decode_line_header (unsigned int offset, bfd *abfd, + struct dwarf2_cu *cu) +{ + struct cleanup *back_to; + struct line_header *lh; + char *line_ptr; + int bytes_read; + int i; + char *cur_dir, *cur_file; + + if (dwarf_line_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_line section"); + return 0; + } + + /* Make sure that at least there's room for the total_length field. That + could be 12 bytes long, but we're just going to fudge that. */ + if (offset + 4 >= dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + + lh = xmalloc (sizeof (*lh)); + memset (lh, 0, sizeof (*lh)); + back_to = make_cleanup ((make_cleanup_ftype *) free_line_header, + (void *) lh); + + line_ptr = dwarf_line_buffer + offset; + + /* read in the header */ + lh->total_length = read_initial_length (abfd, line_ptr, NULL, &bytes_read); + line_ptr += bytes_read; + if (line_ptr + lh->total_length > dwarf_line_buffer + dwarf_line_size) + { + dwarf2_statement_list_fits_in_line_number_section_complaint (); + return 0; + } + lh->statement_program_end = line_ptr + lh->total_length; + lh->version = read_2_bytes (abfd, line_ptr); + line_ptr += 2; + lh->header_length = read_offset (abfd, line_ptr, &cu->header, &bytes_read); + line_ptr += bytes_read; + lh->minimum_instruction_length = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->default_is_stmt = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_base = read_1_signed_byte (abfd, line_ptr); + line_ptr += 1; + lh->line_range = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->opcode_base = read_1_byte (abfd, line_ptr); + line_ptr += 1; + lh->standard_opcode_lengths + = (unsigned char *) xmalloc (lh->opcode_base * sizeof (unsigned char)); + + lh->standard_opcode_lengths[0] = 1; /* This should never be used anyway. */ + for (i = 1; i < lh->opcode_base; ++i) + { + lh->standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); + line_ptr += 1; + } + + /* Read directory table */ + while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + line_ptr += bytes_read; + add_include_dir (lh, cur_dir); + } + line_ptr += bytes_read; + + /* Read file name table */ + while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) + { + unsigned int dir_index, mod_time, length; + + line_ptr += bytes_read; + dir_index = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + line_ptr += bytes_read; + lh->statement_program_start = line_ptr; + + if (line_ptr > dwarf_line_buffer + dwarf_line_size) + complaint (&symfile_complaints, + "line number info header doesn't fit in `.debug_line' section"); + + discard_cleanups (back_to); + return lh; +} + +/* This function exists to work around a bug in certain compilers + (particularly GCC 2.95), in which the first line number marker of a + function does not show up until after the prologue, right before + the second line number marker. This function shifts ADDRESS down + to the beginning of the function if necessary, and is called on + addresses passed to record_line. */ + +static CORE_ADDR +check_cu_functions (CORE_ADDR address, struct dwarf2_cu *cu) +{ + struct function_range *fn; + + /* Find the function_range containing address. */ + if (!cu->first_fn) + return address; + + if (!cu->cached_fn) + cu->cached_fn = cu->first_fn; + + fn = cu->cached_fn; + while (fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + fn = cu->first_fn; + while (fn && fn != cu->cached_fn) + if (fn->lowpc <= address && fn->highpc > address) + goto found; + else + fn = fn->next; + + return address; + + found: + if (fn->seen_line) + return address; + if (address != fn->lowpc) + complaint (&symfile_complaints, + "misplaced first line number at 0x%lx for '%s'", + (unsigned long) address, fn->name); + fn->seen_line = 1; + return fn->lowpc; +} + +/* Decode the line number information for the compilation unit whose + line number info is at OFFSET in the .debug_line section. + The compilation directory of the file is passed in COMP_DIR. */ + +static void +dwarf_decode_lines (struct line_header *lh, char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *line_ptr; + char *line_end; + unsigned int bytes_read; + unsigned char op_code, extended_op, adj_opcode; + CORE_ADDR baseaddr; + struct objfile *objfile = cu->objfile; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + line_ptr = lh->statement_program_start; + line_end = lh->statement_program_end; + + /* Read the statement sequences until there's nothing left. */ + while (line_ptr < line_end) + { + /* state machine registers */ + CORE_ADDR address = 0; + unsigned int file = 1; + unsigned int line = 1; + unsigned int column = 0; + int is_stmt = lh->default_is_stmt; + int basic_block = 0; + int end_sequence = 0; + + /* Start a subfile for the current file of the state machine. */ + if (lh->num_file_names >= file) + { + /* lh->include_dirs and lh->file_names are 0-based, but the + directory and file name numbers in the statement program + are 1-based. */ + struct file_entry *fe = &lh->file_names[file - 1]; + char *dir; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + + /* Decode the table. */ + while (!end_sequence) + { + op_code = read_1_byte (abfd, line_ptr); + line_ptr += 1; + + if (op_code >= lh->opcode_base) + { /* Special operand. */ + adj_opcode = op_code - lh->opcode_base; + address += (adj_opcode / lh->line_range) + * lh->minimum_instruction_length; + line += lh->line_base + (adj_opcode % lh->line_range); + /* append row to matrix using current values */ + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 1; + } + else switch (op_code) + { + case DW_LNS_extended_op: + line_ptr += 1; /* ignore length */ + extended_op = read_1_byte (abfd, line_ptr); + line_ptr += 1; + switch (extended_op) + { + case DW_LNE_end_sequence: + end_sequence = 1; + record_line (current_subfile, 0, address); + break; + case DW_LNE_set_address: + address = read_address (abfd, line_ptr, cu, &bytes_read); + line_ptr += bytes_read; + address += baseaddr; + break; + case DW_LNE_define_file: + { + char *cur_file; + unsigned int dir_index, mod_time, length; + + cur_file = read_string (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + dir_index = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + mod_time = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + length = + read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + add_file_name (lh, cur_file, dir_index, mod_time, length); + } + break; + default: + complaint (&symfile_complaints, + "mangled .debug_line section"); + return; + } + break; + case DW_LNS_copy: + record_line (current_subfile, line, + check_cu_functions (address, cu)); + basic_block = 0; + break; + case DW_LNS_advance_pc: + address += lh->minimum_instruction_length + * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_advance_line: + line += read_signed_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_set_file: + { + /* lh->include_dirs and lh->file_names are 0-based, + but the directory and file name numbers in the + statement program are 1-based. */ + struct file_entry *fe; + char *dir; + file = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + fe = &lh->file_names[file - 1]; + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + dwarf2_start_subfile (fe->name, dir); + } + break; + case DW_LNS_set_column: + column = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + break; + case DW_LNS_negate_stmt: + is_stmt = (!is_stmt); + break; + case DW_LNS_set_basic_block: + basic_block = 1; + break; + /* Add to the address register of the state machine the + address increment value corresponding to special opcode + 255. Ie, this value is scaled by the minimum instruction + length since special opcode 255 would have scaled the + the increment. */ + case DW_LNS_const_add_pc: + address += (lh->minimum_instruction_length + * ((255 - lh->opcode_base) / lh->line_range)); + break; + case DW_LNS_fixed_advance_pc: + address += read_2_bytes (abfd, line_ptr); + line_ptr += 2; + break; + default: + { /* Unknown standard opcode, ignore it. */ + int i; + for (i = 0; i < lh->standard_opcode_lengths[op_code]; i++) + { + (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read); + line_ptr += bytes_read; + } + } + } + } + } +} + +/* Start a subfile for DWARF. FILENAME is the name of the file and + DIRNAME the name of the source directory which contains FILENAME + or NULL if not known. + This routine tries to keep line numbers from identical absolute and + relative file names in a common subfile. + + Using the `list' example from the GDB testsuite, which resides in + /srcdir and compiling it with Irix6.2 cc in /compdir using a filename + of /srcdir/list0.c yields the following debugging information for list0.c: + + DW_AT_name: /srcdir/list0.c + DW_AT_comp_dir: /compdir + files.files[0].name: list0.h + files.files[0].dir: /srcdir + files.files[1].name: list0.c + files.files[1].dir: /srcdir + + The line number information for list0.c has to end up in a single + subfile, so that `break /srcdir/list0.c:1' works as expected. */ + +static void +dwarf2_start_subfile (char *filename, char *dirname) +{ + /* If the filename isn't absolute, try to match an existing subfile + with the full pathname. */ + + if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL) + { + struct subfile *subfile; + char *fullname = concat (dirname, "/", filename, NULL); + + for (subfile = subfiles; subfile; subfile = subfile->next) + { + if (FILENAME_CMP (subfile->name, fullname) == 0) + { + current_subfile = subfile; + xfree (fullname); + return; + } + } + xfree (fullname); + } + start_subfile (filename, dirname); +} + +static void +var_decode_location (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + + /* NOTE drow/2003-01-30: There used to be a comment and some special + code here to turn a symbol with DW_AT_external and a + SYMBOL_VALUE_ADDRESS of 0 into a LOC_UNRESOLVED symbol. This was + necessary for platforms (maybe Alpha, certainly PowerPC GNU/Linux + with some versions of binutils) where shared libraries could have + relocations against symbols in their debug information - the + minimal symbol would have the right address, but the debug info + would not. It's no longer necessary, because we will explicitly + apply relocations when we read in the debug information now. */ + + /* A DW_AT_location attribute with no contents indicates that a + variable has been optimized away. */ + if (attr_form_is_block (attr) && DW_BLOCK (attr)->size == 0) + { + SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT; + return; + } + + /* Handle one degenerate form of location expression specially, to + preserve GDB's previous behavior when section offsets are + specified. If this is just a DW_OP_addr then mark this symbol + as LOC_STATIC. */ + + if (attr_form_is_block (attr) + && DW_BLOCK (attr)->size == 1 + cu_header->addr_size + && DW_BLOCK (attr)->data[0] == DW_OP_addr) + { + int dummy; + + SYMBOL_VALUE_ADDRESS (sym) = + read_address (objfile->obfd, DW_BLOCK (attr)->data + 1, cu, &dummy); + fixup_symbol_section (sym, objfile); + SYMBOL_VALUE_ADDRESS (sym) += ANOFFSET (objfile->section_offsets, + SYMBOL_SECTION (sym)); + SYMBOL_CLASS (sym) = LOC_STATIC; + return; + } + + /* NOTE drow/2002-01-30: It might be worthwhile to have a static + expression evaluator, and use LOC_COMPUTED only when necessary + (i.e. when the value of a register or memory location is + referenced, or a thread-local block, etc.). Then again, it might + not be worthwhile. I'm assuming that it isn't unless performance + or memory numbers show me otherwise. */ + + dwarf2_symbol_mark_computed (attr, sym, cu); + SYMBOL_CLASS (sym) = LOC_COMPUTED; +} + +/* Given a pointer to a DWARF information entry, figure out if we need + to make a symbol table entry for it, and if so, create a new entry + and return a pointer to it. + If TYPE is NULL, determine symbol type from the die, otherwise + used the passed type. */ + +static struct symbol * +new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct symbol *sym = NULL; + char *name; + struct attribute *attr = NULL; + struct attribute *attr2 = NULL; + CORE_ADDR baseaddr; + + baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); + + if (die->tag != DW_TAG_namespace) + name = dwarf2_linkage_name (die, cu); + else + name = TYPE_NAME (type); + + if (name) + { + sym = (struct symbol *) obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + OBJSTAT (objfile, n_syms++); + memset (sym, 0, sizeof (struct symbol)); + + /* Cache this symbol's name and the name's demangled form (if any). */ + SYMBOL_LANGUAGE (sym) = cu->language; + SYMBOL_SET_NAMES (sym, name, strlen (name), objfile); + + /* Default assumptions. + Use the passed type or decode it from the die. */ + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + SYMBOL_CLASS (sym) = LOC_STATIC; + if (type != NULL) + SYMBOL_TYPE (sym) = type; + else + SYMBOL_TYPE (sym) = die_type (die, cu); + attr = dwarf2_attr (die, DW_AT_decl_line, cu); + if (attr) + { + SYMBOL_LINE (sym) = DW_UNSND (attr); + } + switch (die->tag) + { + case DW_TAG_label: + attr = dwarf2_attr (die, DW_AT_low_pc, cu); + if (attr) + { + SYMBOL_VALUE_ADDRESS (sym) = DW_ADDR (attr) + baseaddr; + } + SYMBOL_CLASS (sym) = LOC_LABEL; + break; + case DW_TAG_subprogram: + /* SYMBOL_BLOCK_VALUE (sym) will be filled in later by + finish_block. */ + SYMBOL_CLASS (sym) = LOC_BLOCK; + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + { + add_symbol_to_list (sym, &global_symbols); + } + else + { + add_symbol_to_list (sym, cu->list_in_scope); + } + break; + case DW_TAG_variable: + /* Compilation with minimal debug info may result in variables + with missing type entries. Change the misleading `void' type + to something sensible. */ + if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID) + SYMBOL_TYPE (sym) = init_type (TYPE_CODE_INT, + TARGET_INT_BIT / HOST_CHAR_BIT, 0, + "", + objfile); + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + break; + } + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0)) + add_symbol_to_list (sym, &global_symbols); + else + add_symbol_to_list (sym, cu->list_in_scope); + } + else + { + /* We do not know the address of this symbol. + If it is an external symbol and we have type information + for it, enter the symbol as a LOC_UNRESOLVED symbol. + The address of the variable will then be determined from + the minimal symbol table whenever the variable is + referenced. */ + attr2 = dwarf2_attr (die, DW_AT_external, cu); + if (attr2 && (DW_UNSND (attr2) != 0) + && dwarf2_attr (die, DW_AT_type, cu) != NULL) + { + SYMBOL_CLASS (sym) = LOC_UNRESOLVED; + add_symbol_to_list (sym, &global_symbols); + } + } + break; + case DW_TAG_formal_parameter: + attr = dwarf2_attr (die, DW_AT_location, cu); + if (attr) + { + var_decode_location (attr, sym, cu); + /* FIXME drow/2003-07-31: Is LOC_COMPUTED_ARG necessary? */ + if (SYMBOL_CLASS (sym) == LOC_COMPUTED) + SYMBOL_CLASS (sym) = LOC_COMPUTED_ARG; + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_unspecified_parameters: + /* From varargs functions; gdb doesn't seem to have any + interest in this information, so just ignore it for now. + (FIXME?) */ + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + case DW_TAG_enumeration_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN; + + /* Make sure that the symbol includes appropriate enclosing + classes/namespaces in its name. These are calculated in + read_structure_type, and the correct name is saved in + the type. */ + + if (cu->language == language_cplus) + { + struct type *type = SYMBOL_TYPE (sym); + + if (TYPE_TAG_NAME (type) != NULL) + { + /* FIXME: carlton/2003-11-10: Should this use + SYMBOL_SET_NAMES instead? (The same problem also + arises a further down in the function.) */ + SYMBOL_LINKAGE_NAME (sym) + = obsavestring (TYPE_TAG_NAME (type), + strlen (TYPE_TAG_NAME (type)), + &objfile->objfile_obstack); + } + } + + { + /* NOTE: carlton/2003-11-10: C++ class symbols shouldn't + really ever be static objects: otherwise, if you try + to, say, break of a class's method and you're in a file + which doesn't mention that class, it won't work unless + the check for all static symbols in lookup_symbol_aux + saves you. See the OtherFileClass tests in + gdb.c++/namespace.exp. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + + /* The semantics of C++ state that "struct foo { ... }" also + defines a typedef for "foo". Synthesize a typedef symbol so + that "ptype foo" works as expected. */ + if (cu->language == language_cplus) + { + struct symbol *typedef_sym = (struct symbol *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct symbol)); + *typedef_sym = *sym; + SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN; + if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + TYPE_NAME (SYMBOL_TYPE (sym)) = + obsavestring (SYMBOL_NATURAL_NAME (sym), + strlen (SYMBOL_NATURAL_NAME (sym)), + &objfile->objfile_obstack); + add_symbol_to_list (typedef_sym, list_to_add); + } + } + break; + case DW_TAG_typedef: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_base_type: + case DW_TAG_subrange_type: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + SYMBOL_DOMAIN (sym) = VAR_DOMAIN; + add_symbol_to_list (sym, cu->list_in_scope); + break; + case DW_TAG_enumerator: + if (processing_has_namespace_info + && processing_current_prefix[0] != '\0') + { + SYMBOL_LINKAGE_NAME (sym) = obconcat (&objfile->objfile_obstack, + processing_current_prefix, + "::", + name); + } + attr = dwarf2_attr (die, DW_AT_const_value, cu); + if (attr) + { + dwarf2_const_value (attr, sym, cu); + } + { + /* NOTE: carlton/2003-11-10: See comment above in the + DW_TAG_class_type, etc. block. */ + + struct pending **list_to_add; + + list_to_add = (cu->list_in_scope == &file_symbols + && cu->language == language_cplus + ? &global_symbols : cu->list_in_scope); + + add_symbol_to_list (sym, list_to_add); + } + break; + case DW_TAG_namespace: + SYMBOL_CLASS (sym) = LOC_TYPEDEF; + add_symbol_to_list (sym, &global_symbols); + break; + default: + /* Not a tag we recognize. Hopefully we aren't processing + trash data, but since we must specifically ignore things + we don't recognize, there is nothing else we should do at + this point. */ + complaint (&symfile_complaints, "unsupported tag: '%s'", + dwarf_tag_name (die->tag)); + break; + } + } + return (sym); +} + +/* Copy constant value from an attribute to a symbol. */ + +static void +dwarf2_const_value (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + struct dwarf_block *blk; + + switch (attr->form) + { + case DW_FORM_addr: + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != cu_header->addr_size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + cu_header->addr_size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, cu_header->addr_size); + /* NOTE: cagney/2003-05-09: In-lined store_address call with + it's body - store_unsigned_integer. */ + store_unsigned_integer (SYMBOL_VALUE_BYTES (sym), cu_header->addr_size, + DW_ADDR (attr)); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + blk = DW_BLOCK (attr); + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) != blk->size) + dwarf2_const_value_length_mismatch_complaint (DEPRECATED_SYMBOL_NAME (sym), + blk->size, + TYPE_LENGTH (SYMBOL_TYPE + (sym))); + SYMBOL_VALUE_BYTES (sym) = (char *) + obstack_alloc (&objfile->objfile_obstack, blk->size); + memcpy (SYMBOL_VALUE_BYTES (sym), blk->data, blk->size); + SYMBOL_CLASS (sym) = LOC_CONST_BYTES; + break; + + /* The DW_AT_const_value attributes are supposed to carry the + symbol's value "represented as it would be on the target + architecture." By the time we get here, it's already been + converted to host endianness, so we just need to sign- or + zero-extend it as appropriate. */ + case DW_FORM_data1: + dwarf2_const_value_data (attr, sym, 8); + break; + case DW_FORM_data2: + dwarf2_const_value_data (attr, sym, 16); + break; + case DW_FORM_data4: + dwarf2_const_value_data (attr, sym, 32); + break; + case DW_FORM_data8: + dwarf2_const_value_data (attr, sym, 64); + break; + + case DW_FORM_sdata: + SYMBOL_VALUE (sym) = DW_SND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + case DW_FORM_udata: + SYMBOL_VALUE (sym) = DW_UNSND (attr); + SYMBOL_CLASS (sym) = LOC_CONST; + break; + + default: + complaint (&symfile_complaints, + "unsupported const value attribute form: '%s'", + dwarf_form_name (attr->form)); + SYMBOL_VALUE (sym) = 0; + SYMBOL_CLASS (sym) = LOC_CONST; + break; + } +} + + +/* Given an attr with a DW_FORM_dataN value in host byte order, sign- + or zero-extend it as appropriate for the symbol's type. */ +static void +dwarf2_const_value_data (struct attribute *attr, + struct symbol *sym, + int bits) +{ + LONGEST l = DW_UNSND (attr); + + if (bits < sizeof (l) * 8) + { + if (TYPE_UNSIGNED (SYMBOL_TYPE (sym))) + l &= ((LONGEST) 1 << bits) - 1; + else + l = (l << (sizeof (l) * 8 - bits)) >> (sizeof (l) * 8 - bits); + } + + SYMBOL_VALUE (sym) = l; + SYMBOL_CLASS (sym) = LOC_CONST; +} + + +/* Return the type of the die in question using its DW_AT_type attribute. */ + +static struct type * +die_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *type_attr; + struct die_info *type_die; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_type, cu); + if (!type_attr) + { + /* A missing DW_AT_type represents a void type. */ + return dwarf2_fundamental_type (cu->objfile, FT_VOID, cu); + } + else + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", + ref, cu->objfile->name); + return NULL; + } + } + type = tag_type_to_type (type_die, cu); + if (!type) + { + dump_die (type_die); + error ("Dwarf Error: Problem turning type die at offset into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +/* Return the containing type of the die in question using its + DW_AT_containing_type attribute. */ + +static struct type * +die_containing_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type = NULL; + struct attribute *type_attr; + struct die_info *type_die = NULL; + unsigned int ref; + + type_attr = dwarf2_attr (die, DW_AT_containing_type, cu); + if (type_attr) + { + ref = dwarf2_get_ref_die_offset (type_attr, cu); + type_die = follow_die_ref (ref); + if (!type_die) + { + error ("Dwarf Error: Cannot find referent at offset %d [in module %s]", ref, + cu->objfile->name); + return NULL; + } + type = tag_type_to_type (type_die, cu); + } + if (!type) + { + if (type_die) + dump_die (type_die); + error ("Dwarf Error: Problem turning containing type into gdb type [in module %s]", + cu->objfile->name); + } + return type; +} + +#if 0 +static struct type * +type_at_offset (unsigned int offset, struct dwarf2_cu *cu) +{ + struct die_info *die; + struct type *type; + + die = follow_die_ref (offset); + if (!die) + { + error ("Dwarf Error: Cannot find type referent at offset %d.", offset); + return NULL; + } + type = tag_type_to_type (die, cu); + return type; +} +#endif + +static struct type * +tag_type_to_type (struct die_info *die, struct dwarf2_cu *cu) +{ + if (die->type) + { + return die->type; + } + else + { + read_type_die (die, cu); + if (!die->type) + { + dump_die (die); + error ("Dwarf Error: Cannot find type of die [in module %s]", + cu->objfile->name); + } + return die->type; + } +} + +static void +read_type_die (struct die_info *die, struct dwarf2_cu *cu) +{ + char *prefix = determine_prefix (die, cu); + const char *old_prefix = processing_current_prefix; + struct cleanup *back_to = make_cleanup (xfree, prefix); + processing_current_prefix = prefix; + + switch (die->tag) + { + case DW_TAG_class_type: + case DW_TAG_structure_type: + case DW_TAG_union_type: + read_structure_type (die, cu); +#ifdef CRASH_MERGE + process_structure_scope (die, cu); +#endif + break; + case DW_TAG_enumeration_type: + read_enumeration_type (die, cu); +#ifdef CRASH_MERGE + process_enumeration_scope (die, cu); +#endif + break; + case DW_TAG_subprogram: + case DW_TAG_subroutine_type: + read_subroutine_type (die, cu); + break; + case DW_TAG_array_type: + read_array_type (die, cu); + break; + case DW_TAG_pointer_type: + read_tag_pointer_type (die, cu); + break; + case DW_TAG_ptr_to_member_type: + read_tag_ptr_to_member_type (die, cu); + break; + case DW_TAG_reference_type: + read_tag_reference_type (die, cu); + break; + case DW_TAG_const_type: + read_tag_const_type (die, cu); + break; + case DW_TAG_volatile_type: + read_tag_volatile_type (die, cu); + break; + case DW_TAG_string_type: + read_tag_string_type (die, cu); + break; + case DW_TAG_typedef: + read_typedef (die, cu); + break; + case DW_TAG_subrange_type: + read_subrange_type (die, cu); + break; + case DW_TAG_base_type: + read_base_type (die, cu); +#ifdef CRASH_MERGE + new_symbol (die, die->type, cu); +#endif + break; + default: + complaint (&symfile_complaints, "unexepected tag in read_type_die: '%s'", + dwarf_tag_name (die->tag)); + break; + } + + processing_current_prefix = old_prefix; + do_cleanups (back_to); +} + +/* Return the name of the namespace/class that DIE is defined within, + or "" if we can't tell. The caller should xfree the result. */ + +/* NOTE: carlton/2004-01-23: See read_func_scope (and the comment + therein) for an example of how to use this function to deal with + DW_AT_specification. */ + +static char * +determine_prefix (struct die_info *die, struct dwarf2_cu *cu) +{ + struct die_info *parent; + + if (cu->language != language_cplus) + return NULL; + + parent = die->parent; + + if (parent == NULL) + { + return xstrdup (""); + } + else + { + switch (parent->tag) { + case DW_TAG_namespace: + { + /* FIXME: carlton/2004-03-05: Should I follow extension dies + before doing this check? */ + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + int dummy; + char *parent_prefix = determine_prefix (parent, cu); + char *retval = typename_concat (parent_prefix, + namespace_name (parent, &dummy, + cu)); + xfree (parent_prefix); + return retval; + } + } + break; + case DW_TAG_class_type: + case DW_TAG_structure_type: + { + if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) + { + return xstrdup (TYPE_TAG_NAME (parent->type)); + } + else + { + const char *old_prefix = processing_current_prefix; + char *new_prefix = determine_prefix (parent, cu); + char *retval; + + processing_current_prefix = new_prefix; + retval = determine_class_name (parent, cu); + processing_current_prefix = old_prefix; + + xfree (new_prefix); + return retval; + } + } + default: + return determine_prefix (parent, cu); + } + } +} + +/* Return a newly-allocated string formed by concatenating PREFIX, + "::", and SUFFIX, except that if PREFIX is NULL or the empty + string, just return a copy of SUFFIX. */ + +static char * +typename_concat (const char *prefix, const char *suffix) +{ + if (prefix == NULL || prefix[0] == '\0') + return xstrdup (suffix); + else + { + char *retval = xmalloc (strlen (prefix) + 2 + strlen (suffix) + 1); + + strcpy (retval, prefix); + strcat (retval, "::"); + strcat (retval, suffix); + + return retval; + } +} + +static struct type * +dwarf_base_type (int encoding, int size, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + + /* FIXME - this should not produce a new (struct type *) + every time. It should cache base types. */ + struct type *type; + switch (encoding) + { + case DW_ATE_address: + type = dwarf2_fundamental_type (objfile, FT_VOID, cu); + return type; + case DW_ATE_boolean: + type = dwarf2_fundamental_type (objfile, FT_BOOLEAN, cu); + return type; + case DW_ATE_complex_float: + if (size == 16) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_COMPLEX, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_COMPLEX, cu); + } + return type; + case DW_ATE_float: + if (size == 8) + { + type = dwarf2_fundamental_type (objfile, FT_DBL_PREC_FLOAT, cu); + } + else + { + type = dwarf2_fundamental_type (objfile, FT_FLOAT, cu); + } + return type; + case DW_ATE_signed: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_signed_char: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_CHAR, cu); + return type; + case DW_ATE_unsigned: + switch (size) + { + case 1: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + break; + case 2: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_SHORT, cu); + break; + default: + case 4: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_INTEGER, cu); + break; + } + return type; + case DW_ATE_unsigned_char: + type = dwarf2_fundamental_type (objfile, FT_UNSIGNED_CHAR, cu); + return type; + default: + type = dwarf2_fundamental_type (objfile, FT_SIGNED_INTEGER, cu); + return type; + } +} + +#if 0 +struct die_info * +copy_die (struct die_info *old_die) +{ + struct die_info *new_die; + int i, num_attrs; + + new_die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (new_die, 0, sizeof (struct die_info)); + + new_die->tag = old_die->tag; + new_die->has_children = old_die->has_children; + new_die->abbrev = old_die->abbrev; + new_die->offset = old_die->offset; + new_die->type = NULL; + + num_attrs = old_die->num_attrs; + new_die->num_attrs = num_attrs; + new_die->attrs = (struct attribute *) + xmalloc (num_attrs * sizeof (struct attribute)); + + for (i = 0; i < old_die->num_attrs; ++i) + { + new_die->attrs[i].name = old_die->attrs[i].name; + new_die->attrs[i].form = old_die->attrs[i].form; + new_die->attrs[i].u.addr = old_die->attrs[i].u.addr; + } + + new_die->next = NULL; + return new_die; +} +#endif + +/* Return sibling of die, NULL if no sibling. */ + +static struct die_info * +sibling_die (struct die_info *die) +{ + return die->sibling; +} + +/* Get linkage name of a die, return NULL if not found. */ + +static char * +dwarf2_linkage_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_MIPS_linkage_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Get name of a die, return NULL if not found. */ + +static char * +dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + + attr = dwarf2_attr (die, DW_AT_name, cu); + if (attr && DW_STRING (attr)) + return DW_STRING (attr); + return NULL; +} + +/* Return the die that this die in an extension of, or NULL if there + is none. */ + +static struct die_info * +dwarf2_extension (struct die_info *die, struct dwarf2_cu *cu) +{ + struct attribute *attr; + struct die_info *extension_die; + unsigned int ref; + + attr = dwarf2_attr (die, DW_AT_extension, cu); + if (attr == NULL) + return NULL; + + ref = dwarf2_get_ref_die_offset (attr, cu); + extension_die = follow_die_ref (ref); + if (!extension_die) + { + error ("Dwarf Error: Cannot find referent at offset %d.", ref); + } + + return extension_die; +} + +/* Convert a DIE tag into its string name. */ + +static char * +dwarf_tag_name (unsigned tag) +{ + switch (tag) + { + case DW_TAG_padding: + return "DW_TAG_padding"; + case DW_TAG_array_type: + return "DW_TAG_array_type"; + case DW_TAG_class_type: + return "DW_TAG_class_type"; + case DW_TAG_entry_point: + return "DW_TAG_entry_point"; + case DW_TAG_enumeration_type: + return "DW_TAG_enumeration_type"; + case DW_TAG_formal_parameter: + return "DW_TAG_formal_parameter"; + case DW_TAG_imported_declaration: + return "DW_TAG_imported_declaration"; + case DW_TAG_label: + return "DW_TAG_label"; + case DW_TAG_lexical_block: + return "DW_TAG_lexical_block"; + case DW_TAG_member: + return "DW_TAG_member"; + case DW_TAG_pointer_type: + return "DW_TAG_pointer_type"; + case DW_TAG_reference_type: + return "DW_TAG_reference_type"; + case DW_TAG_compile_unit: + return "DW_TAG_compile_unit"; + case DW_TAG_string_type: + return "DW_TAG_string_type"; + case DW_TAG_structure_type: + return "DW_TAG_structure_type"; + case DW_TAG_subroutine_type: + return "DW_TAG_subroutine_type"; + case DW_TAG_typedef: + return "DW_TAG_typedef"; + case DW_TAG_union_type: + return "DW_TAG_union_type"; + case DW_TAG_unspecified_parameters: + return "DW_TAG_unspecified_parameters"; + case DW_TAG_variant: + return "DW_TAG_variant"; + case DW_TAG_common_block: + return "DW_TAG_common_block"; + case DW_TAG_common_inclusion: + return "DW_TAG_common_inclusion"; + case DW_TAG_inheritance: + return "DW_TAG_inheritance"; + case DW_TAG_inlined_subroutine: + return "DW_TAG_inlined_subroutine"; + case DW_TAG_module: + return "DW_TAG_module"; + case DW_TAG_ptr_to_member_type: + return "DW_TAG_ptr_to_member_type"; + case DW_TAG_set_type: + return "DW_TAG_set_type"; + case DW_TAG_subrange_type: + return "DW_TAG_subrange_type"; + case DW_TAG_with_stmt: + return "DW_TAG_with_stmt"; + case DW_TAG_access_declaration: + return "DW_TAG_access_declaration"; + case DW_TAG_base_type: + return "DW_TAG_base_type"; + case DW_TAG_catch_block: + return "DW_TAG_catch_block"; + case DW_TAG_const_type: + return "DW_TAG_const_type"; + case DW_TAG_constant: + return "DW_TAG_constant"; + case DW_TAG_enumerator: + return "DW_TAG_enumerator"; + case DW_TAG_file_type: + return "DW_TAG_file_type"; + case DW_TAG_friend: + return "DW_TAG_friend"; + case DW_TAG_namelist: + return "DW_TAG_namelist"; + case DW_TAG_namelist_item: + return "DW_TAG_namelist_item"; + case DW_TAG_packed_type: + return "DW_TAG_packed_type"; + case DW_TAG_subprogram: + return "DW_TAG_subprogram"; + case DW_TAG_template_type_param: + return "DW_TAG_template_type_param"; + case DW_TAG_template_value_param: + return "DW_TAG_template_value_param"; + case DW_TAG_thrown_type: + return "DW_TAG_thrown_type"; + case DW_TAG_try_block: + return "DW_TAG_try_block"; + case DW_TAG_variant_part: + return "DW_TAG_variant_part"; + case DW_TAG_variable: + return "DW_TAG_variable"; + case DW_TAG_volatile_type: + return "DW_TAG_volatile_type"; + case DW_TAG_dwarf_procedure: + return "DW_TAG_dwarf_procedure"; + case DW_TAG_restrict_type: + return "DW_TAG_restrict_type"; + case DW_TAG_interface_type: + return "DW_TAG_interface_type"; + case DW_TAG_namespace: + return "DW_TAG_namespace"; + case DW_TAG_imported_module: + return "DW_TAG_imported_module"; + case DW_TAG_unspecified_type: + return "DW_TAG_unspecified_type"; + case DW_TAG_partial_unit: + return "DW_TAG_partial_unit"; + case DW_TAG_imported_unit: + return "DW_TAG_imported_unit"; + case DW_TAG_MIPS_loop: + return "DW_TAG_MIPS_loop"; + case DW_TAG_format_label: + return "DW_TAG_format_label"; + case DW_TAG_function_template: + return "DW_TAG_function_template"; + case DW_TAG_class_template: + return "DW_TAG_class_template"; + default: + return "DW_TAG_"; + } +} + +/* Convert a DWARF attribute code into its string name. */ + +static char * +dwarf_attr_name (unsigned attr) +{ + switch (attr) + { + case DW_AT_sibling: + return "DW_AT_sibling"; + case DW_AT_location: + return "DW_AT_location"; + case DW_AT_name: + return "DW_AT_name"; + case DW_AT_ordering: + return "DW_AT_ordering"; + case DW_AT_subscr_data: + return "DW_AT_subscr_data"; + case DW_AT_byte_size: + return "DW_AT_byte_size"; + case DW_AT_bit_offset: + return "DW_AT_bit_offset"; + case DW_AT_bit_size: + return "DW_AT_bit_size"; + case DW_AT_element_list: + return "DW_AT_element_list"; + case DW_AT_stmt_list: + return "DW_AT_stmt_list"; + case DW_AT_low_pc: + return "DW_AT_low_pc"; + case DW_AT_high_pc: + return "DW_AT_high_pc"; + case DW_AT_language: + return "DW_AT_language"; + case DW_AT_member: + return "DW_AT_member"; + case DW_AT_discr: + return "DW_AT_discr"; + case DW_AT_discr_value: + return "DW_AT_discr_value"; + case DW_AT_visibility: + return "DW_AT_visibility"; + case DW_AT_import: + return "DW_AT_import"; + case DW_AT_string_length: + return "DW_AT_string_length"; + case DW_AT_common_reference: + return "DW_AT_common_reference"; + case DW_AT_comp_dir: + return "DW_AT_comp_dir"; + case DW_AT_const_value: + return "DW_AT_const_value"; + case DW_AT_containing_type: + return "DW_AT_containing_type"; + case DW_AT_default_value: + return "DW_AT_default_value"; + case DW_AT_inline: + return "DW_AT_inline"; + case DW_AT_is_optional: + return "DW_AT_is_optional"; + case DW_AT_lower_bound: + return "DW_AT_lower_bound"; + case DW_AT_producer: + return "DW_AT_producer"; + case DW_AT_prototyped: + return "DW_AT_prototyped"; + case DW_AT_return_addr: + return "DW_AT_return_addr"; + case DW_AT_start_scope: + return "DW_AT_start_scope"; + case DW_AT_stride_size: + return "DW_AT_stride_size"; + case DW_AT_upper_bound: + return "DW_AT_upper_bound"; + case DW_AT_abstract_origin: + return "DW_AT_abstract_origin"; + case DW_AT_accessibility: + return "DW_AT_accessibility"; + case DW_AT_address_class: + return "DW_AT_address_class"; + case DW_AT_artificial: + return "DW_AT_artificial"; + case DW_AT_base_types: + return "DW_AT_base_types"; + case DW_AT_calling_convention: + return "DW_AT_calling_convention"; + case DW_AT_count: + return "DW_AT_count"; + case DW_AT_data_member_location: + return "DW_AT_data_member_location"; + case DW_AT_decl_column: + return "DW_AT_decl_column"; + case DW_AT_decl_file: + return "DW_AT_decl_file"; + case DW_AT_decl_line: + return "DW_AT_decl_line"; + case DW_AT_declaration: + return "DW_AT_declaration"; + case DW_AT_discr_list: + return "DW_AT_discr_list"; + case DW_AT_encoding: + return "DW_AT_encoding"; + case DW_AT_external: + return "DW_AT_external"; + case DW_AT_frame_base: + return "DW_AT_frame_base"; + case DW_AT_friend: + return "DW_AT_friend"; + case DW_AT_identifier_case: + return "DW_AT_identifier_case"; + case DW_AT_macro_info: + return "DW_AT_macro_info"; + case DW_AT_namelist_items: + return "DW_AT_namelist_items"; + case DW_AT_priority: + return "DW_AT_priority"; + case DW_AT_segment: + return "DW_AT_segment"; + case DW_AT_specification: + return "DW_AT_specification"; + case DW_AT_static_link: + return "DW_AT_static_link"; + case DW_AT_type: + return "DW_AT_type"; + case DW_AT_use_location: + return "DW_AT_use_location"; + case DW_AT_variable_parameter: + return "DW_AT_variable_parameter"; + case DW_AT_virtuality: + return "DW_AT_virtuality"; + case DW_AT_vtable_elem_location: + return "DW_AT_vtable_elem_location"; + case DW_AT_allocated: + return "DW_AT_allocated"; + case DW_AT_associated: + return "DW_AT_associated"; + case DW_AT_data_location: + return "DW_AT_data_location"; + case DW_AT_stride: + return "DW_AT_stride"; + case DW_AT_entry_pc: + return "DW_AT_entry_pc"; + case DW_AT_use_UTF8: + return "DW_AT_use_UTF8"; + case DW_AT_extension: + return "DW_AT_extension"; + case DW_AT_ranges: + return "DW_AT_ranges"; + case DW_AT_trampoline: + return "DW_AT_trampoline"; + case DW_AT_call_column: + return "DW_AT_call_column"; + case DW_AT_call_file: + return "DW_AT_call_file"; + case DW_AT_call_line: + return "DW_AT_call_line"; +#ifdef MIPS + case DW_AT_MIPS_fde: + return "DW_AT_MIPS_fde"; + case DW_AT_MIPS_loop_begin: + return "DW_AT_MIPS_loop_begin"; + case DW_AT_MIPS_tail_loop_begin: + return "DW_AT_MIPS_tail_loop_begin"; + case DW_AT_MIPS_epilog_begin: + return "DW_AT_MIPS_epilog_begin"; + case DW_AT_MIPS_loop_unroll_factor: + return "DW_AT_MIPS_loop_unroll_factor"; + case DW_AT_MIPS_software_pipeline_depth: + return "DW_AT_MIPS_software_pipeline_depth"; +#endif + case DW_AT_MIPS_linkage_name: + return "DW_AT_MIPS_linkage_name"; + + case DW_AT_sf_names: + return "DW_AT_sf_names"; + case DW_AT_src_info: + return "DW_AT_src_info"; + case DW_AT_mac_info: + return "DW_AT_mac_info"; + case DW_AT_src_coords: + return "DW_AT_src_coords"; + case DW_AT_body_begin: + return "DW_AT_body_begin"; + case DW_AT_body_end: + return "DW_AT_body_end"; + case DW_AT_GNU_vector: + return "DW_AT_GNU_vector"; + default: + return "DW_AT_"; + } +} + +/* Convert a DWARF value form code into its string name. */ + +static char * +dwarf_form_name (unsigned form) +{ + switch (form) + { + case DW_FORM_addr: + return "DW_FORM_addr"; + case DW_FORM_block2: + return "DW_FORM_block2"; + case DW_FORM_block4: + return "DW_FORM_block4"; + case DW_FORM_data2: + return "DW_FORM_data2"; + case DW_FORM_data4: + return "DW_FORM_data4"; + case DW_FORM_data8: + return "DW_FORM_data8"; + case DW_FORM_string: + return "DW_FORM_string"; + case DW_FORM_block: + return "DW_FORM_block"; + case DW_FORM_block1: + return "DW_FORM_block1"; + case DW_FORM_data1: + return "DW_FORM_data1"; + case DW_FORM_flag: + return "DW_FORM_flag"; + case DW_FORM_sdata: + return "DW_FORM_sdata"; + case DW_FORM_strp: + return "DW_FORM_strp"; + case DW_FORM_udata: + return "DW_FORM_udata"; + case DW_FORM_ref_addr: + return "DW_FORM_ref_addr"; + case DW_FORM_ref1: + return "DW_FORM_ref1"; + case DW_FORM_ref2: + return "DW_FORM_ref2"; + case DW_FORM_ref4: + return "DW_FORM_ref4"; + case DW_FORM_ref8: + return "DW_FORM_ref8"; + case DW_FORM_ref_udata: + return "DW_FORM_ref_udata"; + case DW_FORM_indirect: + return "DW_FORM_indirect"; + default: + return "DW_FORM_"; + } +} + +/* Convert a DWARF stack opcode into its string name. */ + +static char * +dwarf_stack_op_name (unsigned op) +{ + switch (op) + { + case DW_OP_addr: + return "DW_OP_addr"; + case DW_OP_deref: + return "DW_OP_deref"; + case DW_OP_const1u: + return "DW_OP_const1u"; + case DW_OP_const1s: + return "DW_OP_const1s"; + case DW_OP_const2u: + return "DW_OP_const2u"; + case DW_OP_const2s: + return "DW_OP_const2s"; + case DW_OP_const4u: + return "DW_OP_const4u"; + case DW_OP_const4s: + return "DW_OP_const4s"; + case DW_OP_const8u: + return "DW_OP_const8u"; + case DW_OP_const8s: + return "DW_OP_const8s"; + case DW_OP_constu: + return "DW_OP_constu"; + case DW_OP_consts: + return "DW_OP_consts"; + case DW_OP_dup: + return "DW_OP_dup"; + case DW_OP_drop: + return "DW_OP_drop"; + case DW_OP_over: + return "DW_OP_over"; + case DW_OP_pick: + return "DW_OP_pick"; + case DW_OP_swap: + return "DW_OP_swap"; + case DW_OP_rot: + return "DW_OP_rot"; + case DW_OP_xderef: + return "DW_OP_xderef"; + case DW_OP_abs: + return "DW_OP_abs"; + case DW_OP_and: + return "DW_OP_and"; + case DW_OP_div: + return "DW_OP_div"; + case DW_OP_minus: + return "DW_OP_minus"; + case DW_OP_mod: + return "DW_OP_mod"; + case DW_OP_mul: + return "DW_OP_mul"; + case DW_OP_neg: + return "DW_OP_neg"; + case DW_OP_not: + return "DW_OP_not"; + case DW_OP_or: + return "DW_OP_or"; + case DW_OP_plus: + return "DW_OP_plus"; + case DW_OP_plus_uconst: + return "DW_OP_plus_uconst"; + case DW_OP_shl: + return "DW_OP_shl"; + case DW_OP_shr: + return "DW_OP_shr"; + case DW_OP_shra: + return "DW_OP_shra"; + case DW_OP_xor: + return "DW_OP_xor"; + case DW_OP_bra: + return "DW_OP_bra"; + case DW_OP_eq: + return "DW_OP_eq"; + case DW_OP_ge: + return "DW_OP_ge"; + case DW_OP_gt: + return "DW_OP_gt"; + case DW_OP_le: + return "DW_OP_le"; + case DW_OP_lt: + return "DW_OP_lt"; + case DW_OP_ne: + return "DW_OP_ne"; + case DW_OP_skip: + return "DW_OP_skip"; + case DW_OP_lit0: + return "DW_OP_lit0"; + case DW_OP_lit1: + return "DW_OP_lit1"; + case DW_OP_lit2: + return "DW_OP_lit2"; + case DW_OP_lit3: + return "DW_OP_lit3"; + case DW_OP_lit4: + return "DW_OP_lit4"; + case DW_OP_lit5: + return "DW_OP_lit5"; + case DW_OP_lit6: + return "DW_OP_lit6"; + case DW_OP_lit7: + return "DW_OP_lit7"; + case DW_OP_lit8: + return "DW_OP_lit8"; + case DW_OP_lit9: + return "DW_OP_lit9"; + case DW_OP_lit10: + return "DW_OP_lit10"; + case DW_OP_lit11: + return "DW_OP_lit11"; + case DW_OP_lit12: + return "DW_OP_lit12"; + case DW_OP_lit13: + return "DW_OP_lit13"; + case DW_OP_lit14: + return "DW_OP_lit14"; + case DW_OP_lit15: + return "DW_OP_lit15"; + case DW_OP_lit16: + return "DW_OP_lit16"; + case DW_OP_lit17: + return "DW_OP_lit17"; + case DW_OP_lit18: + return "DW_OP_lit18"; + case DW_OP_lit19: + return "DW_OP_lit19"; + case DW_OP_lit20: + return "DW_OP_lit20"; + case DW_OP_lit21: + return "DW_OP_lit21"; + case DW_OP_lit22: + return "DW_OP_lit22"; + case DW_OP_lit23: + return "DW_OP_lit23"; + case DW_OP_lit24: + return "DW_OP_lit24"; + case DW_OP_lit25: + return "DW_OP_lit25"; + case DW_OP_lit26: + return "DW_OP_lit26"; + case DW_OP_lit27: + return "DW_OP_lit27"; + case DW_OP_lit28: + return "DW_OP_lit28"; + case DW_OP_lit29: + return "DW_OP_lit29"; + case DW_OP_lit30: + return "DW_OP_lit30"; + case DW_OP_lit31: + return "DW_OP_lit31"; + case DW_OP_reg0: + return "DW_OP_reg0"; + case DW_OP_reg1: + return "DW_OP_reg1"; + case DW_OP_reg2: + return "DW_OP_reg2"; + case DW_OP_reg3: + return "DW_OP_reg3"; + case DW_OP_reg4: + return "DW_OP_reg4"; + case DW_OP_reg5: + return "DW_OP_reg5"; + case DW_OP_reg6: + return "DW_OP_reg6"; + case DW_OP_reg7: + return "DW_OP_reg7"; + case DW_OP_reg8: + return "DW_OP_reg8"; + case DW_OP_reg9: + return "DW_OP_reg9"; + case DW_OP_reg10: + return "DW_OP_reg10"; + case DW_OP_reg11: + return "DW_OP_reg11"; + case DW_OP_reg12: + return "DW_OP_reg12"; + case DW_OP_reg13: + return "DW_OP_reg13"; + case DW_OP_reg14: + return "DW_OP_reg14"; + case DW_OP_reg15: + return "DW_OP_reg15"; + case DW_OP_reg16: + return "DW_OP_reg16"; + case DW_OP_reg17: + return "DW_OP_reg17"; + case DW_OP_reg18: + return "DW_OP_reg18"; + case DW_OP_reg19: + return "DW_OP_reg19"; + case DW_OP_reg20: + return "DW_OP_reg20"; + case DW_OP_reg21: + return "DW_OP_reg21"; + case DW_OP_reg22: + return "DW_OP_reg22"; + case DW_OP_reg23: + return "DW_OP_reg23"; + case DW_OP_reg24: + return "DW_OP_reg24"; + case DW_OP_reg25: + return "DW_OP_reg25"; + case DW_OP_reg26: + return "DW_OP_reg26"; + case DW_OP_reg27: + return "DW_OP_reg27"; + case DW_OP_reg28: + return "DW_OP_reg28"; + case DW_OP_reg29: + return "DW_OP_reg29"; + case DW_OP_reg30: + return "DW_OP_reg30"; + case DW_OP_reg31: + return "DW_OP_reg31"; + case DW_OP_breg0: + return "DW_OP_breg0"; + case DW_OP_breg1: + return "DW_OP_breg1"; + case DW_OP_breg2: + return "DW_OP_breg2"; + case DW_OP_breg3: + return "DW_OP_breg3"; + case DW_OP_breg4: + return "DW_OP_breg4"; + case DW_OP_breg5: + return "DW_OP_breg5"; + case DW_OP_breg6: + return "DW_OP_breg6"; + case DW_OP_breg7: + return "DW_OP_breg7"; + case DW_OP_breg8: + return "DW_OP_breg8"; + case DW_OP_breg9: + return "DW_OP_breg9"; + case DW_OP_breg10: + return "DW_OP_breg10"; + case DW_OP_breg11: + return "DW_OP_breg11"; + case DW_OP_breg12: + return "DW_OP_breg12"; + case DW_OP_breg13: + return "DW_OP_breg13"; + case DW_OP_breg14: + return "DW_OP_breg14"; + case DW_OP_breg15: + return "DW_OP_breg15"; + case DW_OP_breg16: + return "DW_OP_breg16"; + case DW_OP_breg17: + return "DW_OP_breg17"; + case DW_OP_breg18: + return "DW_OP_breg18"; + case DW_OP_breg19: + return "DW_OP_breg19"; + case DW_OP_breg20: + return "DW_OP_breg20"; + case DW_OP_breg21: + return "DW_OP_breg21"; + case DW_OP_breg22: + return "DW_OP_breg22"; + case DW_OP_breg23: + return "DW_OP_breg23"; + case DW_OP_breg24: + return "DW_OP_breg24"; + case DW_OP_breg25: + return "DW_OP_breg25"; + case DW_OP_breg26: + return "DW_OP_breg26"; + case DW_OP_breg27: + return "DW_OP_breg27"; + case DW_OP_breg28: + return "DW_OP_breg28"; + case DW_OP_breg29: + return "DW_OP_breg29"; + case DW_OP_breg30: + return "DW_OP_breg30"; + case DW_OP_breg31: + return "DW_OP_breg31"; + case DW_OP_regx: + return "DW_OP_regx"; + case DW_OP_fbreg: + return "DW_OP_fbreg"; + case DW_OP_bregx: + return "DW_OP_bregx"; + case DW_OP_piece: + return "DW_OP_piece"; + case DW_OP_deref_size: + return "DW_OP_deref_size"; + case DW_OP_xderef_size: + return "DW_OP_xderef_size"; + case DW_OP_nop: + return "DW_OP_nop"; + /* DWARF 3 extensions. */ + case DW_OP_push_object_address: + return "DW_OP_push_object_address"; + case DW_OP_call2: + return "DW_OP_call2"; + case DW_OP_call4: + return "DW_OP_call4"; + case DW_OP_call_ref: + return "DW_OP_call_ref"; + /* GNU extensions. */ + case DW_OP_GNU_push_tls_address: + return "DW_OP_GNU_push_tls_address"; + default: + return "OP_"; + } +} + +static char * +dwarf_bool_name (unsigned mybool) +{ + if (mybool) + return "TRUE"; + else + return "FALSE"; +} + +/* Convert a DWARF type code into its string name. */ + +static char * +dwarf_type_encoding_name (unsigned enc) +{ + switch (enc) + { + case DW_ATE_address: + return "DW_ATE_address"; + case DW_ATE_boolean: + return "DW_ATE_boolean"; + case DW_ATE_complex_float: + return "DW_ATE_complex_float"; + case DW_ATE_float: + return "DW_ATE_float"; + case DW_ATE_signed: + return "DW_ATE_signed"; + case DW_ATE_signed_char: + return "DW_ATE_signed_char"; + case DW_ATE_unsigned: + return "DW_ATE_unsigned"; + case DW_ATE_unsigned_char: + return "DW_ATE_unsigned_char"; + case DW_ATE_imaginary_float: + return "DW_ATE_imaginary_float"; + default: + return "DW_ATE_"; + } +} + +/* Convert a DWARF call frame info operation to its string name. */ + +#if 0 +static char * +dwarf_cfi_name (unsigned cfi_opc) +{ + switch (cfi_opc) + { + case DW_CFA_advance_loc: + return "DW_CFA_advance_loc"; + case DW_CFA_offset: + return "DW_CFA_offset"; + case DW_CFA_restore: + return "DW_CFA_restore"; + case DW_CFA_nop: + return "DW_CFA_nop"; + case DW_CFA_set_loc: + return "DW_CFA_set_loc"; + case DW_CFA_advance_loc1: + return "DW_CFA_advance_loc1"; + case DW_CFA_advance_loc2: + return "DW_CFA_advance_loc2"; + case DW_CFA_advance_loc4: + return "DW_CFA_advance_loc4"; + case DW_CFA_offset_extended: + return "DW_CFA_offset_extended"; + case DW_CFA_restore_extended: + return "DW_CFA_restore_extended"; + case DW_CFA_undefined: + return "DW_CFA_undefined"; + case DW_CFA_same_value: + return "DW_CFA_same_value"; + case DW_CFA_register: + return "DW_CFA_register"; + case DW_CFA_remember_state: + return "DW_CFA_remember_state"; + case DW_CFA_restore_state: + return "DW_CFA_restore_state"; + case DW_CFA_def_cfa: + return "DW_CFA_def_cfa"; + case DW_CFA_def_cfa_register: + return "DW_CFA_def_cfa_register"; + case DW_CFA_def_cfa_offset: + return "DW_CFA_def_cfa_offset"; + + /* DWARF 3 */ + case DW_CFA_def_cfa_expression: + return "DW_CFA_def_cfa_expression"; + case DW_CFA_expression: + return "DW_CFA_expression"; + case DW_CFA_offset_extended_sf: + return "DW_CFA_offset_extended_sf"; + case DW_CFA_def_cfa_sf: + return "DW_CFA_def_cfa_sf"; + case DW_CFA_def_cfa_offset_sf: + return "DW_CFA_def_cfa_offset_sf"; + + /* SGI/MIPS specific */ + case DW_CFA_MIPS_advance_loc8: + return "DW_CFA_MIPS_advance_loc8"; + + /* GNU extensions */ + case DW_CFA_GNU_window_save: + return "DW_CFA_GNU_window_save"; + case DW_CFA_GNU_args_size: + return "DW_CFA_GNU_args_size"; + case DW_CFA_GNU_negative_offset_extended: + return "DW_CFA_GNU_negative_offset_extended"; + + default: + return "DW_CFA_"; + } +} +#endif + +static void +dump_die (struct die_info *die) +{ + unsigned int i; + + fprintf_unfiltered (gdb_stderr, "Die: %s (abbrev = %d, offset = %d)\n", + dwarf_tag_name (die->tag), die->abbrev, die->offset); + fprintf_unfiltered (gdb_stderr, "\thas children: %s\n", + dwarf_bool_name (die->child != NULL)); + + fprintf_unfiltered (gdb_stderr, "\tattributes:\n"); + for (i = 0; i < die->num_attrs; ++i) + { + fprintf_unfiltered (gdb_stderr, "\t\t%s (%s) ", + dwarf_attr_name (die->attrs[i].name), + dwarf_form_name (die->attrs[i].form)); + switch (die->attrs[i].form) + { + case DW_FORM_ref_addr: + case DW_FORM_addr: + fprintf_unfiltered (gdb_stderr, "address: "); + print_address_numeric (DW_ADDR (&die->attrs[i]), 1, gdb_stderr); + break; + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_block: + case DW_FORM_block1: + fprintf_unfiltered (gdb_stderr, "block: size %d", DW_BLOCK (&die->attrs[i])->size); + break; + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_udata: + case DW_FORM_sdata: + fprintf_unfiltered (gdb_stderr, "constant: %ld", DW_UNSND (&die->attrs[i])); + break; + case DW_FORM_string: + case DW_FORM_strp: + fprintf_unfiltered (gdb_stderr, "string: \"%s\"", + DW_STRING (&die->attrs[i]) + ? DW_STRING (&die->attrs[i]) : ""); + break; + case DW_FORM_flag: + if (DW_UNSND (&die->attrs[i])) + fprintf_unfiltered (gdb_stderr, "flag: TRUE"); + else + fprintf_unfiltered (gdb_stderr, "flag: FALSE"); + break; + case DW_FORM_indirect: + /* the reader will have reduced the indirect form to + the "base form" so this form should not occur */ + fprintf_unfiltered (gdb_stderr, "unexpected attribute form: DW_FORM_indirect"); + break; + default: + fprintf_unfiltered (gdb_stderr, "unsupported attribute form: %d.", + die->attrs[i].form); + } + fprintf_unfiltered (gdb_stderr, "\n"); + } +} + +static void +dump_die_list (struct die_info *die) +{ + while (die) + { + dump_die (die); + if (die->child != NULL) + dump_die_list (die->child); + if (die->sibling != NULL) + dump_die_list (die->sibling); + } +} + +static void +store_in_ref_table (unsigned int offset, struct die_info *die) +{ + int h; + struct die_info *old; + + h = (offset % REF_HASH_SIZE); + old = die_ref_table[h]; + die->next_ref = old; + die_ref_table[h] = die; +} + + +static void +dwarf2_empty_hash_tables (void) +{ + memset (die_ref_table, 0, sizeof (die_ref_table)); +} + +static unsigned int +dwarf2_get_ref_die_offset (struct attribute *attr, struct dwarf2_cu *cu) +{ + unsigned int result = 0; + + switch (attr->form) + { + case DW_FORM_ref_addr: + result = DW_ADDR (attr); + break; + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: + case DW_FORM_ref8: + case DW_FORM_ref_udata: + result = cu->header.offset + DW_UNSND (attr); + break; + default: + complaint (&symfile_complaints, + "unsupported die ref attribute form: '%s'", + dwarf_form_name (attr->form)); + } + return result; +} + +/* Return the constant value held by the given attribute. Return -1 + if the value held by the attribute is not constant. */ + +static int +dwarf2_get_attr_constant_value (struct attribute *attr, int default_value) +{ + if (attr->form == DW_FORM_sdata) + return DW_SND (attr); + else if (attr->form == DW_FORM_udata + || attr->form == DW_FORM_data1 + || attr->form == DW_FORM_data2 + || attr->form == DW_FORM_data4 + || attr->form == DW_FORM_data8) + return DW_UNSND (attr); + else + { + complaint (&symfile_complaints, "Attribute value is not a constant (%s)", + dwarf_form_name (attr->form)); + return default_value; + } +} + +static struct die_info * +follow_die_ref (unsigned int offset) +{ + struct die_info *die; + int h; + + h = (offset % REF_HASH_SIZE); + die = die_ref_table[h]; + while (die) + { + if (die->offset == offset) + { + return die; + } + die = die->next_ref; + } + return NULL; +} + +static struct type * +dwarf2_fundamental_type (struct objfile *objfile, int typeid, + struct dwarf2_cu *cu) +{ + if (typeid < 0 || typeid >= FT_NUM_MEMBERS) + { + error ("Dwarf Error: internal error - invalid fundamental type id %d [in module %s]", + typeid, objfile->name); + } + + /* Look for this particular type in the fundamental type vector. If + one is not found, create and install one appropriate for the + current language and the current target machine. */ + + if (cu->ftypes[typeid] == NULL) + { + cu->ftypes[typeid] = cu->language_defn->la_fund_type (objfile, typeid); + } + + return (cu->ftypes[typeid]); +} + +/* Decode simple location descriptions. + Given a pointer to a dwarf block that defines a location, compute + the location and return the value. + + NOTE drow/2003-11-18: This function is called in two situations + now: for the address of static or global variables (partial symbols + only) and for offsets into structures which are expected to be + (more or less) constant. The partial symbol case should go away, + and only the constant case should remain. That will let this + function complain more accurately. A few special modes are allowed + without complaint for global variables (for instance, global + register values and thread-local values). + + A location description containing no operations indicates that the + object is optimized out. The return value is 0 for that case. + FIXME drow/2003-11-16: No callers check for this case any more; soon all + callers will only want a very basic result and this can become a + complaint. + + When the result is a register number, the global isreg flag is set, + otherwise it is cleared. + + Note that stack[0] is unused except as a default error return. + Note that stack overflow is not yet handled. */ + +static CORE_ADDR +decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu) +{ + struct objfile *objfile = cu->objfile; + struct comp_unit_head *cu_header = &cu->header; + int i; + int size = blk->size; + char *data = blk->data; + CORE_ADDR stack[64]; + int stacki; + unsigned int bytes_read, unsnd; + unsigned char op; + + i = 0; + stacki = 0; + stack[stacki] = 0; + isreg = 0; + + while (i < size) + { + op = data[i++]; + switch (op) + { + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + stack[++stacki] = op - DW_OP_lit0; + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + isreg = 1; + stack[++stacki] = op - DW_OP_reg0; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_regx: + isreg = 1; + unsnd = read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + stack[++stacki] = unsnd; + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_addr: + stack[++stacki] = read_address (objfile->obfd, &data[i], + cu, &bytes_read); + i += bytes_read; + break; + + case DW_OP_const1u: + stack[++stacki] = read_1_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const1s: + stack[++stacki] = read_1_signed_byte (objfile->obfd, &data[i]); + i += 1; + break; + + case DW_OP_const2u: + stack[++stacki] = read_2_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const2s: + stack[++stacki] = read_2_signed_bytes (objfile->obfd, &data[i]); + i += 2; + break; + + case DW_OP_const4u: + stack[++stacki] = read_4_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_const4s: + stack[++stacki] = read_4_signed_bytes (objfile->obfd, &data[i]); + i += 4; + break; + + case DW_OP_constu: + stack[++stacki] = read_unsigned_leb128 (NULL, (data + i), + &bytes_read); + i += bytes_read; + break; + + case DW_OP_consts: + stack[++stacki] = read_signed_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_dup: + stack[stacki + 1] = stack[stacki]; + stacki++; + break; + + case DW_OP_plus: + stack[stacki - 1] += stack[stacki]; + stacki--; + break; + + case DW_OP_plus_uconst: + stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read); + i += bytes_read; + break; + + case DW_OP_minus: + stack[stacki - 1] -= stack[stacki]; + stacki--; + break; + + case DW_OP_deref: + /* If we're not the last op, then we definitely can't encode + this using GDB's address_class enum. This is valid for partial + global symbols, although the variable's address will be bogus + in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + case DW_OP_GNU_push_tls_address: + /* The top of the stack has the offset from the beginning + of the thread control block at which the variable is located. */ + /* Nothing should follow this operator, so the top of stack would + be returned. */ + /* This is valid for partial global symbols, but the variable's + address will be bogus in the psymtab. */ + if (i < size) + dwarf2_complex_location_expr_complaint (); + break; + + default: + complaint (&symfile_complaints, "unsupported stack op: '%s'", + dwarf_stack_op_name (op)); + return (stack[stacki]); + } + } + return (stack[stacki]); +} + +/* memory allocation interface */ + +static void +dwarf2_free_tmp_obstack (void *ignore) +{ + obstack_free (&dwarf2_tmp_obstack, NULL); +} + +static struct dwarf_block * +dwarf_alloc_block (void) +{ + struct dwarf_block *blk; + + blk = (struct dwarf_block *) + obstack_alloc (&dwarf2_tmp_obstack, sizeof (struct dwarf_block)); + return (blk); +} + +static struct abbrev_info * +dwarf_alloc_abbrev (void) +{ + struct abbrev_info *abbrev; + + abbrev = (struct abbrev_info *) xmalloc (sizeof (struct abbrev_info)); + memset (abbrev, 0, sizeof (struct abbrev_info)); + return (abbrev); +} + +static struct die_info * +dwarf_alloc_die (void) +{ + struct die_info *die; + + die = (struct die_info *) xmalloc (sizeof (struct die_info)); + memset (die, 0, sizeof (struct die_info)); + return (die); +} + + +/* Macro support. */ + + +/* Return the full name of file number I in *LH's file name table. + Use COMP_DIR as the name of the current directory of the + compilation. The result is allocated using xmalloc; the caller is + responsible for freeing it. */ +static char * +file_full_name (int file, struct line_header *lh, const char *comp_dir) +{ + struct file_entry *fe = &lh->file_names[file - 1]; + + if (IS_ABSOLUTE_PATH (fe->name)) + return xstrdup (fe->name); + else + { + const char *dir; + int dir_len; + char *full_name; + + if (fe->dir_index) + dir = lh->include_dirs[fe->dir_index - 1]; + else + dir = comp_dir; + + if (dir) + { + dir_len = strlen (dir); + full_name = xmalloc (dir_len + 1 + strlen (fe->name) + 1); + strcpy (full_name, dir); + full_name[dir_len] = '/'; + strcpy (full_name + dir_len + 1, fe->name); + return full_name; + } + else + return xstrdup (fe->name); + } +} + + +static struct macro_source_file * +macro_start_file (int file, int line, + struct macro_source_file *current_file, + const char *comp_dir, + struct line_header *lh, struct objfile *objfile) +{ + /* The full name of this source file. */ + char *full_name = file_full_name (file, lh, comp_dir); + + /* We don't create a macro table for this compilation unit + at all until we actually get a filename. */ + if (! pending_macros) + pending_macros = new_macro_table (&objfile->objfile_obstack, + objfile->macro_cache); + + if (! current_file) + /* If we have no current file, then this must be the start_file + directive for the compilation unit's main source file. */ + current_file = macro_set_main (pending_macros, full_name); + else + current_file = macro_include (current_file, line, full_name); + + xfree (full_name); + + return current_file; +} + + +/* Copy the LEN characters at BUF to a xmalloc'ed block of memory, + followed by a null byte. */ +static char * +copy_string (const char *buf, int len) +{ + char *s = xmalloc (len + 1); + memcpy (s, buf, len); + s[len] = '\0'; + + return s; +} + + +static const char * +consume_improper_spaces (const char *p, const char *body) +{ + if (*p == ' ') + { + complaint (&symfile_complaints, + "macro definition contains spaces in formal argument list:\n`%s'", + body); + + while (*p == ' ') + p++; + } + + return p; +} + + +static void +parse_macro_definition (struct macro_source_file *file, int line, + const char *body) +{ + const char *p; + + /* The body string takes one of two forms. For object-like macro + definitions, it should be: + + " " + + For function-like macro definitions, it should be: + + "() " + or + "(" ( "," ) * ") " + + Spaces may appear only where explicitly indicated, and in the + . + + The Dwarf 2 spec says that an object-like macro's name is always + followed by a space, but versions of GCC around March 2002 omit + the space when the macro's definition is the empty string. + + The Dwarf 2 spec says that there should be no spaces between the + formal arguments in a function-like macro's formal argument list, + but versions of GCC around March 2002 include spaces after the + commas. */ + + + /* Find the extent of the macro name. The macro name is terminated + by either a space or null character (for an object-like macro) or + an opening paren (for a function-like macro). */ + for (p = body; *p; p++) + if (*p == ' ' || *p == '(') + break; + + if (*p == ' ' || *p == '\0') + { + /* It's an object-like macro. */ + int name_len = p - body; + char *name = copy_string (body, name_len); + const char *replacement; + + if (*p == ' ') + replacement = body + name_len + 1; + else + { + dwarf2_macro_malformed_definition_complaint (body); + replacement = body + name_len; + } + + macro_define_object (file, line, name, replacement); + + xfree (name); + } + else if (*p == '(') + { + /* It's a function-like macro. */ + char *name = copy_string (body, p - body); + int argc = 0; + int argv_size = 1; + char **argv = xmalloc (argv_size * sizeof (*argv)); + + p++; + + p = consume_improper_spaces (p, body); + + /* Parse the formal argument list. */ + while (*p && *p != ')') + { + /* Find the extent of the current argument name. */ + const char *arg_start = p; + + while (*p && *p != ',' && *p != ')' && *p != ' ') + p++; + + if (! *p || p == arg_start) + dwarf2_macro_malformed_definition_complaint (body); + else + { + /* Make sure argv has room for the new argument. */ + if (argc >= argv_size) + { + argv_size *= 2; + argv = xrealloc (argv, argv_size * sizeof (*argv)); + } + + argv[argc++] = copy_string (arg_start, p - arg_start); + } + + p = consume_improper_spaces (p, body); + + /* Consume the comma, if present. */ + if (*p == ',') + { + p++; + + p = consume_improper_spaces (p, body); + } + } + + if (*p == ')') + { + p++; + + if (*p == ' ') + /* Perfectly formed definition, no complaints. */ + macro_define_function (file, line, name, + argc, (const char **) argv, + p + 1); + else if (*p == '\0') + { + /* Complain, but do define it. */ + dwarf2_macro_malformed_definition_complaint (body); + macro_define_function (file, line, name, + argc, (const char **) argv, + p); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + } + else + /* Just complain. */ + dwarf2_macro_malformed_definition_complaint (body); + + xfree (name); + { + int i; + + for (i = 0; i < argc; i++) + xfree (argv[i]); + } + xfree (argv); + } + else + dwarf2_macro_malformed_definition_complaint (body); +} + + +static void +dwarf_decode_macros (struct line_header *lh, unsigned int offset, + char *comp_dir, bfd *abfd, + struct dwarf2_cu *cu) +{ + char *mac_ptr, *mac_end; + struct macro_source_file *current_file = 0; + + if (dwarf_macinfo_buffer == NULL) + { + complaint (&symfile_complaints, "missing .debug_macinfo section"); + return; + } + + mac_ptr = dwarf_macinfo_buffer + offset; + mac_end = dwarf_macinfo_buffer + dwarf_macinfo_size; + + for (;;) + { + enum dwarf_macinfo_record_type macinfo_type; + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + macinfo_type = read_1_byte (abfd, mac_ptr); + mac_ptr++; + + switch (macinfo_type) + { + /* A zero macinfo type indicates the end of the macro + information. */ + case 0: + return; + + case DW_MACINFO_define: + case DW_MACINFO_undef: + { + int bytes_read; + int line; + char *body; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + body = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + if (! current_file) + complaint (&symfile_complaints, + "debug info gives macro %s outside of any file: %s", + macinfo_type == + DW_MACINFO_define ? "definition" : macinfo_type == + DW_MACINFO_undef ? "undefinition" : + "something-or-other", body); + else + { + if (macinfo_type == DW_MACINFO_define) + parse_macro_definition (current_file, line, body); + else if (macinfo_type == DW_MACINFO_undef) + macro_undef (current_file, line, body); + } + } + break; + + case DW_MACINFO_start_file: + { + int bytes_read; + int line, file; + + line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + current_file = macro_start_file (file, line, + current_file, comp_dir, + lh, cu->objfile); + } + break; + + case DW_MACINFO_end_file: + if (! current_file) + complaint (&symfile_complaints, + "macro debug info has an unmatched `close_file' directive"); + else + { + current_file = current_file->included_by; + if (! current_file) + { + enum dwarf_macinfo_record_type next_type; + + /* GCC circa March 2002 doesn't produce the zero + type byte marking the end of the compilation + unit. Complain if it's not there, but exit no + matter what. */ + + /* Do we at least have room for a macinfo type byte? */ + if (mac_ptr >= mac_end) + { + dwarf2_macros_too_long_complaint (); + return; + } + + /* We don't increment mac_ptr here, so this is just + a look-ahead. */ + next_type = read_1_byte (abfd, mac_ptr); + if (next_type != 0) + complaint (&symfile_complaints, + "no terminating 0-type entry for macros in `.debug_macinfo' section"); + + return; + } + } + break; + + case DW_MACINFO_vendor_ext: + { + int bytes_read; + int constant; + char *string; + + constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + string = read_string (abfd, mac_ptr, &bytes_read); + mac_ptr += bytes_read; + + /* We don't recognize any vendor extensions. */ + } + break; + } + } +} + +/* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ +static int +attr_form_is_block (struct attribute *attr) +{ + return (attr == NULL ? 0 : + attr->form == DW_FORM_block1 + || attr->form == DW_FORM_block2 + || attr->form == DW_FORM_block4 + || attr->form == DW_FORM_block); +} + +static void +dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, + struct dwarf2_cu *cu) +{ + if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + { + struct dwarf2_loclist_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_loclist_baton)); + baton->objfile = cu->objfile; + + /* We don't know how long the location list is, but make sure we + don't run off the edge of the section. */ + baton->size = dwarf_loc_size - DW_UNSND (attr); + baton->data = dwarf_loc_buffer + DW_UNSND (attr); + baton->base_address = cu->header.base_address; + if (cu->header.base_known == 0) + complaint (&symfile_complaints, + "Location list used without specifying the CU base address."); + + SYMBOL_OPS (sym) = &dwarf2_loclist_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } + else + { + struct dwarf2_locexpr_baton *baton; + + baton = obstack_alloc (&cu->objfile->objfile_obstack, + sizeof (struct dwarf2_locexpr_baton)); + baton->objfile = cu->objfile; + + if (attr_form_is_block (attr)) + { + /* Note that we're just copying the block's data pointer + here, not the actual data. We're still pointing into the + dwarf_info_buffer for SYM's objfile; right now we never + release that buffer, but when we do clean up properly + this may need to change. */ + baton->size = DW_BLOCK (attr)->size; + baton->data = DW_BLOCK (attr)->data; + } + else + { + dwarf2_invalid_attrib_class_complaint ("location description", + SYMBOL_NATURAL_NAME (sym)); + baton->size = 0; + baton->data = NULL; + } + + SYMBOL_OPS (sym) = &dwarf2_locexpr_funcs; + SYMBOL_LOCATION_BATON (sym) = baton; + } +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/elfread.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/elfread.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/elfread.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/elfread.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,754 @@ +/* Read ELF (Executable and Linking Format) object files for GDB. + + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Written by Fred Fish at Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfd.h" +#include "gdb_string.h" +#include "elf-bfd.h" +#include "elf/mips.h" +#include "symtab.h" +#include "symfile.h" +#include "objfiles.h" +#include "buildsym.h" +#include "stabsread.h" +#include "gdb-stabs.h" +#include "complaints.h" +#include "demangle.h" + +extern void _initialize_elfread (void); + +/* The struct elfinfo is available only during ELF symbol table and + psymtab reading. It is destroyed at the completion of psymtab-reading. + It's local to elf_symfile_read. */ + +struct elfinfo + { + file_ptr dboffset; /* Offset to dwarf debug section */ + unsigned int dbsize; /* Size of dwarf debug section */ + file_ptr lnoffset; /* Offset to dwarf line number section */ + unsigned int lnsize; /* Size of dwarf line number section */ + asection *stabsect; /* Section pointer for .stab section */ + asection *stabindexsect; /* Section pointer for .stab.index section */ + asection *mdebugsect; /* Section pointer for .mdebug section */ + }; + +static void free_elfinfo (void *); + +/* We are called once per section from elf_symfile_read. We + need to examine each section we are passed, check to see + if it is something we are interested in processing, and + if so, stash away some access information for the section. + + For now we recognize the dwarf debug information sections and + line number sections from matching their section names. The + ELF definition is no real help here since it has no direct + knowledge of DWARF (by design, so any debugging format can be + used). + + We also recognize the ".stab" sections used by the Sun compilers + released with Solaris 2. + + FIXME: The section names should not be hardwired strings (what + should they be? I don't think most object file formats have enough + section flags to specify what kind of debug section it is + -kingdon). */ + +static void +elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip) +{ + struct elfinfo *ei; + + ei = (struct elfinfo *) eip; + if (strcmp (sectp->name, ".debug") == 0) + { + ei->dboffset = sectp->filepos; + ei->dbsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".line") == 0) + { + ei->lnoffset = sectp->filepos; + ei->lnsize = bfd_get_section_size_before_reloc (sectp); + } + else if (strcmp (sectp->name, ".stab") == 0) + { + ei->stabsect = sectp; + } + else if (strcmp (sectp->name, ".stab.index") == 0) + { + ei->stabindexsect = sectp; + } + else if (strcmp (sectp->name, ".mdebug") == 0) + { + ei->mdebugsect = sectp; + } +} + +static struct minimal_symbol * +record_minimal_symbol (char *name, CORE_ADDR address, + enum minimal_symbol_type ms_type, + asection *bfd_section, struct objfile *objfile) +{ + if (ms_type == mst_text || ms_type == mst_file_text) + address = SMASH_TEXT_ADDRESS (address); + + return prim_record_minimal_symbol_and_info + (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); +} + +/* + + LOCAL FUNCTION + + elf_symtab_read -- read the symbol table of an ELF file + + SYNOPSIS + + void elf_symtab_read (struct objfile *objfile, int dynamic) + + DESCRIPTION + + Given an objfile and a flag that specifies whether or not the objfile + is for an executable or not (may be shared library for example), add + all the global function and data symbols to the minimal symbol table. + + In stabs-in-ELF, as implemented by Sun, there are some local symbols + defined in the ELF symbol table, which can be used to locate + the beginnings of sections from each ".o" file that was linked to + form the executable objfile. We gather any such info and record it + in data structures hung off the objfile's private data. + + */ + +static void +elf_symtab_read (struct objfile *objfile, int dynamic) +{ + long storage_needed; + asymbol *sym; + asymbol **symbol_table; + long number_of_symbols; + long i; + struct cleanup *back_to; + CORE_ADDR symaddr; + CORE_ADDR offset; + enum minimal_symbol_type ms_type; + /* If sectinfo is nonNULL, it contains section info that should end up + filed in the objfile. */ + struct stab_section_info *sectinfo = NULL; + /* If filesym is nonzero, it points to a file symbol, but we haven't + seen any section info for it yet. */ + asymbol *filesym = 0; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + /* Name of filesym, as saved on the objfile_obstack. */ + char *filesymname = obsavestring ("", 0, &objfile->objfile_obstack); +#endif + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + int stripped = (bfd_get_symcount (objfile->obfd) == 0); + + if (dynamic) + { + storage_needed = bfd_get_dynamic_symtab_upper_bound (objfile->obfd); + + /* Nothing to be done if there is no dynamic symtab. */ + if (storage_needed < 0) + return; + } + else + { + storage_needed = bfd_get_symtab_upper_bound (objfile->obfd); + if (storage_needed < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + } + if (storage_needed > 0) + { + symbol_table = (asymbol **) xmalloc (storage_needed); + back_to = make_cleanup (xfree, symbol_table); + if (dynamic) + number_of_symbols = bfd_canonicalize_dynamic_symtab (objfile->obfd, + symbol_table); + else + number_of_symbols = bfd_canonicalize_symtab (objfile->obfd, symbol_table); + if (number_of_symbols < 0) + error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd), + bfd_errmsg (bfd_get_error ())); + + for (i = 0; i < number_of_symbols; i++) + { + sym = symbol_table[i]; + if (sym->name == NULL || *sym->name == '\0') + { + /* Skip names that don't exist (shouldn't happen), or names + that are null strings (may happen). */ + continue; + } + + offset = ANOFFSET (objfile->section_offsets, sym->section->index); + if (dynamic + && sym->section == &bfd_und_section + && (sym->flags & BSF_FUNCTION)) + { + struct minimal_symbol *msym; + + /* Symbol is a reference to a function defined in + a shared library. + If its value is non zero then it is usually the address + of the corresponding entry in the procedure linkage table, + plus the desired section offset. + If its value is zero then the dynamic linker has to resolve + the symbol. We are unable to find any meaningful address + for this symbol in the executable file, so we skip it. */ + symaddr = sym->value; + if (symaddr == 0) + continue; + symaddr += offset; + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + mst_solib_trampoline, sym->section, objfile); +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + continue; + } + + /* If it is a nonstripped executable, do not enter dynamic + symbols, as the dynamic symbol table is usually a subset + of the main symbol table. */ + if (dynamic && !stripped) + continue; + if (sym->flags & BSF_FILE) + { + /* STT_FILE debugging symbol that helps stabs-in-elf debugging. + Chain any old one onto the objfile; remember new sym. */ + if (sectinfo != NULL) + { + sectinfo->next = dbx->stab_section_info; + dbx->stab_section_info = sectinfo; + sectinfo = NULL; + } + filesym = sym; +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + filesymname = + obsavestring ((char *) filesym->name, strlen (filesym->name), + &objfile->objfile_obstack); +#endif + } + else if (sym->flags & (BSF_GLOBAL | BSF_LOCAL | BSF_WEAK)) + { + struct minimal_symbol *msym; + + /* Select global/local/weak symbols. Note that bfd puts abs + symbols in their own section, so all symbols we are + interested in will have a section. */ + /* Bfd symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate all non-absolute symbols by the section offset. */ + if (sym->section != &bfd_abs_section) + { + symaddr += offset; + } + /* For non-absolute symbols, use the type of the section + they are relative to, to intuit text/data. Bfd provides + no way of figuring this out for absolute symbols. */ + if (sym->section == &bfd_abs_section) + { + /* This is a hack to get the minimal symbol type + right for Irix 5, which has absolute addresses + with special section indices for dynamic symbols. */ + unsigned short shndx = + ((elf_symbol_type *) sym)->internal_elf_sym.st_shndx; + + switch (shndx) + { + case SHN_MIPS_TEXT: + ms_type = mst_text; + break; + case SHN_MIPS_DATA: + ms_type = mst_data; + break; + case SHN_MIPS_ACOMMON: + ms_type = mst_bss; + break; + default: + ms_type = mst_abs; + } + + /* If it is an Irix dynamic symbol, skip section name + symbols, relocate all others by section offset. */ + if (ms_type != mst_abs) + { + if (sym->name[0] == '.') + continue; + symaddr += offset; + } + } + else if (sym->section->flags & SEC_CODE) + { + if (sym->flags & BSF_GLOBAL) + { + ms_type = mst_text; + } + else if ((sym->name[0] == '.' && sym->name[1] == 'L') + || ((sym->flags & BSF_LOCAL) + && sym->name[0] == '$' + && sym->name[1] == 'L')) + /* Looks like a compiler-generated label. Skip + it. The assembler should be skipping these (to + keep executables small), but apparently with + gcc on the (deleted) delta m88k SVR4, it loses. + So to have us check too should be harmless (but + I encourage people to fix this in the assembler + instead of adding checks here). */ + continue; + else + { + ms_type = mst_file_text; + } + } + else if (sym->section->flags & SEC_ALLOC) + { + if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) + { + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_data; + } + else + { + ms_type = mst_bss; + } + } + else if (sym->flags & BSF_LOCAL) + { + /* Named Local variable in a Data section. + Check its name for stabs-in-elf. */ + int special_local_sect; + if (strcmp ("Bbss.bss", sym->name) == 0) + special_local_sect = SECT_OFF_BSS (objfile); + else if (strcmp ("Ddata.data", sym->name) == 0) + special_local_sect = SECT_OFF_DATA (objfile); + else if (strcmp ("Drodata.rodata", sym->name) == 0) + special_local_sect = SECT_OFF_RODATA (objfile); + else + special_local_sect = -1; + if (special_local_sect >= 0) + { + /* Found a special local symbol. Allocate a + sectinfo, if needed, and fill it in. */ + if (sectinfo == NULL) + { + int max_index; + size_t size; + + max_index + = max (SECT_OFF_BSS (objfile), + max (SECT_OFF_DATA (objfile), + SECT_OFF_RODATA (objfile))); + + /* max_index is the largest index we'll + use into this array, so we must + allocate max_index+1 elements for it. + However, 'struct stab_section_info' + already includes one element, so we + need to allocate max_index aadditional + elements. */ + size = (sizeof (struct stab_section_info) + + (sizeof (CORE_ADDR) + * max_index)); + sectinfo = (struct stab_section_info *) + xmmalloc (objfile->md, size); + memset (sectinfo, 0, size); + sectinfo->num_sections = max_index; + if (filesym == NULL) + { + complaint (&symfile_complaints, + "elf/stab section information %s without a preceding file symbol", + sym->name); + } + else + { + sectinfo->filename = + (char *) filesym->name; + } + } + if (sectinfo->sections[special_local_sect] != 0) + complaint (&symfile_complaints, + "duplicated elf/stab section information for %s", + sectinfo->filename); + /* BFD symbols are section relative. */ + symaddr = sym->value + sym->section->vma; + /* Relocate non-absolute symbols by the + section offset. */ + if (sym->section != &bfd_abs_section) + symaddr += offset; + sectinfo->sections[special_local_sect] = symaddr; + /* The special local symbols don't go in the + minimal symbol table, so ignore this one. */ + continue; + } + /* Not a special stabs-in-elf symbol, do regular + symbol processing. */ + if (sym->section->flags & SEC_LOAD) + { + ms_type = mst_file_data; + } + else + { + ms_type = mst_file_bss; + } + } + else + { + ms_type = mst_unknown; + } + } + else + { + /* FIXME: Solaris2 shared libraries include lots of + odd "absolute" and "undefined" symbols, that play + hob with actions like finding what function the PC + is in. Ignore them if they aren't text, data, or bss. */ + /* ms_type = mst_unknown; */ + continue; /* Skip this symbol. */ + } + msym = record_minimal_symbol + ((char *) sym->name, symaddr, + ms_type, sym->section, objfile); + if (msym) + { + /* Pass symbol size field in via BFD. FIXME!!! */ + unsigned long size = ((elf_symbol_type *) sym)->internal_elf_sym.st_size; + MSYMBOL_SIZE(msym) = size; + } +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, + struct minimal_symbol *); + patch_load_module(objfile, msym); + } +#endif +#ifdef SOFUN_ADDRESS_MAYBE_MISSING + if (msym != NULL) + msym->filename = filesymname; +#endif + ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + } + } + do_cleanups (back_to); + } +} + +/* Scan and build partial symbols for a symbol file. + We have been initialized by a call to elf_symfile_init, which + currently does nothing. + + SECTION_OFFSETS is a set of offsets to apply to relocate the symbols + in each section. We simplify it down to a single offset for all + symbols. FIXME. + + MAINLINE is true if we are reading the main symbol + table (as opposed to a shared lib or dynamically loaded file). + + This function only does the minimum work necessary for letting the + user "name" things symbolically; it does not read the entire symtab. + Instead, it reads the external and static symbols and puts them in partial + symbol tables. When more extensive information is requested of a + file, the corresponding partial symbol table is mutated into a full + fledged symbol table by going back and reading the symbols + for real. + + We look for sections with specific names, to tell us what debug + format to look for: FIXME!!! + + dwarf_build_psymtabs() builds psymtabs for DWARF symbols; + elfstab_build_psymtabs() handles STABS symbols; + mdebug_build_psymtabs() handles ECOFF debugging information. + + Note that ELF files have a "minimal" symbol table, which looks a lot + like a COFF symbol table, but has only the minimal information necessary + for linking. We process this also, and use the information to + build gdb's minimal symbol table. This gives us some minimal debugging + capability even for files compiled without -g. */ + +static void +elf_symfile_read (struct objfile *objfile, int mainline) +{ + bfd *abfd = objfile->obfd; + struct elfinfo ei; + struct cleanup *back_to; + CORE_ADDR offset; + + init_minimal_symbol_collection (); + back_to = make_cleanup_discard_minimal_symbols (); + + memset ((char *) &ei, 0, sizeof (ei)); + + /* Allocate struct to keep track of the symfile */ + objfile->sym_stab_info = (struct dbx_symfile_info *) + xmmalloc (objfile->md, sizeof (struct dbx_symfile_info)); + memset ((char *) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info)); + make_cleanup (free_elfinfo, (void *) objfile); + + /* Process the normal ELF symbol table first. This may write some + chain of info into the dbx_symfile_info in objfile->sym_stab_info, + which can later be used by elfstab_offset_sections. */ + + elf_symtab_read (objfile, 0); + + /* Add the dynamic symbols. */ + + elf_symtab_read (objfile, 1); + + /* Install any minimal symbols that have been collected as the current + minimal symbols for this objfile. The debug readers below this point + should not generate new minimal symbols; if they do it's their + responsibility to install them. "mdebug" appears to be the only one + which will do this. */ + + install_minimal_symbols (objfile); + do_cleanups (back_to); + + /* Now process debugging information, which is contained in + special ELF sections. */ + + /* If we are reinitializing, or if we have never loaded syms yet, + set table to empty. MAINLINE is cleared so that *_read_psymtab + functions do not all also re-initialize the psymbol table. */ + if (mainline) + { + init_psymbol_list (objfile, 0); + mainline = 0; + } + + /* We first have to find them... */ + bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei); + + /* ELF debugging information is inserted into the psymtab in the + order of least informative first - most informative last. Since + the psymtab table is searched `most recent insertion first' this + increases the probability that more detailed debug information + for a section is found. + + For instance, an object file might contain both .mdebug (XCOFF) + and .debug_info (DWARF2) sections then .mdebug is inserted first + (searched last) and DWARF2 is inserted last (searched first). If + we don't do this then the XCOFF info is found first - for code in + an included file XCOFF info is useless. */ + + if (ei.mdebugsect) + { + const struct ecoff_debug_swap *swap; + + /* .mdebug section, presumably holding ECOFF debugging + information. */ + swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; + if (swap) + elfmdebug_build_psymtabs (objfile, swap, ei.mdebugsect); + } + if (ei.stabsect) + { + asection *str_sect; + + /* Stab sections have an associated string table that looks like + a separate section. */ + str_sect = bfd_get_section_by_name (abfd, ".stabstr"); + + /* FIXME should probably warn about a stab section without a stabstr. */ + if (str_sect) + elfstab_build_psymtabs (objfile, + mainline, + ei.stabsect, + str_sect->filepos, + bfd_section_size (abfd, str_sect)); + } + if (dwarf2_has_info (abfd)) + { + /* DWARF 2 sections */ + dwarf2_build_psymtabs (objfile, mainline); + } + else if (ei.dboffset && ei.lnoffset) + { + /* DWARF sections */ + dwarf_build_psymtabs (objfile, + mainline, + ei.dboffset, ei.dbsize, + ei.lnoffset, ei.lnsize); + } + + /* FIXME: kettenis/20030504: This still needs to be integrated with + dwarf2read.c in a better way. */ + dwarf2_build_frame_info (objfile); +} + +/* This cleans up the objfile's sym_stab_info pointer, and the chain of + stab_section_info's, that might be dangling from it. */ + +static void +free_elfinfo (void *objp) +{ + struct objfile *objfile = (struct objfile *) objp; + struct dbx_symfile_info *dbxinfo = objfile->sym_stab_info; + struct stab_section_info *ssi, *nssi; + + ssi = dbxinfo->stab_section_info; + while (ssi) + { + nssi = ssi->next; + xmfree (objfile->md, ssi); + ssi = nssi; + } + + dbxinfo->stab_section_info = 0; /* Just say No mo info about this. */ +} + + +/* Initialize anything that needs initializing when a completely new symbol + file is specified (not just adding some symbols from another file, e.g. a + shared library). + + We reinitialize buildsym, since we may be reading stabs from an ELF file. */ + +static void +elf_new_init (struct objfile *ignore) +{ + stabsread_new_init (); + buildsym_new_init (); +} + +/* Perform any local cleanups required when we are done with a particular + objfile. I.E, we are in the process of discarding all symbol information + for an objfile, freeing up all memory held for it, and unlinking the + objfile struct from the global list of known objfiles. */ + +static void +elf_symfile_finish (struct objfile *objfile) +{ + if (objfile->sym_stab_info != NULL) + { + xmfree (objfile->md, objfile->sym_stab_info); + } +} + +/* ELF specific initialization routine for reading symbols. + + It is passed a pointer to a struct sym_fns which contains, among other + things, the BFD for the file whose symbols are being read, and a slot for + a pointer to "private data" which we can fill with goodies. + + For now at least, we have nothing in particular to do, so this function is + just a stub. */ + +static void +elf_symfile_init (struct objfile *objfile) +{ + /* ELF objects may be reordered, so set OBJF_REORDERED. If we + find this causes a significant slowdown in gdb then we could + set it in the debug symbol readers only when necessary. */ + objfile->flags |= OBJF_REORDERED; +} + +/* When handling an ELF file that contains Sun STABS debug info, + some of the debug info is relative to the particular chunk of the + section that was generated in its individual .o file. E.g. + offsets to static variables are relative to the start of the data + segment *for that module before linking*. This information is + painfully squirreled away in the ELF symbol table as local symbols + with wierd names. Go get 'em when needed. */ + +void +elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst) +{ + char *filename = pst->filename; + struct dbx_symfile_info *dbx = objfile->sym_stab_info; + struct stab_section_info *maybe = dbx->stab_section_info; + struct stab_section_info *questionable = 0; + int i; + char *p; + + /* The ELF symbol info doesn't include path names, so strip the path + (if any) from the psymtab filename. */ + while (0 != (p = strchr (filename, '/'))) + filename = p + 1; + + /* FIXME: This linear search could speed up significantly + if it was chained in the right order to match how we search it, + and if we unchained when we found a match. */ + for (; maybe; maybe = maybe->next) + { + if (filename[0] == maybe->filename[0] + && strcmp (filename, maybe->filename) == 0) + { + /* We found a match. But there might be several source files + (from different directories) with the same name. */ + if (0 == maybe->found) + break; + questionable = maybe; /* Might use it later. */ + } + } + + if (maybe == 0 && questionable != 0) + { + complaint (&symfile_complaints, + "elf/stab section information questionable for %s", filename); + maybe = questionable; + } + + if (maybe) + { + /* Found it! Allocate a new psymtab struct, and fill it in. */ + maybe->found++; + pst->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + for (i = 0; i < maybe->num_sections; i++) + (pst->section_offsets)->offsets[i] = maybe->sections[i]; + return; + } + + /* We were unable to find any offsets for this file. Complain. */ + if (dbx->stab_section_info) /* If there *is* any info, */ + complaint (&symfile_complaints, + "elf/stab section information missing for %s", filename); +} + +/* Register that we are able to handle ELF object file formats. */ + +static struct sym_fns elf_sym_fns = +{ + bfd_target_elf_flavour, + elf_new_init, /* sym_new_init: init anything gbl to entire symtab */ + elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */ + elf_symfile_read, /* sym_read: read a symbol file into symtab */ + elf_symfile_finish, /* sym_finish: finished with file, cleanup */ + default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */ + NULL /* next: pointer to next struct sym_fns */ +}; + +void +_initialize_elfread (void) +{ + add_symtab_fns (&elf_sym_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/main.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/main.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,924 @@ +/* Top level stuff for GDB, the GNU debugger. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "top.h" +#include "target.h" +#include "inferior.h" +#include "symfile.h" +#include "gdbcore.h" + +#include "getopt.h" + +#include +#include "gdb_stat.h" +#include + +#include "gdb_string.h" +#include "event-loop.h" +#include "ui-out.h" + +#include "interps.h" +#include "main.h" + +/* If nonzero, display time usage both at startup and for each command. */ + +int display_time; + +/* If nonzero, display space usage both at startup and for each command. */ + +int display_space; + +/* Whether this is the async version or not. The async version is + invoked on the command line with the -nw --async options. In this + version, the usual command_loop is substituted by and event loop which + processes UI events asynchronously. */ +int event_loop_p = 1; + +/* The selected interpreter. This will be used as a set command + variable, so it should always be malloc'ed - since + do_setshow_command will free it. */ +char *interpreter_p; + +/* Whether xdb commands will be handled */ +int xdb_commands = 0; + +/* Whether dbx commands will be handled */ +int dbx_commands = 0; + +/* System root path, used to find libraries etc. */ +char *gdb_sysroot = 0; + +struct ui_file *gdb_stdout; +struct ui_file *gdb_stderr; +struct ui_file *gdb_stdlog; +struct ui_file *gdb_stdin; +/* target IO streams */ +struct ui_file *gdb_stdtargin; +struct ui_file *gdb_stdtarg; +struct ui_file *gdb_stdtargerr; + +/* Whether to enable writing into executable and core files */ +extern int write_files; + +static void print_gdb_help (struct ui_file *); + +/* These two are used to set the external editor commands when gdb is farming + out files to be edited by another program. */ + +extern char *external_editor_command; + +/* Call command_loop. If it happens to return, pass that through as a + non-zero return status. */ + +static int +captured_command_loop (void *data) +{ + current_interp_command_loop (); + /* FIXME: cagney/1999-11-05: A correct command_loop() implementaton + would clean things up (restoring the cleanup chain) to the state + they were just prior to the call. Technically, this means that + the do_cleanups() below is redundant. Unfortunately, many FUNCs + are not that well behaved. do_cleanups should either be replaced + with a do_cleanups call (to cover the problem) or an assertion + check to detect bad FUNCs code. */ + do_cleanups (ALL_CLEANUPS); + /* If the command_loop returned, normally (rather than threw an + error) we try to quit. If the quit is aborted, catch_errors() + which called this catch the signal and restart the command + loop. */ + quit_command (NULL, instream == stdin); + return 1; +} + +static int +captured_main (void *data) +{ + struct captured_main_args *context = data; + int argc = context->argc; + char **argv = context->argv; + int count; + static int quiet = 0; + static int batch = 0; + static int set_args = 0; + + /* Pointers to various arguments from command line. */ + char *symarg = NULL; + char *execarg = NULL; + char *corearg = NULL; + char *cdarg = NULL; + char *ttyarg = NULL; + + /* These are static so that we can take their address in an initializer. */ + static int print_help; + static int print_version; + + /* Pointers to all arguments of --command option. */ + char **cmdarg; + /* Allocated size of cmdarg. */ + int cmdsize; + /* Number of elements of cmdarg used. */ + int ncmd; + + /* Indices of all arguments of --directory option. */ + char **dirarg; + /* Allocated size. */ + int dirsize; + /* Number of elements used. */ + int ndir; + + struct stat homebuf, cwdbuf; + char *homedir, *homeinit; + + int i; + + long time_at_startup = get_run_time (); + +#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) + setlocale (LC_MESSAGES, ""); +#endif +#if defined (HAVE_SETLOCALE) + setlocale (LC_CTYPE, ""); +#endif + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* This needs to happen before the first use of malloc. */ + init_malloc (NULL); + +#ifdef HAVE_SBRK + lim_at_start = (char *) sbrk (0); +#endif + +#if defined (ALIGN_STACK_ON_STARTUP) + i = (int) &count & 0x3; + if (i != 0) + alloca (4 - i); +#endif + + cmdsize = 1; + cmdarg = (char **) xmalloc (cmdsize * sizeof (*cmdarg)); + ncmd = 0; + dirsize = 1; + dirarg = (char **) xmalloc (dirsize * sizeof (*dirarg)); + ndir = 0; + + quit_flag = 0; + line = (char *) xmalloc (linesize); + line[0] = '\0'; /* Terminate saved (now empty) cmd line */ + instream = stdin; + + getcwd (gdb_dirbuf, sizeof (gdb_dirbuf)); + current_directory = gdb_dirbuf; + + gdb_stdout = stdio_fileopen (stdout); + gdb_stderr = stdio_fileopen (stderr); + gdb_stdlog = gdb_stderr; /* for moment */ + gdb_stdtarg = gdb_stderr; /* for moment */ + gdb_stdin = stdio_fileopen (stdin); + gdb_stdtargerr = gdb_stderr; /* for moment */ + gdb_stdtargin = gdb_stdin; /* for moment */ + + /* initialize error() */ + error_init (); + + /* Set the sysroot path. */ +#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE + gdb_sysroot = make_relative_prefix (argv[0], BINDIR, TARGET_SYSTEM_ROOT); + if (gdb_sysroot) + { + struct stat s; + int res = 0; + + if (stat (gdb_sysroot, &s) == 0) + if (S_ISDIR (s.st_mode)) + res = 1; + + if (res == 0) + { + xfree (gdb_sysroot); + gdb_sysroot = TARGET_SYSTEM_ROOT; + } + } + else + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else +#if defined (TARGET_SYSTEM_ROOT) + gdb_sysroot = TARGET_SYSTEM_ROOT; +#else + gdb_sysroot = ""; +#endif +#endif + + /* There will always be an interpreter. Either the one passed into + this captured main, or one specified by the user at start up, or + the console. Initialize the interpreter to the one requested by + the application. */ + interpreter_p = xstrdup (context->interpreter_p); + + /* Parse arguments and options. */ + { + int c; + /* When var field is 0, use flag field to record the equivalent + short option (or arbitrary numbers starting at 10 for those + with no equivalent). */ + enum { + OPT_SE = 10, + OPT_CD, + OPT_ANNOTATE, + OPT_STATISTICS, + OPT_TUI, + OPT_NOWINDOWS, + OPT_WINDOWS + }; + static struct option long_options[] = + { + {"async", no_argument, &event_loop_p, 1}, + {"noasync", no_argument, &event_loop_p, 0}, +#if defined(TUI) + {"tui", no_argument, 0, OPT_TUI}, +#endif + {"xdb", no_argument, &xdb_commands, 1}, + {"dbx", no_argument, &dbx_commands, 1}, + {"readnow", no_argument, &readnow_symbol_files, 1}, + {"r", no_argument, &readnow_symbol_files, 1}, + {"quiet", no_argument, &quiet, 1}, + {"q", no_argument, &quiet, 1}, + {"silent", no_argument, &quiet, 1}, + {"nx", no_argument, &inhibit_gdbinit, 1}, + {"n", no_argument, &inhibit_gdbinit, 1}, + {"batch", no_argument, &batch, 1}, + {"epoch", no_argument, &epoch_interface, 1}, + + /* This is a synonym for "--annotate=1". --annotate is now preferred, + but keep this here for a long time because people will be running + emacses which use --fullname. */ + {"fullname", no_argument, 0, 'f'}, + {"f", no_argument, 0, 'f'}, + + {"annotate", required_argument, 0, OPT_ANNOTATE}, + {"help", no_argument, &print_help, 1}, + {"se", required_argument, 0, OPT_SE}, + {"symbols", required_argument, 0, 's'}, + {"s", required_argument, 0, 's'}, + {"exec", required_argument, 0, 'e'}, + {"e", required_argument, 0, 'e'}, + {"core", required_argument, 0, 'c'}, + {"c", required_argument, 0, 'c'}, + {"pid", required_argument, 0, 'p'}, + {"p", required_argument, 0, 'p'}, + {"command", required_argument, 0, 'x'}, + {"version", no_argument, &print_version, 1}, + {"x", required_argument, 0, 'x'}, +#ifdef GDBTK + {"tclcommand", required_argument, 0, 'z'}, + {"enable-external-editor", no_argument, 0, 'y'}, + {"editor-command", required_argument, 0, 'w'}, +#endif + {"ui", required_argument, 0, 'i'}, + {"interpreter", required_argument, 0, 'i'}, + {"i", required_argument, 0, 'i'}, + {"directory", required_argument, 0, 'd'}, + {"d", required_argument, 0, 'd'}, + {"cd", required_argument, 0, OPT_CD}, + {"tty", required_argument, 0, 't'}, + {"baud", required_argument, 0, 'b'}, + {"b", required_argument, 0, 'b'}, + {"nw", no_argument, NULL, OPT_NOWINDOWS}, + {"nowindows", no_argument, NULL, OPT_NOWINDOWS}, + {"w", no_argument, NULL, OPT_WINDOWS}, + {"windows", no_argument, NULL, OPT_WINDOWS}, + {"statistics", no_argument, 0, OPT_STATISTICS}, + {"write", no_argument, &write_files, 1}, + {"args", no_argument, &set_args, 1}, + {0, no_argument, 0, 0} + }; + + while (1) + { + int option_index; + + c = getopt_long_only (argc, argv, "", + long_options, &option_index); + if (c == EOF || set_args) + break; + + /* Long option that takes an argument. */ + if (c == 0 && long_options[option_index].flag == 0) + c = long_options[option_index].val; + + switch (c) + { + case 0: + /* Long option that just sets a flag. */ + break; + case OPT_SE: + symarg = optarg; + execarg = optarg; + break; + case OPT_CD: + cdarg = optarg; + break; + case OPT_ANNOTATE: + /* FIXME: what if the syntax is wrong (e.g. not digits)? */ + annotation_level = atoi (optarg); + break; + case OPT_STATISTICS: + /* Enable the display of both time and space usage. */ + display_time = 1; + display_space = 1; + break; + case OPT_TUI: + /* --tui is equivalent to -i=tui. */ + xfree (interpreter_p); + interpreter_p = xstrdup ("tui"); + break; + case OPT_WINDOWS: + /* FIXME: cagney/2003-03-01: Not sure if this option is + actually useful, and if it is, what it should do. */ + use_windows = 1; + break; + case OPT_NOWINDOWS: + /* -nw is equivalent to -i=console. */ + xfree (interpreter_p); + interpreter_p = xstrdup (INTERP_CONSOLE); + use_windows = 0; + break; + case 'f': + annotation_level = 1; +/* We have probably been invoked from emacs. Disable window interface. */ + use_windows = 0; + break; + case 's': + symarg = optarg; + break; + case 'e': + execarg = optarg; + break; + case 'c': + corearg = optarg; + break; + case 'p': + /* "corearg" is shared by "--core" and "--pid" */ + corearg = optarg; + break; + case 'x': + cmdarg[ncmd++] = optarg; + if (ncmd >= cmdsize) + { + cmdsize *= 2; + cmdarg = (char **) xrealloc ((char *) cmdarg, + cmdsize * sizeof (*cmdarg)); + } + break; +#ifdef GDBTK + case 'z': + { +extern int gdbtk_test (char *); + if (!gdbtk_test (optarg)) + { + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), + argv[0], optarg); + exit (1); + } + break; + } + case 'y': + /* Backwards compatibility only. */ + break; + case 'w': + { + external_editor_command = xstrdup (optarg); + break; + } +#endif /* GDBTK */ + case 'i': + xfree (interpreter_p); + interpreter_p = xstrdup (optarg); + break; + case 'd': + dirarg[ndir++] = optarg; + if (ndir >= dirsize) + { + dirsize *= 2; + dirarg = (char **) xrealloc ((char *) dirarg, + dirsize * sizeof (*dirarg)); + } + break; + case 't': + ttyarg = optarg; + break; + case 'q': + quiet = 1; + break; + case 'b': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set baud rate to `%s'.\n"), optarg); + else + baud_rate = i; + } + break; + case 'l': + { + int i; + char *p; + + i = strtol (optarg, &p, 0); + if (i == 0 && p == optarg) + + /* Don't use *_filtered or warning() (which relies on + current_target) until after initialize_all_files(). */ + + fprintf_unfiltered + (gdb_stderr, + _("warning: could not set timeout limit to `%s'.\n"), optarg); + else + remote_timeout = i; + } + break; + + case '?': + fprintf_unfiltered (gdb_stderr, + _("Use `%s --help' for a complete list of options.\n"), + argv[0]); + exit (1); + } + } + + /* If --help or --version, disable window interface. */ + if (print_help || print_version) + { + use_windows = 0; + } + + if (set_args) + { + /* The remaining options are the command-line options for the + inferior. The first one is the sym/exec file, and the rest + are arguments. */ + if (optind >= argc) + { + fprintf_unfiltered (gdb_stderr, + _("%s: `--args' specified but no program specified\n"), + argv[0]); + exit (1); + } + symarg = argv[optind]; + execarg = argv[optind]; + ++optind; + set_inferior_args_vector (argc - optind, &argv[optind]); + } + else + { + /* OK, that's all the options. The other arguments are filenames. */ + count = 0; + for (; optind < argc; optind++) + switch (++count) + { + case 1: + symarg = argv[optind]; + execarg = argv[optind]; + break; + case 2: + /* The documentation says this can be a "ProcID" as well. + We will try it as both a corefile and a pid. */ + corearg = argv[optind]; + break; + case 3: + fprintf_unfiltered (gdb_stderr, + _("Excess command line arguments ignored. (%s%s)\n"), + argv[optind], (optind == argc - 1) ? "" : " ..."); + break; + } + } + if (batch) + quiet = 1; + } + + /* Initialize all files. Give the interpreter a chance to take + control of the console via the init_ui_hook()) */ + gdb_init (argv[0]); + + /* Do these (and anything which might call wrap_here or *_filtered) + after initialize_all_files() but before the interpreter has been + installed. Otherwize the help/version messages will be eaten by + the interpreter's output handler. */ + + if (print_version) + { + print_gdb_version (gdb_stdout); + wrap_here (""); + printf_filtered ("\n"); + exit (0); + } + + if (print_help) + { + print_gdb_help (gdb_stdout); + fputs_unfiltered ("\n", gdb_stdout); + exit (0); + } + + /* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message before the interpreter is installed. That way + it isn't encapsulated in MI output. */ + if (!quiet && strcmp (interpreter_p, INTERP_MI1) == 0) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + + /* Install the default UI. All the interpreters should have had a + look at things by now. Initialize the default interpreter. */ + + { + /* Find it. */ + struct interp *interp = interp_lookup (interpreter_p); + if (interp == NULL) + error ("Interpreter `%s' unrecognized", interpreter_p); + /* Install it. */ + if (!interp_set (interp)) + { + fprintf_unfiltered (gdb_stderr, + "Interpreter `%s' failed to initialize.\n", + interpreter_p); + exit (1); + } + } +#ifdef CRASH_MERGE +{ + extern void update_gdb_hooks(void); + update_gdb_hooks(); +} +#endif + + /* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets + GDB retain the old MI1 interpreter startup behavior. Output the + copyright message after the interpreter is installed when it is + any sane interpreter. */ + if (!quiet && !current_interp_named_p (INTERP_MI1)) + { + /* Print all the junk at the top, with trailing "..." if we are about + to read a symbol file (possibly slowly). */ + print_gdb_version (gdb_stdout); + if (symarg) + printf_filtered (".."); + wrap_here (""); + gdb_flush (gdb_stdout); /* Force to screen during slow operations */ + } + + error_pre_print = "\n\n"; + quit_pre_print = error_pre_print; + + /* We may get more than one warning, don't double space all of them... */ + warning_pre_print = _("\nwarning: "); + + /* Read and execute $HOME/.gdbinit file, if it exists. This is done + *before* all the command line arguments are processed; it sets + global parameters, which are independent of what file you are + debugging or what directory you are in. */ + homedir = getenv ("HOME"); + if (homedir) + { + homeinit = (char *) alloca (strlen (homedir) + + strlen (gdbinit) + 10); + strcpy (homeinit, homedir); + strcat (homeinit, "/"); + strcat (homeinit, gdbinit); + + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL); + } + + /* Do stats; no need to do them elsewhere since we'll only + need them if homedir is set. Make sure that they are + zero in case one of them fails (this guarantees that they + won't match if either exists). */ + + memset (&homebuf, 0, sizeof (struct stat)); + memset (&cwdbuf, 0, sizeof (struct stat)); + + stat (homeinit, &homebuf); + stat (gdbinit, &cwdbuf); /* We'll only need this if + homedir was set. */ + } + + /* Now perform all the actions indicated by the arguments. */ + if (cdarg != NULL) + { + catch_command_errors (cd_command, cdarg, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ndir; i++) + catch_command_errors (directory_command, dirarg[i], 0, RETURN_MASK_ALL); + xfree (dirarg); + + if (execarg != NULL + && symarg != NULL + && strcmp (execarg, symarg) == 0) + { + /* The exec file and the symbol-file are the same. If we can't + open it, better only print one error message. + catch_command_errors returns non-zero on success! */ + if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL)) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + else + { + if (execarg != NULL) + catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL); + if (symarg != NULL) + catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL); + } + + /* After the symbol file has been read, print a newline to get us + beyond the copyright line... But errors should still set off + the error message with a (single) blank line. */ + if (!quiet) + printf_filtered ("\n"); + error_pre_print = "\n"; + quit_pre_print = error_pre_print; + warning_pre_print = _("\nwarning: "); + + if (corearg != NULL) + { + /* corearg may be either a corefile or a pid. + If its first character is a digit, try attach first + and then corefile. Otherwise try corefile first. */ + + if (isdigit (corearg[0])) + { + if (catch_command_errors (attach_command, corearg, + !batch, RETURN_MASK_ALL) == 0) + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + else /* Can't be a pid, better be a corefile. */ + catch_command_errors (core_file_command, corearg, + !batch, RETURN_MASK_ALL); + } + + if (ttyarg != NULL) + catch_command_errors (tty_command, ttyarg, !batch, RETURN_MASK_ALL); + + /* Error messages should no longer be distinguished with extra output. */ + error_pre_print = NULL; + quit_pre_print = NULL; + warning_pre_print = _("warning: "); + + /* Read the .gdbinit file in the current directory, *if* it isn't + the same as the $HOME/.gdbinit file (it should exist, also). */ + + if (!homedir + || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat))) + if (!inhibit_gdbinit) + { + catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL); + } + + for (i = 0; i < ncmd; i++) + { +#if 0 + /* NOTE: cagney/1999-11-03: SET_TOP_LEVEL() was a macro that + expanded into a call to setjmp(). */ + if (!SET_TOP_LEVEL ()) /* NB: This is #if 0'd out */ + { + /* NOTE: I am commenting this out, because it is not clear + where this feature is used. It is very old and + undocumented. ezannoni: 1999-05-04 */ +#if 0 + if (cmdarg[i][0] == '-' && cmdarg[i][1] == '\0') + read_command_file (stdin); + else +#endif + source_command (cmdarg[i], !batch); + do_cleanups (ALL_CLEANUPS); + } +#endif + catch_command_errors (source_command, cmdarg[i], !batch, RETURN_MASK_ALL); + } + xfree (cmdarg); + + /* Read in the old history after all the command files have been read. */ + init_history (); + + if (batch) + { + /* We have hit the end of the batch file. */ + exit (0); + } + + /* Do any host- or target-specific hacks. This is used for i960 targets + to force the user to set a nindy target and spec its parameters. */ + +#ifdef BEFORE_MAIN_LOOP_HOOK + BEFORE_MAIN_LOOP_HOOK; +#endif + + /* Show time and/or space usage. */ + + if (display_time) + { + long init_time = get_run_time () - time_at_startup; + + printf_unfiltered (_("Startup time: %ld.%06ld\n"), + init_time / 1000000, init_time % 1000000); + } + + if (display_space) + { +#ifdef HAVE_SBRK + extern char **environ; + char *lim = (char *) sbrk (0); + + printf_unfiltered (_("Startup size: data size %ld\n"), + (long) (lim - (char *) &environ)); +#endif + } + +#if 0 + /* FIXME: cagney/1999-11-06: The original main loop was like: */ + while (1) + { + if (!SET_TOP_LEVEL ()) + { + do_cleanups (ALL_CLEANUPS); /* Do complete cleanup */ + /* GUIs generally have their own command loop, mainloop, or whatever. + This is a good place to gain control because many error + conditions will end up here via longjmp(). */ + if (command_loop_hook) + command_loop_hook (); + else + command_loop (); + quit_command ((char *) 0, instream == stdin); + } + } + /* NOTE: If the command_loop() returned normally, the loop would + attempt to exit by calling the function quit_command(). That + function would either call exit() or throw an error returning + control to SET_TOP_LEVEL. */ + /* NOTE: The function do_cleanups() was called once each time round + the loop. The usefulness of the call isn't clear. If an error + was thrown, everything would have already been cleaned up. If + command_loop() returned normally and quit_command() was called, + either exit() or error() (again cleaning up) would be called. */ +#endif + /* NOTE: cagney/1999-11-07: There is probably no reason for not + moving this loop and the code found in captured_command_loop() + into the command_loop() proper. The main thing holding back that + change - SET_TOP_LEVEL() - has been eliminated. */ + while (1) + { + catch_errors (captured_command_loop, 0, "", RETURN_MASK_ALL); +#ifdef CRASH_MERGE + { + int console(char *, ...); + console("\n"); + } +#endif + } + /* No exit -- exit is through quit_command. */ +} + +int +gdb_main (struct captured_main_args *args) +{ + use_windows = args->use_windows; +#ifdef CRASH_MERGE + event_loop_p = 0; +#endif + catch_errors (captured_main, args, "", RETURN_MASK_ALL); + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; +} + +#ifdef CRASH_MERGE +/* + * NOTE: adapted from gdb.c, which is no longer built in; changed name of + * original main() to gdb_main_entry() for use as crash entry point + */ +int +gdb_main_entry (int argc, char **argv) +{ + struct captured_main_args args; + memset (&args, 0, sizeof args); + args.argc = argc; + args.argv = argv; + args.use_windows = 0; + args.interpreter_p = INTERP_CONSOLE; + return gdb_main (&args); +} +#endif + +/* Don't use *_filtered for printing help. We don't want to prompt + for continue no matter how small the screen or how much we're going + to print. */ + +static void +print_gdb_help (struct ui_file *stream) +{ + fputs_unfiltered (_("\ +This is the GNU debugger. Usage:\n\n\ + gdb [options] [executable-file [core-file or process-id]]\n\ + gdb [options] --args executable-file [inferior-arguments ...]\n\n\ +Options:\n\n\ +"), stream); + fputs_unfiltered (_("\ + --args Arguments after executable-file are passed to inferior\n\ +"), stream); + fputs_unfiltered (_("\ + --[no]async Enable (disable) asynchronous version of CLI\n\ +"), stream); + fputs_unfiltered (_("\ + -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ + --batch Exit after processing options.\n\ + --cd=DIR Change current directory to DIR.\n\ + --command=FILE Execute GDB commands from FILE.\n\ + --core=COREFILE Analyze the core dump COREFILE.\n\ + --pid=PID Attach to running process PID.\n\ +"), stream); + fputs_unfiltered (_("\ + --dbx DBX compatibility mode.\n\ + --directory=DIR Search for source files in DIR.\n\ + --epoch Output information used by epoch emacs-GDB interface.\n\ + --exec=EXECFILE Use EXECFILE as the executable.\n\ + --fullname Output information used by emacs-GDB interface.\n\ + --help Print this message.\n\ +"), stream); + fputs_unfiltered (_("\ + --interpreter=INTERP\n\ + Select a specific interpreter / user interface\n\ +"), stream); + fputs_unfiltered (_("\ + --mapped Use mapped symbol files if supported on this system.\n\ + --nw Do not use a window interface.\n\ + --nx Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file.\n\ + --quiet Do not print version number on startup.\n\ + --readnow Fully read symbol files on first access.\n\ +"), stream); + fputs_unfiltered (_("\ + --se=FILE Use FILE as symbol file and executable file.\n\ + --symbols=SYMFILE Read symbols from SYMFILE.\n\ + --tty=TTY Use TTY for input/output by the program being debugged.\n\ +"), stream); +#if defined(TUI) + fputs_unfiltered (_("\ + --tui Use a terminal user interface.\n\ +"), stream); +#endif + fputs_unfiltered (_("\ + --version Print version information and then exit.\n\ + -w Use a window interface.\n\ + --write Set writing into executable and core files.\n\ + --xdb XDB compatibility mode.\n\ +"), stream); + fputs_unfiltered (_("\n\ +For more information, type \"help\" from within GDB, or consult the\n\ +GDB manual (available as on-line info or a printed manual).\n\ +Report bugs to \"bug-gdb@gnu.org\".\ +"), stream); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2882 @@ +# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, +# 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, +# Inc. +# Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. +# Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + +# This file is part of GDB. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +host_alias = @host_alias@ +target_alias = @target_alias@ +program_transform_name = @program_transform_name@ +bindir = @bindir@ +libdir = @libdir@ +tooldir = $(libdir)/$(target_alias) + +datadir = @datadir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 +infodir = @infodir@ +htmldir = $(prefix)/html +includedir = @includedir@ + +# This can be referenced by `INTLDEPS' as computed by CY_GNU_GETTEXT. +top_builddir = . + +SHELL = @SHELL@ +EXEEXT = @EXEEXT@ + +AWK = @AWK@ +LN_S = @LN_S@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +DESTDIR = + +AR = @AR@ +AR_FLAGS = qv +RANLIB = @RANLIB@ +DLLTOOL = @DLLTOOL@ +WINDRES = @WINDRES@ +MIG = @MIG@ + +# If you are compiling with GCC, make sure that either 1) You have the +# fixed include files where GCC can reach them, or 2) You use the +# -traditional flag. Otherwise the ioctl calls in inflow.c +# will be incorrectly compiled. The "fixincludes" script in the gcc +# distribution will fix your include files up. +CC=@CC@ + +# Directory containing source files. +srcdir = @srcdir@ +VPATH = @srcdir@ + +YACC=@YACC@ + +# This is used to rebuild ada-lex.c from ada-lex.l. If the program is +# not defined, but ada-lex.c is present, compilation will continue, +# possibly with a warning. +FLEX = flex + +YLWRAP = $(srcdir)/../ylwrap + +# where to find makeinfo, preferably one designed for texinfo-2 +MAKEINFO=makeinfo + +MAKEHTML = texi2html + +MAKEHTMLFLAGS = -glossary -menu -split_chapter + +# Set this up with gcc if you have gnu ld and the loader will print out +# line numbers for undefined references. +#CC_LD=gcc -static +CC_LD=$(CC) + +# Where is our "include" directory? Typically $(srcdir)/../include. +# This is essentially the header file directory for the library +# routines in libiberty. +INCLUDE_DIR = $(srcdir)/../include +INCLUDE_CFLAGS = -I$(INCLUDE_DIR) + +# Where is the "-liberty" library? Typically in ../libiberty. +LIBIBERTY = ../libiberty/libiberty.a + +# Where is the BFD library? Typically in ../bfd. +BFD_DIR = ../bfd +BFD = $(BFD_DIR)/libbfd.a +BFD_SRC = $(srcdir)/$(BFD_DIR) +BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + +# Where is the READLINE library? Typically in ../readline. +READLINE_DIR = ../readline +READLINE = $(READLINE_DIR)/libreadline.a +READLINE_SRC = $(srcdir)/$(READLINE_DIR) +READLINE_CFLAGS = -I$(READLINE_SRC)/.. + +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ +GDB_WARN_CFLAGS = $(WARN_CFLAGS) +GDB_WERROR_CFLAGS = $(WERROR_CFLAGS) + +# Where is the INTL library? Typically in ../intl. +INTL_DIR = ../intl +INTL = @INTLLIBS@ +INTL_DEPS = @INTLDEPS@ +INTL_SRC = $(srcdir)/$(INTL_DIR) +INTL_CFLAGS = -I$(INTL_DIR) -I$(INTL_SRC) + +# Where is the ICONV library? This can be empty if libc has iconv. +LIBICONV = @LIBICONV@ + +# Did the user give us a --with-sysroot option? +TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ +TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ + +# +# CLI sub directory definitons +# +SUBDIR_CLI_OBS = \ + cli-dump.o \ + cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-utils.o \ + cli-logging.o \ + cli-interp.o +SUBDIR_CLI_SRCS = \ + cli/cli-dump.c \ + cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \ + cli/cli-logging.c \ + cli/cli-interp.c \ + cli/cli-utils.c +SUBDIR_CLI_DEPS = +SUBDIR_CLI_LDFLAGS= +SUBDIR_CLI_CFLAGS= + +# +# MI sub directory definitons +# +SUBDIR_MI_OBS = \ + mi-out.o mi-console.o \ + mi-cmds.o mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \ + mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o \ + mi-interp.o \ + mi-main.o mi-parse.o mi-getopt.o +SUBDIR_MI_SRCS = \ + mi/mi-out.c mi/mi-console.c \ + mi/mi-cmds.c mi/mi-cmd-env.c \ + mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \ + mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \ + mi/mi-interp.c \ + mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c +SUBDIR_MI_DEPS = +SUBDIR_MI_LDFLAGS= +SUBDIR_MI_CFLAGS= \ + -DMI_OUT=1 + +# +# TUI sub directory definitions +# + +# Name of the TUI program +TUI=gdbtui + +SUBDIR_TUI_OBS = \ + tui-command.o \ + tui-data.o \ + tui-disasm.o \ + tui-file.o tui.o \ + tui-hooks.o \ + tui-interp.o \ + tui-io.o \ + tui-layout.o \ + tui-out.o \ + tui-regs.o \ + tui-source.o \ + tui-stack.o \ + tui-win.o \ + tui-windata.o \ + tui-wingeneral.o \ + tui-winsource.o +SUBDIR_TUI_SRCS = \ + tui/tui-command.c \ + tui/tui-data.c \ + tui/tui-disasm.c \ + tui/tui-file.c \ + tui/tui-hooks.c \ + tui/tui-interp.c \ + tui/tui-io.c \ + tui/tui-layout.c \ + tui/tui-out.c \ + tui/tui-regs.c \ + tui/tui-source.c \ + tui/tui-stack.c \ + tui/tui-win.c \ + tui/tui-windata.c \ + tui/tui-wingeneral.c \ + tui/tui-winsource.c \ + tui/tui.c +SUBDIR_TUI_DEPS = +SUBDIR_TUI_LDFLAGS= +SUBDIR_TUI_CFLAGS= \ + -DTUI=1 + + +# Opcodes currently live in one of two places. Either they are in the +# opcode library, typically ../opcodes, or they are in a header file +# in INCLUDE_DIR. +# Where is the "-lopcodes" library, with (some of) the opcode tables and +# disassemblers? +OPCODES_DIR = ../opcodes +OPCODES_SRC = $(srcdir)/$(OPCODES_DIR) +OPCODES = $(OPCODES_DIR)/libopcodes.a +# Where are the other opcode tables which only have header file +# versions? +OP_INCLUDE = $(INCLUDE_DIR)/opcode +OPCODES_CFLAGS = -I$(OP_INCLUDE) + +# The simulator is usually nonexistent; targets that include one +# should set this to list all the .o or .a files to be linked in. +SIM = + +WIN32LIBS = @WIN32LIBS@ + +# Where is the TCL library? Typically in ../tcl. +LIB_INSTALL_DIR = $(libdir) +# This variable is needed when doing dynamic linking. +LIB_RUNTIME_DIR = $(libdir) +TCL = @TCL_CC_SEARCH_FLAGS@ @TCL_BUILD_LIB_SPEC@ +TCL_CFLAGS = @TCLHDIR@ +GDBTKLIBS = @GDBTKLIBS@ +# Extra flags that the GDBTK files need: +GDBTK_CFLAGS = @GDBTK_CFLAGS@ + +# Where is the TK library? Typically in ../tk. +TK = @TK_BUILD_LIB_SPEC@ +TK_CFLAGS = @TKHDIR@ @TK_BUILD_INCLUDES@ + +# Where is Itcl? Typically in ../itcl/itcl. +ITCL_CFLAGS = @ITCLHDIR@ +ITCL = @ITCLLIB@ + +# Where is Itk? Typically in ../itcl/itk. +ITK_CFLAGS = @ITKHDIR@ +ITK = @ITKLIB@ + +X11_CFLAGS = @TK_XINCLUDES@ +X11_LDFLAGS = +X11_LIBS = + +WIN32LDAPP = @WIN32LDAPP@ + +LIBGUI = @LIBGUI@ +GUI_CFLAGS_X = @GUI_CFLAGS_X@ +IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X) + +# The version of gdbtk we're building. This should be kept +# in sync with GDBTK_VERSION and friends in gdbtk.h. +GDBTK_VERSION = 1.0 +GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION) + +# Gdbtk requires an absolute path to the source directory or +# the testsuite won't run properly. +GDBTK_SRC_DIR = @GDBTK_SRC_DIR@ + +SUBDIR_GDBTK_OBS = \ + gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \ + gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o +SUBDIR_GDBTK_SRCS = \ + gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \ + gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \ + gdbtk/generic/gdbtk-interp.c \ + gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \ + gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \ + gdbtk/generic/gdbtk-main.c +SUBDIR_GDBTK_DEPS = \ + $(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TK_DEPS) $(TCL_DEPS) +SUBDIR_GDBTK_LDFLAGS= +SUBDIR_GDBTK_CFLAGS= -DGDBTK + +CONFIG_OBS= @CONFIG_OBS@ +CONFIG_SRCS= @CONFIG_SRCS@ +CONFIG_DEPS= @CONFIG_DEPS@ +CONFIG_LDFLAGS = @CONFIG_LDFLAGS@ +ENABLE_CFLAGS= @ENABLE_CFLAGS@ +# CONFIG_ALL= @CONFIG_ALL@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_CLEAN= @CONFIG_CLEAN@ +CONFIG_INSTALL = @CONFIG_INSTALL@ +CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ + +# -I. for config files. +# -I$(srcdir) for gdb internal headers. +# -I$(srcdir)/config for more generic config files. + +# It is also possible that you will need to add -I/usr/include/sys if +# your system doesn't have fcntl.h in /usr/include (which is where it +# should be according to Posix). +DEFS = -DCRASH_MERGE @DEFS@ +GDB_CFLAGS = -I. -I$(srcdir) -I$(srcdir)/config -DLOCALEDIR="\"$(prefix)/share/locale\"" $(DEFS) + +# M{H,T}_CFLAGS, if defined, have host- and target-dependent CFLAGS +# from the config directory. +GLOBAL_CFLAGS = $(MT_CFLAGS) $(MH_CFLAGS) + +PROFILE_CFLAGS = @PROFILE_CFLAGS@ + +# CFLAGS is specifically reserved for setting from the command line +# when running make. I.E. "make CFLAGS=-Wmissing-prototypes". +CFLAGS = @CFLAGS@ + +# Need to pass this to testsuite for "make check". Probably should be +# consistent with top-level Makefile.in and gdb/testsuite/Makefile.in +# so "make check" has the same result no matter where it is run. +CXXFLAGS = -g -O + +# INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. +INTERNAL_WARN_CFLAGS = \ + $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \ + $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) $(ENABLE_CFLAGS) \ + $(GDB_WARN_CFLAGS) +INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) + +# LDFLAGS is specifically reserved for setting from the command line +# when running make. +LDFLAGS = @LDFLAGS@ + +# Profiling options need to go here to work. +# I think it's perfectly reasonable for a user to set -pg in CFLAGS +# and have it work; that's why CFLAGS is here. +# PROFILE_CFLAGS is _not_ included, however, because we use monstartup. +INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(MH_LDFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) + +# If your system is missing alloca(), or, more likely, it's there but +# it doesn't work, then refer to libiberty. + +# Libraries and corresponding dependencies for compiling gdb. +# {X,T}M_CLIBS, defined in *config files, have host- and target-dependent libs. +# LIBIBERTY appears twice on purpose. +# If you have the Cygnus libraries installed, +# you can use 'CLIBS=$(INSTALLED_LIBS)' 'CDEPS=' +INSTALLED_LIBS=-lbfd -lreadline -lopcodes -liberty \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + -lintl -liberty +CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCODES) $(INTL) $(LIBIBERTY) \ + $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ + $(LIBICONV) \ + $(LIBIBERTY) $(WIN32LIBS) +CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ + $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) + +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) + +DIST=gdb + +LINT=/usr/5bin/lint +LINTFLAGS= $(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \ + $(BFD_CFLAGS) $(INCLUDE_CFLAGS) \ + $(INTL_CFLAGS) + +RUNTEST = `if [ -f $${rootsrc}/../dejagnu/runtest ] ; then \ + echo $${rootsrc}/../dejagnu/runtest ; else echo runtest; \ + fi` + +RUNTESTFLAGS= + +# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX +# interface to the serial port. Hopefully if get ported to OS/2, VMS, +# etc., then there will be (as part of the C library or perhaps as +# part of libiberty) a POSIX interface. But at least for now the +# host-dependent makefile fragment might need to use something else +# besides ser-unix.o +SER_HARDWIRE = @SER_HARDWIRE@ + +# The `remote' debugging target is supported for most architectures, +# but not all (e.g. 960) +REMOTE_OBS = remote.o dcache.o remote-utils.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o + +# This is remote-sim.o if a simulator is to be linked in. +SIM_OBS = + +# Host and target-dependent makefile fragments come in here. +@host_makefile_frag@ +@target_makefile_frag@ +# End of host and target-dependent makefile fragments + +# Possibly ignore the simulator. If the simulator is being ignored, +# these expand into SIM= and SIM_OBJ=, overriding the entries from +# target_makefile_frag +# +@IGNORE_SIM@ +@IGNORE_SIM_OBS@ + +FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "mandir=$(mandir)" \ + "datadir=$(datadir)" \ + "includedir=$(includedir)" \ + "against=$(against)" \ + "DESTDIR=$(DESTDIR)" \ + "AR=$(AR)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC=$(CC)" \ + "CFLAGS=$(CFLAGS)" \ + "CXX=$(CXX)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "DLLTOOL=$(DLLTOOL)" \ + "LDFLAGS=$(LDFLAGS)" \ + "RANLIB=$(RANLIB)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "MAKEHTMLFLAGS=$(MAKEHTMLFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# Flags that we pass when building the testsuite. + +# empty for native, $(target_alias)/ for cross +target_subdir = @target_subdir@ + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../gcc/xgcc ] ; then \ + if [ -f $${rootme}/../$(target_subdir)newlib/Makefile ] ; then \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/ -idirafter $${rootme}/$(target_subdir)newlib/targ-include -idirafter $${rootsrc}/../$(target_subdir)newlib/libc/include -nostdinc -B$${rootme}/../$(target_subdir)newlib/; \ + else \ + echo $${rootme}/../gcc/xgcc -B$${rootme}/../gcc/; \ + fi; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + +# The use of $$(x_FOR_TARGET) reduces the command line length by not +# duplicating the lengthy definition. +TARGET_FLAGS_TO_PASS = \ + "prefix=$(prefix)" \ + "exec_prefix=$(exec_prefix)" \ + "against=$(against)" \ + 'CC=$$(CC_FOR_TARGET)' \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + 'CXX=$$(CXX_FOR_TARGET)' \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "MAKEINFO=$(MAKEINFO)" \ + "MAKEHTML=$(MAKEHTML)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" + +# All source files that go into linking GDB. +# Links made at configuration time should not be specified here, since +# SFILES is used in building the distribution archive. + +SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ + ax-general.c ax-gdb.c \ + bcache.c \ + bfd-target.c \ + block.c blockframe.c breakpoint.c buildsym.c \ + c-exp.y c-lang.c c-typeprint.c c-valprint.c \ + charset.c cli-out.c coffread.c coff-pe-read.c \ + complaints.c completer.c corefile.c \ + cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \ + dbxread.c demangle.c dictionary.c disasm.c doublest.c dummy-frame.c \ + dwarfread.c dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \ + elfread.c environ.c eval.c event-loop.c event-top.c expprint.c \ + f-exp.y f-lang.c f-typeprint.c f-valprint.c findvar.c frame.c \ + frame-base.c \ + frame-unwind.c \ + gdbarch.c arch-utils.c gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \ + hpacc-abi.c \ + inf-loop.c \ + infcall.c \ + infcmd.c inflow.c infrun.c \ + interps.c \ + jv-exp.y jv-lang.c jv-valprint.c jv-typeprint.c \ + kod.c kod-cisco.c \ + language.c linespec.c \ + m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \ + macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \ + mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c \ + nlmread.c \ + objc-exp.y objc-lang.c \ + objfiles.c osabi.c observer.c \ + p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \ + regcache.c reggroups.c remote.c remote-fileio.c \ + scm-exp.c scm-lang.c scm-valprint.c \ + sentinel-frame.c \ + serial.c ser-unix.c source.c \ + stabsread.c stack.c std-regs.c symfile.c symmisc.c symtab.c \ + target.c thread.c top.c tracepoint.c \ + trad-frame.c \ + typeprint.c \ + ui-out.c utils.c ui-file.h ui-file.c \ + user-regs.c \ + valarith.c valops.c valprint.c values.c varobj.c \ + wrapper.c + +LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c + +# "system" headers. Using these in dependencies is a rather personal +# choice. (-rich, summer 1993) +# (Why would we not want to depend on them? If one of these changes in a +# non-binary-compatible way, it is a real pain to remake the right stuff +# without these dependencies -kingdon, 13 Mar 1994) +aout_aout64_h = $(INCLUDE_DIR)/aout/aout64.h +aout_stabs_gnu_h = $(INCLUDE_DIR)/aout/stabs_gnu.h +getopt_h = $(INCLUDE_DIR)/getopt.h +floatformat_h = $(INCLUDE_DIR)/floatformat.h +bfd_h = $(BFD_DIR)/bfd.h +callback_h = $(INCLUDE_DIR)/gdb/callback.h +coff_sym_h = $(INCLUDE_DIR)/coff/sym.h +coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h +coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h +coff_internal_h = $(INCLUDE_DIR)/coff/internal.h +dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h) +elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h +elf_sh_h = $(INCLUDE_DIR)/elf/sh.h +elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h) +elf_bfd_h = $(BFD_SRC)/elf-bfd.h +libaout_h = $(BFD_SRC)/libaout.h +libbfd_h = $(BFD_SRC)/libbfd.h +remote_sim_h = $(INCLUDE_DIR)/gdb/remote-sim.h +demangle_h = $(INCLUDE_DIR)/demangle.h +obstack_h = $(INCLUDE_DIR)/obstack.h +opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h +readline_h = $(READLINE_SRC)/readline.h +readline_tilde_h = $(READLINE_SRC)/tilde.h +readline_history_h = $(READLINE_SRC)/history.h +frv_desc_h = $(OPCODES_SRC)/frv-desc.h +sh_opc_h = $(OPCODES_SRC)/sh-opc.h +gdb_sim_arm_h = $(INCLUDE_DIR)/gdb/sim-arm.h +gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h +gdb_sim_frv_h = $(INCLUDE_DIR)/gdb/sim-frv.h +gdb_sim_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h +splay_tree_h = $(INCLUDE_DIR)/splay-tree.h + +# +# $BUILD/ headers +# + +config_h = config.h +exc_request_U_h = exc_request_U.h +exc_request_S_h = exc_request_S.h +msg_reply_S_h = msg_reply_S.h +msg_U_h = msg_U.h +notify_S_h = notify_S.h +process_reply_S_h = process_reply_S.h + +# +# config/ headers +# + +xm_h = @xm_h@ +tm_h = @tm_h@ +nm_h = @nm_h@ + +# +# gdb/ headers +# + +ada_lang_h = ada-lang.h $(value_h) $(gdbtypes_h) +alphabsd_tdep_h = alphabsd-tdep.h +alpha_tdep_h = alpha-tdep.h +amd64_linux_tdep_h = amd64-linux-tdep.h +amd64_nat_h = amd64-nat.h +amd64_tdep_h = amd64-tdep.h $(i386_tdep_h) +annotate_h = annotate.h $(symtab_h) $(gdbtypes_h) +arch_utils_h = arch-utils.h +arm_tdep_h = arm-tdep.h +auxv_h = auxv.h +ax_gdb_h = ax-gdb.h +ax_h = ax.h $(doublest_h) +bcache_h = bcache.h +bfd_target_h = bfd-target.h +block_h = block.h +breakpoint_h = breakpoint.h $(frame_h) $(value_h) $(gdb_events_h) +buildsym_h = buildsym.h +call_cmds_h = call-cmds.h +charset_h = charset.h +c_lang_h = c-lang.h $(value_h) $(macroexp_h) +cli_out_h = cli-out.h +coff_pe_read_h = coff-pe-read.h +coff_solib_h = coff-solib.h +command_h = command.h +complaints_h = complaints.h +completer_h = completer.h +cp_abi_h = cp-abi.h +cp_support_h = cp-support.h $(symtab_h) +dcache_h = dcache.h +defs_h = defs.h $(config_h) $(ansidecl_h) $(gdb_locale_h) $(gdb_signals_h) \ + $(libiberty_h) $(bfd_h) $(ui_file_h) $(xm_h) $(nm_h) $(tm_h) \ + $(fopen_same_h) $(gdbarch_h) +dictionary_h = dictionary.h +disasm_h = disasm.h +doublest_h = doublest.h $(floatformat_h) +dummy_frame_h = dummy-frame.h +dwarf2expr_h = dwarf2expr.h +dwarf2_frame_h = dwarf2-frame.h +dwarf2loc_h = dwarf2loc.h +environ_h = environ.h +event_loop_h = event-loop.h +event_top_h = event-top.h +exec_h = exec.h $(target_h) +expression_h = expression.h $(symtab_h) $(doublest_h) +f_lang_h = f-lang.h +frame_base_h = frame-base.h +frame_h = frame.h +frame_unwind_h = frame-unwind.h $(frame_h) +gdbarch_h = gdbarch.h +gdb_assert_h = gdb_assert.h +gdbcmd_h = gdbcmd.h $(command_h) $(ui_out_h) +gdbcore_h = gdbcore.h $(bfd_h) +gdb_curses_h = gdb_curses.h +gdb_dirent_h = gdb_dirent.h +gdb_events_h = gdb-events.h +gdb_h = gdb.h +gdb_locale_h = gdb_locale.h +gdb_obstack_h = gdb_obstack.h $(obstack_h) +gdb_proc_service_h = gdb_proc_service.h $(gregset_h) +gdb_regex_h = gdb_regex.h $(xregex_h) +gdb_stabs_h = gdb-stabs.h +gdb_stat_h = gdb_stat.h +gdb_string_h = gdb_string.h +gdb_thread_db_h = gdb_thread_db.h +gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h) +gdbtypes_h = gdbtypes.h +gdb_vfork_h = gdb_vfork.h +gdb_wait_h = gdb_wait.h +glibc_tdep_h = glibc-tdep.h +gnu_nat_h = gnu-nat.h +gregset_h = gregset.h +hppa_tdep_h = hppa-tdep.h +i386_linux_tdep_h = i386-linux-tdep.h +i386_tdep_h = i386-tdep.h +i387_tdep_h = i387-tdep.h +ia64_tdep_h = ia64-tdep.h +infcall_h = infcall.h +inferior_h = inferior.h $(breakpoint_h) $(target_h) $(frame_h) +inf_loop_h = inf-loop.h +inflow_h = inflow.h $(terminal_h) +infttrace_h = infttrace.h +interps_h = interps.h +jv_lang_h = jv-lang.h +kod_h = kod.h +language_h = language.h +libunwind_frame_h = libunwind-frame.h $(libunwind_h) +linespec_h = linespec.h +linux_nat_h = linux-nat.h +m2_lang_h = m2-lang.h +m68k_tdep_h = m68k-tdep.h +macroexp_h = macroexp.h +macroscope_h = macroscope.h $(macrotab_h) $(symtab_h) +macrotab_h = macrotab.h +main_h = main.h +memattr_h = memattr.h +minimon_h = minimon.h +mipsnbsd_tdep_h = mipsnbsd-tdep.h +mips_tdep_h = mips-tdep.h +monitor_h = monitor.h +nbsd_tdep_h = nbsd-tdep.h +ns32k_tdep_h = ns32k-tdep.h +nto_tdep_h = nto-tdep.h $(defs_h) $(solist_h) +objc_lang_h = objc-lang.h +objfiles_h = objfiles.h $(gdb_obstack_h) $(symfile_h) +observer_h = observer.h +ocd_h = ocd.h +osabi_h = osabi.h +pa64solib_h = pa64solib.h +parser_defs_h = parser-defs.h $(doublest_h) +p_lang_h = p-lang.h +ppcnbsd_tdep_h = ppcnbsd-tdep.h +ppc_tdep_h = ppc-tdep.h +proc_utils_h = proc-utils.h +regcache_h = regcache.h +reggroups_h = reggroups.h +regset_h = regset.h +remote_fileio_h = remote-fileio.h +remote_h = remote.h +remote_utils_h = remote-utils.h $(target_h) +s390_tdep_h = s390-tdep.h +scm_lang_h = scm-lang.h $(scm_tags_h) +scm_tags_h = scm-tags.h +sentinel_frame_h = sentinel-frame.h +serial_h = serial.h +ser_unix_h = ser-unix.h +shnbsd_tdep_h = shnbsd-tdep.h +sh_tdep_h = sh-tdep.h +sim_regno_h = sim-regno.h +solib_h = solib.h +solib_svr4_h = solib-svr4.h +solist_h = solist.h +somsolib_h = somsolib.h +source_h = source.h +sparc64_tdep_h = sparc64-tdep.h $(sparc_tdep_h) +sparc_nat_h = sparc-nat.h +sparc_tdep_h = sparc-tdep.h +srec_h = srec.h +stabsread_h = stabsread.h +stack_h = stack.h +symfile_h = symfile.h +symtab_h = symtab.h +target_h = target.h $(bfd_h) $(symtab_h) $(dcache_h) $(memattr_h) +terminal_h = terminal.h +top_h = top.h +tracepoint_h = tracepoint.h +trad_frame_h = trad-frame.h +typeprint_h = typeprint.h +ui_file_h = ui-file.h +ui_out_h = ui-out.h +user_regs_h = user-regs.h +valprint_h = valprint.h +value_h = value.h $(doublest_h) $(frame_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) +varobj_h = varobj.h $(symtab_h) $(gdbtypes_h) +vax_tdep_h = vax-tdep.h +version_h = version.h +wince_stub_h = wince-stub.h +wrapper_h = wrapper.h $(gdb_h) +xcoffsolib_h = xcoffsolib.h +xmodem_h = xmodem.h + +# +# gdb/cli/ headers +# + +cli_cmds_h = $(srcdir)/cli/cli-cmds.h +cli_decode_h = $(srcdir)/cli/cli-decode.h $(command_h) +cli_dump_h = $(srcdir)/cli/cli-dump.h +cli_script_h = $(srcdir)/cli/cli-script.h +cli_setshow_h = $(srcdir)/cli/cli-setshow.h +cli_utils_h = $(srcdir)/cli/cli-utils.h + +# +# gdb/mi/ headers +# + +mi_cmds_h = $(srcdir)/mi/mi-cmds.h +mi_console_h = $(srcdir)/mi/mi-console.h +mi_getopt_h = $(srcdir)/mi/mi-getopt.h +mi_main_h = $(srcdir)/mi/mi-main.h +mi_out_h = $(srcdir)/mi/mi-out.h +mi_parse_h = $(srcdir)/mi/mi-parse.h + +# +# gdb/tui/ headers +# + +tui_command_h = $(srcdir)/tui/tui-command.h +tui_data_h = $(srcdir)/tui/tui-data.h $(tui_h) $(gdb_curses_h) +tui_disasm_h = $(srcdir)/tui/tui-disasm.h $(tui_h) $(tui_data_h) +tui_file_h = $(srcdir)/tui/tui-file.h +tui_h = $(srcdir)/tui/tui.h +tui_hooks_h = $(srcdir)/tui/tui-hooks.h +tui_io_h = $(srcdir)/tui/tui-io.h +tui_layout_h = $(srcdir)/tui/tui-layout.h $(tui_h) $(tui_data_h) +tui_regs_h = $(srcdir)/tui/tui-regs.h $(tui_data_h) +tui_source_h = $(srcdir)/tui/tui-source.h $(tui_data_h) +tui_stack_h = $(srcdir)/tui/tui-stack.h +tui_windata_h = $(srcdir)/tui/tui-windata.h $(tui_data_h) +tui_wingeneral_h = $(srcdir)/tui/tui-wingeneral.h +tui_win_h = $(srcdir)/tui/tui-win.h $(tui_data_h) +tui_winsource_h = $(srcdir)/tui/tui-winsource.h $(tui_data_h) + +# Header files that need to have srcdir added. Note that in the cases +# where we use a macro like $(gdbcmd_h), things are carefully arranged +# so that each .h file is listed exactly once (M-x tags-search works +# wrong if TAGS has files twice). Because this is tricky to get +# right, it is probably easiest just to list .h files here directly. + +HFILES_NO_SRCDIR = bcache.h buildsym.h call-cmds.h coff-solib.h defs.h \ + environ.h $(gdbcmd_h) gdb.h gdbcore.h \ + gdb-stabs.h $(inferior_h) language.h minimon.h monitor.h \ + objfiles.h parser-defs.h serial.h solib.h \ + symfile.h stabsread.h target.h terminal.h typeprint.h xcoffsolib.h \ + macrotab.h macroexp.h macroscope.h \ + c-lang.h f-lang.h \ + jv-lang.h \ + m2-lang.h p-lang.h \ + complaints.h valprint.h \ + vx-share/dbgRpcLib.h vx-share/ptrace.h vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/wait.h vx-share/xdr_ld.h \ + vx-share/xdr_ptrace.h vx-share/xdr_rdb.h gdbthread.h \ + dcache.h remote-utils.h top.h somsolib.h + +# Header files that already have srcdir in them, or which are in objdir. + +HFILES_WITH_SRCDIR = ../bfd/bfd.h + + +# GDB "info" files, which should be included in their entirety +INFOFILES = gdb.info* + +REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar + +# {X,T,NAT}DEPFILES are something of a pain in that it's hard to +# default their values the way we do for SER_HARDWIRE; in the future +# maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other +# variables analogous to SER_HARDWIRE which get defaulted in this +# Makefile.in + +DEPFILES = $(TDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \ + $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS) + +SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS) +# Don't include YYFILES (*.c) because we already include *.y in SFILES, +# and it's more useful to see it in the .y file. +TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ + $(SUBDIR_CLI_SRCS) +TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) + +COMMON_OBS = $(DEPFILES) $(YYOBJ) \ + version.o \ + annotate.o \ + auxv.o \ + bfd-target.o \ + blockframe.o breakpoint.o findvar.o regcache.o \ + charset.o disasm.o dummy-frame.o \ + source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \ + block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \ + infcall.o \ + infcmd.o infrun.o \ + expprint.o environ.o stack.o thread.o \ + interps.o \ + main.o \ + macrotab.o macrocmd.o macroexp.o macroscope.o \ + event-loop.o event-top.o inf-loop.o completer.o \ + gdbarch.o arch-utils.o gdbtypes.o osabi.o copying.o \ + memattr.o mem-break.o target.o parse.o language.o buildsym.o \ + std-regs.o \ + signals.o \ + kod.o kod-cisco.o \ + gdb-events.o \ + exec.o bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \ + dbxread.o coffread.o coff-pe-read.o elfread.o \ + dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \ + dwarf2expr.o dwarf2loc.o dwarf2-frame.o \ + c-lang.o f-lang.o objc-lang.o \ + ui-out.o cli-out.o \ + varobj.o wrapper.o \ + jv-lang.o jv-valprint.o jv-typeprint.o \ + m2-lang.o p-lang.o p-typeprint.o p-valprint.o \ + scm-exp.o scm-lang.o scm-valprint.o \ + sentinel-frame.o \ + complaints.o typeprint.o \ + c-typeprint.o f-typeprint.o m2-typeprint.o \ + c-valprint.o cp-valprint.o f-valprint.o m2-valprint.o \ + nlmread.o serial.o mdebugread.o top.o utils.o \ + ui-file.o \ + user-regs.o \ + frame.o frame-unwind.o doublest.o \ + frame-base.o \ + gnu-v2-abi.o gnu-v3-abi.o hpacc-abi.o cp-abi.o cp-support.o \ + cp-namespace.o \ + reggroups.o \ + trad-frame.o + +TSOBS = inflow.o + +SUBDIRS = build_no_subdirs + +# For now, shortcut the "configure GDB for fewer languages" stuff. +YYFILES = c-exp.c \ + objc-exp.c \ + ada-exp.c \ + jv-exp.c \ + f-exp.c m2-exp.c p-exp.c +YYOBJ = c-exp.o \ + objc-exp.o \ + jv-exp.o \ + f-exp.o m2-exp.o p-exp.o + +# Things which need to be built when making a distribution. + +DISTSTUFF = $(YYFILES) + +# Prevent Sun make from putting in the machine type. Setting +# TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1. +.c.o: + $(CC) -c $(INTERNAL_CFLAGS) $< + +all: gdb$(EXEEXT) $(CONFIG_ALL) + @$(MAKE) -s $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do +.PHONY: all-tui +all-tui: $(TUI)$(EXEEXT) + +installcheck: + +# The check target can not use subdir_do, because subdir_do does not +# use TARGET_FLAGS_TO_PASS. +check: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \ + else true; fi + +info dvi install-info clean-info html install-html: force + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do + +gdb.z:gdb.1 + nroff -man $(srcdir)/gdb.1 | col -b > gdb.t + pack gdb.t ; rm -f gdb.t + mv gdb.t.z gdb.z + +# Traditionally "install" depends on "all". But it may be useful +# not to; for example, if the user has made some trivial change to a +# source file and doesn't care about rebuilding or just wants to save the +# time it takes for make to check that all is up to date. +# install-only is intended to address that need. +install: all install-only +install-only: $(CONFIG_INSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) gdb$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=install "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: install-tui +install-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e "$$t"` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \ + $(INSTALL_PROGRAM) $(TUI)$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(man1dir) ; \ + $(INSTALL_DATA) $(srcdir)/gdb.1 \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + + +uninstall: force $(CONFIG_UNINSTALL) + transformed_name=`t='$(program_transform_name)'; \ + echo gdb | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=gdb ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + @$(MAKE) DO=uninstall "DODIRS=$(SUBDIRS)" $(FLAGS_TO_PASS) subdir_do +.PHONY: uninstall-tui +uninstall-tui: + transformed_name=`t='$(program_transform_name)'; \ + echo $(TUI) | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=$(TUI) ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) \ + $(DESTDIR)$(man1dir)/$$transformed_name.1 + +# We do this by grepping through sources. If that turns out to be too slow, +# maybe we could just require every .o file to have an initialization routine +# of a given name (top.o -> _initialize_top, etc.). +# +# Formatting conventions: The name of the _initialize_* routines must start +# in column zero, and must not be inside #if. +# +# Note that the set of files with init functions might change, or the names +# of the functions might change, so this files needs to depend on all the +# object files that will be linked into gdb. + +# FIXME: There is a problem with this approach - init.c may force +# unnecessary files to be linked in. + +# FIXME: cagney/2002-06-09: gdb/564: gdb/563: Force the order so that +# the first call is to _initialize_gdbtypes (implemented by explicitly +# putting that function's name first in the init.l-tmp file). This is +# a hack to ensure that all the architecture dependant global +# builtin_type_* variables are initialized before anything else +# (per-architecture code is called in the same order that it is +# registered). The ``correct fix'' is to have all the builtin types +# made part of the architecture and initialize them on-demand (using +# gdbarch_data) just like everything else. The catch is that other +# modules still take the address of these builtin types forcing them +# to be variables, sigh! + +# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is +# anchored on the first column and excludes the ``/'' character so +# that it doesn't add the $(srcdir) prefix to any file that already +# has an absolute path. It turns out that $(DEC)'s True64 make +# automatically adds the $(srcdir) prefixes when it encounters files +# in sub-directories such as cli/ and mi/. + +# NOTE: cagney/2004-02-08: The ``case "$$fs" in'' eliminates +# duplicates. Files in the gdb/ directory can end up appearing in +# COMMON_OBS (as a .o file) and CONFIG_SRCS (as a .c file). + +INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS) +init.c: $(INIT_FILES) + @echo Making init.c + @rm -f init.c-tmp init.l-tmp + @touch init.c-tmp + @echo gdbtypes > init.l-tmp + @-echo $(INIT_FILES) | \ + tr ' ' '\012' | \ + sed \ + -e '/^gdbtypes.[co]$$/d' \ + -e '/^init.[co]$$/d' \ + -e '/xdr_ld.[co]$$/d' \ + -e '/xdr_ptrace.[co]$$/d' \ + -e '/xdr_rdb.[co]$$/d' \ + -e '/udr.[co]$$/d' \ + -e '/udip2soc.[co]$$/d' \ + -e '/udi2go32.[co]$$/d' \ + -e '/version.[co]$$/d' \ + -e '/^[a-z0-9A-Z_]*_[SU].[co]$$/d' \ + -e '/[a-z0-9A-Z_]*-exp.tab.[co]$$/d' \ + -e 's/\.[co]$$/.c/' \ + -e 's,signals\.c,signals/signals\.c,' \ + -e 's|^\([^ /][^ ]*\)|$(srcdir)/\1|g' | \ + while read f; do \ + sed -n -e 's/^_initialize_\([a-z_0-9A-Z]*\).*/\1/p' $$f 2>/dev/null; \ + done | \ + while read f; do \ + case " $$fs " in \ + *" $$f "* ) ;; \ + * ) echo $$f ; fs="$$fs $$f";; \ + esac; \ + done >> init.l-tmp + @echo '/* Do not modify this file. */' >>init.c-tmp + @echo '/* It is created automatically by the Makefile. */'>>init.c-tmp + @echo '#include "defs.h" /* For initialize_file_ftype. */' >>init.c-tmp + @echo '#include "call-cmds.h" /* For initialize_all_files. */' >>init.c-tmp + @sed -e 's/\(.*\)/extern initialize_file_ftype _initialize_\1;/' >init.c-tmp + @echo 'void' >>init.c-tmp + @echo 'initialize_all_files (void)' >>init.c-tmp + @echo '{' >>init.c-tmp + @sed -e 's/\(.*\)/ _initialize_\1 ();/' >init.c-tmp + @echo '}' >>init.c-tmp + @rm init.l-tmp + @mv init.c-tmp init.c + +.PRECIOUS: init.c + +init.o: init.c $(defs_h) $(call_cmds_h) + +# Removing the old gdb first works better if it is running, at least on SunOS. +gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + @(cd ../..; make --no-print-directory GDB_FLAGS=-DGDB_6_1 library) + @rm -f gdb$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o `cat mergeobj` libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) `cat mergelibs` + +$(TUI)$(EXEEXT): tui-main.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS) + rm -f $(TUI)$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o $(TUI)$(EXEEXT) tui-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +nlm: force + rootme=`pwd`; export rootme; $(MAKE) $(TARGET_FLAGS_TO_PASS) DO=all DODIRS=nlm subdir_do + +# Create a library of the gdb object files and build GDB by linking +# against that. +# +# init.o is very important. It pulls in the rest of GDB. +LIBGDB_OBS= $(COMMON_OBS) $(TSOBS) $(ADD_FILES) init.o +libgdb.a: $(LIBGDB_OBS) + -rm -f libgdb.a + $(AR) q libgdb.a $(LIBGDB_OBS) + $(RANLIB) libgdb.a + +# A Mach 3.0 program to force gdb back to command level + +stop-gdb: stop-gdb.o + ${CC_LD} $(GLOBAL_CFLAGS) $(LDFLAGS) -o stop-gdb \ + stop-gdb.o $(CLIBS) $(LOADLIBES) + +# This is useful when debugging GDB, because some Unix's don't let you run GDB +# on itself without copying the executable. So "make gdb1" will make +# gdb and put a copy in gdb1, and you can run it with "gdb gdb1". +# Removing gdb1 before the copy is the right thing if gdb1 is open +# in another process. +gdb1$(EXEEXT): gdb$(EXEEXT) + rm -f gdb1$(EXEEXT) + cp gdb$(EXEEXT) gdb1$(EXEEXT) + +# FIXME. These are not generated by "make depend" because they only are there +# for some machines. +# But these rules don't do what we want; we want to hack the foo.o: tm.h +# dependency to do the right thing. +tm-sun3.h tm-altos.h: tm-m68k.h +tm-sun2.h tm-3b1.h: tm-m68k.h +xm-vaxult.h: xm-vax.h +xm-vaxbsd.h: xm-vax.h + +# Put the proper machine-specific files first, so M-. on a machine +# specific routine gets the one for the correct machine. (FIXME: those +# files go in twice; we should be removing them from the main list). + +# TAGS depends on all the files that go into it so you can rebuild TAGS +# with `make TAGS' and not have to say `rm TAGS' first. + +TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR) + @echo Making TAGS + @etags $(srcdir)/$(TM_FILE) \ + $(srcdir)/$(XM_FILE) \ + $(srcdir)/$(NAT_FILE) \ + `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \ + echo $(srcdir)/$$i ; \ + done ; for i in $(TAGFILES_WITH_SRCDIR); do \ + echo $$i ; \ + done) | sed -e 's/\.o$$/\.c/'` \ + `find $(srcdir)/config -name '*.h' -print` + +tags: TAGS + +clean mostlyclean: $(CONFIG_CLEAN) + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(SUBDIRS)" subdir_do + rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp + rm -f init.c version.c + rm -f gdb$(EXEEXT) core make.log + rm -f gdb[0-9]$(EXEEXT) +.PHONY: clean-tui +clean-tui: + rm -f $(TUI)$(EXEEXT) + +# This used to depend on c-exp.c m2-exp.c TAGS +# I believe this is wrong; the makefile standards for distclean just +# describe removing files; the only sort of "re-create a distribution" +# functionality described is if the distributed files are unmodified. +# NB: While GDBSERVER might be configured on native systems, it isn't +# always included in SUBDIRS. Remove the gdbserver files explictly. +distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=distclean "DODIRS=$(SUBDIRS)" subdir_do + rm -f gdbserver/config.status gdbserver/config.log + rm -f gdbserver/tm.h gdbserver/xm.h gdbserver/nm.h + rm -f gdbserver/Makefile gdbserver/config.cache + rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit + rm -f y.output yacc.acts yacc.tmp y.tab.h + rm -f config.log config.cache + rm -f Makefile + +maintainer-clean: local-maintainer-clean do-maintainer-clean distclean +realclean: maintainer-clean + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + rm -f c-exp.c \ + ada-lex.c ada-exp.c \ + objc-exp.c \ + jv-exp.tab \ + f-exp.c m2-exp.c p-exp.c + rm -f TAGS $(INFOFILES) + rm -f $(YYFILES) + rm -f nm.h tm.h xm.h config.status + +do-maintainer-clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=maintainer-clean "DODIRS=$(SUBDIRS)" \ + subdir_do + +diststuff: $(DISTSTUFF) + cd doc; $(MAKE) $(MFLAGS) diststuff + +subdir_do: force + @for i in $(DODIRS); do \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + +Makefile: Makefile.in config.status @frags@ + $(SHELL) config.status + +config.h: stamp-h ; @true +stamp-h: config.in config.status + CONFIG_HEADERS=config.h:config.in $(SHELL) config.status + +config.status: configure configure.tgt configure.host + $(SHELL) config.status --recheck + +force: + +# Documentation! +# GDB QUICK REFERENCE (TeX dvi file, CM fonts) +doc/refcard.dvi: + cd doc; $(MAKE) refcard.dvi $(FLAGS_TO_PASS) + +# GDB QUICK REFERENCE (PostScript output, common PS fonts) +doc/refcard.ps: + cd doc; $(MAKE) refcard.ps $(FLAGS_TO_PASS) + +# GDB MANUAL: TeX dvi file +doc/gdb.dvi: + cd doc; $(MAKE) gdb.dvi $(FLAGS_TO_PASS) + +# GDB MANUAL: info file +doc/gdb.info: + cd doc; $(MAKE) gdb.info $(FLAGS_TO_PASS) + +# Make copying.c from COPYING +$(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ \ + $(srcdir)/COPYING $(srcdir)/copying.awk + awk -f $(srcdir)/copying.awk \ + < $(srcdir)/COPYING > $(srcdir)/copying.tmp + mv $(srcdir)/copying.tmp $(srcdir)/copying.c + +version.c: Makefile version.in + @rm -f version.c-tmp version.c + @echo '#include "version.h"' >> version.c-tmp + @echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp + @echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp + @echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp + @mv version.c-tmp version.c +version.o: version.c $(version_h) + + +lint: $(LINTFILES) + $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \ + `echo $(DEPFILES) | sed 's/\.o /\.c /g'` + +gdb.cxref: $(SFILES) + cxref -I. $(SFILES) >gdb.cxref + +force_update: + +# GNU Make has an annoying habit of putting *all* the Makefile variables +# into the environment, unless you include this target as a circumvention. +# Rumor is that this will be fixed (and this target can be removed) +# in GNU Make 4.0. +.NOEXPORT: + +# GNU Make 3.63 has a different problem: it keeps tacking command line +# overrides onto the definition of $(MAKE). This variable setting +# will remove them. +MAKEOVERRIDES= + +ALLDEPFILES = \ + aix-thread.c \ + alpha-nat.c alphabsd-nat.c \ + alpha-tdep.c alpha-linux-tdep.c alphabsd-tdep.c alphanbsd-tdep.c \ + alpha-osf1-tdep.c alphafbsd-tdep.c alpha-mdebug-tdep.c \ + amd64-nat.c amd64-tdep.c \ + amd64bsd-nat.c amdfbsd-nat.c amd64fbsd-tdep.c \ + amd64nbsd-nat.c amd64nbsd-tdep.c \ + amd64obsd-nat.c amd64obsd-tdep.c \ + amd64-linux-nat.c amd64-linux-tdep.c \ + arm-linux-nat.c arm-linux-tdep.c arm-tdep.c \ + armnbsd-nat.c armnbsd-tdep.c \ + avr-tdep.c \ + coff-solib.c \ + core-regset.c core-aout.c corelow.c \ + dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \ + glibc-tdep.c \ + go32-nat.c h8300-tdep.c \ + hppa-tdep.c hppa-hpux-tdep.c \ + hppah-nat.c hpread.c \ + i386-tdep.c i386v-nat.c i386-linux-nat.c \ + i386v4-nat.c i386ly-tdep.c i386-cygwin-tdep.c \ + i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \ + i387-tdep.c \ + i386-linux-tdep.c i386-nat.c \ + i386gnu-nat.c i386gnu-tdep.c \ + ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c \ + infptrace.c inftarg.c irix4-nat.c irix5-nat.c \ + libunwind-frame.c \ + lynx-nat.c m3-nat.c \ + m68hc11-tdep.c \ + m68k-tdep.c \ + mcore-tdep.c \ + mips-linux-nat.c mips-linux-tdep.c \ + mips-nat.c \ + mips-irix-tdep.c \ + mips-tdep.c mipsm3-nat.c mipsv4-nat.c \ + mipsnbsd-nat.c mipsnbsd-tdep.c \ + nbsd-tdep.c \ + ns32k-tdep.c solib-osf.c \ + somread.c somsolib.c $(HPREAD_SOURCE) \ + ppc-sysv-tdep.o ppc-linux-nat.c ppc-linux-tdep.c \ + ppcnbsd-nat.o ppcnbsd-tdep.o \ + procfs.c \ + remote-e7000.c \ + remote-hms.c remote-m32r-sdi.c remote-mips.c \ + remote-rdp.c remote-sim.c \ + remote-st.c remote-utils.c dcache.c \ + remote-vx.c \ + rs6000-nat.c rs6000-tdep.c \ + s390-tdep.c s390-nat.c \ + ser-go32.c ser-pipe.c ser-tcp.c \ + sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ + solib.c solib-irix.c solib-svr4.c solib-sunos.c \ + sparc-linux-tdep.c sparc-nat.c sparc-sol2-nat.c sparc-sol2-tdep.c \ + sparc-tdep.c sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-linux-nat.c \ + sparc64-linux-tdep.c sparc64-nat.c sparc64-sol2-tdep.c \ + sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \ + sparc64nbsd-nat.c sparc64nbsd-tdep.c sparc64obsd-tdep.c \ + sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \ + sun3-nat.c \ + symm-tdep.c symm-nat.c \ + vax-tdep.c \ + vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ + win32-nat.c \ + xcoffread.c xcoffsolib.c \ + xstormy16-tdep.c + +# Some files need explict build rules (due to -Werror problems) or due +# to sub-directory fun 'n' games. + +# Provide explicit rule/dependency - works for more makes. +copying.o: $(srcdir)/copying.c + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c + +hpux-thread.o: $(srcdir)/hpux-thread.c + $(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \ + -I$(srcdir)/osf-share/HP800 -I/usr/include/dce \ + $(srcdir)/hpux-thread.c + +# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR. +main.o: main.c + $(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \ + -DBINDIR=\"$(bindir)\" $(srcdir)/main.c + +# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral +# errors. It turns out that that is the least of monitor.c's +# problems. The function print_vsprintf appears to be using +# va_arg(long) to extract CORE_ADDR parameters - something that +# definitly will not work. "monitor.c" needs to be rewritten so that +# it doesn't use format strings and instead uses callbacks. +monitor.o: $(srcdir)/monitor.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/monitor.c + +# FIXME: cagney/2003-08-10: Do not try to build "printcmd.c" with +# -Wformat-nonliteral. It needs to be overhauled so that it doesn't +# pass user input strings as the format parameter to host printf +# function calls. +printcmd.o: $(srcdir)/printcmd.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/printcmd.c + +# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't +# match output format strings. +procfs.o: $(srcdir)/procfs.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/procfs.c + +# FIXME: Thread-db.o gets warnings because the definitions of the register +# sets are different from kernel to kernel. +thread-db.o: $(srcdir)/thread-db.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \ + $(srcdir)/thread-db.c + +v850ice.o: $(srcdir)/v850ice.c + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) \ + $(srcdir)/v850ice.c + +# FIXME: cagney/2003-08-10: Do not try to build "valprint.c" with +# -Wformat-nonliteral. It relies on local_hex_format et.al. and +# that's a mess. It needs a serious overhaul. +valprint.o: $(srcdir)/valprint.c + $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c + +# +# YACC/LEX dependencies +# +# LANG-exp.c is generated in objdir from LANG-exp.y if it doesn't +# exist in srcdir, then compiled in objdir to LANG-exp.o. If we +# said LANG-exp.c rather than ./c-exp.c some makes would +# sometimes re-write it into $(srcdir)/c-exp.c. Remove bogus +# decls for malloc/realloc/free which conflict with everything else. +# Strictly speaking c-exp.c should therefore depend on +# Makefile.in, but that was a pretty big annoyance. + +.SUFFIXES: .y .l +.y.c: + $(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $@.tmp -- $(YFLAGS) + -sed -e '/extern.*malloc/d' \ + -e '/extern.*realloc/d' \ + -e '/extern.*free/d' \ + -e '/include.*malloc.h/d' \ + -e 's/malloc/xmalloc/g' \ + -e 's/realloc/xrealloc/g' \ + -e '/^#line.*y.tab.c/d' \ + < $@.tmp > $@.new + -rm $@.tmp + mv $@.new ./$*.c +.l.c: + @if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \ + echo $(FLEX) -Isit $< ">" $@; \ + $(FLEX) -Isit $< > $@; \ + elif [ ! -f $@ -a ! -f $< ]; then \ + echo "ada-lex.c missing and flex not available."; \ + false; \ + elif [ ! -f $@ ]; then \ + echo "Warning: $*.c older than $*.l and flex not available."; \ + fi + +.PRECIOUS: ada-exp.c ada-lex.c +.PRECIOUS: c-exp.c +.PRECIOUS: f-exp.c +.PRECIOUS: jv-exp.c +.PRECIOUS: m2-exp.c +.PRECIOUS: objc-exp.c +.PRECIOUS: p-exp.c + +# +# gdb/ dependencies +# + +abug-rom.o: abug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +ada-exp.o: ada-exp.c $(defs_h) $(expression_h) $(value_h) $(parser_defs_h) \ + $(language_h) $(ada_lang_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(frame_h) $(block_h) $(ada_lex_c) +ada-lang.o: ada-lang.c $(gdb_string_h) $(demangle_h) $(defs_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(expression_h) $(parser_defs_h) \ + $(language_h) $(c_lang_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(breakpoint_h) $(gdbcore_h) $(ada_lang_h) $(ui_out_h) $(block_h) \ + $(infcall_h) $(dictionary_h) +ada-lex.o: ada-lex.c +ada-tasks.o: ada-tasks.c $(defs_h) $(command_h) $(value_h) $(language_h) \ + $(inferior_h) $(symtab_h) $(target_h) $(regcache_h) $(gdbcore_h) \ + $(gregset_h) $(ada_lang_h) +ada-typeprint.o: ada-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) \ + $(target_h) $(command_h) $(gdbcmd_h) $(language_h) $(demangle_h) \ + $(c_lang_h) $(typeprint_h) $(ada_lang_h) $(gdb_string_h) +ada-valprint.o: ada-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(demangle_h) $(valprint_h) $(language_h) \ + $(annotate_h) $(ada_lang_h) $(c_lang_h) $(infcall_h) +aix-thread.o: aix-thread.c $(defs_h) $(gdb_assert_h) $(gdbthread_h) \ + $(target_h) $(inferior_h) $(regcache_h) $(gdbcmd_h) $(language_h) \ + $(ppc_tdep_h) +alphabsd-nat.o: alphabsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(alpha_tdep_h) $(alphabsd_tdep_h) $(gregset_h) +alphabsd-tdep.o: alphabsd-tdep.c $(defs_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) +alphafbsd-tdep.o: alphafbsd-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(alpha_tdep_h) +alpha-linux-tdep.o: alpha-linux-tdep.c $(defs_h) $(frame_h) $(gdb_assert_h) \ + $(osabi_h) $(alpha_tdep_h) +alpha-mdebug-tdep.o: alpha-mdebug-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(symtab_h) $(gdbcore_h) \ + $(block_h) $(gdb_assert_h) $(alpha_tdep_h) +alpha-nat.o: alpha-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(gdbcore_h) $(target_h) $(regcache_h) $(alpha_tdep_h) $(gregset_h) +alphanbsd-tdep.o: alphanbsd-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) $(alpha_tdep_h) \ + $(alphabsd_tdep_h) $(nbsd_tdep_h) +alpha-osf1-tdep.o: alpha-osf1-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(value_h) $(osabi_h) $(gdb_string_h) $(objfiles_h) $(alpha_tdep_h) +alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \ + $(frame_unwind_h) $(frame_base_h) $(dwarf2_frame_h) $(inferior_h) \ + $(symtab_h) $(value_h) $(gdbcmd_h) $(gdbcore_h) $(dis_asm_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(linespec_h) \ + $(regcache_h) $(reggroups_h) $(arch_utils_h) $(osabi_h) $(block_h) \ + $(elf_bfd_h) $(alpha_tdep_h) +amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h) +amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(solib_svr4_h) +amd64-linux-nat.o: amd64-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_proc_service_h) $(gregset_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) $(i386_linux_tdep_h) $(amd64_nat_h) +amd64-linux-tdep.o: amd64-linux-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(osabi_h) $(gdb_string_h) $(amd64_tdep_h) \ + $(amd64_linux_tdep_h) +amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \ + $(gdb_assert_h) $(i386_tdep_h) $(amd64_tdep_h) +amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +amd64obsd-nat.o: amd64obsd-nat.c $(defs_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(amd64_nat_h) +amd64obsd-tdep.o: amd64obsd-tdep.c $(defs_h) $(frame_h) $(gdbcore_h) \ + $(osabi_h) $(regset_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \ + $(amd64_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ + $(dummy_frame_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(inferior_h) $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(regcache_h) \ + $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ + $(i387_tdep_h) +annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ + $(gdbtypes_h) $(breakpoint_h) +arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ + $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ + $(gdb_assert_h) $(sim_regno_h) $(osabi_h) $(version_h) \ + $(floatformat_h) +arm-linux-nat.o: arm-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(gregset_h) +arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \ + $(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \ + $(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) \ + $(glibc_tdep_h) +armnbsd-nat.o: armnbsd-nat.c $(defs_h) $(arm_tdep_h) $(inferior_h) \ + $(regcache_h) $(gdbcore_h) +armnbsd-tdep.o: armnbsd-tdep.c $(defs_h) $(osabi_h) $(arm_tdep_h) \ + $(nbsd_tdep_h) $(solib_svr4_h) +arm-tdep.o: arm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdb_string_h) $(dis_asm_h) $(regcache_h) \ + $(doublest_h) $(value_h) $(arch_utils_h) $(osabi_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(arm_tdep_h) \ + $(gdb_sim_arm_h) $(elf_bfd_h) $(coff_internal_h) $(elf_arm_h) \ + $(gdb_assert_h) $(bfd_in2_h) $(libcoff_h) +auxv.o: auxv.c $(defs_h) $(target_h) $(gdbtypes_h) $(command_h) \ + $(inferior_h) $(valprint_h) $(gdb_assert_h) $(auxv_h) \ + $(elf_common_h) +avr-tdep.o: avr-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(symfile_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_string_h) $(dis_asm_h) +ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(command_h) $(gdbcmd_h) $(frame_h) \ + $(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \ + $(regcache_h) +ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h) +bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h) \ + $(gdb_assert_h) +bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \ + $(gdb_assert_h) $(gdb_string_h) +block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \ + $(gdb_obstack_h) $(cp_support_h) +blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(objfiles_h) \ + $(frame_h) $(gdbcore_h) $(value_h) $(target_h) $(inferior_h) \ + $(annotate_h) $(regcache_h) $(gdb_assert_h) $(dummy_frame_h) \ + $(command_h) $(gdbcmd_h) $(block_h) +breakpoint.o: breakpoint.c $(defs_h) $(symtab_h) $(frame_h) $(breakpoint_h) \ + $(gdbtypes_h) $(expression_h) $(gdbcore_h) $(gdbcmd_h) $(value_h) \ + $(command_h) $(inferior_h) $(gdbthread_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(demangle_h) $(annotate_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(linespec_h) $(completer_h) $(gdb_h) \ + $(ui_out_h) $(cli_script_h) $(gdb_assert_h) $(block_h) \ + $(gdb_events_h) +buildsym.o: buildsym.c $(defs_h) $(bfd_h) $(gdb_obstack_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(gdb_assert_h) \ + $(complaints_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(bcache_h) $(filenames_h) $(macrotab_h) $(demangle_h) $(block_h) \ + $(cp_support_h) $(dictionary_h) $(buildsym_h) $(stabsread_h) +c-exp.o: c-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(charset_h) $(block_h) $(cp_support_h) +charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \ + $(gdb_string_h) +c-lang.o: c-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(valprint_h) \ + $(macroscope_h) $(gdb_assert_h) $(charset_h) $(gdb_string_h) \ + $(demangle_h) $(cp_support_h) +cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \ + $(gdb_assert_h) +coff-pe-read.o: coff-pe-read.c $(coff_pe_read_h) $(bfd_h) $(defs_h) \ + $(gdbtypes_h) $(symtab_h) $(symfile_h) $(objfiles_h) +coffread.o: coffread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(demangle_h) \ + $(breakpoint_h) $(bfd_h) $(gdb_obstack_h) $(gdb_string_h) \ + $(coff_internal_h) $(libcoff_h) $(objfiles_h) $(buildsym_h) \ + $(gdb_stabs_h) $(stabsread_h) $(complaints_h) $(target_h) \ + $(gdb_assert_h) $(block_h) $(dictionary_h) $(coff_pe_read_h) +coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) +complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \ + $(command_h) $(gdbcmd_h) +completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(filenames_h) $(language_h) $(cli_decode_h) $(gdbcmd_h) \ + $(readline_h) $(completer_h) +copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h) +core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_dirent_h) $(gdb_stat_h) +corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \ + $(command_h) $(gdbcmd_h) $(bfd_h) $(target_h) $(gdbcore_h) \ + $(dis_asm_h) $(gdb_stat_h) $(completer_h) +corelow.o: corelow.c $(defs_h) $(arch_utils_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(symtab_h) $(command_h) $(bfd_h) $(target_h) \ + $(gdbcore_h) $(gdbthread_h) $(regcache_h) $(regset_h) $(symfile_h) \ + $(exec_h) $(readline_h) $(gdb_assert_h) +core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h) +cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(command_h) $(gdbcmd_h) \ + $(ui_out_h) $(gdb_string_h) +cp-namespace.o: cp-namespace.c $(defs_h) $(cp_support_h) $(gdb_obstack_h) \ + $(symtab_h) $(symfile_h) $(gdb_assert_h) $(block_h) $(objfiles_h) \ + $(gdbtypes_h) $(dictionary_h) $(command_h) $(frame_h) +cp-support.o: cp-support.c $(defs_h) $(cp_support_h) $(gdb_string_h) \ + $(demangle_h) $(gdb_assert_h) $(gdbcmd_h) $(dictionary_h) \ + $(objfiles_h) $(frame_h) $(symtab_h) $(block_h) $(complaints_h) \ + $(gdbtypes_h) +cpu32bug-rom.o: cpu32bug-rom.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(monitor_h) $(serial_h) $(regcache_h) $(m68k_tdep_h) +cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(demangle_h) $(annotate_h) $(gdb_string_h) $(c_lang_h) $(target_h) \ + $(cp_abi_h) $(valprint_h) +cris-tdep.o: cris-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dwarf2_frame_h) $(symtab_h) \ + $(inferior_h) $(gdbtypes_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) \ + $(value_h) $(opcode_cris_h) $(arch_utils_h) $(regcache_h) \ + $(gdb_assert_h) $(objfiles_h) $(solib_h) $(solib_svr4_h) \ + $(gdb_string_h) $(dis_asm_h) +c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \ + $(gdb_string_h) +c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(c_lang_h) $(cp_abi_h) $(target_h) +d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \ + $(objfiles_h) $(language_h) $(arch_utils_h) $(regcache_h) \ + $(remote_h) $(floatformat_h) $(gdb_sim_d10v_h) $(sim_regno_h) \ + $(disasm_h) $(trad_frame_h) $(gdb_assert_h) +dbug-rom.o: dbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +dbxread.o: dbxread.c $(defs_h) $(gdb_string_h) $(gdb_obstack_h) \ + $(gdb_stat_h) $(symtab_h) $(breakpoint_h) $(target_h) $(gdbcore_h) \ + $(libaout_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \ + $(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \ + $(cp_abi_h) $(gdb_assert_h) $(aout_aout64_h) $(aout_stab_gnu_h) +dcache.o: dcache.c $(defs_h) $(dcache_h) $(gdbcmd_h) $(gdb_string_h) \ + $(gdbcore_h) $(target_h) +delta68-nat.o: delta68-nat.c $(defs_h) +demangle.o: demangle.c $(defs_h) $(command_h) $(gdbcmd_h) $(demangle_h) \ + $(gdb_string_h) +dictionary.o: dictionary.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(buildsym_h) $(gdb_assert_h) $(dictionary_h) +dink32-rom.o: dink32-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symfile_h) $(inferior_h) $(regcache_h) +disasm.o: disasm.c $(defs_h) $(target_h) $(value_h) $(ui_out_h) \ + $(gdb_string_h) $(disasm_h) $(gdbcore_h) $(dis_asm_h) +doublest.o: doublest.c $(defs_h) $(doublest_h) $(floatformat_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdbtypes_h) +dpx2-nat.o: dpx2-nat.c $(defs_h) $(gdbcore_h) $(gdb_string_h) +dsrec.o: dsrec.c $(defs_h) $(serial_h) $(srec_h) $(gdb_assert_h) \ + $(gdb_string_h) +dummy-frame.o: dummy-frame.c $(defs_h) $(dummy_frame_h) $(regcache_h) \ + $(frame_h) $(inferior_h) $(gdb_assert_h) $(frame_unwind_h) \ + $(command_h) $(gdbcmd_h) +dve3900-rom.o: dve3900-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(inferior_h) $(command_h) $(gdb_string_h) $(regcache_h) \ + $(mips_tdep_h) +dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ + $(gdbcore_h) $(elf_dwarf2_h) $(dwarf2expr_h) +dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \ + $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) +dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \ + $(regcache_h) $(objfiles_h) $(elf_dwarf2_h) $(dwarf2expr_h) \ + $(dwarf2loc_h) $(gdb_string_h) +dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \ + $(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \ + $(complaints_h) $(bcache_h) $(dwarf2expr_h) $(dwarf2loc_h) \ + $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) +dwarfread.o: dwarfread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(objfiles_h) \ + $(elf_dwarf_h) $(buildsym_h) $(demangle_h) $(expression_h) \ + $(language_h) $(complaints_h) $(gdb_string_h) +elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \ + $(elf_mips_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(stabsread_h) $(gdb_stabs_h) $(complaints_h) $(demangle_h) +environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h) +eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \ + $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \ + $(parser_defs_h) +event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ + $(gdb_string_h) +event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ + $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ + $(gdbcmd_h) $(readline_h) $(readline_history_h) +exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \ + $(exec_h) $(readline_h) $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) \ + $(xcoffsolib_h) +expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(value_h) $(language_h) $(parser_defs_h) $(user_regs_h) $(target_h) \ + $(gdb_string_h) $(block_h) +fbsd-proc.o: fbsd-proc.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(gdb_string_h) $(elf_bfd_h) $(gregset_h) +f-exp.o: f-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(f_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +findvar.o: findvar.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(frame_h) \ + $(value_h) $(gdbcore_h) $(inferior_h) $(target_h) $(gdb_string_h) \ + $(gdb_assert_h) $(floatformat_h) $(symfile_h) $(regcache_h) \ + $(user_regs_h) $(block_h) +f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(f_lang_h) \ + $(valprint_h) $(value_h) +fork-child.o: fork-child.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdb_wait_h) $(gdb_vfork_h) $(gdbcore_h) \ + $(terminal_h) $(gdbthread_h) $(command_h) +frame-base.o: frame-base.c $(defs_h) $(frame_base_h) $(frame_h) +frame.o: frame.c $(defs_h) $(frame_h) $(target_h) $(value_h) $(inferior_h) \ + $(regcache_h) $(gdb_assert_h) $(gdb_string_h) $(user_regs_h) \ + $(gdb_obstack_h) $(dummy_frame_h) $(sentinel_frame_h) $(gdbcore_h) \ + $(annotate_h) $(language_h) $(frame_unwind_h) $(frame_base_h) \ + $(command_h) $(gdbcmd_h) +frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdb_assert_h) $(dummy_frame_h) +frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(regcache_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(trad_frame_h) $(dis_asm_h) $(gdb_assert_h) \ + $(sim_regno_h) $(gdb_sim_frv_h) $(opcodes_frv_desc_h) $(symtab_h) +f-typeprint.o: f-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(f_lang_h) $(gdb_string_h) +f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \ + $(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h) +gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \ + $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \ + $(gdb_assert_h) +gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \ + $(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gdb_events_h) $(reggroups_h) $(osabi_h) $(gdb_obstack_h) +gdb.o: gdb.c $(defs_h) $(main_h) $(gdb_string_h) $(interps_h) +gdb-events.o: gdb-events.c $(defs_h) $(gdb_events_h) $(gdbcmd_h) +gdbtypes.o: gdbtypes.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdbtypes_h) $(expression_h) \ + $(language_h) $(target_h) $(value_h) $(demangle_h) $(complaints_h) \ + $(gdbcmd_h) $(wrapper_h) $(cp_abi_h) $(gdb_assert_h) +glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(glibc_tdep_h) +gnu-nat.o: gnu-nat.c $(gdb_string_h) $(defs_h) $(inferior_h) $(symtab_h) \ + $(value_h) $(language_h) $(target_h) $(gdb_wait_h) $(gdbcmd_h) \ + $(gdbcore_h) $(gdbthread_h) $(gdb_assert_h) $(gdb_obstack_h) \ + $(gnu_nat_h) $(exc_request_S_h) $(notify_S_h) $(process_reply_S_h) \ + $(msg_reply_S_h) $(exc_request_U_h) $(msg_U_h) +gnu-v2-abi.o: gnu-v2-abi.c $(defs_h) $(gdb_string_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(demangle_h) $(cp_abi_h) $(cp_support_h) +gnu-v3-abi.o: gnu-v3-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(cp_support_h) \ + $(demangle_h) $(gdb_assert_h) $(gdb_string_h) +go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \ + $(command_h) $(gdbcmd_h) $(floatformat_h) $(buildsym_h) \ + $(i387_tdep_h) $(i386_tdep_h) $(value_h) $(regcache_h) \ + $(gdb_string_h) +h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \ + $(gdb_assert_h) $(dis_asm_h) +hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \ + $(gdbtypes_h) $(gdbcore_h) $(cp_abi_h) +hppah-nat.o: hppah-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(gdb_wait_h) $(regcache_h) $(gdb_string_h) +hppa-hpux-tdep.o: hppa-hpux-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(osabi_h) $(gdb_string_h) $(frame_h) +hppa-tdep.o: hppa-tdep.c $(defs_h) $(frame_h) $(bfd_h) $(inferior_h) \ + $(value_h) $(regcache_h) $(completer_h) $(language_h) $(osabi_h) \ + $(gdb_assert_h) $(infttrace_h) $(arch_utils_h) $(symtab_h) \ + $(infcall_h) $(dis_asm_h) $(trad_frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) \ + $(gdbcore_h) $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) \ + $(hppa_tdep_h) +hpread.o: hpread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(hp_symtab_h) \ + $(syms_h) $(symtab_h) $(symfile_h) $(objfiles_h) $(buildsym_h) \ + $(complaints_h) $(gdb_stabs_h) $(gdbtypes_h) $(demangle_h) \ + $(somsolib_h) $(gdb_assert_h) $(gdb_string_h) +hpux-thread.o: hpux-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) +i386bsd-nat.o: i386bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(gdb_assert_h) $(gregset_h) $(i386_tdep_h) $(i387_tdep_h) +i386bsd-tdep.o: i386bsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \ + $(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) $(i386_tdep_h) +i386-cygwin-tdep.o: i386-cygwin-tdep.c $(defs_h) $(osabi_h) $(gdb_string_h) \ + $(i386_tdep_h) +i386fbsd-nat.o: i386fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) +i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386gnu-nat.o: i386gnu-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \ + $(regcache_h) $(gdb_assert_h) $(i386_tdep_h) $(gnu_nat_h) \ + $(i387_tdep_h) $(gregset_h) +i386gnu-tdep.o: i386gnu-tdep.c $(defs_h) $(osabi_h) $(i386_tdep_h) +i386-interix-nat.o: i386-interix-nat.c $(defs_h) $(gdb_string_h) \ + $(gdbcore_h) $(gregset_h) $(regcache_h) +i386-interix-tdep.o: i386-interix-tdep.c $(defs_h) $(arch_utils_h) \ + $(frame_h) $(gdb_string_h) $(gdb_stabs_h) $(gdbcore_h) $(gdbtypes_h) \ + $(i386_tdep_h) $(inferior_h) $(libbfd_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) +i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) $(linux_nat_h) $(gdb_assert_h) $(gdb_string_h) \ + $(gregset_h) $(i387_tdep_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(gdb_proc_service_h) +i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \ + $(value_h) $(regcache_h) $(inferior_h) $(osabi_h) $(reggroups_h) \ + $(solib_svr4_h) $(gdb_string_h) $(i386_tdep_h) $(i386_linux_tdep_h) \ + $(glibc_tdep_h) +i386ly-tdep.o: i386ly-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(target_h) $(osabi_h) $(i386_tdep_h) +i386-nat.o: i386-nat.c $(defs_h) $(breakpoint_h) $(command_h) $(gdbcmd_h) +i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +i386-nto-tdep.o: i386-nto-tdep.c $(gdb_string_h) $(gdb_assert_h) $(defs_h) \ + $(frame_h) $(target_h) $(regcache_h) $(solib_svr4_h) $(i386_tdep_h) \ + $(nto_tdep_h) $(osabi_h) $(i387_tdep_h) +i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(i386_tdep_h) +i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(gdbcore_h) \ + $(regcache_h) $(regset_h) $(osabi_h) $(target_h) $(gdb_assert_h) \ + $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h) +i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \ + $(i386_tdep_h) +i386-stub.o: i386-stub.c +i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \ + $(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \ + $(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \ + $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \ + $(i386_tdep_h) $(i387_tdep_h) +i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \ + $(i386_tdep_h) $(i387_tdep_h) $(gregset_h) +i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \ + $(gdbcore_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(i386_tdep_h) +i387-tdep.o: i387-tdep.c $(defs_h) $(doublest_h) $(floatformat_h) $(frame_h) \ + $(gdbcore_h) $(inferior_h) $(language_h) $(regcache_h) $(value_h) \ + $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) $(i387_tdep_h) +ia64-aix-nat.o: ia64-aix-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stat_h) +ia64-aix-tdep.o: ia64-aix-tdep.c $(defs_h) +ia64-linux-nat.o: ia64-linux-nat.c $(defs_h) $(gdb_string_h) $(inferior_h) \ + $(target_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) +ia64-linux-tdep.o: ia64-linux-tdep.c $(defs_h) $(ia64_tdep_h) \ + $(arch_utils_h) $(gdbcore_h) $(regcache_h) +ia64-tdep.o: ia64-tdep.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(arch_utils_h) $(floatformat_h) $(regcache_h) $(reggroups_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(doublest_h) \ + $(value_h) $(gdb_assert_h) $(objfiles_h) $(elf_common_h) \ + $(elf_bfd_h) $(elf_h) $(dis_asm_h) $(ia64_tdep_h) \ + $(libunwind_frame_h) $(libunwind_ia64_h) +infcall.o: infcall.c $(defs_h) $(breakpoint_h) $(target_h) $(regcache_h) \ + $(inferior_h) $(gdb_assert_h) $(block_h) $(gdbcore_h) $(language_h) \ + $(objfiles_h) $(gdbcmd_h) $(command_h) $(gdb_string_h) $(infcall_h) +infcmd.o: infcmd.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(inferior_h) $(environ_h) $(value_h) $(gdbcmd_h) \ + $(symfile_h) $(gdbcore_h) $(target_h) $(language_h) $(symfile_h) \ + $(objfiles_h) $(completer_h) $(ui_out_h) $(event_top_h) \ + $(parser_defs_h) $(regcache_h) $(reggroups_h) $(block_h) \ + $(gdb_assert_h) +inf-loop.o: inf-loop.c $(defs_h) $(inferior_h) $(target_h) $(event_loop_h) \ + $(event_top_h) $(inf_loop_h) $(remote_h) +inflow.o: inflow.c $(defs_h) $(frame_h) $(inferior_h) $(command_h) \ + $(serial_h) $(terminal_h) $(target_h) $(gdbthread_h) $(gdb_string_h) \ + $(inflow_h) +infptrace.o: infptrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(regcache_h) $(gdb_wait_h) $(command_h) \ + $(gdb_dirent_h) $(gdbcore_h) $(gdb_stat_h) +infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(breakpoint_h) $(gdb_wait_h) $(gdbcore_h) $(gdbcmd_h) \ + $(cli_script_h) $(target_h) $(gdbthread_h) $(annotate_h) \ + $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) $(value_h) \ + $(observer_h) $(language_h) $(gdb_assert_h) +inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(gdb_stat_h) $(gdb_wait_h) $(inflow_h) +infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdb_string_h) $(gdb_wait_h) $(command_h) $(gdbthread_h) \ + $(gdbcore_h) +interps.o: interps.c $(defs_h) $(gdbcmd_h) $(ui_out_h) $(event_loop_h) \ + $(event_top_h) $(interps_h) $(completer_h) $(gdb_string_h) \ + $(gdb_events_h) $(gdb_assert_h) $(top_h) +irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gdb_string_h) $(gregset_h) $(mips_tdep_h) +jv-exp.o: jv-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(jv_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(gdbtypes_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(gdb_string_h) $(value_h) $(c_lang_h) \ + $(jv_lang_h) $(gdbcore_h) $(block_h) $(demangle_h) $(dictionary_h) +jv-typeprint.o: jv-typeprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(demangle_h) $(jv_lang_h) $(gdb_string_h) $(typeprint_h) \ + $(c_lang_h) $(cp_abi_h) +jv-valprint.o: jv-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(expression_h) $(value_h) $(demangle_h) $(valprint_h) \ + $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) +kod.o: kod.c $(defs_h) $(command_h) $(gdbcmd_h) $(target_h) $(gdb_string_h) \ + $(kod_h) +kod-cisco.o: kod-cisco.c $(defs_h) $(gdb_string_h) $(kod_h) +language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ + $(parser_defs_h) $(jv_lang_h) $(demangle_h) +libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ + $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \ + $(gdb_string_h) $(libunwind_frame_h) $(complaints_h) +linespec.o: linespec.c $(defs_h) $(symtab_h) $(frame_h) $(command_h) \ + $(symfile_h) $(objfiles_h) $(source_h) $(demangle_h) $(value_h) \ + $(completer_h) $(cp_abi_h) $(parser_defs_h) $(block_h) \ + $(objc_lang_h) $(linespec_h) +lin-lwp.o: lin-lwp.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) \ + $(gdbthread_h) $(inferior_h) $(target_h) $(regcache_h) $(gdbcmd_h) \ + $(linux_nat_h) +linux-nat.o: linux-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdb_wait_h) \ + $(linux_nat_h) +linux-proc.o: linux-proc.c $(defs_h) $(inferior_h) $(gdb_stat_h) \ + $(regcache_h) $(gregset_h) $(gdbcore_h) $(gdbthread_h) $(elf_bfd_h) \ + $(cli_decode_h) $(gdb_string_h) $(linux_nat_h) +lynx-nat.o: lynx-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +m2-exp.o: m2-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(value_h) $(parser_defs_h) $(m2_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +m2-lang.o: m2-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(m2_lang_h) $(c_lang_h) \ + $(valprint_h) +m2-typeprint.o: m2-typeprint.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(gdbcore_h) $(target_h) $(m2_lang_h) +m2-valprint.o: m2-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(m2_lang_h) +m32r-rom.o: m32r-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(symtab_h) $(command_h) $(gdbcmd_h) $(symfile_h) \ + $(gdb_string_h) $(objfiles_h) $(inferior_h) $(regcache_h) +m32r-stub.o: m32r-stub.c $(syscall_h) +m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \ + $(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \ + $(dis_asm_h) $(gdb_assert_h) +m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \ + $(inferior_h) $(dis_asm_h) $(symfile_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \ + $(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h) +m68klinux-nat.o: m68klinux-nat.c $(defs_h) $(frame_h) $(inferior_h) \ + $(language_h) $(gdbcore_h) $(gdb_string_h) $(regcache_h) \ + $(m68k_tdep_h) $(gdb_stat_h) $(floatformat_h) $(target_h) \ + $(gregset_h) +m68klinux-tdep.o: m68klinux-tdep.c $(defs_h) $(gdbcore_h) $(doublest_h) \ + $(floatformat_h) $(frame_h) $(target_h) $(gdb_string_h) \ + $(gdbtypes_h) $(osabi_h) $(regcache_h) $(objfiles_h) $(symtab_h) \ + $(m68k_tdep_h) +m68knbsd-nat.o: m68knbsd-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \ + $(regcache_h) +m68knbsd-tdep.o: m68knbsd-tdep.c $(defs_h) $(gdbtypes_h) $(regcache_h) +m68k-stub.o: m68k-stub.c +m68k-tdep.o: m68k-tdep.c $(defs_h) $(dwarf2_frame_h) $(frame_h) \ + $(frame_base_h) $(frame_unwind_h) $(symtab_h) $(gdbcore_h) \ + $(value_h) $(gdb_string_h) $(gdb_assert_h) $(inferior_h) \ + $(regcache_h) $(arch_utils_h) $(osabi_h) $(dis_asm_h) $(m68k_tdep_h) \ + $(gregset_h) +macrocmd.o: macrocmd.c $(defs_h) $(macrotab_h) $(macroexp_h) $(macroscope_h) \ + $(command_h) $(gdbcmd_h) +macroexp.o: macroexp.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(macrotab_h) \ + $(macroexp_h) $(gdb_assert_h) +macroscope.o: macroscope.c $(defs_h) $(macroscope_h) $(symtab_h) $(source_h) \ + $(target_h) $(frame_h) $(inferior_h) $(complaints_h) +macrotab.o: macrotab.c $(defs_h) $(gdb_obstack_h) $(splay_tree_h) \ + $(symtab_h) $(symfile_h) $(objfiles_h) $(macrotab_h) $(gdb_assert_h) \ + $(bcache_h) $(complaints_h) +main.o: main.c $(defs_h) $(top_h) $(target_h) $(inferior_h) $(symfile_h) \ + $(gdbcore_h) $(getopt_h) $(gdb_stat_h) $(gdb_string_h) \ + $(event_loop_h) $(ui_out_h) $(interps_h) $(main_h) +maint.o: maint.c $(defs_h) $(command_h) $(gdbcmd_h) $(symtab_h) \ + $(gdbtypes_h) $(demangle_h) $(gdbcore_h) $(expression_h) \ + $(language_h) $(symfile_h) $(objfiles_h) $(value_h) $(cli_decode_h) +mcore-rom.o: mcore-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(gdb_string_h) $(regcache_h) $(serial_h) +mcore-tdep.o: mcore-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(value_h) \ + $(gdbcmd_h) $(regcache_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) \ + $(arch_utils_h) $(gdb_string_h) $(disasm_h) $(dis_asm_h) +mdebugread.o: mdebugread.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(objfiles_h) $(gdb_obstack_h) $(buildsym_h) $(stabsread_h) \ + $(complaints_h) $(demangle_h) $(gdb_assert_h) $(block_h) \ + $(dictionary_h) $(coff_sym_h) $(coff_symconst_h) $(gdb_stat_h) \ + $(gdb_string_h) $(bfd_h) $(coff_ecoff_h) $(libaout_h) \ + $(aout_aout64_h) $(aout_stab_gnu_h) $(expression_h) $(language_h) +memattr.o: memattr.c $(defs_h) $(command_h) $(gdbcmd_h) $(memattr_h) \ + $(target_h) $(value_h) $(language_h) $(gdb_string_h) +mem-break.o: mem-break.c $(defs_h) $(symtab_h) $(breakpoint_h) $(inferior_h) \ + $(target_h) +minsyms.o: minsyms.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(demangle_h) $(value_h) $(cp_abi_h) +mips-irix-tdep.o: mips-irix-tdep.c $(defs_h) $(osabi_h) $(elf_bfd_h) +mips-linux-nat.o: mips-linux-nat.c $(defs_h) $(mips_tdep_h) +mips-linux-tdep.o: mips-linux-tdep.c $(defs_h) $(gdbcore_h) $(target_h) \ + $(solib_svr4_h) $(osabi_h) $(mips_tdep_h) $(gdb_string_h) \ + $(gdb_assert_h) $(frame_h) +mips-nat.o: mips-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +mipsnbsd-nat.o: mipsnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \ + $(mipsnbsd_tdep_h) +mipsnbsd-tdep.o: mipsnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(value_h) $(osabi_h) $(nbsd_tdep_h) $(mipsnbsd_tdep_h) \ + $(solib_svr4_h) +mipsread.o: mipsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(coff_sym_h) \ + $(coff_internal_h) $(coff_ecoff_h) $(libcoff_h) $(libecoff_h) \ + $(elf_common_h) $(elf_mips_h) +mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \ + $(frame_h) $(inferior_h) $(symtab_h) $(value_h) $(gdbcmd_h) \ + $(language_h) $(gdbcore_h) $(symfile_h) $(objfiles_h) $(gdbtypes_h) \ + $(target_h) $(arch_utils_h) $(regcache_h) $(osabi_h) $(mips_tdep_h) \ + $(block_h) $(reggroups_h) $(opcode_mips_h) $(elf_mips_h) \ + $(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h) \ + $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) +mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ + $(regcache_h) $(gregset_h) +mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \ + $(objfiles_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \ + $(dis_asm_h) +monitor.o: monitor.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(command_h) $(serial_h) $(monitor_h) $(gdbcmd_h) $(inferior_h) \ + $(gdb_regex_h) $(srec_h) $(regcache_h) +nbsd-tdep.o: nbsd-tdep.c $(defs_h) $(gdb_string_h) $(solib_svr4_h) +nlmread.o: nlmread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(block_h) +ns32knbsd-nat.o: ns32knbsd-nat.c $(defs_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(regcache_h) +ns32knbsd-tdep.o: ns32knbsd-tdep.c $(defs_h) $(osabi_h) $(ns32k_tdep_h) \ + $(gdb_string_h) +ns32k-tdep.o: ns32k-tdep.c $(defs_h) $(frame_h) $(gdbtypes_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(target_h) $(arch_utils_h) $(osabi_h) \ + $(dis_asm_h) $(ns32k_tdep_h) $(gdb_string_h) +nto-procfs.o: nto-procfs.c $(defs_h) $(gdb_dirent_h) $(gdb_string_h) \ + $(gdbcore_h) $(inferior_h) $(target_h) $(objfiles_h) $(gdbthread_h) \ + $(nto_tdep_h) $(command_h) $(regcache_h) +nto-tdep.o: nto-tdep.c $(gdb_stat_h) $(gdb_string_h) $(nto_tdep_h) $(top_h) \ + $(cli_decode_h) $(cli_cmds_h) $(inferior_h) $(gdbarch_h) $(bfd_h) \ + $(elf_bfd_h) $(solib_svr4_h) $(gdbcore_h) +objc-exp.o: objc-exp.c $(defs_h) $(gdb_string_h) $(expression_h) \ + $(objc_lang_h) $(value_h) $(parser_defs_h) $(language_h) $(c_lang_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(top_h) $(completer_h) \ + $(block_h) +objc-lang.o: objc-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(c_lang_h) $(objc_lang_h) \ + $(complaints_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(frame_h) \ + $(gdb_regex_h) $(regcache_h) $(block_h) $(infcall_h) $(valprint_h) \ + $(gdb_assert_h) +objfiles.o: objfiles.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(gdb_stabs_h) $(target_h) $(bcache_h) $(gdb_assert_h) \ + $(gdb_stat_h) $(gdb_obstack_h) $(gdb_string_h) $(hashtab_h) \ + $(breakpoint_h) $(block_h) $(dictionary_h) +observer.o: observer.c $(defs_h) $(observer_h) +ocd.o: ocd.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) $(inferior_h) \ + $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) \ + $(gdb_stabs_h) $(serial_h) $(ocd_h) $(regcache_h) +osabi.o: osabi.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(osabi_h) \ + $(arch_utils_h) $(gdbcmd_h) $(command_h) $(elf_bfd_h) +pa64solib.o: pa64solib.c $(defs_h) $(frame_h) $(bfd_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(exec_h) +parse.o: parse.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(frame_h) $(expression_h) $(value_h) $(command_h) $(language_h) \ + $(parser_defs_h) $(gdbcmd_h) $(symfile_h) $(inferior_h) \ + $(doublest_h) $(gdb_assert_h) $(block_h) +p-exp.o: p-exp.c $(defs_h) $(gdb_string_h) $(expression_h) $(value_h) \ + $(parser_defs_h) $(language_h) $(p_lang_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(block_h) +p-lang.o: p-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(p_lang_h) \ + $(valprint_h) $(value_h) +ppc-bdm.o: ppc-bdm.c $(defs_h) $(gdbcore_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(serial_h) $(ocd_h) $(ppc_tdep_h) \ + $(regcache_h) +ppcbug-rom.o: ppcbug-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +ppc-linux-nat.o: ppc-linux-nat.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(regcache_h) $(gdb_wait_h) $(gregset_h) \ + $(ppc_tdep_h) +ppc-linux-tdep.o: ppc-linux-tdep.c $(defs_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(symfile_h) \ + $(objfiles_h) $(regcache_h) $(value_h) $(osabi_h) $(solib_svr4_h) \ + $(ppc_tdep_h) +ppcnbsd-nat.o: ppcnbsd-nat.c $(defs_h) $(inferior_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) +ppcnbsd-tdep.o: ppcnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) \ + $(target_h) $(breakpoint_h) $(value_h) $(osabi_h) $(ppc_tdep_h) \ + $(ppcnbsd_tdep_h) $(nbsd_tdep_h) $(solib_svr4_h) +ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \ + $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \ + $(ppc_tdep_h) $(target_h) $(objfiles_h) +printcmd.o: printcmd.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(gdbtypes_h) $(value_h) $(language_h) $(expression_h) $(gdbcore_h) \ + $(gdbcmd_h) $(target_h) $(breakpoint_h) $(demangle_h) $(valprint_h) \ + $(annotate_h) $(symfile_h) $(objfiles_h) $(completer_h) $(ui_out_h) \ + $(gdb_assert_h) $(block_h) $(disasm_h) $(tui_h) +proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) $(completer_h) $(gdb_wait_h) \ + $(proc_utils_h) +proc-events.o: proc-events.c $(defs_h) +proc-flags.o: proc-flags.c $(defs_h) +procfs.o: procfs.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(elf_bfd_h) $(gdbcmd_h) $(gdbthread_h) $(gdb_wait_h) \ + $(gdb_string_h) $(gdb_assert_h) $(inflow_h) $(auxv_h) \ + $(gdb_dirent_h) $(X_OK) $(gdb_stat_h) $(proc_utils_h) $(gregset_h) +proc-service.o: proc-service.c $(defs_h) $(gdb_proc_service_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gregset_h) +proc-why.o: proc-why.c $(defs_h) $(proc_utils_h) +p-typeprint.o: p-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(target_h) \ + $(language_h) $(p_lang_h) $(typeprint_h) $(gdb_string_h) +p-valprint.o: p-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(command_h) $(gdbcmd_h) \ + $(gdbcore_h) $(demangle_h) $(valprint_h) $(typeprint_h) \ + $(language_h) $(target_h) $(annotate_h) $(p_lang_h) $(cp_abi_h) +regcache.o: regcache.c $(defs_h) $(inferior_h) $(target_h) $(gdbarch_h) \ + $(gdbcmd_h) $(regcache_h) $(reggroups_h) $(gdb_assert_h) \ + $(gdb_string_h) $(gdbcmd_h) +reggroups.o: reggroups.c $(defs_h) $(reggroups_h) $(gdbtypes_h) \ + $(gdb_assert_h) $(regcache_h) $(command_h) $(gdbcmd_h) +remote.o: remote.c $(defs_h) $(gdb_string_h) $(inferior_h) $(bfd_h) \ + $(symfile_h) $(target_h) $(gdbcmd_h) $(objfiles_h) $(gdb_stabs_h) \ + $(gdbthread_h) $(remote_h) $(regcache_h) $(value_h) $(gdb_assert_h) \ + $(event_loop_h) $(event_top_h) $(inf_loop_h) $(serial_h) \ + $(gdbcore_h) $(remote_fileio_h) +remote-e7000.o: remote-e7000.c $(defs_h) $(gdbcore_h) $(gdbarch_h) \ + $(inferior_h) $(target_h) $(value_h) $(command_h) $(gdb_string_h) \ + $(gdbcmd_h) $(serial_h) $(remote_utils_h) $(symfile_h) $(regcache_h) +remote-est.o: remote-est.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(m68k_tdep_h) +remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(remote_h) $(gdb_fileio_h) $(gdb_wait_h) $(gdb_stat_h) \ + $(remote_fileio_h) +remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) +remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \ + $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h) +remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \ + $(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdb_stat_h) $(regcache_h) $(mips_tdep_h) +remote-rdi.o: remote-rdi.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(breakpoint_h) $(completer_h) $(regcache_h) $(arm_tdep_h) \ + $(rdi_share_ardi_h) $(rdi_share_adp_h) $(rdi_share_hsys_h) +remote-rdp.o: remote-rdp.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_callback_h) $(command_h) $(symfile_h) $(remote_utils_h) \ + $(gdb_string_h) $(gdbcore_h) $(regcache_h) $(serial_h) $(arm_tdep_h) +remote-sds.o: remote-sds.c $(defs_h) $(gdb_string_h) $(frame_h) \ + $(inferior_h) $(bfd_h) $(symfile_h) $(target_h) $(gdbcmd_h) \ + $(objfiles_h) $(gdb_stabs_h) $(gdbthread_h) $(gdbcore_h) \ + $(regcache_h) $(serial_h) +remote-sim.o: remote-sim.c $(defs_h) $(inferior_h) $(value_h) \ + $(gdb_string_h) $(terminal_h) $(target_h) $(gdbcore_h) \ + $(gdb_callback_h) $(gdb_remote_sim_h) $(remote_utils_h) $(command_h) \ + $(regcache_h) $(gdb_assert_h) $(sim_regno_h) $(arch_utils_h) +remote-st.o: remote-st.c $(defs_h) $(gdbcore_h) $(target_h) $(gdb_string_h) \ + $(serial_h) $(regcache_h) +remote-utils.o: remote-utils.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \ + $(target_h) $(serial_h) $(gdbcore_h) $(inferior_h) $(remote_utils_h) \ + $(regcache_h) +remote-vx68.o: remote-vx68.c $(defs_h) $(vx_share_regPacket_h) $(frame_h) \ + $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) $(symtab_h) \ + $(symfile_h) $(regcache_h) $(gdb_string_h) $(vx_share_ptrace_h) \ + $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) \ + $(vx_share_dbgRpcLib_h) +remote-vx.o: remote-vx.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(symtab_h) $(complaints_h) $(gdbcmd_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(gdb_stabs_h) $(regcache_h) \ + $(gdb_string_h) $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) \ + $(vx_share_xdr_ld_h) $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxmips.o: remote-vxmips.c $(defs_h) $(vx_share_regPacket_h) \ + $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) $(command_h) \ + $(symtab_h) $(symfile_h) $(regcache_h) $(gdb_string_h) \ + $(vx_share_ptrace_h) $(vx_share_xdr_ptrace_h) $(vx_share_xdr_ld_h) \ + $(vx_share_xdr_rdb_h) $(vx_share_dbgRpcLib_h) +remote-vxsparc.o: remote-vxsparc.c $(defs_h) $(regcache_h) $(gdb_string_h) \ + $(sparc_tdep_h) $(vx_share_ptrace_h) $(vx_share_regPacket_h) +rom68k-rom.o: rom68k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(regcache_h) $(value_h) $(m68k_tdep_h) +rs6000-nat.o: rs6000-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(xcoffsolib_h) $(symfile_h) $(objfiles_h) $(libbfd_h) $(bfd_h) \ + $(gdb_stabs_h) $(regcache_h) $(arch_utils_h) $(language_h) \ + $(ppc_tdep_h) $(exec_h) $(gdb_stat_h) +rs6000-tdep.o: rs6000-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \ + $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) $(arch_utils_h) \ + $(regcache_h) $(doublest_h) $(value_h) $(parser_defs_h) $(osabi_h) \ + $(libbfd_h) $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) \ + $(libxcoff_h) $(elf_bfd_h) $(solib_svr4_h) $(ppc_tdep_h) \ + $(gdb_assert_h) $(dis_asm_h) +s390-nat.o: s390-nat.c $(defs_h) $(tm_h) $(regcache_h) $(inferior_h) \ + $(s390_tdep_h) +s390-tdep.o: s390-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) $(inferior_h) \ + $(symtab_h) $(target_h) $(gdbcore_h) $(gdbcmd_h) $(objfiles_h) \ + $(tm_h) $(__bfd_bfd_h) $(floatformat_h) $(regcache_h) \ + $(trad_frame_h) $(frame_base_h) $(frame_unwind_h) $(dwarf2_frame_h) \ + $(reggroups_h) $(regset_h) $(value_h) $(gdb_assert_h) $(dis_asm_h) \ + $(solib_svr4_h) $(s390_tdep_h) +scm-exp.o: scm-exp.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) +scm-lang.o: scm-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \ + $(parser_defs_h) $(language_h) $(value_h) $(c_lang_h) $(scm_lang_h) \ + $(scm_tags_h) $(source_h) $(gdb_string_h) $(gdbcore_h) $(infcall_h) +scm-valprint.o: scm-valprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(parser_defs_h) $(language_h) $(value_h) \ + $(scm_lang_h) $(valprint_h) $(gdbcore_h) +sentinel-frame.o: sentinel-frame.c $(defs_h) $(regcache_h) \ + $(sentinel_frame_h) $(inferior_h) $(frame_unwind_h) +ser-e7kpc.o: ser-e7kpc.c $(defs_h) $(serial_h) $(gdb_string_h) +ser-go32.o: ser-go32.c $(defs_h) $(gdbcmd_h) $(serial_h) $(gdb_string_h) +serial.o: serial.c $(defs_h) $(serial_h) $(gdb_string_h) $(gdbcmd_h) +ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_vfork_h) \ + $(gdb_string_h) +ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_unix_h) $(gdb_string_h) +ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \ + $(gdb_string_h) $(event_loop_h) +sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \ + $(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \ + $(sh_tdep_h) +sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(objfiles_h) \ + $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \ + $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \ + $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \ + $(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \ + $(shnbsd_tdep_h) +sh-stub.o: sh-stub.c +sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \ + $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \ + $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \ + $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \ + $(elf_sh_h) $(gdb_sim_sh_h) +solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \ + $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \ + $(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \ + $(environ_h) $(language_h) $(gdbcmd_h) $(solist_h) +solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \ + $(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \ + $(completer_h) $(filenames_h) $(exec_h) $(solist_h) $(readline_h) +solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \ + $(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) +solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h) +solib-osf.o: solib-osf.c $(defs_h) $(gdb_string_h) $(bfd_h) $(symtab_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(inferior_h) $(solist_h) +solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(gdbcore_h) $(inferior_h) $(solist_h) \ + $(bcache_h) $(regcache_h) +solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \ + $(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \ + $(bfd_target_h) $(exec_h) +sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \ + $(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \ + $(symfile_h) $(gdb_string_h) $(gregset_h) +somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \ + $(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h) +somsolib.o: somsolib.c $(defs_h) $(frame_h) $(bfd_h) $(som_h) $(libhppa_h) \ + $(gdbcore_h) $(symtab_h) $(breakpoint_h) $(symfile_h) $(objfiles_h) \ + $(inferior_h) $(gdb_stabs_h) $(gdb_stat_h) $(gdbcmd_h) $(language_h) \ + $(regcache_h) $(gdb_assert_h) $(exec_h) +source.o: source.c $(defs_h) $(symtab_h) $(expression_h) $(language_h) \ + $(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \ + $(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \ + $(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \ + $(filenames_h) $(completer_h) $(ui_out_h) $(readline_h) +sparc64fbsd-nat.o: sparc64fbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64fbsd-tdep.o: sparc64fbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc64-linux-nat.o: sparc64-linux-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64-linux-tdep.o: sparc64-linux-tdep.c $(defs_h) $(gdbarch_h) $(osabi_h) \ + $(solib_svr4_h) $(sparc64_tdep_h) +sparc64-nat.o: sparc64-nat.c $(defs_h) $(gdbarch_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-nat.o: sparc64nbsd-nat.c $(defs_h) $(sparc64_tdep_h) \ + $(sparc_nat_h) +sparc64nbsd-tdep.o: sparc64nbsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(symtab_h) $(solib_svr4_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64obsd-tdep.o: sparc64obsd-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(regset_h) $(symtab_h) $(solib_svr4_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) $(nbsd_tdep_h) +sparc64-sol2-tdep.o: sparc64-sol2-tdep.c $(defs_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc64_tdep_h) +sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \ + $(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \ + $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) $(osabi_h) \ + $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc64_tdep_h) +sparc-linux-tdep.o: sparc-linux-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbarch_h) $(gdbcore_h) $(osabi_h) $(regcache_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(regcache_h) $(target_h) \ + $(gdb_assert_h) $(gdb_string_h) $(gdb_wait_h) $(sparc_tdep_h) \ + $(sparc_nat_h) +sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(sparc_tdep_h) $(sparc_nat_h) +sparcnbsd-tdep.o: sparcnbsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(gdbcore_h) $(osabi_h) $(regcache_h) $(regset_h) \ + $(solib_svr4_h) $(symtab_h) $(trad_frame_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparcobsd-tdep.o: sparcobsd-tdep.c $(defs_h) $(floatformat_h) $(frame_h) \ + $(frame_unwind_h) $(osabi_h) $(solib_svr4_h) $(symtab_h) \ + $(trad_frame_h) $(gdb_assert_h) $(sparc_tdep_h) $(nbsd_tdep_h) +sparc-sol2-nat.o: sparc-sol2-nat.c $(defs_h) $(regcache_h) $(gregset_h) \ + $(sparc_tdep_h) $(sparc64_tdep_h) +sparc-sol2-tdep.o: sparc-sol2-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \ + $(gdbcore_h) $(symtab_h) $(objfiles_h) $(osabi_h) $(regcache_h) \ + $(target_h) $(trad_frame_h) $(gdb_assert_h) $(gdb_string_h) \ + $(sparc_tdep_h) +sparc-stub.o: sparc-stub.c +sparc-tdep.o: sparc-tdep.c $(defs_h) $(arch_utils_h) $(dis_asm_h) \ + $(floatformat_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \ + $(gdbcore_h) $(gdbtypes_h) $(inferior_h) $(symtab_h) $(objfiles_h) \ + $(osabi_h) $(regcache_h) $(target_h) $(value_h) $(gdb_assert_h) \ + $(gdb_string_h) $(sparc_tdep_h) +stabsread.o: stabsread.c $(defs_h) $(gdb_string_h) $(bfd_h) $(gdb_obstack_h) \ + $(symtab_h) $(gdbtypes_h) $(expression_h) $(symfile_h) $(objfiles_h) \ + $(aout_stab_gnu_h) $(libaout_h) $(aout_aout64_h) $(gdb_stabs_h) \ + $(buildsym_h) $(complaints_h) $(demangle_h) $(language_h) \ + $(doublest_h) $(cp_abi_h) $(cp_support_h) $(stabsread_h) +stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \ + $(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \ + $(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \ + $(gdb_assert_h) $(dictionary_h) $(reggroups_h) $(regcache_h) +standalone.o: standalone.c $(gdb_stat_h) $(defs_h) $(symtab_h) $(frame_h) \ + $(inferior_h) $(gdb_wait_h) +std-regs.o: std-regs.c $(defs_h) $(user_regs_h) $(frame_h) $(gdbtypes_h) \ + $(value_h) $(gdb_string_h) +stop-gdb.o: stop-gdb.c $(defs_h) +sun3-nat.o: sun3-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) +symfile.o: symfile.c $(defs_h) $(bfdlink_h) $(symtab_h) $(gdbtypes_h) \ + $(gdbcore_h) $(frame_h) $(target_h) $(value_h) $(symfile_h) \ + $(objfiles_h) $(source_h) $(gdbcmd_h) $(breakpoint_h) $(language_h) \ + $(complaints_h) $(demangle_h) $(inferior_h) $(filenames_h) \ + $(gdb_stabs_h) $(gdb_obstack_h) $(completer_h) $(bcache_h) \ + $(hashtab_h) $(readline_h) $(gdb_assert_h) $(block_h) \ + $(gdb_string_h) $(gdb_stat_h) +symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \ + $(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \ + $(gdb_obstack_h) $(language_h) $(bcache_h) $(block_h) $(gdb_regex_h) \ + $(dictionary_h) $(gdb_string_h) +symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \ + $(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \ + $(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \ + $(language_h) $(demangle_h) $(inferior_h) $(linespec_h) $(source_h) \ + $(filenames_h) $(objc_lang_h) $(hashtab_h) $(gdb_obstack_h) \ + $(block_h) $(dictionary_h) $(gdb_string_h) $(gdb_stat_h) $(cp_abi_h) +target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \ + $(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \ + $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) $(gdbcore_h) +thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \ + $(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \ + $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h) +thread-db.o: thread-db.c $(defs_h) $(gdb_assert_h) $(gdb_proc_service_h) \ + $(gdb_thread_db_h) $(bfd_h) $(gdbthread_h) $(inferior_h) \ + $(symfile_h) $(objfiles_h) $(target_h) $(regcache_h) $(solib_svr4_h) +top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \ + $(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \ + $(inferior_h) $(target_h) $(breakpoint_h) $(gdbtypes_h) \ + $(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \ + $(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \ + $(gdb_assert_h) $(readline_h) $(readline_history_h) $(event_top_h) \ + $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) $(cli_out_h) +tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \ + $(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \ + $(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \ + $(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) \ + $(block_h) $(dictionary_h) $(ax_h) $(ax_gdb_h) $(readline_h) \ + $(readline_history_h) +trad-frame.o: trad-frame.c $(defs_h) $(frame_h) $(trad_frame_h) \ + $(regcache_h) +typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \ + $(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \ + $(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(typeprint_h) \ + $(gdb_string_h) +ui-file.o: ui-file.c $(defs_h) $(ui_file_h) $(gdb_string_h) +ui-out.o: ui-out.c $(defs_h) $(gdb_string_h) $(expression_h) $(language_h) \ + $(ui_out_h) $(gdb_assert_h) +user-regs.o: user-regs.c $(defs_h) $(user_regs_h) $(gdbtypes_h) \ + $(gdb_string_h) $(gdb_assert_h) $(frame_h) +utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \ + $(tui_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) $(demangle_h) \ + $(expression_h) $(language_h) $(charset_h) $(annotate_h) \ + $(filenames_h) $(inferior_h) $(readline_h) +uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \ + $(regcache_h) $(gregset_h) +v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \ + $(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \ + $(gdbcore_h) $(value_h) $(command_h) $(regcache_h) +v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) $(objfiles_h) \ + $(arch_utils_h) $(regcache_h) $(symtab_h) $(dis_asm_h) +valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \ + $(expression_h) $(target_h) $(language_h) $(gdb_string_h) \ + $(doublest_h) $(infcall_h) +valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \ + $(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \ + $(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \ + $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \ + $(cp_support_h) +valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \ + $(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h) +values.o: values.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ + $(value_h) $(gdbcore_h) $(command_h) $(gdbcmd_h) $(target_h) \ + $(language_h) $(scm_lang_h) $(demangle_h) $(doublest_h) \ + $(gdb_assert_h) $(regcache_h) $(block_h) +varobj.o: varobj.c $(defs_h) $(value_h) $(expression_h) $(frame_h) \ + $(language_h) $(wrapper_h) $(gdbcmd_h) $(gdb_string_h) $(varobj_h) +vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \ + $(inferior_h) $(regcache_h) $(frame_h) $(value_h) $(arch_utils_h) \ + $(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h) +win32-nat.o: win32-nat.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \ + $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) $(top_h) \ + $(buildsym_h) $(symfile_h) $(objfiles_h) $(gdb_string_h) \ + $(gdbthread_h) $(gdbcmd_h) $(exec_h) $(i386_tdep_h) $(i387_tdep_h) +wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \ + $(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \ + $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \ + $(regcache_h) $(mips_tdep_h) +wince-stub.o: wince-stub.c $(wince_stub_h) +wrapper.o: wrapper.c $(defs_h) $(value_h) $(wrapper_h) +xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \ + $(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \ + $(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \ + $(objfiles_h) $(buildsym_h) $(stabsread_h) $(expression_h) \ + $(complaints_h) $(gdb_stabs_h) $(aout_stab_gnu_h) +xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \ + $(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h) +xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h) +xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \ + $(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) \ + $(dis_asm_h) + +# +# gdb/cli/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(defs_h) $(readline_h) \ + $(readline_tilde_h) $(completer_h) $(target_h) $(gdb_wait_h) \ + $(gdb_regex_h) $(gdb_string_h) $(gdb_vfork_h) $(linespec_h) \ + $(expression_h) $(frame_h) $(value_h) $(language_h) $(filenames_h) \ + $(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \ + $(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \ + $(tui_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c +cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \ + $(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \ + $(cli_decode_h) $(tui_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c +cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \ + $(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \ + $(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c +cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \ + $(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c +cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c +cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \ + $(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \ + $(cli_script_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c +cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \ + $(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \ + $(cli_setshow_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c +cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c + +# +# GDBTK sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +all-gdbtk: insight$(EXEEXT) + +install-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir); \ + $(INSTALL_PROGRAM) insight$(EXEEXT) \ + $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY) ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION) ; \ + $(INSTALL_DATA) $(srcdir)/gdbtk/plugins/plugins.tcl \ + $(DESTDIR)$(libdir)/insight$(GDBTK_VERSION)/plugins.tcl ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/images2 ; \ + $(SHELL) $(srcdir)/../mkinstalldirs \ + $(DESTDIR)$(GDBTK_LIBRARY)/help \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/images \ + $(DESTDIR)$(GDBTK_LIBRARY)/help/trace ; \ + cd $(srcdir)/gdbtk/library ; \ + for i in *.tcl *.itcl *.ith *.itb images/*.gif images2/*.gif images/icons.txt images2/icons.txt tclIndex help/*.html help/trace/*.html help/trace/index.toc help/images/*.gif help/images/*.png; \ + do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(GDBTK_LIBRARY)/$$i ; \ + done ; + +uninstall-gdbtk: + transformed_name=`t='$(program_transform_name)'; \ + echo insight | sed -e $$t` ; \ + if test "x$$transformed_name" = x; then \ + transformed_name=insight ; \ + else \ + true ; \ + fi ; \ + rm -f $(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \ + rm -rf $(DESTDIR)$(GDBTK_LIBRARY) + +clean-gdbtk: + rm -f insight$(EXEEXT) + +# Removing the old gdb first works better if it is running, at least on SunOS. +insight$(EXEEXT): gdbtk-main.o libgdb.a $(ADD_DEPS) \ + $(CDEPS) $(TDEPLIBS) + rm -f insight$(EXEEXT) + $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \ + -o insight$(EXEEXT) gdbtk-main.o libgdb.a \ + $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES) + +gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico + $(WINDRES) --include $(srcdir)/gdbtk $(srcdir)/gdbtk/gdb.rc gdbres.o + +gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) $(top_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(ITK_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" -DSRC_DIR=\"$(GDBTK_SRC_DIR)\" + +gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(breakpoint_h) $(tracepoint_h) \ + $(symfile_h) $(symtab_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(inferior_h) $(source_h) $(symfile_h) $(objfiles_h) \ + $(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \ + $(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \ + $(dis_asm_h) $(gdbcmd_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(defs_h) \ + $(symtab_h) $(inferior_h) $(command_h) \ + $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \ + $(tracepoint_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c \ + $(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \ + $(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \ + $(srcdir)/gdbtk/generic/gdbtk.h + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \ + $(srcdir)/gdbtk/generic/gdbtk-interp.c + +gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(defs_h) $(frame_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + $(srcdir)/gdbtk/generic/gdbtk.h $(srcdir)/gdbtk/generic/gdbtk-cmds.h \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \ + $(block_h) $(dictionary_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \ + $(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \ + -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" + +gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \ + $(srcdir)/gdbtk/generic/gdbtk.h \ + $(defs_h) $(value_h) $(varobj_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \ + $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-varobj.c + +gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.h \ + $(defs_h) $(frame_h) $(value_h) + $(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\ + $(srcdir)/gdbtk/generic/gdbtk-wrapper.c + +# +# gdb/mi/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \ + $(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \ + $(mi_getopt_h) $(gdb_events_h) $(gdb_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c +mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \ + $(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c +mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \ + $(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \ + $(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \ + $(gdb_stat_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c +mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \ + $(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c +mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c +mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \ + $(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \ + $(stack_h) $(dictionary_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c +mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \ + $(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c +mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c +mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c +mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \ + $(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \ + $(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c +mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \ + $(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \ + $(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \ + $(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \ + $(gdb_h) $(frame_h) $(mi_main_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c +mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c +mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c +mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \ + $(symtab_h) $(ui_out_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c + +# +# rdi-share sub-directory +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the mi directory. + +rdi-share/libangsd.a: force + @dir=rdi-share; \ + if [ -f ./$${dir}/Makefile ] ; then \ + r=`pwd`; export r; \ + srcroot=`cd $(srcdir); pwd`; export srcroot; \ + (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ + else \ + true; \ + fi + +# +# gdb/signals/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \ + $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c + +# +# gdb/tui/ dependencies +# +# Need to explicitly specify the compile rule as make will do nothing +# or try to compile the object file into the sub-directory. + +tui.o: $(srcdir)/tui/tui.c $(defs_h) $(gdbcmd_h) $(tui_h) $(tui_hooks_h) \ + $(tui_data_h) $(tui_layout_h) $(tui_io_h) $(tui_regs_h) \ + $(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \ + $(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \ + $(source_h) $(gdb_curses_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c +tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c +tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c +tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \ + $(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c +tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \ + $(tui_io_h) $(tui_h) $(gdb_string_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c +tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \ + $(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \ + $(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \ + $(breakpoint_h) $(gdb_events_h) $(ui_out_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_hooks_h) $(tui_data_h) $(tui_layout_h) $(tui_io_h) \ + $(tui_regs_h) $(tui_win_h) $(tui_stack_h) $(tui_windata_h) \ + $(tui_winsource_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c +tui-interp.o: $(srcdir)/tui/tui-interp.c $(defs_h) $(interps_h) $(top_h) \ + $(event_top_h) $(event_loop_h) $(ui_out_h) $(cli_out_h) \ + $(tui_data_h) $(readline_h) $(tui_win_h) $(tui_h) $(tui_io_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-interp.c +tui-io.o: $(srcdir)/tui/tui-io.c $(defs_h) $(terminal_h) $(target_h) \ + $(event_loop_h) $(event_top_h) $(command_h) $(top_h) $(readline_h) \ + $(tui_h) $(tui_data_h) $(tui_io_h) $(tui_command_h) $(tui_win_h) \ + $(tui_wingeneral_h) $(tui_file_h) $(ui_out_h) $(cli_out_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-io.c +tui-layout.o: $(srcdir)/tui/tui-layout.c $(defs_h) $(command_h) $(symtab_h) \ + $(frame_h) $(source_h) $(tui_h) $(tui_data_h) $(tui_windata_h) \ + $(tui_wingeneral_h) $(tui_stack_h) $(tui_regs_h) $(tui_win_h) \ + $(tui_winsource_h) $(tui_disasm_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-layout.c +tui-main.o: $(srcdir)/tui/tui-main.c $(defs_h) $(main_h) $(gdb_string_h) \ + $(interps_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-main.c +tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \ + $(gdb_string_h) $(gdb_assert_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-out.c +tui-regs.o: $(srcdir)/tui/tui-regs.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(frame_h) $(regcache_h) \ + $(inferior_h) $(target_h) $(gdb_string_h) $(tui_layout_h) \ + $(tui_win_h) $(tui_windata_h) $(tui_wingeneral_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-regs.c +tui-source.o: $(srcdir)/tui/tui-source.c $(defs_h) $(symtab_h) $(frame_h) \ + $(breakpoint_h) $(source_h) $(symtab_h) $(tui_h) $(tui_data_h) \ + $(tui_stack_h) $(tui_winsource_h) $(tui_source_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-source.c +tui-stack.o: $(srcdir)/tui/tui-stack.c $(defs_h) $(symtab_h) $(breakpoint_h) \ + $(frame_h) $(command_h) $(inferior_h) $(target_h) $(top_h) \ + $(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_stack_h) \ + $(tui_wingeneral_h) $(tui_source_h) $(tui_winsource_h) $(tui_file_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-stack.c +tui-win.o: $(srcdir)/tui/tui-win.c $(defs_h) $(command_h) $(symtab_h) \ + $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(top_h) $(source_h) \ + $(tui_h) $(tui_data_h) $(tui_wingeneral_h) $(tui_stack_h) \ + $(tui_regs_h) $(tui_disasm_h) $(tui_source_h) $(tui_winsource_h) \ + $(tui_windata_h) $(gdb_curses_h) $(gdb_string_h) $(readline_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-win.c +tui-windata.o: $(srcdir)/tui/tui-windata.c $(defs_h) $(tui_h) $(tui_data_h) \ + $(tui_wingeneral_h) $(tui_regs_h) $(gdb_string_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-windata.c +tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c $(defs_h) $(tui_h) \ + $(tui_data_h) $(tui_wingeneral_h) $(tui_win_h) $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-wingeneral.c +tui-winsource.o: $(srcdir)/tui/tui-winsource.c $(defs_h) $(symtab_h) \ + $(frame_h) $(breakpoint_h) $(value_h) $(source_h) $(tui_h) \ + $(tui_data_h) $(tui_stack_h) $(tui_win_h) $(tui_wingeneral_h) \ + $(tui_winsource_h) $(tui_source_h) $(tui_disasm_h) $(gdb_string_h) \ + $(gdb_curses_h) + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-winsource.c + +# +# vx-share sub-directory +# + +xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ld.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c + +xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_ptrace.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c + +xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \ + vx-share/vxWorks.h vx-share/xdr_rdb.h + $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c + +### end of the gdb Makefile.in. diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ppc-linux-tdep.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,1116 @@ +/* Target-dependent code for GDB, the GNU debugger. + + Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, + 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "frame.h" +#include "inferior.h" +#include "symtab.h" +#include "target.h" +#include "gdbcore.h" +#include "gdbcmd.h" +#include "symfile.h" +#include "objfiles.h" +#include "regcache.h" +#include "value.h" +#include "osabi.h" + +#include "solib-svr4.h" +#include "ppc-tdep.h" + +/* The following instructions are used in the signal trampoline code + on GNU/Linux PPC. The kernel used to use magic syscalls 0x6666 and + 0x7777 but now uses the sigreturn syscalls. We check for both. */ +#define INSTR_LI_R0_0x6666 0x38006666 +#define INSTR_LI_R0_0x7777 0x38007777 +#define INSTR_LI_R0_NR_sigreturn 0x38000077 +#define INSTR_LI_R0_NR_rt_sigreturn 0x380000AC + +#define INSTR_SC 0x44000002 + +/* Since the *-tdep.c files are platform independent (i.e, they may be + used to build cross platform debuggers), we can't include system + headers. Therefore, details concerning the sigcontext structure + must be painstakingly rerecorded. What's worse, if these details + ever change in the header files, they'll have to be changed here + as well. */ + +/* __SIGNAL_FRAMESIZE from */ +#define PPC_LINUX_SIGNAL_FRAMESIZE 64 + +/* From , offsetof(struct sigcontext_struct, regs) == 0x1c */ +#define PPC_LINUX_REGS_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x1c) + +/* From , + offsetof(struct sigcontext_struct, handler) == 0x14 */ +#define PPC_LINUX_HANDLER_PTR_OFFSET (PPC_LINUX_SIGNAL_FRAMESIZE + 0x14) + +/* From , values for PT_NIP, PT_R1, and PT_LNK */ +#define PPC_LINUX_PT_R0 0 +#define PPC_LINUX_PT_R1 1 +#define PPC_LINUX_PT_R2 2 +#define PPC_LINUX_PT_R3 3 +#define PPC_LINUX_PT_R4 4 +#define PPC_LINUX_PT_R5 5 +#define PPC_LINUX_PT_R6 6 +#define PPC_LINUX_PT_R7 7 +#define PPC_LINUX_PT_R8 8 +#define PPC_LINUX_PT_R9 9 +#define PPC_LINUX_PT_R10 10 +#define PPC_LINUX_PT_R11 11 +#define PPC_LINUX_PT_R12 12 +#define PPC_LINUX_PT_R13 13 +#define PPC_LINUX_PT_R14 14 +#define PPC_LINUX_PT_R15 15 +#define PPC_LINUX_PT_R16 16 +#define PPC_LINUX_PT_R17 17 +#define PPC_LINUX_PT_R18 18 +#define PPC_LINUX_PT_R19 19 +#define PPC_LINUX_PT_R20 20 +#define PPC_LINUX_PT_R21 21 +#define PPC_LINUX_PT_R22 22 +#define PPC_LINUX_PT_R23 23 +#define PPC_LINUX_PT_R24 24 +#define PPC_LINUX_PT_R25 25 +#define PPC_LINUX_PT_R26 26 +#define PPC_LINUX_PT_R27 27 +#define PPC_LINUX_PT_R28 28 +#define PPC_LINUX_PT_R29 29 +#define PPC_LINUX_PT_R30 30 +#define PPC_LINUX_PT_R31 31 +#define PPC_LINUX_PT_NIP 32 +#define PPC_LINUX_PT_MSR 33 +#define PPC_LINUX_PT_CTR 35 +#define PPC_LINUX_PT_LNK 36 +#define PPC_LINUX_PT_XER 37 +#define PPC_LINUX_PT_CCR 38 +#define PPC_LINUX_PT_MQ 39 +#define PPC_LINUX_PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ +#define PPC_LINUX_PT_FPR31 (PPC_LINUX_PT_FPR0 + 2*31) +#define PPC_LINUX_PT_FPSCR (PPC_LINUX_PT_FPR0 + 2*32 + 1) + +static int ppc_linux_at_sigtramp_return_path (CORE_ADDR pc); + +/* Determine if pc is in a signal trampoline... + + Ha! That's not what this does at all. wait_for_inferior in + infrun.c calls PC_IN_SIGTRAMP in order to detect entry into a + signal trampoline just after delivery of a signal. But on + GNU/Linux, signal trampolines are used for the return path only. + The kernel sets things up so that the signal handler is called + directly. + + If we use in_sigtramp2() in place of in_sigtramp() (see below) + we'll (often) end up with stop_pc in the trampoline and prev_pc in + the (now exited) handler. The code there will cause a temporary + breakpoint to be set on prev_pc which is not very likely to get hit + again. + + If this is confusing, think of it this way... the code in + wait_for_inferior() needs to be able to detect entry into a signal + trampoline just after a signal is delivered, not after the handler + has been run. + + So, we define in_sigtramp() below to return 1 if the following is + true: + + 1) The previous frame is a real signal trampoline. + + - and - + + 2) pc is at the first or second instruction of the corresponding + handler. + + Why the second instruction? It seems that wait_for_inferior() + never sees the first instruction when single stepping. When a + signal is delivered while stepping, the next instruction that + would've been stepped over isn't, instead a signal is delivered and + the first instruction of the handler is stepped over instead. That + puts us on the second instruction. (I added the test for the + first instruction long after the fact, just in case the observed + behavior is ever fixed.) + + PC_IN_SIGTRAMP is called from blockframe.c as well in order to set + the frame's type (if a SIGTRAMP_FRAME). Because of our strange + definition of in_sigtramp below, we can't rely on the frame's type + getting set correctly from within blockframe.c. This is why we + take pains to set it in init_extra_frame_info(). + + NOTE: cagney/2002-11-10: I suspect the real problem here is that + the get_prev_frame() only initializes the frame's type after the + call to INIT_FRAME_INFO. get_prev_frame() should be fixed, this + code shouldn't be working its way around a bug :-(. */ + +int +ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name) +{ + CORE_ADDR lr; + CORE_ADDR sp; + CORE_ADDR tramp_sp; + char buf[4]; + CORE_ADDR handler; + + lr = read_register (gdbarch_tdep (current_gdbarch)->ppc_lr_regnum); + if (!ppc_linux_at_sigtramp_return_path (lr)) + return 0; + + sp = read_register (SP_REGNUM); + + if (target_read_memory (sp, buf, sizeof (buf)) != 0) + return 0; + + tramp_sp = extract_unsigned_integer (buf, 4); + + if (target_read_memory (tramp_sp + PPC_LINUX_HANDLER_PTR_OFFSET, buf, + sizeof (buf)) != 0) + return 0; + + handler = extract_unsigned_integer (buf, 4); + + return (pc == handler || pc == handler + 4); +} + +static int +insn_is_sigreturn (unsigned long pcinsn) +{ + switch(pcinsn) + { + case INSTR_LI_R0_0x6666: + case INSTR_LI_R0_0x7777: + case INSTR_LI_R0_NR_sigreturn: + case INSTR_LI_R0_NR_rt_sigreturn: + return 1; + default: + return 0; + } +} + +/* + * The signal handler trampoline is on the stack and consists of exactly + * two instructions. The easiest and most accurate way of determining + * whether the pc is in one of these trampolines is by inspecting the + * instructions. It'd be faster though if we could find a way to do this + * via some simple address comparisons. + */ +static int +ppc_linux_at_sigtramp_return_path (CORE_ADDR pc) +{ + char buf[12]; + unsigned long pcinsn; + if (target_read_memory (pc - 4, buf, sizeof (buf)) != 0) + return 0; + + /* extract the instruction at the pc */ + pcinsn = extract_unsigned_integer (buf + 4, 4); + + return ( + (insn_is_sigreturn (pcinsn) + && extract_unsigned_integer (buf + 8, 4) == INSTR_SC) + || + (pcinsn == INSTR_SC + && insn_is_sigreturn (extract_unsigned_integer (buf, 4)))); +} + +static CORE_ADDR +ppc_linux_skip_trampoline_code (CORE_ADDR pc) +{ + char buf[4]; + struct obj_section *sect; + struct objfile *objfile; + unsigned long insn; + CORE_ADDR plt_start = 0; + CORE_ADDR symtab = 0; + CORE_ADDR strtab = 0; + int num_slots = -1; + int reloc_index = -1; + CORE_ADDR plt_table; + CORE_ADDR reloc; + CORE_ADDR sym; + long symidx; + char symname[1024]; + struct minimal_symbol *msymbol; + + /* Find the section pc is in; return if not in .plt */ + sect = find_pc_section (pc); + if (!sect || strcmp (sect->the_bfd_section->name, ".plt") != 0) + return 0; + + objfile = sect->objfile; + + /* Pick up the instruction at pc. It had better be of the + form + li r11, IDX + + where IDX is an index into the plt_table. */ + + if (target_read_memory (pc, buf, 4) != 0) + return 0; + insn = extract_unsigned_integer (buf, 4); + + if ((insn & 0xffff0000) != 0x39600000 /* li r11, VAL */ ) + return 0; + + reloc_index = (insn << 16) >> 16; + + /* Find the objfile that pc is in and obtain the information + necessary for finding the symbol name. */ + for (sect = objfile->sections; sect < objfile->sections_end; ++sect) + { + const char *secname = sect->the_bfd_section->name; + if (strcmp (secname, ".plt") == 0) + plt_start = sect->addr; + else if (strcmp (secname, ".rela.plt") == 0) + num_slots = ((int) sect->endaddr - (int) sect->addr) / 12; + else if (strcmp (secname, ".dynsym") == 0) + symtab = sect->addr; + else if (strcmp (secname, ".dynstr") == 0) + strtab = sect->addr; + } + + /* Make sure we have all the information we need. */ + if (plt_start == 0 || num_slots == -1 || symtab == 0 || strtab == 0) + return 0; + + /* Compute the value of the plt table */ + plt_table = plt_start + 72 + 8 * num_slots; + + /* Get address of the relocation entry (Elf32_Rela) */ + if (target_read_memory (plt_table + reloc_index, buf, 4) != 0) + return 0; + reloc = extract_unsigned_integer (buf, 4); + + sect = find_pc_section (reloc); + if (!sect) + return 0; + + if (strcmp (sect->the_bfd_section->name, ".text") == 0) + return reloc; + + /* Now get the r_info field which is the relocation type and symbol + index. */ + if (target_read_memory (reloc + 4, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Shift out the relocation type leaving just the symbol index */ + /* symidx = ELF32_R_SYM(symidx); */ + symidx = symidx >> 8; + + /* compute the address of the symbol */ + sym = symtab + symidx * 4; + + /* Fetch the string table index */ + if (target_read_memory (sym, buf, 4) != 0) + return 0; + symidx = extract_unsigned_integer (buf, 4); + + /* Fetch the string; we don't know how long it is. Is it possible + that the following will fail because we're trying to fetch too + much? */ + if (target_read_memory (strtab + symidx, symname, sizeof (symname)) != 0) + return 0; + + /* This might not work right if we have multiple symbols with the + same name; the only way to really get it right is to perform + the same sort of lookup as the dynamic linker. */ + msymbol = lookup_minimal_symbol_text (symname, NULL); + if (!msymbol) + return 0; + + return SYMBOL_VALUE_ADDRESS (msymbol); +} + +/* The rs6000 version of FRAME_SAVED_PC will almost work for us. The + signal handler details are different, so we'll handle those here + and call the rs6000 version to do the rest. */ +CORE_ADDR +ppc_linux_frame_saved_pc (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return the NIP in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_NIP, 4); + } + else if (get_next_frame (fi) + && (get_frame_type (get_next_frame (fi)) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr = + read_memory_integer (get_frame_base (get_next_frame (fi)) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + /* return LNK in the regs array */ + return read_memory_integer (regs_addr + 4 * PPC_LINUX_PT_LNK, 4); + } + else + return rs6000_frame_saved_pc (fi); +} + +void +ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *fi) +{ + rs6000_init_extra_frame_info (fromleaf, fi); + + if (get_next_frame (fi) != 0) + { + /* We're called from get_prev_frame_info; check to see if + this is a signal frame by looking to see if the pc points + at trampoline code */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + deprecated_set_frame_type (fi, SIGTRAMP_FRAME); + else + /* FIXME: cagney/2002-11-10: Is this double bogus? What + happens if the frame has previously been marked as a dummy? */ + deprecated_set_frame_type (fi, NORMAL_FRAME); + } +} + +int +ppc_linux_frameless_function_invocation (struct frame_info *fi) +{ + /* We'll find the wrong thing if we let + rs6000_frameless_function_invocation () search for a signal trampoline */ + if (ppc_linux_at_sigtramp_return_path (get_frame_pc (fi))) + return 0; + else + return rs6000_frameless_function_invocation (fi); +} + +void +ppc_linux_frame_init_saved_regs (struct frame_info *fi) +{ + if ((get_frame_type (fi) == SIGTRAMP_FRAME)) + { + CORE_ADDR regs_addr; + int i; + if (deprecated_get_frame_saved_regs (fi)) + return; + + frame_saved_regs_zalloc (fi); + + regs_addr = + read_memory_integer (get_frame_base (fi) + + PPC_LINUX_REGS_PTR_OFFSET, 4); + deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MSR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CCR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_LNK; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] = + regs_addr + 4 * PPC_LINUX_PT_CTR; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] = + regs_addr + 4 * PPC_LINUX_PT_XER; + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] = + regs_addr + 4 * PPC_LINUX_PT_MQ; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] = + regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i; + for (i = 0; i < 32; i++) + deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i; + } + else + rs6000_frame_init_saved_regs (fi); +} + +CORE_ADDR +ppc_linux_frame_chain (struct frame_info *thisframe) +{ + /* Kernel properly constructs the frame chain for the handler */ + if ((get_frame_type (thisframe) == SIGTRAMP_FRAME)) + return read_memory_integer (get_frame_base (thisframe), 4); + else + return rs6000_frame_chain (thisframe); +} + +/* ppc_linux_memory_remove_breakpoints attempts to remove a breakpoint + in much the same fashion as memory_remove_breakpoint in mem-break.c, + but is careful not to write back the previous contents if the code + in question has changed in between inserting the breakpoint and + removing it. + + Here is the problem that we're trying to solve... + + Once upon a time, before introducing this function to remove + breakpoints from the inferior, setting a breakpoint on a shared + library function prior to running the program would not work + properly. In order to understand the problem, it is first + necessary to understand a little bit about dynamic linking on + this platform. + + A call to a shared library function is accomplished via a bl + (branch-and-link) instruction whose branch target is an entry + in the procedure linkage table (PLT). The PLT in the object + file is uninitialized. To gdb, prior to running the program, the + entries in the PLT are all zeros. + + Once the program starts running, the shared libraries are loaded + and the procedure linkage table is initialized, but the entries in + the table are not (necessarily) resolved. Once a function is + actually called, the code in the PLT is hit and the function is + resolved. In order to better illustrate this, an example is in + order; the following example is from the gdb testsuite. + + We start the program shmain. + + [kev@arroyo testsuite]$ ../gdb gdb.base/shmain + [...] + + We place two breakpoints, one on shr1 and the other on main. + + (gdb) b shr1 + Breakpoint 1 at 0x100409d4 + (gdb) b main + Breakpoint 2 at 0x100006a0: file gdb.base/shmain.c, line 44. + + Examine the instruction (and the immediatly following instruction) + upon which the breakpoint was placed. Note that the PLT entry + for shr1 contains zeros. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : .long 0x0 + 0x100409d8 : .long 0x0 + + Now run 'til main. + + (gdb) r + Starting program: gdb.base/shmain + Breakpoint 1 at 0xffaf790: file gdb.base/shr1.c, line 19. + + Breakpoint 2, main () + at gdb.base/shmain.c:44 + 44 g = 1; + + Examine the PLT again. Note that the loading of the shared + library has initialized the PLT to code which loads a constant + (which I think is an index into the GOT) into r11 and then + branchs a short distance to the code which actually does the + resolving. + + (gdb) x/2i 0x100409d4 + 0x100409d4 : li r11,4 + 0x100409d8 : b 0x10040984 + (gdb) c + Continuing. + + Breakpoint 1, shr1 (x=1) + at gdb.base/shr1.c:19 + 19 l = 1; + + Now we've hit the breakpoint at shr1. (The breakpoint was + reset from the PLT entry to the actual shr1 function after the + shared library was loaded.) Note that the PLT entry has been + resolved to contain a branch that takes us directly to shr1. + (The real one, not the PLT entry.) + + (gdb) x/2i 0x100409d4 + 0x100409d4 : b 0xffaf76c + 0x100409d8 : b 0x10040984 + + The thing to note here is that the PLT entry for shr1 has been + changed twice. + + Now the problem should be obvious. GDB places a breakpoint (a + trap instruction) on the zero value of the PLT entry for shr1. + Later on, after the shared library had been loaded and the PLT + initialized, GDB gets a signal indicating this fact and attempts + (as it always does when it stops) to remove all the breakpoints. + + The breakpoint removal was causing the former contents (a zero + word) to be written back to the now initialized PLT entry thus + destroying a portion of the initialization that had occurred only a + short time ago. When execution continued, the zero word would be + executed as an instruction an an illegal instruction trap was + generated instead. (0 is not a legal instruction.) + + The fix for this problem was fairly straightforward. The function + memory_remove_breakpoint from mem-break.c was copied to this file, + modified slightly, and renamed to ppc_linux_memory_remove_breakpoint. + In tm-linux.h, MEMORY_REMOVE_BREAKPOINT is defined to call this new + function. + + The differences between ppc_linux_memory_remove_breakpoint () and + memory_remove_breakpoint () are minor. All that the former does + that the latter does not is check to make sure that the breakpoint + location actually contains a breakpoint (trap instruction) prior + to attempting to write back the old contents. If it does contain + a trap instruction, we allow the old contents to be written back. + Otherwise, we silently do nothing. + + The big question is whether memory_remove_breakpoint () should be + changed to have the same functionality. The downside is that more + traffic is generated for remote targets since we'll have an extra + fetch of a memory word each time a breakpoint is removed. + + For the time being, we'll leave this self-modifying-code-friendly + version in ppc-linux-tdep.c, but it ought to be migrated somewhere + else in the event that some other platform has similar needs with + regard to removing breakpoints in some potentially self modifying + code. */ +int +ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache) +{ + const unsigned char *bp; + int val; + int bplen; + char old_contents[BREAKPOINT_MAX]; + + /* Determine appropriate breakpoint contents and size for this address. */ + bp = BREAKPOINT_FROM_PC (&addr, &bplen); + if (bp == NULL) + error ("Software breakpoints not implemented for this target."); + + val = target_read_memory (addr, old_contents, bplen); + + /* If our breakpoint is no longer at the address, this means that the + program modified the code on us, so it is wrong to put back the + old value */ + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) + val = target_write_memory (addr, contents_cache, bplen); + + return val; +} + +/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather + than the 32 bit SYSV R4 ABI structure return convention - all + structures, no matter their size, are put in memory. Vectors, + which were added later, do get returned in a register though. */ + +static enum return_value_convention +ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype, + struct regcache *regcache, void *readbuf, + const void *writebuf) +{ + if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT + || TYPE_CODE (valtype) == TYPE_CODE_UNION) + && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8) + && TYPE_VECTOR (valtype))) + return RETURN_VALUE_STRUCT_CONVENTION; + else + return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, readbuf, + writebuf); +} + +/* Fetch (and possibly build) an appropriate link_map_offsets + structure for GNU/Linux PPC targets using the struct offsets + defined in link.h (but without actual reference to that file). + + This makes it possible to access GNU/Linux PPC shared libraries + from a GDB that was not built on an GNU/Linux PPC host (for cross + debugging). */ + +struct link_map_offsets * +ppc_linux_svr4_fetch_link_map_offsets (void) +{ + static struct link_map_offsets lmo; + static struct link_map_offsets *lmp = NULL; + + if (lmp == NULL) + { + lmp = &lmo; + + lmo.r_debug_size = 8; /* The actual size is 20 bytes, but + this is all we need. */ + lmo.r_map_offset = 4; + lmo.r_map_size = 4; + + lmo.link_map_size = 20; /* The actual size is 560 bytes, but + this is all we need. */ + lmo.l_addr_offset = 0; + lmo.l_addr_size = 4; + + lmo.l_name_offset = 4; + lmo.l_name_size = 4; + + lmo.l_next_offset = 12; + lmo.l_next_size = 4; + + lmo.l_prev_offset = 16; + lmo.l_prev_size = 4; + } + + return lmp; +} + + +/* Macros for matching instructions. Note that, since all the + operands are masked off before they're or-ed into the instruction, + you can use -1 to make masks. */ + +#define insn_d(opcd, rts, ra, d) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xffff)) + +#define insn_ds(opcd, rts, ra, d, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((ra) & 0x1f) << 16) \ + | ((d) & 0xfffc) \ + | ((xo) & 0x3)) + +#define insn_xfx(opcd, rts, spr, xo) \ + ((((opcd) & 0x3f) << 26) \ + | (((rts) & 0x1f) << 21) \ + | (((spr) & 0x1f) << 16) \ + | (((spr) & 0x3e0) << 6) \ + | (((xo) & 0x3ff) << 1)) + +/* Read a PPC instruction from memory. PPC instructions are always + big-endian, no matter what endianness the program is running in, so + we can't use read_memory_integer or one of its friends here. */ +static unsigned int +read_insn (CORE_ADDR pc) +{ + unsigned char buf[4]; + + read_memory (pc, buf, 4); + return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; +} + + +/* An instruction to match. */ +struct insn_pattern +{ + unsigned int mask; /* mask the insn with this... */ + unsigned int data; /* ...and see if it matches this. */ + int optional; /* If non-zero, this insn may be absent. */ +}; + +/* Return non-zero if the instructions at PC match the series + described in PATTERN, or zero otherwise. PATTERN is an array of + 'struct insn_pattern' objects, terminated by an entry whose mask is + zero. + + When the match is successful, fill INSN[i] with what PATTERN[i] + matched. If PATTERN[i] is optional, and the instruction wasn't + present, set INSN[i] to 0 (which is not a valid PPC instruction). + INSN should have as many elements as PATTERN. Note that, if + PATTERN contains optional instructions which aren't present in + memory, then INSN will have holes, so INSN[i] isn't necessarily the + i'th instruction in memory. */ +static int +insns_match_pattern (CORE_ADDR pc, + struct insn_pattern *pattern, + unsigned int *insn) +{ + int i; + + for (i = 0; pattern[i].mask; i++) + { + insn[i] = read_insn (pc); + if ((insn[i] & pattern[i].mask) == pattern[i].data) + pc += 4; + else if (pattern[i].optional) + insn[i] = 0; + else + return 0; + } + + return 1; +} + + +/* Return the 'd' field of the d-form instruction INSN, properly + sign-extended. */ +static CORE_ADDR +insn_d_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xffff) ^ 0x8000) - 0x8000); +} + + +/* Return the 'ds' field of the ds-form instruction INSN, with the two + zero bits concatenated at the right, and properly + sign-extended. */ +static CORE_ADDR +insn_ds_field (unsigned int insn) +{ + return ((((CORE_ADDR) insn & 0xfffc) ^ 0x8000) - 0x8000); +} + + +/* If DESC is the address of a 64-bit PowerPC GNU/Linux function + descriptor, return the descriptor's entry point. */ +static CORE_ADDR +ppc64_desc_entry_point (CORE_ADDR desc) +{ + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); +} + + +/* Pattern for the standard linkage function. These are built by + build_plt_stub in elf64-ppc.c, whose GLINK argument is always + zero. */ +static struct insn_pattern ppc64_standard_linkage[] = + { + /* addis r12, r2, */ + { insn_d (-1, -1, -1, 0), insn_d (15, 12, 2, 0), 0 }, + + /* std r2, 40(r1) */ + { -1, insn_ds (62, 2, 1, 40, 0), 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* ld r2, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 2, 12, 0, 0), 0 }, + + /* addis r12, r12, 1 */ + { insn_d (-1, -1, -1, -1), insn_d (15, 12, 2, 1), 1 }, + + /* mtctr r11 */ + { insn_xfx (-1, -1, -1, -1), insn_xfx (31, 11, 9, 467), + 0 }, + + /* ld r11, (r12) */ + { insn_ds (-1, -1, -1, 0, -1), insn_ds (58, 11, 12, 0, 0), 0 }, + + /* bctr */ + { -1, 0x4e800420, 0 }, + + { 0, 0, 0 } + }; +#define PPC64_STANDARD_LINKAGE_LEN \ + (sizeof (ppc64_standard_linkage) / sizeof (ppc64_standard_linkage[0])) + + +/* Recognize a 64-bit PowerPC GNU/Linux linkage function --- what GDB + calls a "solib trampoline". */ +static int +ppc64_in_solib_call_trampoline (CORE_ADDR pc, char *name) +{ + /* Detecting solib call trampolines on PPC64 GNU/Linux is a pain. + + It's not specifically solib call trampolines that are the issue. + Any call from one function to another function that uses a + different TOC requires a trampoline, to save the caller's TOC + pointer and then load the callee's TOC. An executable or shared + library may have more than one TOC, so even intra-object calls + may require a trampoline. Since executable and shared libraries + will all have their own distinct TOCs, every inter-object call is + also an inter-TOC call, and requires a trampoline --- so "solib + call trampolines" are just a special case. + + The 64-bit PowerPC GNU/Linux ABI calls these call trampolines + "linkage functions". Since they need to be near the functions + that call them, they all appear in .text, not in any special + section. The .plt section just contains an array of function + descriptors, from which the linkage functions load the callee's + entry point, TOC value, and environment pointer. So + in_plt_section is useless. The linkage functions don't have any + special linker symbols to name them, either. + + The only way I can see to recognize them is to actually look at + their code. They're generated by ppc_build_one_stub and some + other functions in bfd/elf64-ppc.c, so that should show us all + the instruction sequences we need to recognize. */ + unsigned int insn[PPC64_STANDARD_LINKAGE_LEN]; + + return insns_match_pattern (pc, ppc64_standard_linkage, insn); +} + + +/* When the dynamic linker is doing lazy symbol resolution, the first + call to a function in another object will go like this: + + - The user's function calls the linkage function: + + 100007c4: 4b ff fc d5 bl 10000498 + 100007c8: e8 41 00 28 ld r2,40(r1) + + - The linkage function loads the entry point (and other stuff) from + the function descriptor in the PLT, and jumps to it: + + 10000498: 3d 82 00 00 addis r12,r2,0 + 1000049c: f8 41 00 28 std r2,40(r1) + 100004a0: e9 6c 80 98 ld r11,-32616(r12) + 100004a4: e8 4c 80 a0 ld r2,-32608(r12) + 100004a8: 7d 69 03 a6 mtctr r11 + 100004ac: e9 6c 80 a8 ld r11,-32600(r12) + 100004b0: 4e 80 04 20 bctr + + - But since this is the first time that PLT entry has been used, it + sends control to its glink entry. That loads the number of the + PLT entry and jumps to the common glink0 code: + + 10000c98: 38 00 00 00 li r0,0 + 10000c9c: 4b ff ff dc b 10000c78 + + - The common glink0 code then transfers control to the dynamic + linker's fixup code: + + 10000c78: e8 41 00 28 ld r2,40(r1) + 10000c7c: 3d 82 00 00 addis r12,r2,0 + 10000c80: e9 6c 80 80 ld r11,-32640(r12) + 10000c84: e8 4c 80 88 ld r2,-32632(r12) + 10000c88: 7d 69 03 a6 mtctr r11 + 10000c8c: e9 6c 80 90 ld r11,-32624(r12) + 10000c90: 4e 80 04 20 bctr + + Eventually, this code will figure out how to skip all of this, + including the dynamic linker. At the moment, we just get through + the linkage function. */ + +/* If the current thread is about to execute a series of instructions + at PC matching the ppc64_standard_linkage pattern, and INSN is the result + from that pattern match, return the code address to which the + standard linkage function will send them. (This doesn't deal with + dynamic linker lazy symbol resolution stubs.) */ +static CORE_ADDR +ppc64_standard_linkage_target (CORE_ADDR pc, unsigned int *insn) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + /* The address of the function descriptor this linkage function + references. */ + CORE_ADDR desc + = ((CORE_ADDR) read_register (tdep->ppc_gp0_regnum + 2) + + (insn_d_field (insn[0]) << 16) + + insn_ds_field (insn[2])); + + /* The first word of the descriptor is the entry point. Return that. */ + return ppc64_desc_entry_point (desc); +} + + +/* Given that we've begun executing a call trampoline at PC, return + the entry point of the function the trampoline will go to. */ +static CORE_ADDR +ppc64_skip_trampoline_code (CORE_ADDR pc) +{ + unsigned int ppc64_standard_linkage_insn[PPC64_STANDARD_LINKAGE_LEN]; + + if (insns_match_pattern (pc, ppc64_standard_linkage, + ppc64_standard_linkage_insn)) + return ppc64_standard_linkage_target (pc, ppc64_standard_linkage_insn); + else + return 0; +} + + +/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64 + GNU/Linux. + + Usually a function pointer's representation is simply the address + of the function. On GNU/Linux on the 64-bit PowerPC however, a + function pointer is represented by a pointer to a TOC entry. This + TOC entry contains three words, the first word is the address of + the function, the second word is the TOC pointer (r2), and the + third word is the static chain value. Throughout GDB it is + currently assumed that a function pointer contains the address of + the function, which is not easy to fix. In addition, the + conversion of a function address to a function pointer would + require allocation of a TOC entry in the inferior's memory space, + with all its drawbacks. To be able to call C++ virtual methods in + the inferior (which are called via function pointers), + find_function_addr uses this function to get the function address + from a function pointer. */ + +/* If ADDR points at what is clearly a function descriptor, transform + it into the address of the corresponding function. Be + conservative, otherwize GDB will do the transformation on any + random addresses such as occures when there is no symbol table. */ + +static CORE_ADDR +ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch, + CORE_ADDR addr, + struct target_ops *targ) +{ + struct section_table *s = target_section_by_addr (targ, addr); + + /* Check if ADDR points to a function descriptor. */ + if (s && strcmp (s->the_bfd_section->name, ".opd") == 0) + return get_target_memory_unsigned (targ, addr, 8); + + return addr; +} + +#ifdef CRASH_MERGE +enum { + PPC_ELF_NGREG = 48, + PPC_ELF_NFPREG = 33, + PPC_ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (PPC_ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (PPC_ELF_NFPREG * 8) +}; +#else +enum { + ELF_NGREG = 48, + ELF_NFPREG = 33, + ELF_NVRREG = 33 +}; + +enum { + ELF_GREGSET_SIZE = (ELF_NGREG * 4), + ELF_FPREGSET_SIZE = (ELF_NFPREG * 8) +}; +#endif + +void +ppc_linux_supply_gregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (regi, buf + 4 * regi); + + supply_register (PC_REGNUM, buf + 4 * PPC_LINUX_PT_NIP); + supply_register (tdep->ppc_lr_regnum, buf + 4 * PPC_LINUX_PT_LNK); + supply_register (tdep->ppc_cr_regnum, buf + 4 * PPC_LINUX_PT_CCR); + supply_register (tdep->ppc_xer_regnum, buf + 4 * PPC_LINUX_PT_XER); + supply_register (tdep->ppc_ctr_regnum, buf + 4 * PPC_LINUX_PT_CTR); + if (tdep->ppc_mq_regnum != -1) + supply_register (tdep->ppc_mq_regnum, buf + 4 * PPC_LINUX_PT_MQ); + supply_register (tdep->ppc_ps_regnum, buf + 4 * PPC_LINUX_PT_MSR); +} + +void +ppc_linux_supply_fpregset (char *buf) +{ + int regi; + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); + + for (regi = 0; regi < 32; regi++) + supply_register (FP0_REGNUM + regi, buf + 8 * regi); + + /* The FPSCR is stored in the low order word of the last doubleword in the + fpregset. */ + supply_register (tdep->ppc_fpscr_regnum, buf + 8 * 32 + 4); +} + +/* + Use a local version of this function to get the correct types for regsets. +*/ + +static void +fetch_core_registers (char *core_reg_sect, + unsigned core_reg_size, + int which, + CORE_ADDR reg_addr) +{ + if (which == 0) + { + if (core_reg_size == ELF_GREGSET_SIZE) + ppc_linux_supply_gregset (core_reg_sect); + else + warning ("wrong size gregset struct in core file"); + } + else if (which == 2) + { + if (core_reg_size == ELF_FPREGSET_SIZE) + ppc_linux_supply_fpregset (core_reg_sect); + else + warning ("wrong size fpregset struct in core file"); + } +} + +/* Register that we are able to handle ELF file formats using standard + procfs "regset" structures. */ + +static struct core_fns ppc_linux_regset_core_fns = +{ + bfd_target_elf_flavour, /* core_flavour */ + default_check_format, /* check_format */ + default_core_sniffer, /* core_sniffer */ + fetch_core_registers, /* core_read_registers */ + NULL /* next */ +}; + +static void +ppc_linux_init_abi (struct gdbarch_info info, + struct gdbarch *gdbarch) +{ + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + + if (tdep->wordsize == 4) + { + /* Until November 2001, gcc did not comply with the 32 bit SysV + R4 ABI requirement that structures less than or equal to 8 + bytes should be returned in registers. Instead GCC was using + the the AIX/PowerOpen ABI - everything returned in memory + (well ignoring vectors that is). When this was corrected, it + wasn't fixed for GNU/Linux native platform. Use the + PowerOpen struct convention. */ + set_gdbarch_return_value (gdbarch, ppc_linux_return_value); + + /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding + *_push_arguments(). The same remarks hold for the methods below. */ + set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); + set_gdbarch_deprecated_frame_chain (gdbarch, ppc_linux_frame_chain); + set_gdbarch_deprecated_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); + + set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, + ppc_linux_frame_init_saved_regs); + set_gdbarch_deprecated_init_extra_frame_info (gdbarch, + ppc_linux_init_extra_frame_info); + + set_gdbarch_memory_remove_breakpoint (gdbarch, + ppc_linux_memory_remove_breakpoint); + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, + ppc_linux_skip_trampoline_code); + set_solib_svr4_fetch_link_map_offsets + (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); + } + + if (tdep->wordsize == 8) + { + /* Handle PPC64 GNU/Linux function pointers (which are really + function descriptors). */ + set_gdbarch_convert_from_func_ptr_addr + (gdbarch, ppc64_linux_convert_from_func_ptr_addr); + + set_gdbarch_in_solib_call_trampoline + (gdbarch, ppc64_in_solib_call_trampoline); + set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code); + + /* PPC64 malloc's entry-point is called ".malloc". */ + set_gdbarch_name_of_malloc (gdbarch, ".malloc"); + } +} + +void +_initialize_ppc_linux_tdep (void) +{ + /* Register for all sub-familes of the POWER/PowerPC: 32-bit and + 64-bit PowerPC, and the older rs6k. */ + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX, + ppc_linux_init_abi); + gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX, + ppc_linux_init_abi); + add_core_fns (&ppc_linux_regset_core_fns); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symfile.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symfile.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symfile.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symfile.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3644 @@ +/* Generic symbol file reading for the GNU debugger, GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support, using pieces from other GDB modules. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "bfdlink.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "source.h" +#include "gdbcmd.h" +#include "breakpoint.h" +#include "language.h" +#include "complaints.h" +#include "demangle.h" +#include "inferior.h" /* for write_pc */ +#include "filenames.h" /* for DOSish file names */ +#include "gdb-stabs.h" +#include "gdb_obstack.h" +#include "completer.h" +#include "bcache.h" +#include "hashtab.h" +#include "readline/readline.h" +#include "gdb_assert.h" +#include "block.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#ifdef HPUXHPPA + +/* Some HP-UX related globals to clear when a new "main" + symbol file is loaded. HP-specific. */ + +extern int hp_som_som_object_present; +extern int hp_cxx_exception_support_initialized; +#define RESET_HP_UX_GLOBALS() do {\ + hp_som_som_object_present = 0; /* indicates HP-compiled code */ \ + hp_cxx_exception_support_initialized = 0; /* must reinitialize exception stuff */ \ + } while (0) +#endif + +int (*ui_load_progress_hook) (const char *section, unsigned long num); +void (*show_load_progress) (const char *section, + unsigned long section_sent, + unsigned long section_size, + unsigned long total_sent, + unsigned long total_size); +void (*pre_add_symbol_hook) (char *); +void (*post_add_symbol_hook) (void); +void (*target_new_objfile_hook) (struct objfile *); + +static void clear_symtab_users_cleanup (void *ignore); + +/* Global variables owned by this file */ +int readnow_symbol_files; /* Read full symbols immediately */ + +/* External variables and functions referenced. */ + +extern void report_transfer_performance (unsigned long, time_t, time_t); + +/* Functions this file defines */ + +#if 0 +static int simple_read_overlay_region_table (void); +static void simple_free_overlay_region_table (void); +#endif + +static void set_initial_language (void); + +static void load_command (char *, int); + +static void symbol_file_add_main_1 (char *args, int from_tty, int flags); + +static void add_symbol_file_command (char *, int); + +static void add_shared_symbol_files_command (char *, int); + +static void reread_separate_symbols (struct objfile *objfile); + +static void cashier_psymtab (struct partial_symtab *); + +bfd *symfile_bfd_open (char *); + +int get_section_index (struct objfile *, char *); + +static void find_sym_fns (struct objfile *); + +static void decrement_reading_symtab (void *); + +static void overlay_invalidate_all (void); + +static int overlay_is_mapped (struct obj_section *); + +void list_overlays_command (char *, int); + +void map_overlay_command (char *, int); + +void unmap_overlay_command (char *, int); + +static void overlay_auto_command (char *, int); + +static void overlay_manual_command (char *, int); + +static void overlay_off_command (char *, int); + +static void overlay_load_command (char *, int); + +static void overlay_command (char *, int); + +static void simple_free_overlay_table (void); + +static void read_target_long_array (CORE_ADDR, unsigned int *, int); + +static int simple_read_overlay_table (void); + +static int simple_overlay_update_1 (struct obj_section *); + +static void add_filename_language (char *ext, enum language lang); + +static void set_ext_lang_command (char *args, int from_tty); + +static void info_ext_lang_command (char *args, int from_tty); + +static char *find_separate_debug_file (struct objfile *objfile); + +static void init_filename_language_table (void); + +void _initialize_symfile (void); + +/* List of all available sym_fns. On gdb startup, each object file reader + calls add_symtab_fns() to register information on each format it is + prepared to read. */ + +static struct sym_fns *symtab_fns = NULL; + +/* Flag for whether user will be reloading symbols multiple times. + Defaults to ON for VxWorks, otherwise OFF. */ + +#ifdef SYMBOL_RELOADING_DEFAULT +int symbol_reloading = SYMBOL_RELOADING_DEFAULT; +#else +int symbol_reloading = 0; +#endif + +/* If non-zero, shared library symbols will be added automatically + when the inferior is created, new libraries are loaded, or when + attaching to the inferior. This is almost always what users will + want to have happen; but for very large programs, the startup time + will be excessive, and so if this is a problem, the user can clear + this flag and then add the shared library symbols as needed. Note + that there is a potential for confusion, since if the shared + library symbols are not loaded, commands like "info fun" will *not* + report all the functions that are actually present. */ + +int auto_solib_add = 1; + +/* For systems that support it, a threshold size in megabytes. If + automatically adding a new library's symbol table to those already + known to the debugger would cause the total shared library symbol + size to exceed this threshhold, then the shlib's symbols are not + added. The threshold is ignored if the user explicitly asks for a + shlib to be added, such as when using the "sharedlibrary" + command. */ + +int auto_solib_limit; + + +/* This compares two partial symbols by names, using strcmp_iw_ordered + for the comparison. */ + +static int +compare_psymbols (const void *s1p, const void *s2p) +{ + struct partial_symbol *const *s1 = s1p; + struct partial_symbol *const *s2 = s2p; + + return strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*s1), + SYMBOL_NATURAL_NAME (*s2)); +} + +void +sort_pst_symbols (struct partial_symtab *pst) +{ + /* Sort the global list; don't sort the static list */ + + qsort (pst->objfile->global_psymbols.list + pst->globals_offset, + pst->n_global_syms, sizeof (struct partial_symbol *), + compare_psymbols); +} + +/* Make a null terminated copy of the string at PTR with SIZE characters in + the obstack pointed to by OBSTACKP . Returns the address of the copy. + Note that the string at PTR does not have to be null terminated, I.E. it + may be part of a larger string and we are only saving a substring. */ + +char * +obsavestring (const char *ptr, int size, struct obstack *obstackp) +{ + char *p = (char *) obstack_alloc (obstackp, size + 1); + /* Open-coded memcpy--saves function call time. These strings are usually + short. FIXME: Is this really still true with a compiler that can + inline memcpy? */ + { + const char *p1 = ptr; + char *p2 = p; + const char *end = ptr + size; + while (p1 != end) + *p2++ = *p1++; + } + p[size] = 0; + return p; +} + +/* Concatenate strings S1, S2 and S3; return the new string. Space is found + in the obstack pointed to by OBSTACKP. */ + +char * +obconcat (struct obstack *obstackp, const char *s1, const char *s2, + const char *s3) +{ + int len = strlen (s1) + strlen (s2) + strlen (s3) + 1; + char *val = (char *) obstack_alloc (obstackp, len); + strcpy (val, s1); + strcat (val, s2); + strcat (val, s3); + return val; +} + +/* True if we are nested inside psymtab_to_symtab. */ + +int currently_reading_symtab = 0; + +static void +decrement_reading_symtab (void *dummy) +{ + currently_reading_symtab--; +} + +/* Get the symbol table that corresponds to a partial_symtab. + This is fast after the first time you do it. In fact, there + is an even faster macro PSYMTAB_TO_SYMTAB that does the fast + case inline. */ + +struct symtab * +psymtab_to_symtab (struct partial_symtab *pst) +{ + /* If it's been looked up before, return it. */ + if (pst->symtab) + return pst->symtab; + + /* If it has not yet been read in, read it. */ + if (!pst->readin) + { + struct cleanup *back_to = make_cleanup (decrement_reading_symtab, NULL); + currently_reading_symtab++; + (*pst->read_symtab) (pst); + do_cleanups (back_to); + } + + return pst->symtab; +} + +/* Remember the lowest-addressed loadable section we've seen. + This function is called via bfd_map_over_sections. + + In case of equal vmas, the section with the largest size becomes the + lowest-addressed loadable section. + + If the vmas and sizes are equal, the last section is considered the + lowest-addressed loadable section. */ + +void +find_lowest_section (bfd *abfd, asection *sect, void *obj) +{ + asection **lowest = (asection **) obj; + + if (0 == (bfd_get_section_flags (abfd, sect) & SEC_LOAD)) + return; + if (!*lowest) + *lowest = sect; /* First loadable section */ + else if (bfd_section_vma (abfd, *lowest) > bfd_section_vma (abfd, sect)) + *lowest = sect; /* A lower loadable section */ + else if (bfd_section_vma (abfd, *lowest) == bfd_section_vma (abfd, sect) + && (bfd_section_size (abfd, (*lowest)) + <= bfd_section_size (abfd, sect))) + *lowest = sect; +} + +/* Create a new section_addr_info, with room for NUM_SECTIONS. */ + +struct section_addr_info * +alloc_section_addr_info (size_t num_sections) +{ + struct section_addr_info *sap; + size_t size; + + size = (sizeof (struct section_addr_info) + + sizeof (struct other_sections) * (num_sections - 1)); + sap = (struct section_addr_info *) xmalloc (size); + memset (sap, 0, size); + sap->num_sections = num_sections; + + return sap; +} + +/* Build (allocate and populate) a section_addr_info struct from + an existing section table. */ + +extern struct section_addr_info * +build_section_addr_info_from_section_table (const struct section_table *start, + const struct section_table *end) +{ + struct section_addr_info *sap; + const struct section_table *stp; + int oidx; + + sap = alloc_section_addr_info (end - start); + + for (stp = start, oidx = 0; stp != end; stp++) + { + if (bfd_get_section_flags (stp->bfd, + stp->the_bfd_section) & (SEC_ALLOC | SEC_LOAD) + && oidx < end - start) + { + sap->other[oidx].addr = stp->addr; + sap->other[oidx].name + = xstrdup (bfd_section_name (stp->bfd, stp->the_bfd_section)); + sap->other[oidx].sectindex = stp->the_bfd_section->index; + oidx++; + } + } + + return sap; +} + + +/* Free all memory allocated by build_section_addr_info_from_section_table. */ + +extern void +free_section_addr_info (struct section_addr_info *sap) +{ + int idx; + + for (idx = 0; idx < sap->num_sections; idx++) + if (sap->other[idx].name) + xfree (sap->other[idx].name); + xfree (sap); +} + + +/* Initialize OBJFILE's sect_index_* members. */ +static void +init_objfile_sect_indices (struct objfile *objfile) +{ + asection *sect; + int i; + + sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (sect) + objfile->sect_index_text = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".data"); + if (sect) + objfile->sect_index_data = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".bss"); + if (sect) + objfile->sect_index_bss = sect->index; + + sect = bfd_get_section_by_name (objfile->obfd, ".rodata"); + if (sect) + objfile->sect_index_rodata = sect->index; + + /* This is where things get really weird... We MUST have valid + indices for the various sect_index_* members or gdb will abort. + So if for example, there is no ".text" section, we have to + accomodate that. Except when explicitly adding symbol files at + some address, section_offsets contains nothing but zeros, so it + doesn't matter which slot in section_offsets the individual + sect_index_* members index into. So if they are all zero, it is + safe to just point all the currently uninitialized indices to the + first slot. */ + + for (i = 0; i < objfile->num_sections; i++) + { + if (ANOFFSET (objfile->section_offsets, i) != 0) + { + break; + } + } + if (i == objfile->num_sections) + { + if (objfile->sect_index_text == -1) + objfile->sect_index_text = 0; + if (objfile->sect_index_data == -1) + objfile->sect_index_data = 0; + if (objfile->sect_index_bss == -1) + objfile->sect_index_bss = 0; + if (objfile->sect_index_rodata == -1) + objfile->sect_index_rodata = 0; + } +} + + +/* Parse the user's idea of an offset for dynamic linking, into our idea + of how to represent it for fast symbol reading. This is the default + version of the sym_fns.sym_offsets function for symbol readers that + don't need to do anything special. It allocates a section_offsets table + for the objectfile OBJFILE and stuffs ADDR into all of the offsets. */ + +void +default_symfile_offsets (struct objfile *objfile, + struct section_addr_info *addrs) +{ + int i; + + objfile->num_sections = bfd_count_sections (objfile->obfd); + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + memset (objfile->section_offsets, 0, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); + + /* Now calculate offsets for section that were specified by the + caller. */ + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + struct other_sections *osp ; + + osp = &addrs->other[i] ; + if (osp->addr == 0) + continue; + + /* Record all sections in offsets */ + /* The section_offsets in the objfile are here filled in using + the BFD index. */ + (objfile->section_offsets)->offsets[osp->sectindex] = osp->addr; + } + + /* Remember the bfd indexes for the .text, .data, .bss and + .rodata sections. */ + init_objfile_sect_indices (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + OBJFILE is where the symbols are to be read from. + + ADDRS is the list of section load addresses. If the user has given + an 'add-symbol-file' command, then this is the list of offsets and + addresses he or she provided as arguments to the command; or, if + we're handling a shared library, these are the actual addresses the + sections are loaded at, according to the inferior's dynamic linker + (as gleaned by GDB's shared library code). We convert each address + into an offset from the section VMA's as it appears in the object + file, and then call the file's sym_offsets function to convert this + into a format-specific offset table --- a `struct section_offsets'. + If ADDRS is non-zero, OFFSETS must be zero. + + OFFSETS is a table of section offsets already in the right + format-specific representation. NUM_OFFSETS is the number of + elements present in OFFSETS->offsets. If OFFSETS is non-zero, we + assume this is the proper table the call to sym_offsets described + above would produce. Instead of calling sym_offsets, we just dump + it right into objfile->section_offsets. (When we're re-reading + symbols from an objfile, we don't have the original load address + list any more; all we have is the section offset table.) If + OFFSETS is non-zero, ADDRS must be zero. + + MAINLINE is nonzero if this is the main symbol file, or zero if + it's an extra symbol file such as dynamically loaded code. + + VERBO is nonzero if the caller has printed a verbose message about + the symbol reading (and complaints can be more terse about it). */ + +void +syms_from_objfile (struct objfile *objfile, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, + int verbo) +{ + struct section_addr_info *local_addr = NULL; + struct cleanup *old_chain; + + gdb_assert (! (addrs && offsets)); + + init_entry_point_info (objfile); + find_sym_fns (objfile); + + if (objfile->sf == NULL) + return; /* No symbols. */ + + /* Make sure that partially constructed symbol tables will be cleaned up + if an error occurs during symbol reading. */ + old_chain = make_cleanup_free_objfile (objfile); + + /* If ADDRS and OFFSETS are both NULL, put together a dummy address + list. We now establish the convention that an addr of zero means + no load address was specified. */ + if (! addrs && ! offsets) + { + local_addr + = alloc_section_addr_info (bfd_count_sections (objfile->obfd)); + make_cleanup (xfree, local_addr); + addrs = local_addr; + } + + /* Now either addrs or offsets is non-zero. */ + + if (mainline) + { + /* We will modify the main symbol table, make sure that all its users + will be cleaned up if an error occurs during symbol reading. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Since no error yet, throw away the old symbol table. */ + + if (symfile_objfile != NULL) + { + free_objfile (symfile_objfile); + symfile_objfile = NULL; + } + + /* Currently we keep symbols from the add-symbol-file command. + If the user wants to get rid of them, they should do "symbol-file" + without arguments first. Not sure this is the best behavior + (PR 2207). */ + + (*objfile->sf->sym_new_init) (objfile); + } + + /* Convert addr into an offset rather than an absolute address. + We find the lowest address of a loaded segment in the objfile, + and assume that is where that got loaded. + + We no longer warn if the lowest section is not a text segment (as + happens for the PA64 port. */ + if (!mainline && addrs && addrs->other[0].name) + { + asection *lower_sect; + asection *sect; + CORE_ADDR lower_offset; + int i; + + /* Find lowest loadable section to be used as starting point for + continguous sections. FIXME!! won't work without call to find + .text first, but this assumes text is lowest section. */ + lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); + if (lower_sect == NULL) + bfd_map_over_sections (objfile->obfd, find_lowest_section, + &lower_sect); + if (lower_sect == NULL) + warning ("no loadable sections found in added symbol-file %s", + objfile->name); + else + if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) + warning ("Lowest section in %s is %s at %s", + objfile->name, + bfd_section_name (objfile->obfd, lower_sect), + paddr (bfd_section_vma (objfile->obfd, lower_sect))); + if (lower_sect != NULL) + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); + else + lower_offset = 0; + + /* Calculate offsets for the loadable sections. + FIXME! Sections must be in order of increasing loadable section + so that contiguous sections can use the lower-offset!!! + + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to + the offset of the highest loadable section lower than it + (the loadable section directly below it in memory). + this_offset = lower_offset = lower_addr - lower_orig_addr */ + + for (i = 0; i < addrs->num_sections && addrs->other[i].name; i++) + { + if (addrs->other[i].addr != 0) + { + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); + if (sect) + { + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); + lower_offset = addrs->other[i].addr; + /* This is the index used by BFD. */ + addrs->other[i].sectindex = sect->index ; + } + else + { + warning ("section %s not found in %s", + addrs->other[i].name, + objfile->name); + addrs->other[i].addr = 0; + } + } + else + addrs->other[i].addr = lower_offset; + } + } + + /* Initialize symbol reading routines for this objfile, allow complaints to + appear for this new file, and record how verbose to be, then do the + initial symbol reading for this file. */ + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, verbo); + + if (addrs) + (*objfile->sf->sym_offsets) (objfile, addrs); + else + { + size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets); + + /* Just copy in the offset table directly as given to us. */ + objfile->num_sections = num_offsets; + objfile->section_offsets + = ((struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, size)); + memcpy (objfile->section_offsets, offsets, size); + + init_objfile_sect_indices (objfile); + } + +#ifndef DEPRECATED_IBM6000_TARGET + /* This is a SVR4/SunOS specific hack, I think. In any event, it + screws RS/6000. sym_offsets should be doing this sort of thing, + because it knows the mapping between bfd sections and + section_offsets. */ + /* This is a hack. As far as I can tell, section offsets are not + target dependent. They are all set to addr with a couple of + exceptions. The exceptions are sysvr4 shared libraries, whose + offsets are kept in solib structures anyway and rs6000 xcoff + which handles shared libraries in a completely unique way. + + Section offsets are built similarly, except that they are built + by adding addr in all cases because there is no clear mapping + from section_offsets into actual sections. Note that solib.c + has a different algorithm for finding section offsets. + + These should probably all be collapsed into some target + independent form of shared library support. FIXME. */ + + if (addrs) + { + struct obj_section *s; + + /* Map section offsets in "addr" back to the object's + sections by comparing the section names with bfd's + section names. Then adjust the section address by + the offset. */ /* for gdb/13815 */ + + ALL_OBJFILE_OSECTIONS (objfile, s) + { + CORE_ADDR s_addr = 0; + int i; + + for (i = 0; + !s_addr && i < addrs->num_sections && addrs->other[i].name; + i++) + if (strcmp (bfd_section_name (s->objfile->obfd, + s->the_bfd_section), + addrs->other[i].name) == 0) + s_addr = addrs->other[i].addr; /* end added for gdb/13815 */ + + s->addr -= s->offset; + s->addr += s_addr; + s->endaddr -= s->offset; + s->endaddr += s_addr; + s->offset += s_addr; + } + } + +#ifdef CRASH_MERGE + { + void patch_load_module(struct objfile *, struct minimal_symbol *); + patch_load_module(objfile, NULL); + } +#endif +#endif /* not DEPRECATED_IBM6000_TARGET */ + + (*objfile->sf->sym_read) (objfile, mainline); + + /* Don't allow char * to have a typename (else would get caddr_t). + Ditto void *. FIXME: Check whether this is now done by all the + symbol readers themselves (many of them now do), and if so remove + it from here. */ + + TYPE_NAME (lookup_pointer_type (builtin_type_char)) = 0; + TYPE_NAME (lookup_pointer_type (builtin_type_void)) = 0; + + /* Mark the objfile has having had initial symbol read attempted. Note + that this does not mean we found any symbols... */ + + objfile->flags |= OBJF_SYMS; + + /* Discard cleanups as symbol reading was successful. */ + + discard_cleanups (old_chain); +} + +/* Perform required actions after either reading in the initial + symbols for a new objfile, or mapping in the symbols from a reusable + objfile. */ + +void +new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) +{ + + /* If this is the main symbol file we have to clean up all users of the + old main symbol file. Otherwise it is sufficient to fixup all the + breakpoints that may have been redefined by this symbol file. */ + if (mainline) + { + /* OK, make it the "real" symbol file. */ + symfile_objfile = objfile; + + clear_symtab_users (); + } + else + { + breakpoint_re_set (); + } + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, verbo); +} + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. + + NAME is the file name (which will be tilde-expanded and made + absolute herein) (but we don't free or modify NAME itself). + + FROM_TTY says how verbose to be. + + MAINLINE specifies whether this is the main symbol file, or whether + it's an extra symbol file such as dynamically loaded code. + + ADDRS, OFFSETS, and NUM_OFFSETS are as described for + syms_from_objfile, above. ADDRS is ignored when MAINLINE is + non-zero. + + Upon success, returns a pointer to the objfile that was added. + Upon failure, jumps back to command level (never returns). */ +static struct objfile * +symbol_file_add_with_addrs_or_offsets (char *name, int from_tty, + struct section_addr_info *addrs, + struct section_offsets *offsets, + int num_offsets, + int mainline, int flags) +{ + struct objfile *objfile; + struct partial_symtab *psymtab; + char *debugfile; + bfd *abfd; + struct section_addr_info *orig_addrs; + struct cleanup *my_cleanups; + + /* Open a bfd for the file, and give user a chance to burp if we'd be + interactively wiping out any existing symbols. */ + + abfd = symfile_bfd_open (name); + + if ((have_full_symbols () || have_partial_symbols ()) + && mainline + && from_tty + && !query ("Load new symbol table from \"%s\"? ", name)) + error ("Not confirmed."); + + objfile = allocate_objfile (abfd, flags); + + orig_addrs = alloc_section_addr_info (bfd_count_sections (abfd)); + my_cleanups = make_cleanup (xfree, orig_addrs); + if (addrs) + { + int i; + orig_addrs->num_sections = addrs->num_sections; + for (i = 0; i < addrs->num_sections; i++) + orig_addrs->other[i] = addrs->other[i]; + } + + /* We either created a new mapped symbol table, mapped an existing + symbol table file which has not had initial symbol reading + performed, or need to read an unmapped symbol table. */ + if (from_tty || info_verbose) + { + if (pre_add_symbol_hook) + pre_add_symbol_hook (name); + else + { + printf_unfiltered ("Reading symbols from %s...", name); + wrap_here (""); + gdb_flush (gdb_stdout); + } + } + syms_from_objfile (objfile, addrs, offsets, num_offsets, + mainline, from_tty); + + /* We now have at least a partial symbol table. Check to see if the + user requested that all symbols be read on initial access via either + the gdb startup command line or on a per symbol file basis. Expand + all partial symbol tables for this objfile if so. */ + + if ((flags & OBJF_READNOW) || readnow_symbol_files) + { + if (from_tty || info_verbose) + { + printf_unfiltered ("expanding to full symbols..."); + wrap_here (""); + gdb_flush (gdb_stdout); + } + + for (psymtab = objfile->psymtabs; + psymtab != NULL; + psymtab = psymtab->next) + { + psymtab_to_symtab (psymtab); + } + } + + debugfile = find_separate_debug_file (objfile); + if (debugfile) + { + if (addrs != NULL) + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, orig_addrs, 0, flags); + } + else + { + objfile->separate_debug_objfile + = symbol_file_add (debugfile, from_tty, NULL, 0, flags); + } + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + + /* Put the separate debug object before the normal one, this is so that + usage of the ALL_OBJFILES_SAFE macro will stay safe. */ + put_objfile_before (objfile->separate_debug_objfile, objfile); + + xfree (debugfile); + } + + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)..."); + wrap_here (""); + } + + if (from_tty || info_verbose) + { + if (post_add_symbol_hook) + post_add_symbol_hook (); + else + { + printf_unfiltered ("done.\n"); + } + } + + /* We print some messages regardless of whether 'from_tty || + info_verbose' is true, so make sure they go out at the right + time. */ + gdb_flush (gdb_stdout); + + do_cleanups (my_cleanups); + + if (objfile->sf == NULL) + return objfile; /* No symbols. */ + + new_symfile_objfile (objfile, mainline, from_tty); + + if (target_new_objfile_hook) + target_new_objfile_hook (objfile); + + return (objfile); +} + + +/* Process a symbol file, as either the main file or as a dynamically + loaded file. See symbol_file_add_with_addrs_or_offsets's comments + for details. */ +struct objfile * +symbol_file_add (char *name, int from_tty, struct section_addr_info *addrs, + int mainline, int flags) +{ + return symbol_file_add_with_addrs_or_offsets (name, from_tty, addrs, 0, 0, + mainline, flags); +} + + +/* Call symbol_file_add() with default values and update whatever is + affected by the loading of a new main(). + Used when the file is supplied in the gdb command line + and by some targets with special loading requirements. + The auxiliary function, symbol_file_add_main_1(), has the flags + argument for the switches that can only be specified in the symbol_file + command itself. */ + +void +symbol_file_add_main (char *args, int from_tty) +{ + symbol_file_add_main_1 (args, from_tty, 0); +} + +static void +symbol_file_add_main_1 (char *args, int from_tty, int flags) +{ + symbol_file_add (args, from_tty, NULL, 1, flags); + +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + + /* Getting new symbols may change our opinion about + what is frameless. */ + reinit_frame_cache (); + + set_initial_language (); +} + +void +symbol_file_clear (int from_tty) +{ + if ((have_full_symbols () || have_partial_symbols ()) + && from_tty + && !query ("Discard symbol table from `%s'? ", + symfile_objfile->name)) + error ("Not confirmed."); + free_all_objfiles (); + + /* solib descriptors may have handles to objfiles. Since their + storage has just been released, we'd better wipe the solib + descriptors as well. + */ +#if defined(SOLIB_RESTART) + SOLIB_RESTART (); +#endif + + symfile_objfile = NULL; + if (from_tty) + printf_unfiltered ("No symbol file now.\n"); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif +} + +static char * +get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) +{ + asection *sect; + bfd_size_type debuglink_size; + unsigned long crc32; + char *contents; + int crc_offset; + unsigned char *p; + + sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink"); + + if (sect == NULL) + return NULL; + + debuglink_size = bfd_section_size (objfile->obfd, sect); + + contents = xmalloc (debuglink_size); + bfd_get_section_contents (objfile->obfd, sect, contents, + (file_ptr)0, (bfd_size_type)debuglink_size); + + /* Crc value is stored after the filename, aligned up to 4 bytes. */ + crc_offset = strlen (contents) + 1; + crc_offset = (crc_offset + 3) & ~3; + + crc32 = bfd_get_32 (objfile->obfd, (bfd_byte *) (contents + crc_offset)); + + *crc32_out = crc32; + return contents; +} + +static int +separate_debug_file_exists (const char *name, unsigned long crc) +{ + unsigned long file_crc = 0; + int fd; + char buffer[8*1024]; + int count; + + fd = open (name, O_RDONLY | O_BINARY); + if (fd < 0) + return 0; + + while ((count = read (fd, buffer, sizeof (buffer))) > 0) + file_crc = gnu_debuglink_crc32 (file_crc, buffer, count); + + close (fd); + + return crc == file_crc; +} + +static char *debug_file_directory = NULL; + +#if ! defined (DEBUG_SUBDIRECTORY) +#define DEBUG_SUBDIRECTORY ".debug" +#endif + +static char * +find_separate_debug_file (struct objfile *objfile) +{ + asection *sect; + char *basename; + char *dir; + char *debugfile; + char *name_copy; + bfd_size_type debuglink_size; + unsigned long crc32; + int i; + + basename = get_debug_link_info (objfile, &crc32); + + if (basename == NULL) + return NULL; + + dir = xstrdup (objfile->name); + + /* Strip off the final filename part, leaving the directory name, + followed by a slash. Objfile names should always be absolute and + tilde-expanded, so there should always be a slash in there + somewhere. */ + for (i = strlen(dir) - 1; i >= 0; i--) + { + if (IS_DIR_SEPARATOR (dir[i])) + break; + } + gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i])); + dir[i+1] = '\0'; + + debugfile = alloca (strlen (debug_file_directory) + 1 + + strlen (dir) + + strlen (DEBUG_SUBDIRECTORY) + + strlen ("/") + + strlen (basename) + + 1); + + /* First try in the same directory as the original file. */ + strcpy (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the subdirectory named DEBUG_SUBDIRECTORY. */ + strcpy (debugfile, dir); + strcat (debugfile, DEBUG_SUBDIRECTORY); + strcat (debugfile, "/"); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + /* Then try in the global debugfile directory. */ + strcpy (debugfile, debug_file_directory); + strcat (debugfile, "/"); + strcat (debugfile, dir); + strcat (debugfile, basename); + + if (separate_debug_file_exists (debugfile, crc32)) + { + xfree (basename); + xfree (dir); + return xstrdup (debugfile); + } + + xfree (basename); + xfree (dir); +#ifdef CRASH_MERGE +{ + extern char *check_specified_debug_file(); + name_copy = check_specified_debug_file(); + return (name_copy ? xstrdup (name_copy) : NULL); +} +#else + return NULL; +#endif +} + + +/* This is the symbol-file command. Read the file, analyze its + symbols, and add a struct symtab to a symtab list. The syntax of + the command is rather bizarre--(1) buildargv implements various + quoting conventions which are undocumented and have little or + nothing in common with the way things are quoted (or not quoted) + elsewhere in GDB, (2) options are used, which are not generally + used in GDB (perhaps "set mapped on", "set readnow on" would be + better), (3) the order of options matters, which is contrary to GNU + conventions (because it is confusing and inconvenient). */ +/* Note: ezannoni 2000-04-17. This function used to have support for + rombug (see remote-os9k.c). It consisted of a call to target_link() + (target.c) to get the address of the text segment from the target, + and pass that to symbol_file_add(). This is no longer supported. */ + +void +symbol_file_command (char *args, int from_tty) +{ + char **argv; + char *name = NULL; + struct cleanup *cleanups; + int flags = OBJF_USERLOADED; + + dont_repeat (); + + if (args == NULL) + { + symbol_file_clear (from_tty); + } + else + { + if ((argv = buildargv (args)) == NULL) + { + nomem (0); + } + cleanups = make_cleanup_freeargv (argv); + while (*argv != NULL) + { + if (strcmp (*argv, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (**argv == '-') + error ("unknown option `%s'", *argv); + else + { + name = *argv; + + symbol_file_add_main_1 (name, from_tty, flags); + } + argv++; + } + + if (name == NULL) + { + error ("no symbol file name was specified"); + } + do_cleanups (cleanups); + } +} + +/* Set the initial language. + + A better solution would be to record the language in the psymtab when reading + partial symbols, and then use it (if known) to set the language. This would + be a win for formats that encode the language in an easily discoverable place, + such as DWARF. For stabs, we can jump through hoops looking for specially + named symbols or try to intuit the language from the specific type of stabs + we find, but we can't do that until later when we read in full symbols. + FIXME. */ + +static void +set_initial_language (void) +{ + struct partial_symtab *pst; + enum language lang = language_unknown; + + pst = find_main_psymtab (); + if (pst != NULL) + { + if (pst->filename != NULL) + { + lang = deduce_language_from_filename (pst->filename); + } + if (lang == language_unknown) + { + /* Make C the default language */ + lang = language_c; + } + set_language (lang); + expected_language = current_language; /* Don't warn the user */ + } +} + +/* Open file specified by NAME and hand it off to BFD for preliminary + analysis. Result is a newly initialized bfd *, which includes a newly + malloc'd` copy of NAME (tilde-expanded and made absolute). + In case of trouble, error() is called. */ + +bfd * +symfile_bfd_open (char *name) +{ + bfd *sym_bfd; + int desc; + char *absolute_name; + + + + name = tilde_expand (name); /* Returns 1st new malloc'd copy */ + + /* Look down path for it, allocate 2nd new malloc'd copy. */ + desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name); +#if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) + if (desc < 0) + { + char *exename = alloca (strlen (name) + 5); + strcat (strcpy (exename, name), ".exe"); + desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY, + 0, &absolute_name); + } +#endif + if (desc < 0) + { + make_cleanup (xfree, name); + perror_with_name (name); + } + xfree (name); /* Free 1st new malloc'd copy */ + name = absolute_name; /* Keep 2nd malloc'd copy in bfd */ + /* It'll be freed in free_objfile(). */ + + sym_bfd = bfd_fdopenr (name, gnutarget, desc); + if (!sym_bfd) + { + close (desc); + make_cleanup (xfree, name); + error ("\"%s\": can't open to read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + bfd_set_cacheable (sym_bfd, 1); + + if (!bfd_check_format (sym_bfd, bfd_object)) + { + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + bfd_close (sym_bfd); /* This also closes desc */ + make_cleanup (xfree, name); + error ("\"%s\": can't read symbols: %s.", name, + bfd_errmsg (bfd_get_error ())); + } + return (sym_bfd); +} + +/* Return the section index for the given section name. Return -1 if + the section was not found. */ +int +get_section_index (struct objfile *objfile, char *section_name) +{ + asection *sect = bfd_get_section_by_name (objfile->obfd, section_name); + if (sect) + return sect->index; + else + return -1; +} + +/* Link a new symtab_fns into the global symtab_fns list. Called on gdb + startup by the _initialize routine in each object file format reader, + to register information about each format the the reader is prepared + to handle. */ + +void +add_symtab_fns (struct sym_fns *sf) +{ + sf->next = symtab_fns; + symtab_fns = sf; +} + + +/* Initialize to read symbols from the symbol file sym_bfd. It either + returns or calls error(). The result is an initialized struct sym_fns + in the objfile structure, that contains cached information about the + symbol file. */ + +static void +find_sym_fns (struct objfile *objfile) +{ + struct sym_fns *sf; + enum bfd_flavour our_flavour = bfd_get_flavour (objfile->obfd); + char *our_target = bfd_get_target (objfile->obfd); + + if (our_flavour == bfd_target_srec_flavour + || our_flavour == bfd_target_ihex_flavour + || our_flavour == bfd_target_tekhex_flavour) + return; /* No symbols. */ + + for (sf = symtab_fns; sf != NULL; sf = sf->next) + { + if (our_flavour == sf->sym_flavour) + { + objfile->sf = sf; + return; + } + } + error ("I'm sorry, Dave, I can't do that. Symbol format `%s' unknown.", + bfd_get_target (objfile->obfd)); +} + +/* This function runs the load command of our current target. */ + +static void +load_command (char *arg, int from_tty) +{ + if (arg == NULL) + arg = get_exec_file (1); + target_load (arg, from_tty); + + /* After re-loading the executable, we don't really know which + overlays are mapped any more. */ + overlay_cache_invalid = 1; +} + +/* This version of "load" should be usable for any target. Currently + it is just used for remote targets, not inftarg.c or core files, + on the theory that only in that case is it useful. + + Avoiding xmodem and the like seems like a win (a) because we don't have + to worry about finding it, and (b) On VMS, fork() is very slow and so + we don't want to run a subprocess. On the other hand, I'm not sure how + performance compares. */ + +static int download_write_size = 512; +static int validate_download = 0; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +add_section_size_callback (bfd *abfd, asection *asec, void *data) +{ + bfd_size_type *sum = data; + + *sum += bfd_get_section_size_before_reloc (asec); +} + +/* Opaque data for load_section_callback. */ +struct load_section_data { + unsigned long load_offset; + unsigned long write_count; + unsigned long data_count; + bfd_size_type total_size; +}; + +/* Callback service function for generic_load (bfd_map_over_sections). */ + +static void +load_section_callback (bfd *abfd, asection *asec, void *data) +{ + struct load_section_data *args = data; + + if (bfd_get_section_flags (abfd, asec) & SEC_LOAD) + { + bfd_size_type size = bfd_get_section_size_before_reloc (asec); + if (size > 0) + { + char *buffer; + struct cleanup *old_chain; + CORE_ADDR lma = bfd_section_lma (abfd, asec) + args->load_offset; + bfd_size_type block_size; + int err; + const char *sect_name = bfd_get_section_name (abfd, asec); + bfd_size_type sent; + + if (download_write_size > 0 && size > download_write_size) + block_size = download_write_size; + else + block_size = size; + + buffer = xmalloc (size); + old_chain = make_cleanup (xfree, buffer); + + /* Is this really necessary? I guess it gives the user something + to look at during a long download. */ + ui_out_message (uiout, 0, "Loading section %s, size 0x%s lma 0x%s\n", + sect_name, paddr_nz (size), paddr_nz (lma)); + + bfd_get_section_contents (abfd, asec, buffer, 0, size); + + sent = 0; + do + { + int len; + bfd_size_type this_transfer = size - sent; + + if (this_transfer >= block_size) + this_transfer = block_size; + len = target_write_memory_partial (lma, buffer, + this_transfer, &err); + if (err) + break; + if (validate_download) + { + /* Broken memories and broken monitors manifest + themselves here when bring new computers to + life. This doubles already slow downloads. */ + /* NOTE: cagney/1999-10-18: A more efficient + implementation might add a verify_memory() + method to the target vector and then use + that. remote.c could implement that method + using the ``qCRC'' packet. */ + char *check = xmalloc (len); + struct cleanup *verify_cleanups = + make_cleanup (xfree, check); + + if (target_read_memory (lma, check, len) != 0) + error ("Download verify read failed at 0x%s", + paddr (lma)); + if (memcmp (buffer, check, len) != 0) + error ("Download verify compare failed at 0x%s", + paddr (lma)); + do_cleanups (verify_cleanups); + } + args->data_count += len; + lma += len; + buffer += len; + args->write_count += 1; + sent += len; + if (quit_flag + || (ui_load_progress_hook != NULL + && ui_load_progress_hook (sect_name, sent))) + error ("Canceled the download"); + + if (show_load_progress != NULL) + show_load_progress (sect_name, sent, size, + args->data_count, args->total_size); + } + while (sent < size); + + if (err != 0) + error ("Memory access error while loading section %s.", sect_name); + + do_cleanups (old_chain); + } + } +} + +void +generic_load (char *args, int from_tty) +{ + asection *s; + bfd *loadfile_bfd; + time_t start_time, end_time; /* Start and end times of download */ + char *filename; + struct cleanup *old_cleanups; + char *offptr; + struct load_section_data cbdata; + CORE_ADDR entry; + + cbdata.load_offset = 0; /* Offset to add to vma for each section. */ + cbdata.write_count = 0; /* Number of writes needed. */ + cbdata.data_count = 0; /* Number of bytes written to target memory. */ + cbdata.total_size = 0; /* Total size of all bfd sectors. */ + + /* Parse the input argument - the user can specify a load offset as + a second argument. */ + filename = xmalloc (strlen (args) + 1); + old_cleanups = make_cleanup (xfree, filename); + strcpy (filename, args); + offptr = strchr (filename, ' '); + if (offptr != NULL) + { + char *endptr; + + cbdata.load_offset = strtoul (offptr, &endptr, 0); + if (offptr == endptr) + error ("Invalid download offset:%s\n", offptr); + *offptr = '\0'; + } + else + cbdata.load_offset = 0; + + /* Open the file for loading. */ + loadfile_bfd = bfd_openr (filename, gnutarget); + if (loadfile_bfd == NULL) + { + perror_with_name (filename); + return; + } + + /* FIXME: should be checking for errors from bfd_close (for one thing, + on error it does not free all the storage associated with the + bfd). */ + make_cleanup_bfd_close (loadfile_bfd); + + if (!bfd_check_format (loadfile_bfd, bfd_object)) + { + error ("\"%s\" is not an object file: %s", filename, + bfd_errmsg (bfd_get_error ())); + } + + bfd_map_over_sections (loadfile_bfd, add_section_size_callback, + (void *) &cbdata.total_size); + + start_time = time (NULL); + + bfd_map_over_sections (loadfile_bfd, load_section_callback, &cbdata); + + end_time = time (NULL); + + entry = bfd_get_start_address (loadfile_bfd); + ui_out_text (uiout, "Start address "); + ui_out_field_fmt (uiout, "address", "0x%s", paddr_nz (entry)); + ui_out_text (uiout, ", load size "); + ui_out_field_fmt (uiout, "load-size", "%lu", cbdata.data_count); + ui_out_text (uiout, "\n"); + /* We were doing this in remote-mips.c, I suspect it is right + for other targets too. */ + write_pc (entry); + + /* FIXME: are we supposed to call symbol_file_add or not? According + to a comment from remote-mips.c (where a call to symbol_file_add + was commented out), making the call confuses GDB if more than one + file is loaded in. Some targets do (e.g., remote-vx.c) but + others don't (or didn't - perhaphs they have all been deleted). */ + + print_transfer_performance (gdb_stdout, cbdata.data_count, + cbdata.write_count, end_time - start_time); + + do_cleanups (old_cleanups); +} + +/* Report how fast the transfer went. */ + +/* DEPRECATED: cagney/1999-10-18: report_transfer_performance is being + replaced by print_transfer_performance (with a very different + function signature). */ + +void +report_transfer_performance (unsigned long data_count, time_t start_time, + time_t end_time) +{ + print_transfer_performance (gdb_stdout, data_count, + end_time - start_time, 0); +} + +void +print_transfer_performance (struct ui_file *stream, + unsigned long data_count, + unsigned long write_count, + unsigned long time_count) +{ + ui_out_text (uiout, "Transfer rate: "); + if (time_count > 0) + { + ui_out_field_fmt (uiout, "transfer-rate", "%lu", + (data_count * 8) / time_count); + ui_out_text (uiout, " bits/sec"); + } + else + { + ui_out_field_fmt (uiout, "transferred-bits", "%lu", (data_count * 8)); + ui_out_text (uiout, " bits in <1 sec"); + } + if (write_count > 0) + { + ui_out_text (uiout, ", "); + ui_out_field_fmt (uiout, "write-rate", "%lu", data_count / write_count); + ui_out_text (uiout, " bytes/write"); + } + ui_out_text (uiout, ".\n"); +} + +/* This function allows the addition of incrementally linked object files. + It does not modify any state in the target, only in the debugger. */ +/* Note: ezannoni 2000-04-13 This function/command used to have a + special case syntax for the rombug target (Rombug is the boot + monitor for Microware's OS-9 / OS-9000, see remote-os9k.c). In the + rombug case, the user doesn't need to supply a text address, + instead a call to target_link() (in target.c) would supply the + value to use. We are now discontinuing this type of ad hoc syntax. */ + +static void +add_symbol_file_command (char *args, int from_tty) +{ + char *filename = NULL; + int flags = OBJF_USERLOADED; + char *arg; + int expecting_option = 0; + int section_index = 0; + int argcnt = 0; + int sec_num = 0; + int i; + int expecting_sec_name = 0; + int expecting_sec_addr = 0; + + struct sect_opt + { + char *name; + char *value; + }; + + struct section_addr_info *section_addrs; + struct sect_opt *sect_opts = NULL; + size_t num_sect_opts = 0; + struct cleanup *my_cleanups = make_cleanup (null_cleanup, NULL); + + num_sect_opts = 16; + sect_opts = (struct sect_opt *) xmalloc (num_sect_opts + * sizeof (struct sect_opt)); + + dont_repeat (); + + if (args == NULL) + error ("add-symbol-file takes a file name and an address"); + + /* Make a copy of the string that we can safely write into. */ + args = xstrdup (args); + + while (*args != '\000') + { + /* Any leading spaces? */ + while (isspace (*args)) + args++; + + /* Point arg to the beginning of the argument. */ + arg = args; + + /* Move args pointer over the argument. */ + while ((*args != '\000') && !isspace (*args)) + args++; + + /* If there are more arguments, terminate arg and + proceed past it. */ + if (*args != '\000') + *args++ = '\000'; + + /* Now process the argument. */ + if (argcnt == 0) + { + /* The first argument is the file name. */ + filename = tilde_expand (arg); + make_cleanup (xfree, filename); + } + else + if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) + { + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; +#ifdef CRASH_MERGE + if (++section_index >= num_sect_opts) +#else + if (++section_index > num_sect_opts) +#endif + { + num_sect_opts *= 2; + sect_opts = ((struct sect_opt *) + xrealloc (sect_opts, + num_sect_opts + * sizeof (struct sect_opt))); + } + } + else + error ("USAGE: add-symbol-file [-mapped] [-readnow] [-s ]*"); + } + } + argcnt++; + } + + /* Print the prompt for the query below. And save the arguments into + a sect_addr_info structure to be passed around to other + functions. We have to split this up into separate print + statements because local_hex_string returns a local static + string. */ + + printf_unfiltered ("add symbol table from file \"%s\" at\n", filename); + section_addrs = alloc_section_addr_info (section_index); + make_cleanup (xfree, section_addrs); + for (i = 0; i < section_index; i++) + { + CORE_ADDR addr; + char *val = sect_opts[i].value; + char *sec = sect_opts[i].name; + + addr = parse_and_eval_address (val); + + /* Here we store the section offsets in the order they were + entered on the command line. */ + section_addrs->other[sec_num].name = sec; + section_addrs->other[sec_num].addr = addr; + printf_unfiltered ("\t%s_addr = %s\n", + sec, + local_hex_string ((unsigned long)addr)); + sec_num++; + + /* The object's sections are initialized when a + call is made to build_objfile_section_table (objfile). + This happens in reread_symbols. + At this point, we don't know what file type this is, + so we can't determine what section names are valid. */ + } + +#ifndef CRASH_MERGE + if (from_tty && (!query ("%s", ""))) + error ("Not confirmed."); +#endif + + symbol_file_add (filename, from_tty, section_addrs, 0, flags); + + /* Getting new symbols may change our opinion about what is + frameless. */ + reinit_frame_cache (); + do_cleanups (my_cleanups); +} + +static void +add_shared_symbol_files_command (char *args, int from_tty) +{ +#ifdef ADD_SHARED_SYMBOL_FILES + ADD_SHARED_SYMBOL_FILES (args, from_tty); +#else + error ("This command is not available in this configuration of GDB."); +#endif +} + +/* Re-read symbols if a symbol-file has changed. */ +void +reread_symbols (void) +{ + struct objfile *objfile; + long new_modtime; + int reread_one = 0; + struct stat new_statbuf; + int res; + + /* With the addition of shared libraries, this should be modified, + the load time should be saved in the partial symbol tables, since + different tables may come from different source files. FIXME. + This routine should then walk down each partial symbol table + and see if the symbol table that it originates from has been changed */ + + for (objfile = object_files; objfile; objfile = objfile->next) + { + if (objfile->obfd) + { +#ifdef DEPRECATED_IBM6000_TARGET + /* If this object is from a shared library, then you should + stat on the library name, not member name. */ + + if (objfile->obfd->my_archive) + res = stat (objfile->obfd->my_archive->filename, &new_statbuf); + else +#endif + res = stat (objfile->name, &new_statbuf); + if (res != 0) + { + /* FIXME, should use print_sys_errmsg but it's not filtered. */ + printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n", + objfile->name); + continue; + } + new_modtime = new_statbuf.st_mtime; + if (new_modtime != objfile->mtime) + { + struct cleanup *old_cleanups; + struct section_offsets *offsets; + int num_offsets; + char *obfd_filename; + + printf_unfiltered ("`%s' has changed; re-reading symbols.\n", + objfile->name); + + /* There are various functions like symbol_file_add, + symfile_bfd_open, syms_from_objfile, etc., which might + appear to do what we want. But they have various other + effects which we *don't* want. So we just do stuff + ourselves. We don't worry about mapped files (for one thing, + any mapped file will be out of date). */ + + /* If we get an error, blow away this objfile (not sure if + that is the correct response for things like shared + libraries). */ + old_cleanups = make_cleanup_free_objfile (objfile); + /* We need to do this whenever any symbols go away. */ + make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); + + /* Clean up any state BFD has sitting around. We don't need + to close the descriptor but BFD lacks a way of closing the + BFD without closing the descriptor. */ + obfd_filename = bfd_get_filename (objfile->obfd); + if (!bfd_close (objfile->obfd)) + error ("Can't close BFD for %s: %s", objfile->name, + bfd_errmsg (bfd_get_error ())); + objfile->obfd = bfd_openr (obfd_filename, gnutarget); + if (objfile->obfd == NULL) + error ("Can't open %s to read symbols.", objfile->name); + /* bfd_openr sets cacheable to true, which is what we want. */ + if (!bfd_check_format (objfile->obfd, bfd_object)) + error ("Can't read symbols from %s: %s.", objfile->name, + bfd_errmsg (bfd_get_error ())); + + /* Save the offsets, we will nuke them with the rest of the + objfile_obstack. */ + num_offsets = objfile->num_sections; + offsets = ((struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (num_offsets))); + memcpy (offsets, objfile->section_offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + + /* Nuke all the state that we will re-read. Much of the following + code which sets things to NULL really is necessary to tell + other parts of GDB that there is nothing currently there. */ + + /* FIXME: Do we have to free a whole linked list, or is this + enough? */ + if (objfile->global_psymbols.list) + xmfree (objfile->md, objfile->global_psymbols.list); + memset (&objfile->global_psymbols, 0, + sizeof (objfile->global_psymbols)); + if (objfile->static_psymbols.list) + xmfree (objfile->md, objfile->static_psymbols.list); + memset (&objfile->static_psymbols, 0, + sizeof (objfile->static_psymbols)); + + /* Free the obstacks for non-reusable objfiles */ + bcache_xfree (objfile->psymbol_cache); + objfile->psymbol_cache = bcache_xmalloc (); + bcache_xfree (objfile->macro_cache); + objfile->macro_cache = bcache_xmalloc (); + if (objfile->demangled_names_hash != NULL) + { + htab_delete (objfile->demangled_names_hash); + objfile->demangled_names_hash = NULL; + } + obstack_free (&objfile->objfile_obstack, 0); + objfile->sections = NULL; + objfile->symtabs = NULL; + objfile->psymtabs = NULL; + objfile->free_psymtabs = NULL; + objfile->cp_namespace_symtab = NULL; + objfile->msymbols = NULL; + objfile->sym_private = NULL; + objfile->minimal_symbol_count = 0; + memset (&objfile->msymbol_hash, 0, + sizeof (objfile->msymbol_hash)); + memset (&objfile->msymbol_demangled_hash, 0, + sizeof (objfile->msymbol_demangled_hash)); + objfile->fundamental_types = NULL; + clear_objfile_data (objfile); + if (objfile->sf != NULL) + { + (*objfile->sf->sym_finish) (objfile); + } + + /* We never make this a mapped file. */ + objfile->md = NULL; + objfile->psymbol_cache = bcache_xmalloc (); + objfile->macro_cache = bcache_xmalloc (); + /* obstack_init also initializes the obstack so it is + empty. We could use obstack_specify_allocation but + gdb_obstack.h specifies the alloc/dealloc + functions. */ + obstack_init (&objfile->objfile_obstack); + if (build_objfile_section_table (objfile)) + { + error ("Can't find the file sections in `%s': %s", + objfile->name, bfd_errmsg (bfd_get_error ())); + } + terminate_minimal_symbol_table (objfile); + + /* We use the same section offsets as from last time. I'm not + sure whether that is always correct for shared libraries. */ + objfile->section_offsets = (struct section_offsets *) + obstack_alloc (&objfile->objfile_obstack, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + memcpy (objfile->section_offsets, offsets, + SIZEOF_N_SECTION_OFFSETS (num_offsets)); + objfile->num_sections = num_offsets; + + /* What the hell is sym_new_init for, anyway? The concept of + distinguishing between the main file and additional files + in this way seems rather dubious. */ + if (objfile == symfile_objfile) + { + (*objfile->sf->sym_new_init) (objfile); +#ifdef HPUXHPPA + RESET_HP_UX_GLOBALS (); +#endif + } + + (*objfile->sf->sym_init) (objfile); + clear_complaints (&symfile_complaints, 1, 1); + /* The "mainline" parameter is a hideous hack; I think leaving it + zero is OK since dbxread.c also does what it needs to do if + objfile->global_psymbols.size is 0. */ + (*objfile->sf->sym_read) (objfile, 0); + if (!have_partial_symbols () && !have_full_symbols ()) + { + wrap_here (""); + printf_unfiltered ("(no debugging symbols found)\n"); + wrap_here (""); + } + objfile->flags |= OBJF_SYMS; + + /* We're done reading the symbol file; finish off complaints. */ + clear_complaints (&symfile_complaints, 0, 1); + + /* Getting new symbols may change our opinion about what is + frameless. */ + + reinit_frame_cache (); + + /* Discard cleanups as symbol reading was successful. */ + discard_cleanups (old_cleanups); + + /* If the mtime has changed between the time we set new_modtime + and now, we *want* this to be out of date, so don't call stat + again now. */ + objfile->mtime = new_modtime; + reread_one = 1; + reread_separate_symbols (objfile); + } + } + } + + if (reread_one) + clear_symtab_users (); +} + + +/* Handle separate debug info for OBJFILE, which has just been + re-read: + - If we had separate debug info before, but now we don't, get rid + of the separated objfile. + - If we didn't have separated debug info before, but now we do, + read in the new separated debug info file. + - If the debug link points to a different file, toss the old one + and read the new one. + This function does *not* handle the case where objfile is still + using the same separate debug info file, but that file's timestamp + has changed. That case should be handled by the loop in + reread_symbols already. */ +static void +reread_separate_symbols (struct objfile *objfile) +{ + char *debug_file; + unsigned long crc32; + + /* Does the updated objfile's debug info live in a + separate file? */ + debug_file = find_separate_debug_file (objfile); + + if (objfile->separate_debug_objfile) + { + /* There are two cases where we need to get rid of + the old separated debug info objfile: + - if the new primary objfile doesn't have + separated debug info, or + - if the new primary objfile has separate debug + info, but it's under a different filename. + + If the old and new objfiles both have separate + debug info, under the same filename, then we're + okay --- if the separated file's contents have + changed, we will have caught that when we + visited it in this function's outermost + loop. */ + if (! debug_file + || strcmp (debug_file, objfile->separate_debug_objfile->name) != 0) + free_objfile (objfile->separate_debug_objfile); + } + + /* If the new objfile has separate debug info, and we + haven't loaded it already, do so now. */ + if (debug_file + && ! objfile->separate_debug_objfile) + { + /* Use the same section offset table as objfile itself. + Preserve the flags from objfile that make sense. */ + objfile->separate_debug_objfile + = (symbol_file_add_with_addrs_or_offsets + (debug_file, + info_verbose, /* from_tty: Don't override the default. */ + 0, /* No addr table. */ + objfile->section_offsets, objfile->num_sections, + 0, /* Not mainline. See comments about this above. */ + objfile->flags & (OBJF_REORDERED | OBJF_SHARED | OBJF_READNOW + | OBJF_USERLOADED))); + objfile->separate_debug_objfile->separate_debug_objfile_backlink + = objfile; + } +} + + + + + +typedef struct +{ + char *ext; + enum language lang; +} +filename_language; + +static filename_language *filename_language_table; +static int fl_table_size, fl_table_next; + +static void +add_filename_language (char *ext, enum language lang) +{ + if (fl_table_next >= fl_table_size) + { + fl_table_size += 10; + filename_language_table = + xrealloc (filename_language_table, + fl_table_size * sizeof (*filename_language_table)); + } + + filename_language_table[fl_table_next].ext = xstrdup (ext); + filename_language_table[fl_table_next].lang = lang; + fl_table_next++; +} + +static char *ext_args; + +static void +set_ext_lang_command (char *args, int from_tty) +{ + int i; + char *cp = ext_args; + enum language lang; + + /* First arg is filename extension, starting with '.' */ + if (*cp != '.') + error ("'%s': Filename extension must begin with '.'", ext_args); + + /* Find end of first arg. */ + while (*cp && !isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Null-terminate first arg */ + *cp++ = '\0'; + + /* Find beginning of second arg, which should be a source language. */ + while (*cp && isspace (*cp)) + cp++; + + if (*cp == '\0') + error ("'%s': two arguments required -- filename extension and language", + ext_args); + + /* Lookup the language from among those we know. */ + lang = language_enum (cp); + + /* Now lookup the filename extension: do we already know it? */ + for (i = 0; i < fl_table_next; i++) + if (0 == strcmp (ext_args, filename_language_table[i].ext)) + break; + + if (i >= fl_table_next) + { + /* new file extension */ + add_filename_language (ext_args, lang); + } + else + { + /* redefining a previously known filename extension */ + + /* if (from_tty) */ + /* query ("Really make files of type %s '%s'?", */ + /* ext_args, language_str (lang)); */ + + xfree (filename_language_table[i].ext); + filename_language_table[i].ext = xstrdup (ext_args); + filename_language_table[i].lang = lang; + } +} + +static void +info_ext_lang_command (char *args, int from_tty) +{ + int i; + + printf_filtered ("Filename extensions and the languages they represent:"); + printf_filtered ("\n\n"); + for (i = 0; i < fl_table_next; i++) + printf_filtered ("\t%s\t- %s\n", + filename_language_table[i].ext, + language_str (filename_language_table[i].lang)); +} + +static void +init_filename_language_table (void) +{ + if (fl_table_size == 0) /* protect against repetition */ + { + fl_table_size = 20; + fl_table_next = 0; + filename_language_table = + xmalloc (fl_table_size * sizeof (*filename_language_table)); + add_filename_language (".c", language_c); + add_filename_language (".C", language_cplus); + add_filename_language (".cc", language_cplus); + add_filename_language (".cp", language_cplus); + add_filename_language (".cpp", language_cplus); + add_filename_language (".cxx", language_cplus); + add_filename_language (".c++", language_cplus); + add_filename_language (".java", language_java); + add_filename_language (".class", language_java); + add_filename_language (".m", language_objc); + add_filename_language (".f", language_fortran); + add_filename_language (".F", language_fortran); + add_filename_language (".s", language_asm); + add_filename_language (".S", language_asm); + add_filename_language (".pas", language_pascal); + add_filename_language (".p", language_pascal); + add_filename_language (".pp", language_pascal); + } +} + +enum language +deduce_language_from_filename (char *filename) +{ + int i; + char *cp; + + if (filename != NULL) + if ((cp = strrchr (filename, '.')) != NULL) + for (i = 0; i < fl_table_next; i++) + if (strcmp (cp, filename_language_table[i].ext) == 0) + return filename_language_table[i].lang; + + return language_unknown; +} + +/* allocate_symtab: + + Allocate and partly initialize a new symbol table. Return a pointer + to it. error() if no space. + + Caller must set these fields: + LINETABLE(symtab) + symtab->blockvector + symtab->dirname + symtab->free_code + symtab->free_ptr + possibly free_named_symtabs (symtab->filename); + */ + +struct symtab * +allocate_symtab (char *filename, struct objfile *objfile) +{ + struct symtab *symtab; + + symtab = (struct symtab *) + obstack_alloc (&objfile->objfile_obstack, sizeof (struct symtab)); + memset (symtab, 0, sizeof (*symtab)); + symtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + symtab->fullname = NULL; + symtab->language = deduce_language_from_filename (filename); + symtab->debugformat = obsavestring ("unknown", 7, + &objfile->objfile_obstack); + + /* Hook it to the objfile it comes from */ + + symtab->objfile = objfile; + symtab->next = objfile->symtabs; + objfile->symtabs = symtab; + + /* FIXME: This should go away. It is only defined for the Z8000, + and the Z8000 definition of this macro doesn't have anything to + do with the now-nonexistent EXTRA_SYMTAB_INFO macro, it's just + here for convenience. */ +#ifdef INIT_EXTRA_SYMTAB_INFO + INIT_EXTRA_SYMTAB_INFO (symtab); +#endif + + return (symtab); +} + +struct partial_symtab * +allocate_psymtab (char *filename, struct objfile *objfile) +{ + struct partial_symtab *psymtab; + + if (objfile->free_psymtabs) + { + psymtab = objfile->free_psymtabs; + objfile->free_psymtabs = psymtab->next; + } + else + psymtab = (struct partial_symtab *) + obstack_alloc (&objfile->objfile_obstack, + sizeof (struct partial_symtab)); + + memset (psymtab, 0, sizeof (struct partial_symtab)); + psymtab->filename = obsavestring (filename, strlen (filename), + &objfile->objfile_obstack); + psymtab->symtab = NULL; + + /* Prepend it to the psymtab list for the objfile it belongs to. + Psymtabs are searched in most recent inserted -> least recent + inserted order. */ + + psymtab->objfile = objfile; + psymtab->next = objfile->psymtabs; + objfile->psymtabs = psymtab; +#if 0 + { + struct partial_symtab **prev_pst; + psymtab->objfile = objfile; + psymtab->next = NULL; + prev_pst = &(objfile->psymtabs); + while ((*prev_pst) != NULL) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = psymtab; + } +#endif + + return (psymtab); +} + +void +discard_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab **prev_pst; + + /* From dbxread.c: + Empty psymtabs happen as a result of header files which don't + have any symbols in them. There can be a lot of them. But this + check is wrong, in that a psymtab with N_SLINE entries but + nothing else is not empty, but we don't realize that. Fixing + that without slowing things down might be tricky. */ + + /* First, snip it out of the psymtab chain */ + + prev_pst = &(pst->objfile->psymtabs); + while ((*prev_pst) != pst) + prev_pst = &((*prev_pst)->next); + (*prev_pst) = pst->next; + + /* Next, put it on a free list for recycling */ + + pst->next = pst->objfile->free_psymtabs; + pst->objfile->free_psymtabs = pst; +} + + +/* Reset all data structures in gdb which may contain references to symbol + table data. */ + +void +clear_symtab_users (void) +{ + /* Someday, we should do better than this, by only blowing away + the things that really need to be blown. */ + clear_value_history (); + clear_displays (); + clear_internalvars (); + breakpoint_re_set (); + set_default_breakpoint (0, 0, 0, 0); + clear_current_source_symtab_and_line (); + clear_pc_function_cache (); + if (target_new_objfile_hook) + target_new_objfile_hook (NULL); +} + +static void +clear_symtab_users_cleanup (void *ignore) +{ + clear_symtab_users (); +} + +/* clear_symtab_users_once: + + This function is run after symbol reading, or from a cleanup. + If an old symbol table was obsoleted, the old symbol table + has been blown away, but the other GDB data structures that may + reference it have not yet been cleared or re-directed. (The old + symtab was zapped, and the cleanup queued, in free_named_symtab() + below.) + + This function can be queued N times as a cleanup, or called + directly; it will do all the work the first time, and then will be a + no-op until the next time it is queued. This works by bumping a + counter at queueing time. Much later when the cleanup is run, or at + the end of symbol processing (in case the cleanup is discarded), if + the queued count is greater than the "done-count", we do the work + and set the done-count to the queued count. If the queued count is + less than or equal to the done-count, we just ignore the call. This + is needed because reading a single .o file will often replace many + symtabs (one per .h file, for example), and we don't want to reset + the breakpoints N times in the user's face. + + The reason we both queue a cleanup, and call it directly after symbol + reading, is because the cleanup protects us in case of errors, but is + discarded if symbol reading is successful. */ + +#if 0 +/* FIXME: As free_named_symtabs is currently a big noop this function + is no longer needed. */ +static void clear_symtab_users_once (void); + +static int clear_symtab_users_queued; +static int clear_symtab_users_done; + +static void +clear_symtab_users_once (void) +{ + /* Enforce once-per-`do_cleanups'-semantics */ + if (clear_symtab_users_queued <= clear_symtab_users_done) + return; + clear_symtab_users_done = clear_symtab_users_queued; + + clear_symtab_users (); +} +#endif + +/* Delete the specified psymtab, and any others that reference it. */ + +static void +cashier_psymtab (struct partial_symtab *pst) +{ + struct partial_symtab *ps, *pprev = NULL; + int i; + + /* Find its previous psymtab in the chain */ + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + if (ps == pst) + break; + pprev = ps; + } + + if (ps) + { + /* Unhook it from the chain. */ + if (ps == pst->objfile->psymtabs) + pst->objfile->psymtabs = ps->next; + else + pprev->next = ps->next; + + /* FIXME, we can't conveniently deallocate the entries in the + partial_symbol lists (global_psymbols/static_psymbols) that + this psymtab points to. These just take up space until all + the psymtabs are reclaimed. Ditto the dependencies list and + filename, which are all in the objfile_obstack. */ + + /* We need to cashier any psymtab that has this one as a dependency... */ + again: + for (ps = pst->objfile->psymtabs; ps; ps = ps->next) + { + for (i = 0; i < ps->number_of_dependencies; i++) + { + if (ps->dependencies[i] == pst) + { + cashier_psymtab (ps); + goto again; /* Must restart, chain has been munged. */ + } + } + } + } +} + +/* If a symtab or psymtab for filename NAME is found, free it along + with any dependent breakpoints, displays, etc. + Used when loading new versions of object modules with the "add-file" + command. This is only called on the top-level symtab or psymtab's name; + it is not called for subsidiary files such as .h files. + + Return value is 1 if we blew away the environment, 0 if not. + FIXME. The return value appears to never be used. + + FIXME. I think this is not the best way to do this. We should + work on being gentler to the environment while still cleaning up + all stray pointers into the freed symtab. */ + +int +free_named_symtabs (char *name) +{ +#if 0 + /* FIXME: With the new method of each objfile having it's own + psymtab list, this function needs serious rethinking. In particular, + why was it ever necessary to toss psymtabs with specific compilation + unit filenames, as opposed to all psymtabs from a particular symbol + file? -- fnf + Well, the answer is that some systems permit reloading of particular + compilation units. We want to blow away any old info about these + compilation units, regardless of which objfiles they arrived in. --gnu. */ + + struct symtab *s; + struct symtab *prev; + struct partial_symtab *ps; + struct blockvector *bv; + int blewit = 0; + + /* We only wack things if the symbol-reload switch is set. */ + if (!symbol_reloading) + return 0; + + /* Some symbol formats have trouble providing file names... */ + if (name == 0 || *name == '\0') + return 0; + + /* Look for a psymtab with the specified name. */ + +again2: + for (ps = partial_symtab_list; ps; ps = ps->next) + { + if (strcmp (name, ps->filename) == 0) + { + cashier_psymtab (ps); /* Blow it away...and its little dog, too. */ + goto again2; /* Must restart, chain has been munged */ + } + } + + /* Look for a symtab with the specified name. */ + + for (s = symtab_list; s; s = s->next) + { + if (strcmp (name, s->filename) == 0) + break; + prev = s; + } + + if (s) + { + if (s == symtab_list) + symtab_list = s->next; + else + prev->next = s->next; + + /* For now, queue a delete for all breakpoints, displays, etc., whether + or not they depend on the symtab being freed. This should be + changed so that only those data structures affected are deleted. */ + + /* But don't delete anything if the symtab is empty. + This test is necessary due to a bug in "dbxread.c" that + causes empty symtabs to be created for N_SO symbols that + contain the pathname of the object file. (This problem + has been fixed in GDB 3.9x). */ + + bv = BLOCKVECTOR (s); + if (BLOCKVECTOR_NBLOCKS (bv) > 2 + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) + || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) + { + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); + clear_symtab_users_queued++; + make_cleanup (clear_symtab_users_once, 0); + blewit = 1; + } + else + { + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); + } + + free_symtab (s); + } + else + { + /* It is still possible that some breakpoints will be affected + even though no symtab was found, since the file might have + been compiled without debugging, and hence not be associated + with a symtab. In order to handle this correctly, we would need + to keep a list of text address ranges for undebuggable files. + For now, we do nothing, since this is a fairly obscure case. */ + ; + } + + /* FIXME, what about the minimal symbol table? */ + return blewit; +#else + return (0); +#endif +} + +/* Allocate and partially fill a partial symtab. It will be + completely filled at the end of the symbol list. + + FILENAME is the name of the symbol-file we are reading from. */ + +struct partial_symtab * +start_psymtab_common (struct objfile *objfile, + struct section_offsets *section_offsets, char *filename, + CORE_ADDR textlow, struct partial_symbol **global_syms, + struct partial_symbol **static_syms) +{ + struct partial_symtab *psymtab; + + psymtab = allocate_psymtab (filename, objfile); + psymtab->section_offsets = section_offsets; + psymtab->textlow = textlow; + psymtab->texthigh = psymtab->textlow; /* default */ + psymtab->globals_offset = global_syms - objfile->global_psymbols.list; + psymtab->statics_offset = static_syms - objfile->static_psymbols.list; + return (psymtab); +} + +/* Add a symbol with a long value to a psymtab. + Since one arg is a struct, we pass in a ptr and deref it (sigh). + Return the partial symbol that has been added. */ + +/* NOTE: carlton/2003-09-11: The reason why we return the partial + symbol is so that callers can get access to the symbol's demangled + name, which they don't have any cheap way to determine otherwise. + (Currenly, dwarf2read.c is the only file who uses that information, + though it's possible that other readers might in the future.) + Elena wasn't thrilled about that, and I don't blame her, but we + couldn't come up with a better way to get that information. If + it's needed in other situations, we could consider breaking up + SYMBOL_SET_NAMES to provide access to the demangled name lookup + cache. */ + +const struct partial_symbol * +add_psymbol_to_list (char *name, int namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + + SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); + + return psym; +} + +/* Add a symbol with a long value to a psymtab. This differs from + * add_psymbol_to_list above in taking both a mangled and a demangled + * name. */ + +void +add_psymbol_with_dem_name_to_list (char *name, int namelength, char *dem_name, + int dem_namelength, domain_enum domain, + enum address_class class, + struct psymbol_allocation_list *list, long val, /* Value as a long */ + CORE_ADDR coreaddr, /* Value as a CORE_ADDR */ + enum language language, + struct objfile *objfile) +{ + struct partial_symbol *psym; + char *buf = alloca (namelength + 1); + /* psymbol is static so that there will be no uninitialized gaps in the + structure which might contain random data, causing cache misses in + bcache. */ + static struct partial_symbol psymbol; + + /* Create local copy of the partial symbol */ + + memcpy (buf, name, namelength); + buf[namelength] = '\0'; + DEPRECATED_SYMBOL_NAME (&psymbol) = deprecated_bcache (buf, namelength + 1, + objfile->psymbol_cache); + + buf = alloca (dem_namelength + 1); + memcpy (buf, dem_name, dem_namelength); + buf[dem_namelength] = '\0'; + + switch (language) + { + case language_c: + case language_cplus: + SYMBOL_CPLUS_DEMANGLED_NAME (&psymbol) = + deprecated_bcache (buf, dem_namelength + 1, objfile->psymbol_cache); + break; + /* FIXME What should be done for the default case? Ignoring for now. */ + } + + /* val and coreaddr are mutually exclusive, one of them *will* be zero */ + if (val != 0) + { + SYMBOL_VALUE (&psymbol) = val; + } + else + { + SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr; + } + SYMBOL_SECTION (&psymbol) = 0; + SYMBOL_LANGUAGE (&psymbol) = language; + PSYMBOL_DOMAIN (&psymbol) = domain; + PSYMBOL_CLASS (&psymbol) = class; + SYMBOL_INIT_LANGUAGE_SPECIFIC (&psymbol, language); + + /* Stash the partial symbol away in the cache */ + psym = deprecated_bcache (&psymbol, sizeof (struct partial_symbol), + objfile->psymbol_cache); + + /* Save pointer to partial symbol in psymtab, growing symtab if needed. */ + if (list->next >= list->list + list->size) + { + extend_psymbol_list (list, objfile); + } + *list->next++ = psym; + OBJSTAT (objfile, n_psyms++); +} + +/* Initialize storage for partial symbols. */ + +void +init_psymbol_list (struct objfile *objfile, int total_symbols) +{ + /* Free any previously allocated psymbol lists. */ + + if (objfile->global_psymbols.list) + { + xmfree (objfile->md, objfile->global_psymbols.list); + } + if (objfile->static_psymbols.list) + { + xmfree (objfile->md, objfile->static_psymbols.list); + } + + /* Current best guess is that approximately a twentieth + of the total symbols (in a debugging file) are global or static + oriented symbols */ + + objfile->global_psymbols.size = total_symbols / 10; + objfile->static_psymbols.size = total_symbols / 10; + + if (objfile->global_psymbols.size > 0) + { + objfile->global_psymbols.next = + objfile->global_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->global_psymbols.size + * sizeof (struct partial_symbol *))); + } + if (objfile->static_psymbols.size > 0) + { + objfile->static_psymbols.next = + objfile->static_psymbols.list = (struct partial_symbol **) + xmmalloc (objfile->md, (objfile->static_psymbols.size + * sizeof (struct partial_symbol *))); + } +} + +/* OVERLAYS: + The following code implements an abstraction for debugging overlay sections. + + The target model is as follows: + 1) The gnu linker will permit multiple sections to be mapped into the + same VMA, each with its own unique LMA (or load address). + 2) It is assumed that some runtime mechanism exists for mapping the + sections, one by one, from the load address into the VMA address. + 3) This code provides a mechanism for gdb to keep track of which + sections should be considered to be mapped from the VMA to the LMA. + This information is used for symbol lookup, and memory read/write. + For instance, if a section has been mapped then its contents + should be read from the VMA, otherwise from the LMA. + + Two levels of debugger support for overlays are available. One is + "manual", in which the debugger relies on the user to tell it which + overlays are currently mapped. This level of support is + implemented entirely in the core debugger, and the information about + whether a section is mapped is kept in the objfile->obj_section table. + + The second level of support is "automatic", and is only available if + the target-specific code provides functionality to read the target's + overlay mapping table, and translate its contents for the debugger + (by updating the mapped state information in the obj_section tables). + + The interface is as follows: + User commands: + overlay map -- tell gdb to consider this section mapped + overlay unmap -- tell gdb to consider this section unmapped + overlay list -- list the sections that GDB thinks are mapped + overlay read-target -- get the target's state of what's mapped + overlay off/manual/auto -- set overlay debugging state + Functional interface: + find_pc_mapped_section(pc): if the pc is in the range of a mapped + section, return that section. + find_pc_overlay(pc): find any overlay section that contains + the pc, either in its VMA or its LMA + overlay_is_mapped(sect): true if overlay is marked as mapped + section_is_overlay(sect): true if section's VMA != LMA + pc_in_mapped_range(pc,sec): true if pc belongs to section's VMA + pc_in_unmapped_range(...): true if pc belongs to section's LMA + sections_overlap(sec1, sec2): true if mapped sec1 and sec2 ranges overlap + overlay_mapped_address(...): map an address from section's LMA to VMA + overlay_unmapped_address(...): map an address from section's VMA to LMA + symbol_overlayed_address(...): Return a "current" address for symbol: + either in VMA or LMA depending on whether + the symbol's section is currently mapped + */ + +/* Overlay debugging state: */ + +enum overlay_debugging_state overlay_debugging = ovly_off; +int overlay_cache_invalid = 0; /* True if need to refresh mapped state */ + +/* Target vector for refreshing overlay mapped state */ +static void simple_overlay_update (struct obj_section *); +void (*target_overlay_update) (struct obj_section *) = simple_overlay_update; + +/* Function: section_is_overlay (SECTION) + Returns true if SECTION has VMA not equal to LMA, ie. + SECTION is loaded at an address different from where it will "run". */ + +int +section_is_overlay (asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section->lma != 0 && + section->vma != section->lma) + return 1; + + return 0; +} + +/* Function: overlay_invalidate_all (void) + Invalidate the mapped state of all overlay sections (mark it as stale). */ + +static void +overlay_invalidate_all (void) +{ + struct objfile *objfile; + struct obj_section *sect; + + ALL_OBJSECTIONS (objfile, sect) + if (section_is_overlay (sect->the_bfd_section)) + sect->ovly_mapped = -1; +} + +/* Function: overlay_is_mapped (SECTION) + Returns true if section is an overlay, and is currently mapped. + Private: public access is thru function section_is_mapped. + + Access to the ovly_mapped flag is restricted to this function, so + that we can do automatic update. If the global flag + OVERLAY_CACHE_INVALID is set (by wait_for_inferior), then call + overlay_invalidate_all. If the mapped state of the particular + section is stale, then call TARGET_OVERLAY_UPDATE to refresh it. */ + +static int +overlay_is_mapped (struct obj_section *osect) +{ + if (osect == 0 || !section_is_overlay (osect->the_bfd_section)) + return 0; + + switch (overlay_debugging) + { + default: + case ovly_off: + return 0; /* overlay debugging off */ + case ovly_auto: /* overlay debugging automatic */ + /* Unles there is a target_overlay_update function, + there's really nothing useful to do here (can't really go auto) */ + if (target_overlay_update) + { + if (overlay_cache_invalid) + { + overlay_invalidate_all (); + overlay_cache_invalid = 0; + } + if (osect->ovly_mapped == -1) + (*target_overlay_update) (osect); + } + /* fall thru to manual case */ + case ovly_on: /* overlay debugging manual */ + return osect->ovly_mapped == 1; + } +} + +/* Function: section_is_mapped + Returns true if section is an overlay, and is currently mapped. */ + +int +section_is_mapped (asection *section) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + ALL_OBJSECTIONS (objfile, osect) + if (osect->the_bfd_section == section) + return overlay_is_mapped (osect); + + return 0; +} + +/* Function: pc_in_unmapped_range + If PC falls into the lma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_unmapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->lma <= pc && pc < section->lma + size) + return 1; + } + return 0; +} + +/* Function: pc_in_mapped_range + If PC falls into the vma range of SECTION, return true, else false. */ + +CORE_ADDR +pc_in_mapped_range (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + int size; + + if (overlay_debugging) + if (section && section_is_overlay (section)) + { + size = bfd_get_section_size_before_reloc (section); + if (section->vma <= pc && pc < section->vma + size) + return 1; + } + return 0; +} + + +/* Return true if the mapped ranges of sections A and B overlap, false + otherwise. */ +static int +sections_overlap (asection *a, asection *b) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + CORE_ADDR a_start = a->vma; + CORE_ADDR a_end = a->vma + bfd_get_section_size_before_reloc (a); + CORE_ADDR b_start = b->vma; + CORE_ADDR b_end = b->vma + bfd_get_section_size_before_reloc (b); + + return (a_start < b_end && b_start < a_end); +} + +/* Function: overlay_unmapped_address (PC, SECTION) + Returns the address corresponding to PC in the unmapped (load) range. + May be the same as PC. */ + +CORE_ADDR +overlay_unmapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_lma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_mapped_range (pc, section)) + return pc + section->lma - section->vma; + + return pc; +} + +/* Function: overlay_mapped_address (PC, SECTION) + Returns the address corresponding to PC in the mapped (runtime) range. + May be the same as PC. */ + +CORE_ADDR +overlay_mapped_address (CORE_ADDR pc, asection *section) +{ + /* FIXME: need bfd *, so we can use bfd_section_vma methods. */ + + if (overlay_debugging) + if (section && section_is_overlay (section) && + pc_in_unmapped_range (pc, section)) + return pc + section->vma - section->lma; + + return pc; +} + + +/* Function: symbol_overlayed_address + Return one of two addresses (relative to the VMA or to the LMA), + depending on whether the section is mapped or not. */ + +CORE_ADDR +symbol_overlayed_address (CORE_ADDR address, asection *section) +{ + if (overlay_debugging) + { + /* If the symbol has no section, just return its regular address. */ + if (section == 0) + return address; + /* If the symbol's section is not an overlay, just return its address */ + if (!section_is_overlay (section)) + return address; + /* If the symbol's section is mapped, just return its address */ + if (section_is_mapped (section)) + return address; + /* + * HOWEVER: if the symbol is in an overlay section which is NOT mapped, + * then return its LOADED address rather than its vma address!! + */ + return overlay_unmapped_address (address, section); + } + return address; +} + +/* Function: find_pc_overlay (PC) + Return the best-match overlay section for PC: + If PC matches a mapped overlay section's VMA, return that section. + Else if PC matches an unmapped section's VMA, return that section. + Else if PC matches an unmapped section's LMA, return that section. */ + +asection * +find_pc_overlay (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect, *best_match = NULL; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + if (pc_in_mapped_range (pc, osect->the_bfd_section)) + { + if (overlay_is_mapped (osect)) + return osect->the_bfd_section; + else + best_match = osect; + } + else if (pc_in_unmapped_range (pc, osect->the_bfd_section)) + best_match = osect; + } + return best_match ? best_match->the_bfd_section : NULL; +} + +/* Function: find_pc_mapped_section (PC) + If PC falls into the VMA address range of an overlay section that is + currently marked as MAPPED, return that section. Else return NULL. */ + +asection * +find_pc_mapped_section (CORE_ADDR pc) +{ + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (pc_in_mapped_range (pc, osect->the_bfd_section) && + overlay_is_mapped (osect)) + return osect->the_bfd_section; + + return NULL; +} + +/* Function: list_overlays_command + Print a list of mapped sections and their PC ranges */ + +void +list_overlays_command (char *args, int from_tty) +{ + int nmapped = 0; + struct objfile *objfile; + struct obj_section *osect; + + if (overlay_debugging) + ALL_OBJSECTIONS (objfile, osect) + if (overlay_is_mapped (osect)) + { + const char *name; + bfd_vma lma, vma; + int size; + + vma = bfd_section_vma (objfile->obfd, osect->the_bfd_section); + lma = bfd_section_lma (objfile->obfd, osect->the_bfd_section); + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + name = bfd_section_name (objfile->obfd, osect->the_bfd_section); + + printf_filtered ("Section %s, loaded at ", name); + print_address_numeric (lma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (lma + size, 1, gdb_stdout); + printf_filtered (", mapped at "); + print_address_numeric (vma, 1, gdb_stdout); + puts_filtered (" - "); + print_address_numeric (vma + size, 1, gdb_stdout); + puts_filtered ("\n"); + + nmapped++; + } + if (nmapped == 0) + printf_filtered ("No sections are mapped.\n"); +} + +/* Function: map_overlay_command + Mark the named section as mapped (ie. residing at its VMA address). */ + +void +map_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile, *objfile2; + struct obj_section *sec, *sec2; + asection *bfdsec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + /* Now, check to see if the section is an overlay. */ + bfdsec = sec->the_bfd_section; + if (!section_is_overlay (bfdsec)) + continue; /* not an overlay section */ + + /* Mark the overlay as "mapped" */ + sec->ovly_mapped = 1; + + /* Next, make a pass and unmap any sections that are + overlapped by this new section: */ + ALL_OBJSECTIONS (objfile2, sec2) + if (sec2->ovly_mapped + && sec != sec2 + && sec->the_bfd_section != sec2->the_bfd_section + && sections_overlap (sec->the_bfd_section, + sec2->the_bfd_section)) + { + if (info_verbose) + printf_unfiltered ("Note: section %s unmapped by overlap\n", + bfd_section_name (objfile->obfd, + sec2->the_bfd_section)); + sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */ + } + return; + } + error ("No overlay section called %s", args); +} + +/* Function: unmap_overlay_command + Mark the overlay section as unmapped + (ie. resident in its LMA address range, rather than the VMA range). */ + +void +unmap_overlay_command (char *args, int from_tty) +{ + struct objfile *objfile; + struct obj_section *sec; + + if (!overlay_debugging) + error ("\ +Overlay debugging not enabled. Use either the 'overlay auto' or\n\ +the 'overlay manual' command."); + + if (args == 0 || *args == 0) + error ("Argument required: name of an overlay section"); + + /* First, find a section matching the user supplied argument */ + ALL_OBJSECTIONS (objfile, sec) + if (!strcmp (bfd_section_name (objfile->obfd, sec->the_bfd_section), args)) + { + if (!sec->ovly_mapped) + error ("Section %s is not mapped", args); + sec->ovly_mapped = 0; + return; + } + error ("No overlay section called %s", args); +} + +/* Function: overlay_auto_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_auto_command (char *args, int from_tty) +{ + overlay_debugging = ovly_auto; + enable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Automatic overlay debugging enabled."); +} + +/* Function: overlay_manual_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_manual_command (char *args, int from_tty) +{ + overlay_debugging = ovly_on; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging enabled."); +} + +/* Function: overlay_off_command + A utility command to turn on overlay debugging. + Possibly this should be done via a set/show command. */ + +static void +overlay_off_command (char *args, int from_tty) +{ + overlay_debugging = ovly_off; + disable_overlay_breakpoints (); + if (info_verbose) + printf_unfiltered ("Overlay debugging disabled."); +} + +static void +overlay_load_command (char *args, int from_tty) +{ + if (target_overlay_update) + (*target_overlay_update) (NULL); + else + error ("This target does not know how to read its overlay state."); +} + +/* Function: overlay_command + A place-holder for a mis-typed command */ + +/* Command list chain containing all defined "overlay" subcommands. */ +struct cmd_list_element *overlaylist; + +static void +overlay_command (char *args, int from_tty) +{ + printf_unfiltered + ("\"overlay\" must be followed by the name of an overlay command.\n"); + help_list (overlaylist, "overlay ", -1, gdb_stdout); +} + + +/* Target Overlays for the "Simplest" overlay manager: + + This is GDB's default target overlay layer. It works with the + minimal overlay manager supplied as an example by Cygnus. The + entry point is via a function pointer "target_overlay_update", + so targets that use a different runtime overlay manager can + substitute their own overlay_update function and take over the + function pointer. + + The overlay_update function pokes around in the target's data structures + to see what overlays are mapped, and updates GDB's overlay mapping with + this information. + + In this simple implementation, the target data structures are as follows: + unsigned _novlys; /# number of overlay sections #/ + unsigned _ovly_table[_novlys][4] = { + {VMA, SIZE, LMA, MAPPED}, /# one entry per overlay section #/ + {..., ..., ..., ...}, + } + unsigned _novly_regions; /# number of overlay regions #/ + unsigned _ovly_region_table[_novly_regions][3] = { + {VMA, SIZE, MAPPED_TO_LMA}, /# one entry per overlay region #/ + {..., ..., ...}, + } + These functions will attempt to update GDB's mappedness state in the + symbol section table, based on the target's mappedness state. + + To do this, we keep a cached copy of the target's _ovly_table, and + attempt to detect when the cached copy is invalidated. The main + entry point is "simple_overlay_update(SECT), which looks up SECT in + the cached table and re-reads only the entry for that section from + the target (whenever possible). + */ + +/* Cached, dynamically allocated copies of the target data structures: */ +static unsigned (*cache_ovly_table)[4] = 0; +#if 0 +static unsigned (*cache_ovly_region_table)[3] = 0; +#endif +static unsigned cache_novlys = 0; +#if 0 +static unsigned cache_novly_regions = 0; +#endif +static CORE_ADDR cache_ovly_table_base = 0; +#if 0 +static CORE_ADDR cache_ovly_region_table_base = 0; +#endif +enum ovly_index + { + VMA, SIZE, LMA, MAPPED + }; +#define TARGET_LONG_BYTES (TARGET_LONG_BIT / TARGET_CHAR_BIT) + +/* Throw away the cached copy of _ovly_table */ +static void +simple_free_overlay_table (void) +{ + if (cache_ovly_table) + xfree (cache_ovly_table); + cache_novlys = 0; + cache_ovly_table = NULL; + cache_ovly_table_base = 0; +} + +#if 0 +/* Throw away the cached copy of _ovly_region_table */ +static void +simple_free_overlay_region_table (void) +{ + if (cache_ovly_region_table) + xfree (cache_ovly_region_table); + cache_novly_regions = 0; + cache_ovly_region_table = NULL; + cache_ovly_region_table_base = 0; +} +#endif + +/* Read an array of ints from the target into a local buffer. + Convert to host order. int LEN is number of ints */ +static void +read_target_long_array (CORE_ADDR memaddr, unsigned int *myaddr, int len) +{ + /* FIXME (alloca): Not safe if array is very large. */ + char *buf = alloca (len * TARGET_LONG_BYTES); + int i; + + read_memory (memaddr, buf, len * TARGET_LONG_BYTES); + for (i = 0; i < len; i++) + myaddr[i] = extract_unsigned_integer (TARGET_LONG_BYTES * i + buf, + TARGET_LONG_BYTES); +} + +/* Find and grab a copy of the target _ovly_table + (and _novlys, which is needed for the table's size) */ +static int +simple_read_overlay_table (void) +{ + struct minimal_symbol *novlys_msym, *ovly_table_msym; + + simple_free_overlay_table (); + novlys_msym = lookup_minimal_symbol ("_novlys", NULL, NULL); + if (! novlys_msym) + { + error ("Error reading inferior's overlay table: " + "couldn't find `_novlys' variable\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + ovly_table_msym = lookup_minimal_symbol ("_ovly_table", NULL, NULL); + if (! ovly_table_msym) + { + error ("Error reading inferior's overlay table: couldn't find " + "`_ovly_table' array\n" + "in inferior. Use `overlay manual' mode."); + return 0; + } + + cache_novlys = read_memory_integer (SYMBOL_VALUE_ADDRESS (novlys_msym), 4); + cache_ovly_table + = (void *) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); + cache_ovly_table_base = SYMBOL_VALUE_ADDRESS (ovly_table_msym); + read_target_long_array (cache_ovly_table_base, + (int *) cache_ovly_table, + cache_novlys * 4); + + return 1; /* SUCCESS */ +} + +#if 0 +/* Find and grab a copy of the target _ovly_region_table + (and _novly_regions, which is needed for the table's size) */ +static int +simple_read_overlay_region_table (void) +{ + struct minimal_symbol *msym; + + simple_free_overlay_region_table (); + msym = lookup_minimal_symbol ("_novly_regions", NULL, NULL); + if (msym != NULL) + cache_novly_regions = read_memory_integer (SYMBOL_VALUE_ADDRESS (msym), 4); + else + return 0; /* failure */ + cache_ovly_region_table = (void *) xmalloc (cache_novly_regions * 12); + if (cache_ovly_region_table != NULL) + { + msym = lookup_minimal_symbol ("_ovly_region_table", NULL, NULL); + if (msym != NULL) + { + cache_ovly_region_table_base = SYMBOL_VALUE_ADDRESS (msym); + read_target_long_array (cache_ovly_region_table_base, + (int *) cache_ovly_region_table, + cache_novly_regions * 3); + } + else + return 0; /* failure */ + } + else + return 0; /* failure */ + return 1; /* SUCCESS */ +} +#endif + +/* Function: simple_overlay_update_1 + A helper function for simple_overlay_update. Assuming a cached copy + of _ovly_table exists, look through it to find an entry whose vma, + lma and size match those of OSECT. Re-read the entry and make sure + it still matches OSECT (else the table may no longer be valid). + Set OSECT's mapped state to match the entry. Return: 1 for + success, 0 for failure. */ + +static int +simple_overlay_update_1 (struct obj_section *osect) +{ + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + read_target_long_array (cache_ovly_table_base + i * TARGET_LONG_BYTES, + (int *) cache_ovly_table[i], 4); + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + return 1; + } + else /* Warning! Warning! Target's ovly table has changed! */ + return 0; + } + return 0; +} + +/* Function: simple_overlay_update + If OSECT is NULL, then update all sections' mapped state + (after re-reading the entire target _ovly_table). + If OSECT is non-NULL, then try to find a matching entry in the + cached ovly_table and update only OSECT's mapped state. + If a cached entry can't be found or the cache isn't valid, then + re-read the entire cache, and go ahead and update all sections. */ + +static void +simple_overlay_update (struct obj_section *osect) +{ + struct objfile *objfile; + + /* Were we given an osect to look up? NULL means do all of them. */ + if (osect) + /* Have we got a cached copy of the target's overlay table? */ + if (cache_ovly_table != NULL) + /* Does its cached location match what's currently in the symtab? */ + if (cache_ovly_table_base == + SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL))) + /* Then go ahead and try to look up this single section in the cache */ + if (simple_overlay_update_1 (osect)) + /* Found it! We're done. */ + return; + + /* Cached table no good: need to read the entire table anew. + Or else we want all the sections, in which case it's actually + more efficient to read the whole table in one block anyway. */ + + if (! simple_read_overlay_table ()) + return; + + /* Now may as well update all sections, even if only one was requested. */ + ALL_OBJSECTIONS (objfile, osect) + if (section_is_overlay (osect->the_bfd_section)) + { + int i, size; + bfd *obfd = osect->objfile->obfd; + asection *bsect = osect->the_bfd_section; + + size = bfd_get_section_size_before_reloc (osect->the_bfd_section); + for (i = 0; i < cache_novlys; i++) + if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect) + && cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect) + /* && cache_ovly_table[i][SIZE] == size */ ) + { /* obj_section matches i'th entry in ovly_table */ + osect->ovly_mapped = cache_ovly_table[i][MAPPED]; + break; /* finished with inner for loop: break out */ + } + } +} + +/* Set the output sections and output offsets for section SECTP in + ABFD. The relocation code in BFD will read these offsets, so we + need to be sure they're initialized. We map each section to itself, + with no offset; this means that SECTP->vma will be honored. */ + +static void +symfile_dummy_outputs (bfd *abfd, asection *sectp, void *dummy) +{ + sectp->output_section = sectp; + sectp->output_offset = 0; +} + +/* Relocate the contents of a debug section SECTP in ABFD. The + contents are stored in BUF if it is non-NULL, or returned in a + malloc'd buffer otherwise. + + For some platforms and debug info formats, shared libraries contain + relocations against the debug sections (particularly for DWARF-2; + one affected platform is PowerPC GNU/Linux, although it depends on + the version of the linker in use). Also, ELF object files naturally + have unresolved relocations for their debug sections. We need to apply + the relocations in order to get the locations of symbols correct. */ + +bfd_byte * +symfile_relocate_debug_section (bfd *abfd, asection *sectp, bfd_byte *buf) +{ +#ifdef CRASH_MERGE + /* Executable files have all the relocations already resolved. + * Handle files linked with --emit-relocs. + * http://sources.redhat.com/ml/gdb/2006-08/msg00137.html */ + if ((abfd->flags & EXEC_P) != 0) + return NULL; +#endif + /* We're only interested in debugging sections with relocation + information. */ + if ((sectp->flags & SEC_RELOC) == 0) + return NULL; + if ((sectp->flags & SEC_DEBUGGING) == 0) + return NULL; + + /* We will handle section offsets properly elsewhere, so relocate as if + all sections begin at 0. */ + bfd_map_over_sections (abfd, symfile_dummy_outputs, NULL); + + return bfd_simple_get_relocated_section_contents (abfd, sectp, buf, NULL); +} + +void +_initialize_symfile (void) +{ + struct cmd_list_element *c; + + c = add_cmd ("symbol-file", class_files, symbol_file_command, + "Load symbol table from executable file FILE.\n\ +The `file' command can also load symbol tables, as well as setting the file\n\ +to execute.", &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, + "Usage: add-symbol-file FILE ADDR [-s -s ...]\n\ +Load the symbols from FILE, assuming FILE has been dynamically loaded.\n\ +ADDR is the starting address of the file's text.\n\ +The optional arguments are section-name section-address pairs and\n\ +should be specified if the data and bss segments are not contiguous\n\ +with the text. SECT is a section name to be loaded at SECT_ADDR.", + &cmdlist); + set_cmd_completer (c, filename_completer); + + c = add_cmd ("add-shared-symbol-files", class_files, + add_shared_symbol_files_command, + "Load the symbols from shared objects in the dynamic linker's link map.", + &cmdlist); + c = add_alias_cmd ("assf", "add-shared-symbol-files", class_files, 1, + &cmdlist); + + c = add_cmd ("load", class_files, load_command, + "Dynamically load FILE into the running program, and record its symbols\n\ +for access from GDB.", &cmdlist); + set_cmd_completer (c, filename_completer); + + add_show_from_set + (add_set_cmd ("symbol-reloading", class_support, var_boolean, + (char *) &symbol_reloading, + "Set dynamic symbol table reloading multiple times in one run.", + &setlist), + &showlist); + + add_prefix_cmd ("overlay", class_support, overlay_command, + "Commands for debugging overlays.", &overlaylist, + "overlay ", 0, &cmdlist); + + add_com_alias ("ovly", "overlay", class_alias, 1); + add_com_alias ("ov", "overlay", class_alias, 1); + + add_cmd ("map-overlay", class_support, map_overlay_command, + "Assert that an overlay section is mapped.", &overlaylist); + + add_cmd ("unmap-overlay", class_support, unmap_overlay_command, + "Assert that an overlay section is unmapped.", &overlaylist); + + add_cmd ("list-overlays", class_support, list_overlays_command, + "List mappings of overlay sections.", &overlaylist); + + add_cmd ("manual", class_support, overlay_manual_command, + "Enable overlay debugging.", &overlaylist); + add_cmd ("off", class_support, overlay_off_command, + "Disable overlay debugging.", &overlaylist); + add_cmd ("auto", class_support, overlay_auto_command, + "Enable automatic overlay debugging.", &overlaylist); + add_cmd ("load-target", class_support, overlay_load_command, + "Read the overlay mapping state from the target.", &overlaylist); + + /* Filename extension to source language lookup table: */ + init_filename_language_table (); + c = add_set_cmd ("extension-language", class_files, var_string_noescape, + (char *) &ext_args, + "Set mapping between filename extension and source language.\n\ +Usage: set extension-language .foo bar", + &setlist); + set_cmd_cfunc (c, set_ext_lang_command); + + add_info ("extensions", info_ext_lang_command, + "All filename extensions associated with a source language."); + + add_show_from_set + (add_set_cmd ("download-write-size", class_obscure, + var_integer, (char *) &download_write_size, + "Set the write size used when downloading a program.\n" + "Only used when downloading a program onto a remote\n" + "target. Specify zero, or a negative value, to disable\n" + "blocked writes. The actual size of each transfer is also\n" + "limited by the size of the target packet and the memory\n" + "cache.\n", + &setlist), + &showlist); + + debug_file_directory = xstrdup (DEBUGDIR); + c = (add_set_cmd + ("debug-file-directory", class_support, var_string, + (char *) &debug_file_directory, + "Set the directory where separate debug symbols are searched for.\n" + "Separate debug symbols are first searched for in the same\n" + "directory as the binary, then in the `" DEBUG_SUBDIRECTORY + "' subdirectory,\n" + "and lastly at the path of the directory of the binary with\n" + "the global debug-file directory prepended\n", + &setlist)); + add_show_from_set (c, &showlist); + set_cmd_completer (c, filename_completer); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symtab.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symtab.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symtab.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/symtab.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,4814 @@ +/* Symbol table lookup for the GNU debugger, GDB. + + Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005, 2007 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "symtab.h" +#include "gdbtypes.h" +#include "gdbcore.h" +#include "frame.h" +#include "target.h" +#include "value.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdbcmd.h" +#include "call-cmds.h" +#include "gdb_regex.h" +#include "expression.h" +#include "language.h" +#include "demangle.h" +#include "inferior.h" +#include "linespec.h" +#include "source.h" +#include "filenames.h" /* for FILENAME_CMP */ +#include "objc-lang.h" + +#include "hashtab.h" + +#include "gdb_obstack.h" +#include "block.h" +#include "dictionary.h" + +#include +#include +#include "gdb_string.h" +#include "gdb_stat.h" +#include +#include "cp-abi.h" + +/* Prototypes for local functions */ + +static void completion_list_add_name (char *, char *, int, char *, char *); + +static void rbreak_command (char *, int); + +static void types_info (char *, int); + +static void functions_info (char *, int); + +static void variables_info (char *, int); + +static void sources_info (char *, int); + +static void output_source_filename (char *, int *); + +static int find_line_common (struct linetable *, int, int *); + +/* This one is used by linespec.c */ + +char *operator_chars (char *p, char **end); + +static struct symbol *lookup_symbol_aux (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_local (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_symtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +static +struct symbol *lookup_symbol_aux_psymtabs (int block_index, + const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab); + +#if 0 +static +struct symbol *lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab); +#endif + +/* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ +/* Signals the presence of objects compiled by HP compilers */ +int hp_som_som_object_present = 0; + +static void fixup_section (struct general_symbol_info *, struct objfile *); + +static int file_matches (char *, char **, int); + +static void print_symbol_info (domain_enum, + struct symtab *, struct symbol *, int, char *); + +static void print_msymbol_info (struct minimal_symbol *); + +static void symtab_symbol_info (char *, domain_enum, int); + +void _initialize_symtab (void); + +/* */ + +/* The single non-language-specific builtin type */ +struct type *builtin_type_error; + +/* Block in which the most recently searched-for symbol was found. + Might be better to make this a parameter to lookup_symbol and + value_of_this. */ + +const struct block *block_found; + +/* Check for a symtab of a specific name; first in symtabs, then in + psymtabs. *If* there is no '/' in the name, a match after a '/' + in the symtab filename will also work. */ + +struct symtab * +lookup_symtab (const char *name) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + char *real_path = NULL; + char *full_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + +got_symtab: + + /* First, search for an exact match */ + + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (name, s->filename) == 0) + { + return s; + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + + if (full_path != NULL) + { + const char *fp = symtab_to_filename (s); + if (FILENAME_CMP (full_path, fp) == 0) + { + return s; + } + } + + if (real_path != NULL) + { + char *rp = gdb_realpath (symtab_to_filename (s)); + make_cleanup (xfree, rp); + if (FILENAME_CMP (real_path, rp) == 0) + { + return s; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_SYMTABS (objfile, s) + { + if (FILENAME_CMP (lbasename (s->filename), name) == 0) + return s; + } + + /* Same search rules as above apply here, but now we look thru the + psymtabs. */ + + ps = lookup_partial_symtab (name); + if (!ps) + return (NULL); + + if (ps->readin) + error ("Internal: readin %s pst for `%s' found when no symtab found.", + ps->filename, name); + + s = PSYMTAB_TO_SYMTAB (ps); + + if (s) + return s; + + /* At this point, we have located the psymtab for this file, but + the conversion to a symtab has failed. This usually happens + when we are looking up an include file. In this case, + PSYMTAB_TO_SYMTAB doesn't return a symtab, even though one has + been created. So, we need to run through the symtabs again in + order to find the file. + XXX - This is a crock, and should be fixed inside of the the + symbol parsing routines. */ + goto got_symtab; +} + +/* Lookup the partial symbol table of a source file named NAME. + *If* there is no '/' in the name, a match after a '/' + in the psymtab filename will also work. */ + +struct partial_symtab * +lookup_partial_symtab (const char *name) +{ + struct partial_symtab *pst; + struct objfile *objfile; + char *full_path = NULL; + char *real_path = NULL; + + /* Here we are interested in canonicalizing an absolute path, not + absolutizing a relative path. */ + if (IS_ABSOLUTE_PATH (name)) + { + full_path = xfullpath (name); + make_cleanup (xfree, full_path); + real_path = gdb_realpath (name); + make_cleanup (xfree, real_path); + } + + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (name, pst->filename) == 0) + { + return (pst); + } + + /* If the user gave us an absolute path, try to find the file in + this symtab and use its absolute path. */ + if (full_path != NULL) + { + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL + && FILENAME_CMP (full_path, pst->fullname) == 0) + { + return pst; + } + } + + if (real_path != NULL) + { + char *rp = NULL; + if (pst->fullname == NULL) + source_full_path_of (pst->filename, &pst->fullname); + if (pst->fullname != NULL) + { + rp = gdb_realpath (pst->fullname); + make_cleanup (xfree, rp); + } + if (rp != NULL && FILENAME_CMP (real_path, rp) == 0) + { + return pst; + } + } + } + + /* Now, search for a matching tail (only if name doesn't have any dirs) */ + + if (lbasename (name) == name) + ALL_PSYMTABS (objfile, pst) + { + if (FILENAME_CMP (lbasename (pst->filename), name) == 0) + return (pst); + } + + return (NULL); +} + +/* Mangle a GDB method stub type. This actually reassembles the pieces of the + full method name, which consist of the class name (from T), the unadorned + method name from METHOD_ID, and the signature for the specific overload, + specified by SIGNATURE_ID. Note that this function is g++ specific. */ + +char * +gdb_mangle_name (struct type *type, int method_id, int signature_id) +{ + int mangled_name_len; + char *mangled_name; + struct fn_field *f = TYPE_FN_FIELDLIST1 (type, method_id); + struct fn_field *method = &f[signature_id]; + char *field_name = TYPE_FN_FIELDLIST_NAME (type, method_id); + char *physname = TYPE_FN_FIELD_PHYSNAME (f, signature_id); + char *newname = type_name_no_tag (type); + + /* Does the form of physname indicate that it is the full mangled name + of a constructor (not just the args)? */ + int is_full_physname_constructor; + + int is_constructor; + int is_destructor = is_destructor_name (physname); + /* Need a new type prefix. */ + char *const_prefix = method->is_const ? "C" : ""; + char *volatile_prefix = method->is_volatile ? "V" : ""; + char buf[20]; + int len = (newname == NULL ? 0 : strlen (newname)); + + /* Nothing to do if physname already contains a fully mangled v3 abi name + or an operator name. */ + if ((physname[0] == '_' && physname[1] == 'Z') + || is_operator_name (field_name)) + return xstrdup (physname); + + is_full_physname_constructor = is_constructor_name (physname); + + is_constructor = + is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0); + + if (!is_destructor) + is_destructor = (strncmp (physname, "__dt", 4) == 0); + + if (is_destructor || is_full_physname_constructor) + { + mangled_name = (char *) xmalloc (strlen (physname) + 1); + strcpy (mangled_name, physname); + return mangled_name; + } + + if (len == 0) + { + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + } + else if (physname[0] == 't' || physname[0] == 'Q') + { + /* The physname for template and qualified methods already includes + the class name. */ + sprintf (buf, "__%s%s", const_prefix, volatile_prefix); + newname = NULL; + len = 0; + } + else + { + sprintf (buf, "__%s%s%d", const_prefix, volatile_prefix, len); + } + mangled_name_len = ((is_constructor ? 0 : strlen (field_name)) + + strlen (buf) + len + strlen (physname) + 1); + + { + mangled_name = (char *) xmalloc (mangled_name_len); + if (is_constructor) + mangled_name[0] = '\0'; + else + strcpy (mangled_name, field_name); + } + strcat (mangled_name, buf); + /* If the class doesn't have a name, i.e. newname NULL, then we just + mangle it using 0 for the length of the class. Thus it gets mangled + as something starting with `::' rather than `classname::'. */ + if (newname != NULL) + strcat (mangled_name, newname); + + strcat (mangled_name, physname); + return (mangled_name); +} + + +/* Initialize the language dependent portion of a symbol + depending upon the language for the symbol. */ +void +symbol_init_language_specific (struct general_symbol_info *gsymbol, + enum language language) +{ + gsymbol->language = language; + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + memset (&gsymbol->language_specific, 0, + sizeof (gsymbol->language_specific)); + } +} + +/* Functions to initialize a symbol's mangled name. */ + +/* Create the hash table used for demangled names. Each hash entry is + a pair of strings; one for the mangled name and one for the demangled + name. The entry is hashed via just the mangled name. */ + +static void +create_demangled_names_hash (struct objfile *objfile) +{ + /* Choose 256 as the starting size of the hash table, somewhat arbitrarily. + The hash table code will round this up to the next prime number. + Choosing a much larger table size wastes memory, and saves only about + 1% in symbol reading. */ + + objfile->demangled_names_hash = htab_create_alloc_ex + (256, htab_hash_string, (int (*) (const void *, const void *)) streq, + NULL, objfile->md, xmcalloc, xmfree); +} + +/* Try to determine the demangled name for a symbol, based on the + language of that symbol. If the language is set to language_auto, + it will attempt to find any demangling algorithm that works and + then set the language appropriately. The returned name is allocated + by the demangler and should be xfree'd. */ + +static char * +symbol_find_demangled_name (struct general_symbol_info *gsymbol, + const char *mangled) +{ + char *demangled = NULL; + + if (gsymbol->language == language_unknown) + gsymbol->language = language_auto; + + if (gsymbol->language == language_objc + || gsymbol->language == language_auto) + { + demangled = + objc_demangle (mangled, 0); + if (demangled != NULL) + { + gsymbol->language = language_objc; + return demangled; + } + } + if (gsymbol->language == language_cplus + || gsymbol->language == language_auto) + { + demangled = + cplus_demangle (mangled, DMGL_PARAMS | DMGL_ANSI); + if (demangled != NULL) + { + gsymbol->language = language_cplus; + return demangled; + } + } + if (gsymbol->language == language_java) + { + demangled = + cplus_demangle (mangled, + DMGL_PARAMS | DMGL_ANSI | DMGL_JAVA); + if (demangled != NULL) + { + gsymbol->language = language_java; + return demangled; + } + } + return NULL; +} + +/* Set both the mangled and demangled (if any) names for GSYMBOL based + on LINKAGE_NAME and LEN. The hash table corresponding to OBJFILE + is used, and the memory comes from that objfile's objfile_obstack. + LINKAGE_NAME is copied, so the pointer can be discarded after + calling this function. */ + +/* We have to be careful when dealing with Java names: when we run + into a Java minimal symbol, we don't know it's a Java symbol, so it + gets demangled as a C++ name. This is unfortunate, but there's not + much we can do about it: but when demangling partial symbols and + regular symbols, we'd better not reuse the wrong demangled name. + (See PR gdb/1039.) We solve this by putting a distinctive prefix + on Java names when storing them in the hash table. */ + +/* FIXME: carlton/2003-03-13: This is an unfortunate situation. I + don't mind the Java prefix so much: different languages have + different demangling requirements, so it's only natural that we + need to keep language data around in our demangling cache. But + it's not good that the minimal symbol has the wrong demangled name. + Unfortunately, I can't think of any easy solution to that + problem. */ + +#define JAVA_PREFIX "##JAVA$$" +#define JAVA_PREFIX_LEN 8 + +void +symbol_set_names (struct general_symbol_info *gsymbol, + const char *linkage_name, int len, struct objfile *objfile) +{ + char **slot; + /* A 0-terminated copy of the linkage name. */ + const char *linkage_name_copy; + /* A copy of the linkage name that might have a special Java prefix + added to it, for use when looking names up in the hash table. */ + const char *lookup_name; + /* The length of lookup_name. */ + int lookup_len; + + if (objfile->demangled_names_hash == NULL) + create_demangled_names_hash (objfile); + + /* The stabs reader generally provides names that are not + NUL-terminated; most of the other readers don't do this, so we + can just use the given copy, unless we're in the Java case. */ + if (gsymbol->language == language_java) + { + char *alloc_name; + lookup_len = len + JAVA_PREFIX_LEN; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, JAVA_PREFIX, JAVA_PREFIX_LEN); + memcpy (alloc_name + JAVA_PREFIX_LEN, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name + JAVA_PREFIX_LEN; + } + else if (linkage_name[len] != '\0') + { + char *alloc_name; + lookup_len = len; + + alloc_name = alloca (lookup_len + 1); + memcpy (alloc_name, linkage_name, len); + alloc_name[lookup_len] = '\0'; + + lookup_name = alloc_name; + linkage_name_copy = alloc_name; + } + else + { + lookup_len = len; + lookup_name = linkage_name; + linkage_name_copy = linkage_name; + } + + slot = (char **) htab_find_slot (objfile->demangled_names_hash, + lookup_name, INSERT); + + /* If this name is not in the hash table, add it. */ + if (*slot == NULL) + { + char *demangled_name = symbol_find_demangled_name (gsymbol, + linkage_name_copy); + int demangled_len = demangled_name ? strlen (demangled_name) : 0; + + /* If there is a demangled name, place it right after the mangled name. + Otherwise, just place a second zero byte after the end of the mangled + name. */ + *slot = obstack_alloc (&objfile->objfile_obstack, + lookup_len + demangled_len + 2); + memcpy (*slot, lookup_name, lookup_len + 1); + if (demangled_name != NULL) + { + memcpy (*slot + lookup_len + 1, demangled_name, demangled_len + 1); + xfree (demangled_name); + } + else + (*slot)[lookup_len + 1] = '\0'; + } + + gsymbol->name = *slot + lookup_len - len; + if ((*slot)[lookup_len + 1] != '\0') + gsymbol->language_specific.cplus_specific.demangled_name + = &(*slot)[lookup_len + 1]; + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; +} + +/* Initialize the demangled name of GSYMBOL if possible. Any required space + to store the name is obtained from the specified obstack. The function + symbol_set_names, above, should be used instead where possible for more + efficient memory usage. */ + +void +symbol_init_demangled_name (struct general_symbol_info *gsymbol, + struct obstack *obstack) +{ + char *mangled = gsymbol->name; + char *demangled = NULL; + + demangled = symbol_find_demangled_name (gsymbol, mangled); + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + { + if (demangled) + { + gsymbol->language_specific.cplus_specific.demangled_name + = obsavestring (demangled, strlen (demangled), obstack); + xfree (demangled); + } + else + gsymbol->language_specific.cplus_specific.demangled_name = NULL; + } + else + { + /* Unknown language; just clean up quietly. */ + if (demangled) + xfree (demangled); + } +} + +/* Return the source code name of a symbol. In languages where + demangling is necessary, this is the demangled name. */ + +char * +symbol_natural_name (const struct general_symbol_info *gsymbol) +{ + if ((gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + && (gsymbol->language_specific.cplus_specific.demangled_name != NULL)) + { + return gsymbol->language_specific.cplus_specific.demangled_name; + } + else + { + return gsymbol->name; + } +} + +/* Return the demangled name for a symbol based on the language for + that symbol. If no demangled name exists, return NULL. */ +char * +symbol_demangled_name (struct general_symbol_info *gsymbol) +{ + if (gsymbol->language == language_cplus + || gsymbol->language == language_java + || gsymbol->language == language_objc) + return gsymbol->language_specific.cplus_specific.demangled_name; + + else + return NULL; +} + +/* Initialize the structure fields to zero values. */ +void +init_sal (struct symtab_and_line *sal) +{ + sal->symtab = 0; + sal->section = 0; + sal->line = 0; + sal->pc = 0; + sal->end = 0; +} + + + +/* Find which partial symtab contains PC and SECTION. Return 0 if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ +struct partial_symtab * +find_pc_sect_psymtab (CORE_ADDR pc, asection *section) +{ + struct partial_symtab *pst; + struct objfile *objfile; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on texthigh and textlow, which do + not include the data ranges. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + ALL_PSYMTABS (objfile, pst) + { + if (pc >= pst->textlow && pc < pst->texthigh) + { + struct partial_symtab *tpst; + struct partial_symtab *best_pst = pst; + struct partial_symbol *best_psym = NULL; + + /* An objfile that has its functions reordered might have + many partial symbol tables containing the PC, but + we want the partial symbol table that contains the + function containing the PC. */ + if (!(objfile->flags & OBJF_REORDERED) && + section == 0) /* can't validate section this way */ + return (pst); + + if (msymbol == NULL) + return (pst); + + /* The code range of partial symtabs sometimes overlap, so, in + the loop below, we need to check all partial symtabs and + find the one that fits better for the given PC address. We + select the partial symtab that contains a symbol whose + address is closest to the PC address. By closest we mean + that find_pc_sect_symbol returns the symbol with address + that is closest and still less than the given PC. */ + for (tpst = pst; tpst != NULL; tpst = tpst->next) + { + if (pc >= tpst->textlow && pc < tpst->texthigh) + { + struct partial_symbol *p; + + p = find_pc_sect_psymbol (tpst, pc, section); + if (p != NULL + && SYMBOL_VALUE_ADDRESS (p) + == SYMBOL_VALUE_ADDRESS (msymbol)) + return (tpst); + if (p != NULL) + { + /* We found a symbol in this partial symtab which + matches (or is closest to) PC, check whether it + is closer than our current BEST_PSYM. Since + this symbol address is necessarily lower or + equal to PC, the symbol closer to PC is the + symbol which address is the highest. */ + /* This way we return the psymtab which contains + such best match symbol. This can help in cases + where the symbol information/debuginfo is not + complete, like for instance on IRIX6 with gcc, + where no debug info is emitted for + statics. (See also the nodebug.exp + testcase.) */ + if (best_psym == NULL + || SYMBOL_VALUE_ADDRESS (p) + > SYMBOL_VALUE_ADDRESS (best_psym)) + { + best_psym = p; + best_pst = tpst; + } + } + + } + } + return (best_pst); + } + } + return (NULL); +} + +/* Find which partial symtab contains PC. Return 0 if none. + Backward compatibility, no section */ + +struct partial_symtab * +find_pc_psymtab (CORE_ADDR pc) +{ + return find_pc_sect_psymtab (pc, find_pc_mapped_section (pc)); +} + +/* Find which partial symbol within a psymtab matches PC and SECTION. + Return 0 if none. Check all psymtabs if PSYMTAB is 0. */ + +struct partial_symbol * +find_pc_sect_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc, + asection *section) +{ + struct partial_symbol *best = NULL, *p, **pp; + CORE_ADDR best_pc; + + if (!psymtab) + psymtab = find_pc_sect_psymtab (pc, section); + if (!psymtab) + return 0; + + /* Cope with programs that start at address 0 */ + best_pc = (psymtab->textlow != 0) ? psymtab->textlow - 1 : 0; + + /* Search the global symbols as well as the static symbols, so that + find_pc_partial_function doesn't use a minimal symbol and thus + cache a bad endaddr. */ + for (pp = psymtab->objfile->global_psymbols.list + psymtab->globals_offset; + (pp - (psymtab->objfile->global_psymbols.list + psymtab->globals_offset) + < psymtab->n_global_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + for (pp = psymtab->objfile->static_psymbols.list + psymtab->statics_offset; + (pp - (psymtab->objfile->static_psymbols.list + psymtab->statics_offset) + < psymtab->n_static_syms); + pp++) + { + p = *pp; + if (SYMBOL_DOMAIN (p) == VAR_DOMAIN + && SYMBOL_CLASS (p) == LOC_BLOCK + && pc >= SYMBOL_VALUE_ADDRESS (p) + && (SYMBOL_VALUE_ADDRESS (p) > best_pc + || (psymtab->textlow == 0 + && best_pc == 0 && SYMBOL_VALUE_ADDRESS (p) == 0))) + { + if (section) /* match on a specific section */ + { + fixup_psymbol_section (p, psymtab->objfile); + if (SYMBOL_BFD_SECTION (p) != section) + continue; + } + best_pc = SYMBOL_VALUE_ADDRESS (p); + best = p; + } + } + + return best; +} + +/* Find which partial symbol within a psymtab matches PC. Return 0 if none. + Check all psymtabs if PSYMTAB is 0. Backwards compatibility, no section. */ + +struct partial_symbol * +find_pc_psymbol (struct partial_symtab *psymtab, CORE_ADDR pc) +{ + return find_pc_sect_psymbol (psymtab, pc, find_pc_mapped_section (pc)); +} + +/* Debug symbols usually don't have section information. We need to dig that + out of the minimal symbols and stash that in the debug symbol. */ + +static void +fixup_section (struct general_symbol_info *ginfo, struct objfile *objfile) +{ + struct minimal_symbol *msym; + msym = lookup_minimal_symbol (ginfo->name, NULL, objfile); + + if (msym) + { + ginfo->bfd_section = SYMBOL_BFD_SECTION (msym); + ginfo->section = SYMBOL_SECTION (msym); + } +} + +struct symbol * +fixup_symbol_section (struct symbol *sym, struct objfile *objfile) +{ + if (!sym) + return NULL; + + if (SYMBOL_BFD_SECTION (sym)) + return sym; + + fixup_section (&sym->ginfo, objfile); + + return sym; +} + +struct partial_symbol * +fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) +{ + if (!psym) + return NULL; + + if (SYMBOL_BFD_SECTION (psym)) + return psym; + + fixup_section (&psym->ginfo, objfile); + + return psym; +} + +/* Find the definition for a specified symbol name NAME + in domain DOMAIN, visible from lexical block BLOCK. + Returns the struct symbol pointer, or zero if no symbol is found. + If SYMTAB is non-NULL, store the symbol table in which the + symbol was found there, or NULL if not found. + C++: if IS_A_FIELD_OF_THIS is nonzero on entry, check to see if + NAME is a field of the current implied argument `this'. If so set + *IS_A_FIELD_OF_THIS to 1, otherwise set it to zero. + BLOCK_FOUND is set to the block in which NAME is found (in the case of + a field of `this', value_of_this sets BLOCK_FOUND to the proper value.) */ + +/* This function has a bunch of loops in it and it would seem to be + attractive to put in some QUIT's (though I'm not really sure + whether it can run long enough to be really important). But there + are a few calls for which it would appear to be bad news to quit + out of here: find_proc_desc in alpha-tdep.c and mips-tdep.c. (Note + that there is C++ code below which can error(), but that probably + doesn't affect these calls since they are looking for a known + variable and thus can probably assume it will never hit the C++ + code). */ +#ifdef CRASH_MERGE +static void gdb_bait_and_switch(char *, struct symbol *); +#endif +struct symbol * +lookup_symbol (const char *name, const struct block *block, + const domain_enum domain, int *is_a_field_of_this, + struct symtab **symtab) +{ + char *demangled_name = NULL; + const char *modified_name = NULL; + const char *mangled_name = NULL; + int needtofreename = 0; + struct symbol *returnval; + + modified_name = name; + + /* If we are using C++ language, demangle the name before doing a lookup, so + we can always binary search. */ + if (current_language->la_language == language_cplus) + { + demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); + if (demangled_name) + { + mangled_name = name; + modified_name = demangled_name; + needtofreename = 1; + } + } + + if (case_sensitivity == case_sensitive_off) + { + char *copy; + int len, i; + + len = strlen (name); + copy = (char *) alloca (len + 1); + for (i= 0; i < len; i++) + copy[i] = tolower (name[i]); + copy[len] = 0; + modified_name = copy; + } + + returnval = lookup_symbol_aux (modified_name, mangled_name, block, + domain, is_a_field_of_this, symtab); + if (needtofreename) + xfree (demangled_name); + +#ifdef CRASH_MERGE + if (returnval && (domain == VAR_DOMAIN)) { + gdb_bait_and_switch((char *)modified_name, returnval); + } +#endif + + return returnval; +} + +/* Behave like lookup_symbol_aux except that NAME is the natural name + of the symbol that we're looking for and, if LINKAGE_NAME is + non-NULL, ensure that the symbol's linkage name matches as + well. */ + +static struct symbol * +lookup_symbol_aux (const char *name, const char *linkage_name, + const struct block *block, const domain_enum domain, + int *is_a_field_of_this, struct symtab **symtab) +{ + struct symbol *sym; + + /* Make sure we do something sensible with is_a_field_of_this, since + the callers that set this parameter to some non-null value will + certainly use it later and expect it to be either 0 or 1. + If we don't set it, the contents of is_a_field_of_this are + undefined. */ + if (is_a_field_of_this != NULL) + *is_a_field_of_this = 0; + + /* Search specified block and its superiors. Don't search + STATIC_BLOCK or GLOBAL_BLOCK. */ + + sym = lookup_symbol_aux_local (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + + /* If requested to do so by the caller and if appropriate for the + current language, check to see if NAME is a field of `this'. */ + + if (current_language->la_value_of_this != NULL + && is_a_field_of_this != NULL) + { + struct value *v = current_language->la_value_of_this (0); + + if (v && check_field (v, name)) + { + *is_a_field_of_this = 1; + if (symtab != NULL) + *symtab = NULL; + return NULL; + } + } + + /* Now do whatever is appropriate for the current language to look + up static and global variables. */ + + sym = current_language->la_lookup_symbol_nonlocal (name, linkage_name, + block, domain, + symtab); + if (sym != NULL) + return sym; + + /* Now search all static file-level symbols. Not strictly correct, + but more useful than an error. Do the symtabs first, then check + the psymtabs. If a psymtab indicates the existence of the + desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + if (symtab != NULL) + *symtab = NULL; + return NULL; +} + +/* Check to see if the symbol is defined in BLOCK or its superiors. + Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ + +static struct symbol * +lookup_symbol_aux_local (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + const struct block *static_block = block_static_block (block); + + /* Check if either no block is specified or it's a global block. */ + + if (static_block == NULL) + return NULL; + + while (block != static_block) + { + sym = lookup_symbol_aux_block (name, linkage_name, block, domain, + symtab); + if (sym != NULL) + return sym; + block = BLOCK_SUPERBLOCK (block); + } + + /* We've reached the static block without finding a result. */ + + return NULL; +} + +/* Look up a symbol in a block; if found, locate its symtab, fixup the + symbol, and set block_found appropriately. */ + +struct symbol * +lookup_symbol_aux_block (const char *name, const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile = NULL; + struct blockvector *bv; + struct block *b; + struct symtab *s = NULL; + + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + { + /* Search the list of symtabs for one which contains the + address of the start of this block. */ + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + if (BLOCK_START (b) <= BLOCK_START (block) + && BLOCK_END (b) > BLOCK_START (block)) + goto found; + } + found: + *symtab = s; + } + + return fixup_symbol_section (sym, objfile); + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the symtabs. + BLOCK_INDEX should be either GLOBAL_BLOCK or STATIC_BLOCK, + depending on whether or not we want to search global symbols or + static symbols. */ + +static struct symbol * +lookup_symbol_aux_symtabs (int block_index, + const char *name, const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct symtab *s; + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (sym) + { + block_found = block; + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +/* Check to see if the symbol is defined in one of the partial + symtabs. BLOCK_INDEX should be either GLOBAL_BLOCK or + STATIC_BLOCK, depending on whether or not we want to search global + symbols or static symbols. */ + +static struct symbol * +lookup_symbol_aux_psymtabs (int block_index, const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + struct objfile *objfile; + struct blockvector *bv; + const struct block *block; + struct partial_symtab *ps; + struct symtab *s; + const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin + && lookup_partial_symbol (ps, name, linkage_name, + psymtab_index, domain)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, block_index); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort try + looking in the statics even though the psymtab claimed + the symbol was global, or vice-versa. It's possible + that the psymtab gets it wrong in some cases. */ + + /* FIXME: carlton/2002-09-30: Should we really do that? + If that happens, isn't it likely to be a GDB error, in + which case we should fix the GDB error rather than + silently dealing with it here? So I'd vote for + removing the check for the symbol in the other + block. */ + block = BLOCKVECTOR_BLOCK (bv, + block_index == GLOBAL_BLOCK ? + STATIC_BLOCK : GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, linkage_name, domain); + if (!sym) + error ("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s).", + block_index == GLOBAL_BLOCK ? "global" : "static", + name, ps->filename, name, name); + } + if (symtab != NULL) + *symtab = s; + return fixup_symbol_section (sym, objfile); + } + } + + return NULL; +} + +#if 0 +/* Check for the possibility of the symbol being a function or a + mangled variable that is stored in one of the minimal symbol + tables. Eventually, all global symbols might be resolved in this + way. */ + +/* NOTE: carlton/2002-12-05: At one point, this function was part of + lookup_symbol_aux, and what are now 'return' statements within + lookup_symbol_aux_minsyms returned from lookup_symbol_aux, even if + sym was NULL. As far as I can tell, this was basically accidental; + it didn't happen every time that msymbol was non-NULL, but only if + some additional conditions held as well, and it caused problems + with HP-generated symbol tables. */ + +/* NOTE: carlton/2003-05-14: This function was once used as part of + lookup_symbol. It is currently unnecessary for correctness + reasons, however, and using it doesn't seem to be any faster than + using lookup_symbol_aux_psymtabs, so I'm commenting it out. */ + +static struct symbol * +lookup_symbol_aux_minsyms (const char *name, + const char *linkage_name, + const domain_enum domain, + int *is_a_field_of_this, + struct symtab **symtab) +{ + struct symbol *sym; + struct blockvector *bv; + const struct block *block; + struct minimal_symbol *msymbol; + struct symtab *s; + + if (domain == VAR_DOMAIN) + { + msymbol = lookup_minimal_symbol (name, NULL, NULL); + + if (msymbol != NULL) + { + /* OK, we found a minimal symbol in spite of not finding any + symbol. There are various possible explanations for + this. One possibility is the symbol exists in code not + compiled -g. Another possibility is that the 'psymtab' + isn't doing its job. A third possibility, related to #2, + is that we were confused by name-mangling. For instance, + maybe the psymtab isn't doing its job because it only + know about demangled names, but we were given a mangled + name... */ + + /* We first use the address in the msymbol to try to locate + the appropriate symtab. Note that find_pc_sect_symtab() + has a side-effect of doing psymtab-to-symtab expansion, + for the found symtab. */ + s = find_pc_sect_symtab (SYMBOL_VALUE_ADDRESS (msymbol), + SYMBOL_BFD_SECTION (msymbol)); + if (s != NULL) + { + /* This is a function which has a symtab for its address. */ + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + /* This call used to pass `SYMBOL_LINKAGE_NAME (msymbol)' as the + `name' argument to lookup_block_symbol. But the name + of a minimal symbol is always mangled, so that seems + to be clearly the wrong thing to pass as the + unmangled name. */ + sym = + lookup_block_symbol (block, name, linkage_name, domain); + /* We kept static functions in minimal symbol table as well as + in static scope. We want to find them in the symbol table. */ + if (!sym) + { + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, + linkage_name, domain); + } + + /* NOTE: carlton/2002-12-04: The following comment was + taken from a time when two versions of this function + were part of the body of lookup_symbol_aux: this + comment was taken from the version of the function + that was #ifdef HPUXHPPA, and the comment was right + before the 'return NULL' part of lookup_symbol_aux. + (Hence the "Fall through and return 0" comment.) + Elena did some digging into the situation for + Fortran, and she reports: + + "I asked around (thanks to Jeff Knaggs), and I think + the story for Fortran goes like this: + + "Apparently, in older Fortrans, '_' was not part of + the user namespace. g77 attached a final '_' to + procedure names as the exported symbols for linkage + (foo_) , but the symbols went in the debug info just + like 'foo'. The rationale behind this is not + completely clear, and maybe it was done to other + symbols as well, not just procedures." */ + + /* If we get here with sym == 0, the symbol was + found in the minimal symbol table + but not in the symtab. + Fall through and return 0 to use the msymbol + definition of "foo_". + (Note that outer code generally follows up a call + to this routine with a call to lookup_minimal_symbol(), + so a 0 return means we'll just flow into that other routine). + + This happens for Fortran "foo_" symbols, + which are "foo" in the symtab. + + This can also happen if "asm" is used to make a + regular symbol but not a debugging symbol, e.g. + asm(".globl _main"); + asm("_main:"); + */ + + if (symtab != NULL && sym != NULL) + *symtab = s; + return fixup_symbol_section (sym, s->objfile); + } + } + } + + return NULL; +} +#endif /* 0 */ + +/* A default version of lookup_symbol_nonlocal for use by languages + that can't think of anything better to do. This implements the C + lookup rules. */ + +struct symbol * +basic_lookup_symbol_nonlocal (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + /* NOTE: carlton/2003-05-19: The comments below were written when + this (or what turned into this) was part of lookup_symbol_aux; + I'm much less worried about these questions now, since these + decisions have turned out well, but I leave these comments here + for posterity. */ + + /* NOTE: carlton/2002-12-05: There is a question as to whether or + not it would be appropriate to search the current global block + here as well. (That's what this code used to do before the + is_a_field_of_this check was moved up.) On the one hand, it's + redundant with the lookup_symbol_aux_symtabs search that happens + next. On the other hand, if decode_line_1 is passed an argument + like filename:var, then the user presumably wants 'var' to be + searched for in filename. On the third hand, there shouldn't be + multiple global variables all of which are named 'var', and it's + not like decode_line_1 has ever restricted its search to only + global variables in a single filename. All in all, only + searching the static block here seems best: it's correct and it's + cleanest. */ + + /* NOTE: carlton/2002-12-05: There's also a possible performance + issue here: if you usually search for global symbols in the + current file, then it would be slightly better to search the + current global block before searching all the symtabs. But there + are other factors that have a much greater effect on performance + than that one, so I don't think we should worry about that for + now. */ + + sym = lookup_symbol_static (name, linkage_name, block, domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_global (name, linkage_name, domain, symtab); +} + +/* Lookup a symbol in the static block associated to BLOCK, if there + is one; do nothing if BLOCK is NULL or a global block. */ + +struct symbol * +lookup_symbol_static (const char *name, + const char *linkage_name, + const struct block *block, + const domain_enum domain, + struct symtab **symtab) +{ + const struct block *static_block = block_static_block (block); + + if (static_block != NULL) + return lookup_symbol_aux_block (name, linkage_name, static_block, + domain, symtab); + else + return NULL; +} + +/* Lookup a symbol in all files' global blocks (searching psymtabs if + necessary). */ + +struct symbol * +lookup_symbol_global (const char *name, + const char *linkage_name, + const domain_enum domain, + struct symtab **symtab) +{ + struct symbol *sym; + + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); + if (sym != NULL) + return sym; + + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, + domain, symtab); +} + +/* Look, in partial_symtab PST, for symbol whose natural name is NAME. + If LINKAGE_NAME is non-NULL, check in addition that the symbol's + linkage name matches it. Check the global symbols if GLOBAL, the + static symbols if not */ + +struct partial_symbol * +lookup_partial_symbol (struct partial_symtab *pst, const char *name, + const char *linkage_name, int global, + domain_enum domain) +{ + struct partial_symbol *temp; + struct partial_symbol **start, **psym; + struct partial_symbol **top, **real_top, **bottom, **center; + int length = (global ? pst->n_global_syms : pst->n_static_syms); + int do_linear_search = 1; + + if (length == 0) + { + return (NULL); + } + start = (global ? + pst->objfile->global_psymbols.list + pst->globals_offset : + pst->objfile->static_psymbols.list + pst->statics_offset); + + if (global) /* This means we can use a binary search. */ + { + do_linear_search = 0; + + /* Binary search. This search is guaranteed to end with center + pointing at the earliest partial symbol whose name might be + correct. At that point *all* partial symbols with an + appropriate name will be checked against the correct + domain. */ + + bottom = start; + top = start + length - 1; + real_top = top; + while (top > bottom) + { + center = bottom + (top - bottom) / 2; + if (!(center < top)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + if (!do_linear_search + && (SYMBOL_LANGUAGE (*center) == language_java)) + { + do_linear_search = 1; + } + if (strcmp_iw_ordered (SYMBOL_NATURAL_NAME (*center), name) >= 0) + { + top = center; + } + else + { + bottom = center + 1; + } + } + if (!(top == bottom)) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + while (top <= real_top + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*top,name))) + { + if (SYMBOL_DOMAIN (*top) == domain) + { + return (*top); + } + top++; + } + } + + /* Can't use a binary search or else we found during the binary search that + we should also do a linear search. */ + + if (do_linear_search) + { + for (psym = start; psym < start + length; psym++) + { + if (domain == SYMBOL_DOMAIN (*psym)) + { + if (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 + : SYMBOL_MATCHES_NATURAL_NAME (*psym, name)) + { + return (*psym); + } + } + } + } + + return (NULL); +} + +/* Look up a type named NAME in the struct_domain. The type returned + must not be opaque -- i.e., must have at least one field + defined. */ + +struct type * +lookup_transparent_type (const char *name) +{ + return current_language->la_lookup_transparent_type (name); +} + +/* The standard implementation of lookup_transparent_type. This code + was modeled on lookup_symbol -- the parts not relevant to looking + up types were just left out. In particular it's assumed here that + types are available in struct_domain and only at file-static or + global blocks. */ + +struct type * +basic_lookup_transparent_type (const char *name) +{ + struct symbol *sym; + struct symtab *s = NULL; + struct partial_symtab *ps; + struct blockvector *bv; + struct objfile *objfile; + struct block *block; + + /* Now search all the global symbols. Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a global, then do psymtab-to-symtab + conversion on the fly and return the found symbol. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, + 1, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the statics even though the psymtab + * claimed the symbol was global. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + + /* Now search the static file-level symbols. + Not strictly correct, but more useful than an error. + Do the symtab's first, then + check the psymtab's. If a psymtab indicates the existence + of the desired name as a file-level static, then do psymtab-to-symtab + conversion on the fly and return the found symbol. + */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + { + return SYMBOL_TYPE (sym); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + { + s = PSYMTAB_TO_SYMTAB (ps); + bv = BLOCKVECTOR (s); + block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + { + /* This shouldn't be necessary, but as a last resort + * try looking in the globals even though the psymtab + * claimed the symbol was static. It's possible that + * the psymtab gets it wrong in some cases. + */ + block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + if (!sym) + error ("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ +%s may be an inlined function, or may be a template function\n\ +(if a template, try specifying an instantiation: %s).", + name, ps->filename, name, name); + } + if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) + return SYMBOL_TYPE (sym); + } + } + return (struct type *) 0; +} + + +/* Find the psymtab containing main(). */ +/* FIXME: What about languages without main() or specially linked + executables that have no main() ? */ + +struct partial_symtab * +find_main_psymtab (void) +{ + struct partial_symtab *pst; + struct objfile *objfile; + + ALL_PSYMTABS (objfile, pst) + { + if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + { + return (pst); + } + } + return (NULL); +} + +/* Search BLOCK for symbol NAME in DOMAIN. + + Note that if NAME is the demangled form of a C++ symbol, we will fail + to find a match during the binary search of the non-encoded names, but + for now we don't worry about the slight inefficiency of looking for + a match we'll never find, since it will go pretty quick. Once the + binary search terminates, we drop through and do a straight linear + search on the symbols. Each symbol which is marked as being a ObjC/C++ + symbol (language_cplus or language_objc set) has both the encoded and + non-encoded names tested for a match. + + If LINKAGE_NAME is non-NULL, verify that any symbol we find has this + particular mangled name. +*/ + +struct symbol * +lookup_block_symbol (const struct block *block, const char *name, + const char *linkage_name, + const domain_enum domain) +{ + struct dict_iterator iter; + struct symbol *sym; + + if (!BLOCK_FUNCTION (block)) + { + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + return sym; + } + return NULL; + } + else + { + /* Note that parameter symbols do not always show up last in the + list; this loop makes sure to take anything else other than + parameter symbols first; it only uses parameter symbols as a + last resort. Note that this only takes up extra computation + time on a match. */ + + struct symbol *sym_found = NULL; + + for (sym = dict_iter_name_first (BLOCK_DICT (block), name, &iter); + sym != NULL; + sym = dict_iter_name_next (name, &iter)) + { + if (SYMBOL_DOMAIN (sym) == domain + && (linkage_name != NULL + ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + { + sym_found = sym; + if (SYMBOL_CLASS (sym) != LOC_ARG && + SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && + SYMBOL_CLASS (sym) != LOC_REF_ARG && + SYMBOL_CLASS (sym) != LOC_REGPARM && + SYMBOL_CLASS (sym) != LOC_REGPARM_ADDR && + SYMBOL_CLASS (sym) != LOC_BASEREG_ARG && + SYMBOL_CLASS (sym) != LOC_COMPUTED_ARG) + { + break; + } + } + } + return (sym_found); /* Will be NULL if not found. */ + } +} + +/* Find the symtab associated with PC and SECTION. Look through the + psymtabs and read in another symtab if necessary. */ + +struct symtab * +find_pc_sect_symtab (CORE_ADDR pc, asection *section) +{ + struct block *b; + struct blockvector *bv; + struct symtab *s = NULL; + struct symtab *best_s = NULL; + struct partial_symtab *ps; + struct objfile *objfile; + CORE_ADDR distance = 0; + struct minimal_symbol *msymbol; + + /* If we know that this is not a text address, return failure. This is + necessary because we loop based on the block's high and low code + addresses, which do not include the data ranges, and because + we call find_pc_sect_psymtab which has a similar restriction based + on the partial_symtab's texthigh and textlow. */ + msymbol = lookup_minimal_symbol_by_pc_section (pc, section); + if (msymbol + && (msymbol->type == mst_data + || msymbol->type == mst_bss + || msymbol->type == mst_abs + || msymbol->type == mst_file_data + || msymbol->type == mst_file_bss)) + return NULL; + + /* Search all symtabs for the one whose file contains our address, and which + is the smallest of all the ones containing the address. This is designed + to deal with a case like symtab a is at 0x1000-0x2000 and 0x3000-0x4000 + and symtab b is at 0x2000-0x3000. So the GLOBAL_BLOCK for a is from + 0x1000-0x4000, but for address 0x2345 we want to return symtab b. + + This happens for native ecoff format, where code from included files + gets its own symtab. The symtab for the included file should have + been read in already via the dependency mechanism. + It might be swifter to create several symtabs with the same name + like xcoff does (I'm not sure). + + It also happens for objfiles that have their functions reordered. + For these, the symtab we are looking for is not necessarily read in. */ + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); + + if (BLOCK_START (b) <= pc + && BLOCK_END (b) > pc + && (distance == 0 + || BLOCK_END (b) - BLOCK_START (b) < distance)) + { + /* For an objfile that has its functions reordered, + find_pc_psymtab will find the proper partial symbol table + and we simply return its corresponding symtab. */ + /* In order to better support objfiles that contain both + stabs and coff debugging info, we continue on if a psymtab + can't be found. */ + if ((objfile->flags & OBJF_REORDERED) && objfile->psymtabs) + { + ps = find_pc_sect_psymtab (pc, section); + if (ps) + return PSYMTAB_TO_SYMTAB (ps); + } + if (section != 0) + { + struct dict_iterator iter; + struct symbol *sym = NULL; + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + fixup_symbol_section (sym, objfile); + if (section == SYMBOL_BFD_SECTION (sym)) + break; + } + if (sym == NULL) + continue; /* no symbol in this symtab matches section */ + } + distance = BLOCK_END (b) - BLOCK_START (b); + best_s = s; + } + } + + if (best_s != NULL) + return (best_s); + + s = NULL; + ps = find_pc_sect_psymtab (pc, section); + if (ps) + { + if (ps->readin) + /* Might want to error() here (in case symtab is corrupt and + will cause a core dump), but maybe we can successfully + continue, so let's not. */ + warning ("\ +(Internal error: pc 0x%s in read in psymtab, but not in symtab.)\n", + paddr_nz (pc)); + s = PSYMTAB_TO_SYMTAB (ps); + } + return (s); +} + +/* Find the symtab associated with PC. Look through the psymtabs and + read in another symtab if necessary. Backward compatibility, no section */ + +struct symtab * +find_pc_symtab (CORE_ADDR pc) +{ + return find_pc_sect_symtab (pc, find_pc_mapped_section (pc)); +} + + +/* Find the source file and line number for a given PC value and SECTION. + Return a structure containing a symtab pointer, a line number, + and a pc range for the entire source line. + The value's .pc field is NOT the specified pc. + NOTCURRENT nonzero means, if specified pc is on a line boundary, + use the line that ends there. Otherwise, in that case, the line + that begins there is used. */ + +/* The big complication here is that a line may start in one file, and end just + before the start of another file. This usually occurs when you #include + code in the middle of a subroutine. To properly find the end of a line's PC + range, we must search all symtabs associated with this compilation unit, and + find the one whose first PC is closer than that of the next line in this + symtab. */ + +/* If it's worth the effort, we could be using a binary search. */ + +struct symtab_and_line +find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent) +{ + struct symtab *s; + struct linetable *l; + int len; + int i; + struct linetable_entry *item; + struct symtab_and_line val; + struct blockvector *bv; + struct minimal_symbol *msymbol; + struct minimal_symbol *mfunsym; + + /* Info on best line seen so far, and where it starts, and its file. */ + + struct linetable_entry *best = NULL; + CORE_ADDR best_end = 0; + struct symtab *best_symtab = 0; + + /* Store here the first line number + of a file which contains the line at the smallest pc after PC. + If we don't find a line whose range contains PC, + we will use a line one less than this, + with a range from the start of that file to the first line's pc. */ + struct linetable_entry *alt = NULL; + struct symtab *alt_symtab = 0; + + /* Info on best line seen in this file. */ + + struct linetable_entry *prev; + + /* If this pc is not from the current frame, + it is the address of the end of a call instruction. + Quite likely that is the start of the following statement. + But what we want is the statement containing the instruction. + Fudge the pc to make sure we get that. */ + + init_sal (&val); /* initialize to zeroes */ + + /* It's tempting to assume that, if we can't find debugging info for + any function enclosing PC, that we shouldn't search for line + number info, either. However, GAS can emit line number info for + assembly files --- very helpful when debugging hand-written + assembly code. In such a case, we'd have no debug info for the + function, but we would have line info. */ + + if (notcurrent) + pc -= 1; + + /* elz: added this because this function returned the wrong + information if the pc belongs to a stub (import/export) + to call a shlib function. This stub would be anywhere between + two functions in the target, and the line info was erroneously + taken to be the one of the line before the pc. + */ + /* RT: Further explanation: + + * We have stubs (trampolines) inserted between procedures. + * + * Example: "shr1" exists in a shared library, and a "shr1" stub also + * exists in the main image. + * + * In the minimal symbol table, we have a bunch of symbols + * sorted by start address. The stubs are marked as "trampoline", + * the others appear as text. E.g.: + * + * Minimal symbol table for main image + * main: code for main (text symbol) + * shr1: stub (trampoline symbol) + * foo: code for foo (text symbol) + * ... + * Minimal symbol table for "shr1" image: + * ... + * shr1: code for shr1 (text symbol) + * ... + * + * So the code below is trying to detect if we are in the stub + * ("shr1" stub), and if so, find the real code ("shr1" trampoline), + * and if found, do the symbolization from the real-code address + * rather than the stub address. + * + * Assumptions being made about the minimal symbol table: + * 1. lookup_minimal_symbol_by_pc() will return a trampoline only + * if we're really in the trampoline. If we're beyond it (say + * we're in "foo" in the above example), it'll have a closer + * symbol (the "foo" text symbol for example) and will not + * return the trampoline. + * 2. lookup_minimal_symbol_text() will find a real text symbol + * corresponding to the trampoline, and whose address will + * be different than the trampoline address. I put in a sanity + * check for the address being the same, to avoid an + * infinite recursion. + */ + msymbol = lookup_minimal_symbol_by_pc (pc); + if (msymbol != NULL) + if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) + { + mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol), + NULL); + if (mfunsym == NULL) + /* I eliminated this warning since it is coming out + * in the following situation: + * gdb shmain // test program with shared libraries + * (gdb) break shr1 // function in shared lib + * Warning: In stub for ... + * In the above situation, the shared lib is not loaded yet, + * so of course we can't find the real func/line info, + * but the "break" still works, and the warning is annoying. + * So I commented out the warning. RT */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else if (SYMBOL_VALUE (mfunsym) == SYMBOL_VALUE (msymbol)) + /* Avoid infinite recursion */ + /* See above comment about why warning is commented out */ + /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ; + /* fall through */ + else + return find_pc_line (SYMBOL_VALUE (mfunsym), 0); + } + + + s = find_pc_sect_symtab (pc, section); + if (!s) + { + /* if no symbol information, return previous pc */ + if (notcurrent) + pc++; + val.pc = pc; + return val; + } + + bv = BLOCKVECTOR (s); + + /* Look at all the symtabs that share this blockvector. + They all have the same apriori range, that we found was right; + but they have different line tables. */ + + for (; s && BLOCKVECTOR (s) == bv; s = s->next) + { + /* Find the best line in this symtab. */ + l = LINETABLE (s); + if (!l) + continue; + len = l->nitems; + if (len <= 0) + { + /* I think len can be zero if the symtab lacks line numbers + (e.g. gcc -g1). (Either that or the LINETABLE is NULL; + I'm not sure which, and maybe it depends on the symbol + reader). */ + continue; + } + + prev = NULL; + item = l->item; /* Get first line info */ + + /* Is this file's first line closer than the first lines of other files? + If so, record this file, and its first line, as best alternate. */ + if (item->pc > pc && (!alt || item->pc < alt->pc)) + { + alt = item; + alt_symtab = s; + } + + for (i = 0; i < len; i++, item++) + { + /* Leave prev pointing to the linetable entry for the last line + that started at or before PC. */ + if (item->pc > pc) + break; + + prev = item; + } + + /* At this point, prev points at the line whose start addr is <= pc, and + item points at the next line. If we ran off the end of the linetable + (pc >= start of the last line), then prev == item. If pc < start of + the first line, prev will not be set. */ + + /* Is this file's best line closer than the best in the other files? + If so, record this file, and its best line, as best so far. Don't + save prev if it represents the end of a function (i.e. line number + 0) instead of a real line. */ + + if (prev && prev->line && (!best || prev->pc > best->pc)) + { + best = prev; + best_symtab = s; + + /* Discard BEST_END if it's before the PC of the current BEST. */ + if (best_end <= best->pc) + best_end = 0; + } + + /* If another line (denoted by ITEM) is in the linetable and its + PC is after BEST's PC, but before the current BEST_END, then + use ITEM's PC as the new best_end. */ + if (best && i < len && item->pc > best->pc + && (best_end == 0 || best_end > item->pc)) + best_end = item->pc; + } + + if (!best_symtab) + { + if (!alt_symtab) + { /* If we didn't find any line # info, just + return zeros. */ + val.pc = pc; + } + else + { + val.symtab = alt_symtab; + val.line = alt->line - 1; + + /* Don't return line 0, that means that we didn't find the line. */ + if (val.line == 0) + ++val.line; + + val.pc = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + val.end = alt->pc; + } + } + else if (best->line == 0) + { + /* If our best fit is in a range of PC's for which no line + number info is available (line number is zero) then we didn't + find any valid line information. */ + val.pc = pc; + } + else + { + val.symtab = best_symtab; + val.line = best->line; + val.pc = best->pc; + if (best_end && (!alt || best_end < alt->pc)) + val.end = best_end; + else if (alt) + val.end = alt->pc; + else + val.end = BLOCK_END (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)); + } + val.section = section; + return val; +} + +/* Backward compatibility (no section) */ + +struct symtab_and_line +find_pc_line (CORE_ADDR pc, int notcurrent) +{ + asection *section; + + section = find_pc_overlay (pc); + if (pc_in_unmapped_range (pc, section)) + pc = overlay_mapped_address (pc, section); + return find_pc_sect_line (pc, section, notcurrent); +} + +/* Find line number LINE in any symtab whose name is the same as + SYMTAB. + + If found, return the symtab that contains the linetable in which it was + found, set *INDEX to the index in the linetable of the best entry + found, and set *EXACT_MATCH nonzero if the value returned is an + exact match. + + If not found, return NULL. */ + +struct symtab * +find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match) +{ + int exact; + + /* BEST_INDEX and BEST_LINETABLE identify the smallest linenumber > LINE + so far seen. */ + + int best_index; + struct linetable *best_linetable; + struct symtab *best_symtab; + + /* First try looking it up in the given symtab. */ + best_linetable = LINETABLE (symtab); + best_symtab = symtab; + best_index = find_line_common (best_linetable, line, &exact); + if (best_index < 0 || !exact) + { + /* Didn't find an exact match. So we better keep looking for + another symtab with the same name. In the case of xcoff, + multiple csects for one source file (produced by IBM's FORTRAN + compiler) produce multiple symtabs (this is unavoidable + assuming csects can be at arbitrary places in memory and that + the GLOBAL_BLOCK of a symtab has a begin and end address). */ + + /* BEST is the smallest linenumber > LINE so far seen, + or 0 if none has been seen so far. + BEST_INDEX and BEST_LINETABLE identify the item for it. */ + int best; + + struct objfile *objfile; + struct symtab *s; + + if (best_index >= 0) + best = best_linetable->item[best_index].line; + else + best = 0; + + ALL_SYMTABS (objfile, s) + { + struct linetable *l; + int ind; + + if (strcmp (symtab->filename, s->filename) != 0) + continue; + l = LINETABLE (s); + ind = find_line_common (l, line, &exact); + if (ind >= 0) + { + if (exact) + { + best_index = ind; + best_linetable = l; + best_symtab = s; + goto done; + } + if (best == 0 || l->item[ind].line < best) + { + best = l->item[ind].line; + best_index = ind; + best_linetable = l; + best_symtab = s; + } + } + } + } +done: + if (best_index < 0) + return NULL; + + if (index) + *index = best_index; + if (exact_match) + *exact_match = exact; + + return best_symtab; +} + +/* Set the PC value for a given source file and line number and return true. + Returns zero for invalid line number (and sets the PC to 0). + The source file is specified with a struct symtab. */ + +int +find_line_pc (struct symtab *symtab, int line, CORE_ADDR *pc) +{ + struct linetable *l; + int ind; + + *pc = 0; + if (symtab == 0) + return 0; + + symtab = find_line_symtab (symtab, line, &ind, NULL); + if (symtab != NULL) + { + l = LINETABLE (symtab); + *pc = l->item[ind].pc; + return 1; + } + else + return 0; +} + +/* Find the range of pc values in a line. + Store the starting pc of the line into *STARTPTR + and the ending pc (start of next line) into *ENDPTR. + Returns 1 to indicate success. + Returns 0 if could not find the specified line. */ + +int +find_line_pc_range (struct symtab_and_line sal, CORE_ADDR *startptr, + CORE_ADDR *endptr) +{ + CORE_ADDR startaddr; + struct symtab_and_line found_sal; + + startaddr = sal.pc; + if (startaddr == 0 && !find_line_pc (sal.symtab, sal.line, &startaddr)) + return 0; + + /* This whole function is based on address. For example, if line 10 has + two parts, one from 0x100 to 0x200 and one from 0x300 to 0x400, then + "info line *0x123" should say the line goes from 0x100 to 0x200 + and "info line *0x355" should say the line goes from 0x300 to 0x400. + This also insures that we never give a range like "starts at 0x134 + and ends at 0x12c". */ + + found_sal = find_pc_sect_line (startaddr, sal.section, 0); + if (found_sal.line != sal.line) + { + /* The specified line (sal) has zero bytes. */ + *startptr = found_sal.pc; + *endptr = found_sal.pc; + } + else + { + *startptr = found_sal.pc; + *endptr = found_sal.end; + } + return 1; +} + +/* Given a line table and a line number, return the index into the line + table for the pc of the nearest line whose number is >= the specified one. + Return -1 if none is found. The value is >= 0 if it is an index. + + Set *EXACT_MATCH nonzero if the value returned is an exact match. */ + +static int +find_line_common (struct linetable *l, int lineno, + int *exact_match) +{ + int i; + int len; + + /* BEST is the smallest linenumber > LINENO so far seen, + or 0 if none has been seen so far. + BEST_INDEX identifies the item for it. */ + + int best_index = -1; + int best = 0; + + if (lineno <= 0) + return -1; + if (l == 0) + return -1; + + len = l->nitems; + for (i = 0; i < len; i++) + { + struct linetable_entry *item = &(l->item[i]); + + if (item->line == lineno) + { + /* Return the first (lowest address) entry which matches. */ + *exact_match = 1; + return i; + } + + if (item->line > lineno && (best == 0 || item->line < best)) + { + best = item->line; + best_index = i; + } + } + + /* If we got here, we didn't get an exact match. */ + + *exact_match = 0; + return best_index; +} + +int +find_pc_line_pc_range (CORE_ADDR pc, CORE_ADDR *startptr, CORE_ADDR *endptr) +{ + struct symtab_and_line sal; + sal = find_pc_line (pc, 0); + *startptr = sal.pc; + *endptr = sal.end; + return sal.symtab != 0; +} + +/* Given a function symbol SYM, find the symtab and line for the start + of the function. + If the argument FUNFIRSTLINE is nonzero, we want the first line + of real code inside the function. */ + +struct symtab_and_line +find_function_start_sal (struct symbol *sym, int funfirstline) +{ + CORE_ADDR pc; + struct symtab_and_line sal; + + pc = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); + fixup_symbol_section (sym, NULL); + if (funfirstline) + { /* skip "first line" of function (which is actually its prologue) */ + asection *section = SYMBOL_BFD_SECTION (sym); + /* If function is in an unmapped overlay, use its unmapped LMA + address, so that SKIP_PROLOGUE has something unique to work on */ + if (section_is_overlay (section) && + !section_is_mapped (section)) + pc = overlay_unmapped_address (pc, section); + + pc += FUNCTION_START_OFFSET; + pc = SKIP_PROLOGUE (pc); + + /* For overlays, map pc back into its mapped VMA range */ + pc = overlay_mapped_address (pc, section); + } + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + + /* Check if SKIP_PROLOGUE left us in mid-line, and the next + line is still part of the same function. */ + if (sal.pc != pc + && BLOCK_START (SYMBOL_BLOCK_VALUE (sym)) <= sal.end + && sal.end < BLOCK_END (SYMBOL_BLOCK_VALUE (sym))) + { + /* First pc of next line */ + pc = sal.end; + /* Recalculate the line number (might not be N+1). */ + sal = find_pc_sect_line (pc, SYMBOL_BFD_SECTION (sym), 0); + } + sal.pc = pc; + + return sal; +} + +/* If P is of the form "operator[ \t]+..." where `...' is + some legitimate operator text, return a pointer to the + beginning of the substring of the operator text. + Otherwise, return "". */ +char * +operator_chars (char *p, char **end) +{ + *end = ""; + if (strncmp (p, "operator", 8)) + return *end; + p += 8; + + /* Don't get faked out by `operator' being part of a longer + identifier. */ + if (isalpha (*p) || *p == '_' || *p == '$' || *p == '\0') + return *end; + + /* Allow some whitespace between `operator' and the operator symbol. */ + while (*p == ' ' || *p == '\t') + p++; + + /* Recognize 'operator TYPENAME'. */ + + if (isalpha (*p) || *p == '_' || *p == '$') + { + char *q = p + 1; + while (isalnum (*q) || *q == '_' || *q == '$') + q++; + *end = q; + return p; + } + + while (*p) + switch (*p) + { + case '\\': /* regexp quoting */ + if (p[1] == '*') + { + if (p[2] == '=') /* 'operator\*=' */ + *end = p + 3; + else /* 'operator\*' */ + *end = p + 2; + return p; + } + else if (p[1] == '[') + { + if (p[2] == ']') + error ("mismatched quoting on brackets, try 'operator\\[\\]'"); + else if (p[2] == '\\' && p[3] == ']') + { + *end = p + 4; /* 'operator\[\]' */ + return p; + } + else + error ("nothing is allowed between '[' and ']'"); + } + else + { + /* Gratuitous qoute: skip it and move on. */ + p++; + continue; + } + break; + case '!': + case '=': + case '*': + case '/': + case '%': + case '^': + if (p[1] == '=') + *end = p + 2; + else + *end = p + 1; + return p; + case '<': + case '>': + case '+': + case '-': + case '&': + case '|': + if (p[0] == '-' && p[1] == '>') + { + /* Struct pointer member operator 'operator->'. */ + if (p[2] == '*') + { + *end = p + 3; /* 'operator->*' */ + return p; + } + else if (p[2] == '\\') + { + *end = p + 4; /* Hopefully 'operator->\*' */ + return p; + } + else + { + *end = p + 2; /* 'operator->' */ + return p; + } + } + if (p[1] == '=' || p[1] == p[0]) + *end = p + 2; + else + *end = p + 1; + return p; + case '~': + case ',': + *end = p + 1; + return p; + case '(': + if (p[1] != ')') + error ("`operator ()' must be specified without whitespace in `()'"); + *end = p + 2; + return p; + case '?': + if (p[1] != ':') + error ("`operator ?:' must be specified without whitespace in `?:'"); + *end = p + 2; + return p; + case '[': + if (p[1] != ']') + error ("`operator []' must be specified without whitespace in `[]'"); + *end = p + 2; + return p; + default: + error ("`operator %s' not supported", p); + break; + } + + *end = ""; + return *end; +} + + +/* If FILE is not already in the table of files, return zero; + otherwise return non-zero. Optionally add FILE to the table if ADD + is non-zero. If *FIRST is non-zero, forget the old table + contents. */ +static int +filename_seen (const char *file, int add, int *first) +{ + /* Table of files seen so far. */ + static const char **tab = NULL; + /* Allocated size of tab in elements. + Start with one 256-byte block (when using GNU malloc.c). + 24 is the malloc overhead when range checking is in effect. */ + static int tab_alloc_size = (256 - 24) / sizeof (char *); + /* Current size of tab in elements. */ + static int tab_cur_size; + const char **p; + + if (*first) + { + if (tab == NULL) + tab = (const char **) xmalloc (tab_alloc_size * sizeof (*tab)); + tab_cur_size = 0; + } + + /* Is FILE in tab? */ + for (p = tab; p < tab + tab_cur_size; p++) + if (strcmp (*p, file) == 0) + return 1; + + /* No; maybe add it to tab. */ + if (add) + { + if (tab_cur_size == tab_alloc_size) + { + tab_alloc_size *= 2; + tab = (const char **) xrealloc ((char *) tab, + tab_alloc_size * sizeof (*tab)); + } + tab[tab_cur_size++] = file; + } + + return 0; +} + +/* Slave routine for sources_info. Force line breaks at ,'s. + NAME is the name to print and *FIRST is nonzero if this is the first + name printed. Set *FIRST to zero. */ +static void +output_source_filename (char *name, int *first) +{ + /* Since a single source file can result in several partial symbol + tables, we need to avoid printing it more than once. Note: if + some of the psymtabs are read in and some are not, it gets + printed both under "Source files for which symbols have been + read" and "Source files for which symbols will be read in on + demand". I consider this a reasonable way to deal with the + situation. I'm not sure whether this can also happen for + symtabs; it doesn't hurt to check. */ + + /* Was NAME already seen? */ + if (filename_seen (name, 1, first)) + { + /* Yes; don't print it again. */ + return; + } + /* No; print it and reset *FIRST. */ + if (*first) + { + *first = 0; + } + else + { + printf_filtered (", "); + } + + wrap_here (""); + fputs_filtered (name, gdb_stdout); +} + +static void +sources_info (char *ignore, int from_tty) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first; + + if (!have_full_symbols () && !have_partial_symbols ()) + { + error ("No symbol table is loaded. Use the \"file\" command."); + } + + printf_filtered ("Source files for which symbols have been read in:\n\n"); + + first = 1; + ALL_SYMTABS (objfile, s) + { + output_source_filename (s->filename, &first); + } + printf_filtered ("\n\n"); + + printf_filtered ("Source files for which symbols will be read in on demand:\n\n"); + + first = 1; + ALL_PSYMTABS (objfile, ps) + { + if (!ps->readin) + { + output_source_filename (ps->filename, &first); + } + } + printf_filtered ("\n"); +} + +static int +file_matches (char *file, char *files[], int nfiles) +{ + int i; + + if (file != NULL && nfiles != 0) + { + for (i = 0; i < nfiles; i++) + { + if (strcmp (files[i], lbasename (file)) == 0) + return 1; + } + } + else if (nfiles == 0) + return 1; + return 0; +} + +/* Free any memory associated with a search. */ +void +free_search_symbols (struct symbol_search *symbols) +{ + struct symbol_search *p; + struct symbol_search *next; + + for (p = symbols; p != NULL; p = next) + { + next = p->next; + xfree (p); + } +} + +static void +do_free_search_symbols_cleanup (void *symbols) +{ + free_search_symbols (symbols); +} + +struct cleanup * +make_cleanup_free_search_symbols (struct symbol_search *symbols) +{ + return make_cleanup (do_free_search_symbols_cleanup, symbols); +} + +/* Helper function for sort_search_symbols and qsort. Can only + sort symbols, not minimal symbols. */ +static int +compare_search_syms (const void *sa, const void *sb) +{ + struct symbol_search **sym_a = (struct symbol_search **) sa; + struct symbol_search **sym_b = (struct symbol_search **) sb; + + return strcmp (SYMBOL_PRINT_NAME ((*sym_a)->symbol), + SYMBOL_PRINT_NAME ((*sym_b)->symbol)); +} + +/* Sort the ``nfound'' symbols in the list after prevtail. Leave + prevtail where it is, but update its next pointer to point to + the first of the sorted symbols. */ +static struct symbol_search * +sort_search_symbols (struct symbol_search *prevtail, int nfound) +{ + struct symbol_search **symbols, *symp, *old_next; + int i; + + symbols = (struct symbol_search **) xmalloc (sizeof (struct symbol_search *) + * nfound); + symp = prevtail->next; + for (i = 0; i < nfound; i++) + { + symbols[i] = symp; + symp = symp->next; + } + /* Generally NULL. */ + old_next = symp; + + qsort (symbols, nfound, sizeof (struct symbol_search *), + compare_search_syms); + + symp = prevtail; + for (i = 0; i < nfound; i++) + { + symp->next = symbols[i]; + symp = symp->next; + } + symp->next = old_next; + + xfree (symbols); + return symp; +} + +/* Search the symbol table for matches to the regular expression REGEXP, + returning the results in *MATCHES. + + Only symbols of KIND are searched: + FUNCTIONS_DOMAIN - search all functions + TYPES_DOMAIN - search all type names + METHODS_DOMAIN - search all methods NOT IMPLEMENTED + VARIABLES_DOMAIN - search all symbols, excluding functions, type names, + and constants (enums) + + free_search_symbols should be called when *MATCHES is no longer needed. + + The results are sorted locally; each symtab's global and static blocks are + separately alphabetized. + */ +void +search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], + struct symbol_search **matches) +{ + struct symtab *s; + struct partial_symtab *ps; + struct blockvector *bv; + struct blockvector *prev_bv = 0; + struct block *b; + int i = 0; + struct dict_iterator iter; + struct symbol *sym; + struct partial_symbol **psym; + struct objfile *objfile; + struct minimal_symbol *msymbol; + char *val; + int found_misc = 0; + static enum minimal_symbol_type types[] + = + {mst_data, mst_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types2[] + = + {mst_bss, mst_file_text, mst_abs, mst_unknown}; + static enum minimal_symbol_type types3[] + = + {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown}; + static enum minimal_symbol_type types4[] + = + {mst_file_bss, mst_text, mst_abs, mst_unknown}; + enum minimal_symbol_type ourtype; + enum minimal_symbol_type ourtype2; + enum minimal_symbol_type ourtype3; + enum minimal_symbol_type ourtype4; + struct symbol_search *sr; + struct symbol_search *psr; + struct symbol_search *tail; + struct cleanup *old_chain = NULL; + + if (kind < VARIABLES_DOMAIN) + error ("must search on specific domain"); + + ourtype = types[(int) (kind - VARIABLES_DOMAIN)]; + ourtype2 = types2[(int) (kind - VARIABLES_DOMAIN)]; + ourtype3 = types3[(int) (kind - VARIABLES_DOMAIN)]; + ourtype4 = types4[(int) (kind - VARIABLES_DOMAIN)]; + + sr = *matches = NULL; + tail = NULL; + + if (regexp != NULL) + { + /* Make sure spacing is right for C++ operators. + This is just a courtesy to make the matching less sensitive + to how many spaces the user leaves between 'operator' + and or . */ + char *opend; + char *opname = operator_chars (regexp, &opend); + if (*opname) + { + int fix = -1; /* -1 means ok; otherwise number of spaces needed. */ + if (isalpha (*opname) || *opname == '_' || *opname == '$') + { + /* There should 1 space between 'operator' and 'TYPENAME'. */ + if (opname[-1] != ' ' || opname[-2] == ' ') + fix = 1; + } + else + { + /* There should 0 spaces between 'operator' and 'OPERATOR'. */ + if (opname[-1] == ' ') + fix = 0; + } + /* If wrong number of spaces, fix it. */ + if (fix >= 0) + { + char *tmp = (char *) alloca (8 + fix + strlen (opname) + 1); + sprintf (tmp, "operator%.*s%s", fix, " ", opname); + regexp = tmp; + } + } + + if (0 != (val = re_comp (regexp))) + error ("Invalid regexp (%s): %s", val, regexp); + } + + /* Search through the partial symtabs *first* for all symbols + matching the regexp. That way we don't have to reproduce all of + the machinery below. */ + + ALL_PSYMTABS (objfile, ps) + { + struct partial_symbol **bound, **gbound, **sbound; + int keep_going = 1; + + if (ps->readin) + continue; + + gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms; + sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms; + bound = gbound; + + /* Go through all of the symbols stored in a partial + symtab in one loop. */ + psym = objfile->global_psymbols.list + ps->globals_offset; + while (keep_going) + { + if (psym >= bound) + { + if (bound == gbound && ps->n_static_syms != 0) + { + psym = objfile->static_psymbols.list + ps->statics_offset; + bound = sbound; + } + else + keep_going = 0; + continue; + } + else + { + QUIT; + + /* If it would match (logic taken from loop below) + load the file and go on to the next one */ + if (file_matches (ps->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (*psym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (*psym) != LOC_TYPEDEF + && SYMBOL_CLASS (*psym) != LOC_BLOCK) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (*psym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (*psym) == LOC_BLOCK)))) + { + PSYMTAB_TO_SYMTAB (ps); + keep_going = 0; + } + } + psym++; + } + } + + /* Here, we search through the minimal symbol tables for functions + and variables that match, and force their symbols to be read. + This is in particular necessary for demangled variable names, + which are no longer put into the partial symbol tables. + The symbol will then be found during the scan of symtabs below. + + For functions, find_pc_symtab should succeed if we have debug info + for the function, for variables we have to call lookup_symbol + to determine if the variable has debug info. + If the lookup fails, set found_misc so that we will rescan to print + any matching symbols without debug info. + */ + + if (nfiles == 0 && (kind == VARIABLES_DOMAIN || kind == FUNCTIONS_DOMAIN)) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + if (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol))) + { + /* FIXME: carlton/2003-02-04: Given that the + semantics of lookup_symbol keeps on changing + slightly, it would be a nice idea if we had a + function lookup_symbol_minsym that found the + symbol associated to a given minimal symbol (if + any). */ + if (kind == FUNCTIONS_DOMAIN + || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, + VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + found_misc = 1; + } + } + } + } + } + + ALL_SYMTABS (objfile, s) + { + bv = BLOCKVECTOR (s); + /* Often many files share a blockvector. + Scan each blockvector only once so that + we don't get every symbol many times. + It happens that the first symtab in the list + for any given blockvector is the main file. */ + if (bv != prev_bv) + for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) + { + struct symbol_search *prevtail = tail; + int nfound = 0; + b = BLOCKVECTOR_BLOCK (bv, i); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + if (file_matches (s->filename, files, nfiles) + && ((regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (sym)) != 0) + && ((kind == VARIABLES_DOMAIN && SYMBOL_CLASS (sym) != LOC_TYPEDEF + && SYMBOL_CLASS (sym) != LOC_BLOCK + && SYMBOL_CLASS (sym) != LOC_CONST) + || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK) + || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF) + || (kind == METHODS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)))) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->symtab = s; + psr->symbol = sym; + psr->msymbol = NULL; + psr->next = NULL; + if (tail == NULL) + sr = psr; + else + tail->next = psr; + tail = psr; + nfound ++; + } + } + if (nfound > 0) + { + if (prevtail == NULL) + { + struct symbol_search dummy; + + dummy.next = sr; + tail = sort_search_symbols (&dummy, nfound); + sr = dummy.next; + + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail = sort_search_symbols (prevtail, nfound); + } + } + prev_bv = bv; + } + + /* If there are no eyes, avoid all contact. I mean, if there are + no debug symbols, then print directly from the msymbol_vector. */ + + if (found_misc || kind != FUNCTIONS_DOMAIN) + { + ALL_MSYMBOLS (objfile, msymbol) + { + if (MSYMBOL_TYPE (msymbol) == ourtype || + MSYMBOL_TYPE (msymbol) == ourtype2 || + MSYMBOL_TYPE (msymbol) == ourtype3 || + MSYMBOL_TYPE (msymbol) == ourtype4) + { + if (regexp == NULL + || re_exec (SYMBOL_NATURAL_NAME (msymbol)) != 0) + { + /* Functions: Look up by address. */ + if (kind != FUNCTIONS_DOMAIN || + (0 == find_pc_symtab (SYMBOL_VALUE_ADDRESS (msymbol)))) + { + /* Variables/Absolutes: Look up by name */ + if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), + (struct block *) NULL, VAR_DOMAIN, + 0, (struct symtab **) NULL) == NULL) + { + /* match */ + psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); + psr->block = i; + psr->msymbol = msymbol; + psr->symtab = NULL; + psr->symbol = NULL; + psr->next = NULL; + if (tail == NULL) + { + sr = psr; + old_chain = make_cleanup_free_search_symbols (sr); + } + else + tail->next = psr; + tail = psr; + } + } + } + } + } + } + + *matches = sr; + if (sr != NULL) + discard_cleanups (old_chain); +} + +/* Helper function for symtab_symbol_info, this function uses + the data returned from search_symbols() to print information + regarding the match to gdb_stdout. + */ +static void +print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym, + int block, char *last) +{ + if (last == NULL || strcmp (last, s->filename) != 0) + { + fputs_filtered ("\nFile ", gdb_stdout); + fputs_filtered (s->filename, gdb_stdout); + fputs_filtered (":\n", gdb_stdout); + } + + if (kind != TYPES_DOMAIN && block == STATIC_BLOCK) + printf_filtered ("static "); + + /* Typedef that is not a C++ class */ + if (kind == TYPES_DOMAIN + && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN) + typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout); + /* variable, func, or typedef-that-is-c++-class */ + else if (kind < TYPES_DOMAIN || + (kind == TYPES_DOMAIN && + SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN)) + { + type_print (SYMBOL_TYPE (sym), + (SYMBOL_CLASS (sym) == LOC_TYPEDEF + ? "" : SYMBOL_PRINT_NAME (sym)), + gdb_stdout, 0); + + printf_filtered (";\n"); + } +} + +/* This help function for symtab_symbol_info() prints information + for non-debugging symbols to gdb_stdout. + */ +static void +print_msymbol_info (struct minimal_symbol *msymbol) +{ + char *tmp; + + if (TARGET_ADDR_BIT <= 32) + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol) + & (CORE_ADDR) 0xffffffff, + "08l"); + else + tmp = local_hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol), + "016l"); + printf_filtered ("%s %s\n", + tmp, SYMBOL_PRINT_NAME (msymbol)); +} + +/* This is the guts of the commands "info functions", "info types", and + "info variables". It calls search_symbols to find all matches and then + print_[m]symbol_info to print out some useful information about the + matches. + */ +static void +symtab_symbol_info (char *regexp, domain_enum kind, int from_tty) +{ + static char *classnames[] + = + {"variable", "function", "type", "method"}; + struct symbol_search *symbols; + struct symbol_search *p; + struct cleanup *old_chain; + char *last_filename = NULL; + int first = 1; + + /* must make sure that if we're interrupted, symbols gets freed */ + search_symbols (regexp, kind, 0, (char **) NULL, &symbols); + old_chain = make_cleanup_free_search_symbols (symbols); + + printf_filtered (regexp + ? "All %ss matching regular expression \"%s\":\n" + : "All defined %ss:\n", + classnames[(int) (kind - VARIABLES_DOMAIN)], regexp); + + for (p = symbols; p != NULL; p = p->next) + { + QUIT; + + if (p->msymbol != NULL) + { + if (first) + { + printf_filtered ("\nNon-debugging symbols:\n"); + first = 0; + } + print_msymbol_info (p->msymbol); + } + else + { + print_symbol_info (kind, + p->symtab, + p->symbol, + p->block, + last_filename); + last_filename = p->symtab->filename; + } + } + + do_cleanups (old_chain); +} + +static void +variables_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, VARIABLES_DOMAIN, from_tty); +} + +static void +functions_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, FUNCTIONS_DOMAIN, from_tty); +} + + +static void +types_info (char *regexp, int from_tty) +{ + symtab_symbol_info (regexp, TYPES_DOMAIN, from_tty); +} + +/* Breakpoint all functions matching regular expression. */ + +void +rbreak_command_wrapper (char *regexp, int from_tty) +{ + rbreak_command (regexp, from_tty); +} + +static void +rbreak_command (char *regexp, int from_tty) +{ + struct symbol_search *ss; + struct symbol_search *p; + struct cleanup *old_chain; + + search_symbols (regexp, FUNCTIONS_DOMAIN, 0, (char **) NULL, &ss); + old_chain = make_cleanup_free_search_symbols (ss); + + for (p = ss; p != NULL; p = p->next) + { + if (p->msymbol == NULL) + { + char *string = alloca (strlen (p->symtab->filename) + + strlen (SYMBOL_LINKAGE_NAME (p->symbol)) + + 4); + strcpy (string, p->symtab->filename); + strcat (string, ":'"); + strcat (string, SYMBOL_LINKAGE_NAME (p->symbol)); + strcat (string, "'"); + break_command (string, from_tty); + print_symbol_info (FUNCTIONS_DOMAIN, + p->symtab, + p->symbol, + p->block, + p->symtab->filename); + } + else + { + break_command (SYMBOL_LINKAGE_NAME (p->msymbol), from_tty); + printf_filtered (" %s;\n", + SYMBOL_PRINT_NAME (p->msymbol)); + } + } + + do_cleanups (old_chain); +} + + +/* Helper routine for make_symbol_completion_list. */ + +static int return_val_size; +static int return_val_index; +static char **return_val; + +#define COMPLETION_LIST_ADD_SYMBOL(symbol, sym_text, len, text, word) \ + completion_list_add_name \ + (SYMBOL_NATURAL_NAME (symbol), (sym_text), (len), (text), (word)) + +/* Test to see if the symbol specified by SYMNAME (which is already + demangled for C++ symbols) matches SYM_TEXT in the first SYM_TEXT_LEN + characters. If so, add it to the current completion list. */ + +static void +completion_list_add_name (char *symname, char *sym_text, int sym_text_len, + char *text, char *word) +{ + int newsize; + int i; + + /* clip symbols that cannot match */ + + if (strncmp (symname, sym_text, sym_text_len) != 0) + { + return; + } + + /* We have a match for a completion, so add SYMNAME to the current list + of matches. Note that the name is moved to freshly malloc'd space. */ + + { + char *new; + if (word == sym_text) + { + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname); + } + else if (word > sym_text) + { + /* Return some portion of symname. */ + new = xmalloc (strlen (symname) + 5); + strcpy (new, symname + (word - sym_text)); + } + else + { + /* Return some of SYM_TEXT plus symname. */ + new = xmalloc (strlen (symname) + (sym_text - word) + 5); + strncpy (new, word, sym_text - word); + new[sym_text - word] = '\0'; + strcat (new, symname); + } + + if (return_val_index + 3 > return_val_size) + { + newsize = (return_val_size *= 2) * sizeof (char *); + return_val = (char **) xrealloc ((char *) return_val, newsize); + } + return_val[return_val_index++] = new; + return_val[return_val_index] = NULL; + } +} + +/* ObjC: In case we are completing on a selector, look as the msymbol + again and feed all the selectors into the mill. */ + +static void +completion_list_objc_symbol (struct minimal_symbol *msymbol, char *sym_text, + int sym_text_len, char *text, char *word) +{ + static char *tmp = NULL; + static unsigned int tmplen = 0; + + char *method, *category, *selector; + char *tmp2 = NULL; + + method = SYMBOL_NATURAL_NAME (msymbol); + + /* Is it a method? */ + if ((method[0] != '-') && (method[0] != '+')) + return; + + if (sym_text[0] == '[') + /* Complete on shortened method method. */ + completion_list_add_name (method + 1, sym_text, sym_text_len, text, word); + + while ((strlen (method) + 1) >= tmplen) + { + if (tmplen == 0) + tmplen = 1024; + else + tmplen *= 2; + tmp = xrealloc (tmp, tmplen); + } + selector = strchr (method, ' '); + if (selector != NULL) + selector++; + + category = strchr (method, '('); + + if ((category != NULL) && (selector != NULL)) + { + memcpy (tmp, method, (category - method)); + tmp[category - method] = ' '; + memcpy (tmp + (category - method) + 1, selector, strlen (selector) + 1); + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + if (sym_text[0] == '[') + completion_list_add_name (tmp + 1, sym_text, sym_text_len, text, word); + } + + if (selector != NULL) + { + /* Complete on selector only. */ + strcpy (tmp, selector); + tmp2 = strchr (tmp, ']'); + if (tmp2 != NULL) + *tmp2 = '\0'; + + completion_list_add_name (tmp, sym_text, sym_text_len, text, word); + } +} + +/* Break the non-quoted text based on the characters which are in + symbols. FIXME: This should probably be language-specific. */ + +static char * +language_search_unquoted_string (char *text, char *p) +{ + for (; p > text; --p) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + continue; + else + { + if ((current_language->la_language == language_objc)) + { + if (p[-1] == ':') /* might be part of a method name */ + continue; + else if (p[-1] == '[' && (p[-2] == '-' || p[-2] == '+')) + p -= 2; /* beginning of a method name */ + else if (p[-1] == ' ' || p[-1] == '(' || p[-1] == ')') + { /* might be part of a method name */ + char *t = p; + + /* Seeing a ' ' or a '(' is not conclusive evidence + that we are in the middle of a method name. However, + finding "-[" or "+[" should be pretty un-ambiguous. + Unfortunately we have to find it now to decide. */ + + while (t > text) + if (isalnum (t[-1]) || t[-1] == '_' || + t[-1] == ' ' || t[-1] == ':' || + t[-1] == '(' || t[-1] == ')') + --t; + else + break; + + if (t[-1] == '[' && (t[-2] == '-' || t[-2] == '+')) + p = t - 2; /* method name detected */ + /* else we leave with p unchanged */ + } + } + break; + } + } + return p; +} + + +/* Return a NULL terminated array of all symbols (regardless of class) + which begin by matching TEXT. If the answer is no symbols, then + the return value is an array which contains only a NULL pointer. + + Problem: All of the symbols have to be copied because readline frees them. + I'm not going to worry about this; hopefully there won't be that many. */ + +char ** +make_symbol_completion_list (char *text, char *word) +{ + struct symbol *sym; + struct symtab *s; + struct partial_symtab *ps; + struct minimal_symbol *msymbol; + struct objfile *objfile; + struct block *b, *surrounding_static_block = 0; + struct dict_iterator iter; + int j; + struct partial_symbol **psym; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* It is not a quoted string. Break it based on the characters + which are in symbols. */ + while (p > text) + { + if (isalnum (p[-1]) || p[-1] == '_' || p[-1] == '\0') + --p; + else + break; + } + sym_text = p; + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 100; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Look through the partial symtabs for all symbols which begin + by matching SYM_TEXT. Add each one that you find to the list. */ + + ALL_PSYMTABS (objfile, ps) + { + /* If the psymtab's been read in we'll get it when we search + through the blockvector. */ + if (ps->readin) + continue; + + for (psym = objfile->global_psymbols.list + ps->globals_offset; + psym < (objfile->global_psymbols.list + ps->globals_offset + + ps->n_global_syms); + psym++) + { + /* If interrupted, then quit. */ + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + + for (psym = objfile->static_psymbols.list + ps->statics_offset; + psym < (objfile->static_psymbols.list + ps->statics_offset + + ps->n_static_syms); + psym++) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (*psym, sym_text, sym_text_len, text, word); + } + } + + /* At this point scan through the misc symbol vectors and add each + symbol you find to the list. Eventually we want to ignore + anything that isn't a text symbol (everything else will be + handled by the psymtab code above). */ + + ALL_MSYMBOLS (objfile, msymbol) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (msymbol, sym_text, sym_text_len, text, word); + + completion_list_objc_symbol (msymbol, sym_text, sym_text_len, text, word); + } + + /* Search upwards from currently selected frame (so that we can + complete on local vars. */ + + for (b = get_selected_block (0); b != NULL; b = BLOCK_SUPERBLOCK (b)) + { + if (!BLOCK_SUPERBLOCK (b)) + { + surrounding_static_block = b; /* For elmin of dups */ + } + + /* Also catch fields of types defined in this places which match our + text string. Only complete on types visible from current context. */ + + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + QUIT; + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + if (SYMBOL_CLASS (sym) == LOC_TYPEDEF) + { + struct type *t = SYMBOL_TYPE (sym); + enum type_code c = TYPE_CODE (t); + + if (c == TYPE_CODE_UNION || c == TYPE_CODE_STRUCT) + { + for (j = TYPE_N_BASECLASSES (t); j < TYPE_NFIELDS (t); j++) + { + if (TYPE_FIELD_NAME (t, j)) + { + completion_list_add_name (TYPE_FIELD_NAME (t, j), + sym_text, sym_text_len, text, word); + } + } + } + } + } + } + + /* Go through the symtabs and check the externs and statics for + symbols which match. */ + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + ALL_SYMTABS (objfile, s) + { + QUIT; + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + /* Don't do this block twice. */ + if (b == surrounding_static_block) + continue; + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + } + + return (return_val); +} + +/* Like make_symbol_completion_list, but returns a list of symbols + defined in a source file FILE. */ + +char ** +make_file_symbol_completion_list (char *text, char *word, char *srcfile) +{ + struct symbol *sym; + struct symtab *s; + struct block *b; + struct dict_iterator iter; + /* The symbol we are completing on. Points in same buffer as text. */ + char *sym_text; + /* Length of sym_text. */ + int sym_text_len; + + /* Now look for the symbol we are supposed to complete on. + FIXME: This should be language-specific. */ + { + char *p; + char quote_found; + char *quote_pos = NULL; + + /* First see if this is a quoted string. */ + quote_found = '\0'; + for (p = text; *p != '\0'; ++p) + { + if (quote_found != '\0') + { + if (*p == quote_found) + /* Found close quote. */ + quote_found = '\0'; + else if (*p == '\\' && p[1] == quote_found) + /* A backslash followed by the quote character + doesn't end the string. */ + ++p; + } + else if (*p == '\'' || *p == '"') + { + quote_found = *p; + quote_pos = p; + } + } + if (quote_found == '\'') + /* A string within single quotes can be a symbol, so complete on it. */ + sym_text = quote_pos + 1; + else if (quote_found == '"') + /* A double-quoted string is never a symbol, nor does it make sense + to complete it any other way. */ + { + return_val = (char **) xmalloc (sizeof (char *)); + return_val[0] = NULL; + return return_val; + } + else + { + /* Not a quoted string. */ + sym_text = language_search_unquoted_string (text, p); + } + } + + sym_text_len = strlen (sym_text); + + return_val_size = 10; + return_val_index = 0; + return_val = (char **) xmalloc ((return_val_size + 1) * sizeof (char *)); + return_val[0] = NULL; + + /* Find the symtab for SRCFILE (this loads it if it was not yet read + in). */ + s = lookup_symtab (srcfile); + if (s == NULL) + { + /* Maybe they typed the file with leading directories, while the + symbol tables record only its basename. */ + const char *tail = lbasename (srcfile); + + if (tail > srcfile) + s = lookup_symtab (tail); + } + + /* If we have no symtab for that file, return an empty list. */ + if (s == NULL) + return (return_val); + + /* Go through this symtab and check the externs and statics for + symbols which match. */ + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), GLOBAL_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + b = BLOCKVECTOR_BLOCK (BLOCKVECTOR (s), STATIC_BLOCK); + ALL_BLOCK_SYMBOLS (b, iter, sym) + { + COMPLETION_LIST_ADD_SYMBOL (sym, sym_text, sym_text_len, text, word); + } + + return (return_val); +} + +/* A helper function for make_source_files_completion_list. It adds + another file name to a list of possible completions, growing the + list as necessary. */ + +static void +add_filename_to_list (const char *fname, char *text, char *word, + char ***list, int *list_used, int *list_alloced) +{ + char *new; + size_t fnlen = strlen (fname); + + if (*list_used + 1 >= *list_alloced) + { + *list_alloced *= 2; + *list = (char **) xrealloc ((char *) *list, + *list_alloced * sizeof (char *)); + } + + if (word == text) + { + /* Return exactly fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname); + } + else if (word > text) + { + /* Return some portion of fname. */ + new = xmalloc (fnlen + 5); + strcpy (new, fname + (word - text)); + } + else + { + /* Return some of TEXT plus fname. */ + new = xmalloc (fnlen + (text - word) + 5); + strncpy (new, word, text - word); + new[text - word] = '\0'; + strcat (new, fname); + } + (*list)[*list_used] = new; + (*list)[++*list_used] = NULL; +} + +static int +not_interesting_fname (const char *fname) +{ + static const char *illegal_aliens[] = { + "_globals_", /* inserted by coff_symtab_read */ + NULL + }; + int i; + + for (i = 0; illegal_aliens[i]; i++) + { + if (strcmp (fname, illegal_aliens[i]) == 0) + return 1; + } + return 0; +} + +/* Return a NULL terminated array of all source files whose names + begin with matching TEXT. The file names are looked up in the + symbol tables of this program. If the answer is no matchess, then + the return value is an array which contains only a NULL pointer. */ + +char ** +make_source_files_completion_list (char *text, char *word) +{ + struct symtab *s; + struct partial_symtab *ps; + struct objfile *objfile; + int first = 1; + int list_alloced = 1; + int list_used = 0; + size_t text_len = strlen (text); + char **list = (char **) xmalloc (list_alloced * sizeof (char *)); + const char *base_name; + + list[0] = NULL; + + if (!have_full_symbols () && !have_partial_symbols ()) + return list; + + ALL_SYMTABS (objfile, s) + { + if (not_interesting_fname (s->filename)) + continue; + if (!filename_seen (s->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (s->filename, text, text_len) == 0 +#else + && strncmp (s->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the current + list of matches. */ + add_filename_to_list (s->filename, text, word, + &list, &list_used, &list_alloced); + } + else + { + /* NOTE: We allow the user to type a base name when the + debug info records leading directories, but not the other + way around. This is what subroutines of breakpoint + command do when they parse file names. */ + base_name = lbasename (s->filename); + if (base_name != s->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + + ALL_PSYMTABS (objfile, ps) + { + if (not_interesting_fname (ps->filename)) + continue; + if (!ps->readin) + { + if (!filename_seen (ps->filename, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (ps->filename, text, text_len) == 0 +#else + && strncmp (ps->filename, text, text_len) == 0 +#endif + ) + { + /* This file matches for a completion; add it to the + current list of matches. */ + add_filename_to_list (ps->filename, text, word, + &list, &list_used, &list_alloced); + + } + else + { + base_name = lbasename (ps->filename); + if (base_name != ps->filename + && !filename_seen (base_name, 1, &first) +#if HAVE_DOS_BASED_FILE_SYSTEM + && strncasecmp (base_name, text, text_len) == 0 +#else + && strncmp (base_name, text, text_len) == 0 +#endif + ) + add_filename_to_list (base_name, text, word, + &list, &list_used, &list_alloced); + } + } + } + + return list; +} + +/* Determine if PC is in the prologue of a function. The prologue is the area + between the first instruction of a function, and the first executable line. + Returns 1 if PC *might* be in prologue, 0 if definately *not* in prologue. + + If non-zero, func_start is where we think the prologue starts, possibly + by previous examination of symbol table information. + */ + +int +in_prologue (CORE_ADDR pc, CORE_ADDR func_start) +{ + struct symtab_and_line sal; + CORE_ADDR func_addr, func_end; + + /* We have several sources of information we can consult to figure + this out. + - Compilers usually emit line number info that marks the prologue + as its own "source line". So the ending address of that "line" + is the end of the prologue. If available, this is the most + reliable method. + - The minimal symbols and partial symbols, which can usually tell + us the starting and ending addresses of a function. + - If we know the function's start address, we can call the + architecture-defined SKIP_PROLOGUE function to analyze the + instruction stream and guess where the prologue ends. + - Our `func_start' argument; if non-zero, this is the caller's + best guess as to the function's entry point. At the time of + this writing, handle_inferior_event doesn't get this right, so + it should be our last resort. */ + + /* Consult the partial symbol table, to find which function + the PC is in. */ + if (! find_pc_partial_function (pc, NULL, &func_addr, &func_end)) + { + CORE_ADDR prologue_end; + + /* We don't even have minsym information, so fall back to using + func_start, if given. */ + if (! func_start) + return 1; /* We *might* be in a prologue. */ + + prologue_end = SKIP_PROLOGUE (func_start); + + return func_start <= pc && pc < prologue_end; + } + + /* If we have line number information for the function, that's + usually pretty reliable. */ + sal = find_pc_line (func_addr, 0); + + /* Now sal describes the source line at the function's entry point, + which (by convention) is the prologue. The end of that "line", + sal.end, is the end of the prologue. + + Note that, for functions whose source code is all on a single + line, the line number information doesn't always end up this way. + So we must verify that our purported end-of-prologue address is + *within* the function, not at its start or end. */ + if (sal.line == 0 + || sal.end <= func_addr + || func_end <= sal.end) + { + /* We don't have any good line number info, so use the minsym + information, together with the architecture-specific prologue + scanning code. */ + CORE_ADDR prologue_end = SKIP_PROLOGUE (func_addr); + + return func_addr <= pc && pc < prologue_end; + } + + /* We have line number info, and it looks good. */ + return func_addr <= pc && pc < sal.end; +} + +/* Given PC at the function's start address, attempt to find the + prologue end using SAL information. Return zero if the skip fails. + + A non-optimized prologue traditionally has one SAL for the function + and a second for the function body. A single line function has + them both pointing at the same line. + + An optimized prologue is similar but the prologue may contain + instructions (SALs) from the instruction body. Need to skip those + while not getting into the function body. + + The functions end point and an increasing SAL line are used as + indicators of the prologue's endpoint. + + This code is based on the function refine_prologue_limit (versions + found in both ia64 and ppc). */ + +CORE_ADDR +skip_prologue_using_sal (CORE_ADDR func_addr) +{ + struct symtab_and_line prologue_sal; + CORE_ADDR start_pc; + CORE_ADDR end_pc; + + /* Get an initial range for the function. */ + find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc); + start_pc += FUNCTION_START_OFFSET; + + prologue_sal = find_pc_line (start_pc, 0); + if (prologue_sal.line != 0) + { + while (prologue_sal.end < end_pc) + { + struct symtab_and_line sal; + + sal = find_pc_line (prologue_sal.end, 0); + if (sal.line == 0) + break; + /* Assume that a consecutive SAL for the same (or larger) + line mark the prologue -> body transition. */ + if (sal.line >= prologue_sal.line) + break; + /* The case in which compiler's optimizer/scheduler has + moved instructions into the prologue. We look ahead in + the function looking for address ranges whose + corresponding line number is less the first one that we + found for the function. This is more conservative then + refine_prologue_limit which scans a large number of SALs + looking for any in the prologue */ + prologue_sal = sal; + } + } + return prologue_sal.end; +} + +struct symtabs_and_lines +decode_line_spec (char *string, int funfirstline) +{ + struct symtabs_and_lines sals; + struct symtab_and_line cursal; + + if (string == 0) + error ("Empty line specification."); + + /* We use whatever is set as the current source line. We do not try + and get a default or it will recursively call us! */ + cursal = get_current_source_symtab_and_line (); + + sals = decode_line_1 (&string, funfirstline, + cursal.symtab, cursal.line, + (char ***) NULL, NULL); + + if (*string) + error ("Junk at end of line specification: %s", string); + return sals; +} + +/* Track MAIN */ +static char *name_of_main; + +void +set_main_name (const char *name) +{ + if (name_of_main != NULL) + { + xfree (name_of_main); + name_of_main = NULL; + } + if (name != NULL) + { + name_of_main = xstrdup (name); + } +} + +char * +main_name (void) +{ + if (name_of_main != NULL) + return name_of_main; + else + return "main"; +} + + +void +_initialize_symtab (void) +{ + add_info ("variables", variables_info, + "All global and static variable names, or those matching REGEXP."); + if (dbx_commands) + add_com ("whereis", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + + add_info ("functions", functions_info, + "All function names, or those matching REGEXP."); + + + /* FIXME: This command has at least the following problems: + 1. It prints builtin types (in a very strange and confusing fashion). + 2. It doesn't print right, e.g. with + typedef struct foo *FOO + type_print prints "FOO" when we want to make it (in this situation) + print "struct foo *". + I also think "ptype" or "whatis" is more likely to be useful (but if + there is much disagreement "info types" can be fixed). */ + add_info ("types", types_info, + "All type names, or those matching REGEXP."); + + add_info ("sources", sources_info, + "Source files in the program."); + + add_com ("rbreak", class_breakpoint, rbreak_command, + "Set a breakpoint for all functions matching REGEXP."); + + if (xdb_commands) + { + add_com ("lf", class_info, sources_info, "Source files in the program"); + add_com ("lg", class_info, variables_info, + "All global and static variable names, or those matching REGEXP."); + } + + /* Initialize the one built-in type that isn't language dependent... */ + builtin_type_error = init_type (TYPE_CODE_ERROR, 0, 0, + "", (struct objfile *) NULL); +} + +#ifdef CRASH_MERGE +#include "gdb-stabs.h" +#include "version.h" +#define GDB_COMMON +#include "../../defs.h" + +static void get_member_data(struct gnu_request *, struct type *); +static void dump_enum(struct type *, struct gnu_request *); +static void eval_enum(struct type *, struct gnu_request *); +static void gdb_get_line_number(struct gnu_request *); +static void gdb_get_datatype(struct gnu_request *); +static void gdb_get_symbol_type(struct gnu_request *); +static void gdb_command_exists(struct gnu_request *); +#ifdef NEEDS_NEW_FUNCTIONALITY +static void gdb_stack_trace(struct gnu_request *); +#endif +static void gdb_debug_command(struct gnu_request *); +static void gdb_function_numargs(struct gnu_request *); +static void gdb_add_symbol_file(struct gnu_request *); +static void gdb_delete_symbol_file(struct gnu_request *); +static void gdb_patch_symbol_values(struct gnu_request *); +extern void replace_ui_file_FILE(struct ui_file *, FILE *); +extern int get_frame_offset(CORE_ADDR); + +static struct objfile *gdb_kernel_objfile = { 0 }; + +static ulong gdb_merge_flags = 0; +#define KERNEL_SYMBOLS_PATCHED (0x1) + +#undef STREQ +#define STREQ(A, B) (A && B && (strcmp(A, B) == 0)) + +/* + * All commands from above come through here. + */ +void +gdb_command_funnel(struct gnu_request *req) +{ + struct symbol *sym; + + if (req->command != GNU_VERSION) { + replace_ui_file_FILE(gdb_stdout, req->fp); + replace_ui_file_FILE(gdb_stderr, req->fp); + do_cleanups((struct cleanup *)0); + } + + switch (req->command) + { + case GNU_VERSION: + req->buf = (char *)version; + break; + + case GNU_PASS_THROUGH: + execute_command(req->buf, + req->flags & GNU_FROM_TTY_OFF ? FALSE : TRUE); + break; + + case GNU_STACK_TRACE: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * The get_current_frame() function in frame.c no longer can + * be subject of a CRASH_MERGE in which passed-in fp and pc + * value were substituted for read_fp() and read_pc() calls. + * Now there's a new unwind_to_current_frame() function and + * a new frame_info structure that are used. + */ + gdb_stack_trace(req); +#endif + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_RESOLVE_TEXT_ADDR: + sym = find_pc_function(req->addr); + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) + req->flags |= GNU_COMMAND_FAILED; + break; + + case GNU_DISASSEMBLE: + if (req->addr2) + sprintf(req->buf, "disassemble 0x%lx 0x%lx", + req->addr, req->addr2); + else + sprintf(req->buf, "disassemble 0x%lx", req->addr); + execute_command(req->buf, TRUE); + break; + + case GNU_ADD_SYMBOL_FILE: + gdb_add_symbol_file(req); + break; + + case GNU_DELETE_SYMBOL_FILE: + gdb_delete_symbol_file(req); + break; + + case GNU_GET_LINE_NUMBER: + gdb_get_line_number(req); + break; + + case GNU_GET_DATATYPE: + gdb_get_datatype(req); + break; + + case GNU_GET_SYMBOL_TYPE: + gdb_get_symbol_type(req); + break; + + case GNU_COMMAND_EXISTS: + gdb_command_exists(req); + break; + + case GNU_ALPHA_FRAME_OFFSET: +#ifdef NEEDS_NEW_FUNCTIONALITY + /* + * get_frame_offset() was a CRASH_MERGE function located in + * alpha-tdep.c; going from 5.3 to 6.1 made its direct port + * impossible because of dependencies that no longer exist. + * Also changed in alpha-tdep.c, alpha_frame_chain() and + * read_next_frame_reg() no longer exist, and both of those + * contained CRASH_MERGE pieces. Until somebody gives me + * a new port of a function to calculate the size of a function + * frame, it appears that alpha back-traces may be far more + * likely to fail. + */ + req->value = get_frame_offset(req->pc); +#endif + req->value = 0; + break; + + case GNU_FUNCTION_NUMARGS: + gdb_function_numargs(req); + break; + + case GNU_DEBUG_COMMAND: + gdb_debug_command(req); + break; + + case GNU_PATCH_SYMBOL_VALUES: + gdb_patch_symbol_values(req); + break; + + default: + req->flags |= GNU_COMMAND_FAILED; + break; + } +} + +/* + * Given a PC value, return the file and line number. + */ +static void +gdb_get_line_number(struct gnu_request *req) +{ + struct symtab_and_line sal; + CORE_ADDR pc; + +#define LASTCHAR(s) (s[strlen(s)-1]) + + pc = req->addr; + + sal = find_pc_line(pc, 0); + + if (!sal.symtab) { + req->buf[0] = '\0'; + return; + } + + if (sal.symtab->filename && sal.symtab->dirname) { + if (sal.symtab->filename[0] == '/') + sprintf(req->buf, "%s: %d", + sal.symtab->filename, sal.line); + else + sprintf(req->buf, "%s%s%s: %d", + sal.symtab->dirname, + LASTCHAR(sal.symtab->dirname) == '/' ? "" : "/", sal.symtab->filename, sal.line); + } +} + + +/* + * General purpose routine for determining datatypes. + */ + +static void +gdb_get_datatype(struct gnu_request *req) +{ + register struct cleanup *old_chain = NULL; + register struct type *type; + register struct type *typedef_type; + struct expression *expr; + struct symbol *sym; + register int i; + struct field *nextfield; + struct value *val; + + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (a)\n", req->name); + + req->typecode = TYPE_CODE_UNDEF; + + /* + * lookup_symbol() will pick up struct and union names. + */ + sym = lookup_symbol(req->name, 0, STRUCT_DOMAIN, 0, + (struct symtab **) NULL); + if (sym) { + req->typecode = TYPE_CODE(sym->type); + req->length = TYPE_LENGTH(sym->type); + if (req->member) + get_member_data(req, sym->type); + + if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) { + if (req->flags & GNU_PRINT_ENUMERATORS) + dump_enum(sym->type, req); + } + + return; + } + + /* + * Otherwise parse the expression. + */ + if (gdb_CRASHDEBUG(2)) + console("gdb_get_datatype [%s] (b)\n", req->name); + + expr = parse_expression(req->name); + + old_chain = make_cleanup(free_current_contents, &expr); + + + switch (expr->elts[0].opcode) + { + case OP_VAR_VALUE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_VAR_VALUE\n"); + type = expr->elts[2].symbol->type; + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + req->typecode = TYPE_CODE(type); + req->value = SYMBOL_VALUE(expr->elts[2].symbol); + req->tagname = TYPE_TAG_NAME(type); + if (!req->tagname) { + val = evaluate_type(expr); + eval_enum(VALUE_TYPE(val), req); + } + } + break; + + case OP_TYPE: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: OP_TYPE\n"); + type = expr->elts[1].type; + + req->typecode = TYPE_CODE(type); + req->length = TYPE_LENGTH(type); + + if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) { + req->is_typedef = TYPE_CODE_TYPEDEF; + if ((typedef_type = check_typedef(type))) { + req->typecode = TYPE_CODE(typedef_type); + req->length = TYPE_LENGTH(typedef_type); + type = typedef_type; + } + } + + if (TYPE_CODE(type) == TYPE_CODE_ENUM) { + if (req->is_typedef) + if (req->flags & GNU_PRINT_ENUMERATORS) { + if (req->is_typedef) + fprintf_filtered(gdb_stdout, + "typedef "); + dump_enum(type, req); + } + } + + if (req->member) + get_member_data(req, type); + + break; + + default: + if (gdb_CRASHDEBUG(2)) + console("expr->elts[0].opcode: %d (?)\n", + expr->elts[0].opcode); + break; + + } + + do_cleanups(old_chain); +} + +/* + * More robust enum list dump that gdb's, showing the value of each + * identifier, each on its own line. + */ +static void +dump_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, + "enum %s {\n", TYPE_TAG_NAME (type)); + else + fprintf_filtered(gdb_stdout, "enum {\n"); + + for (i = 0; i < len; i++) { + fprintf_filtered(gdb_stdout, " %s", + TYPE_FIELD_NAME (type, i)); + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + fprintf_filtered (gdb_stdout, " = %d", + TYPE_FIELD_BITPOS (type, i)); + lastval = TYPE_FIELD_BITPOS (type, i); + } else + fprintf_filtered(gdb_stdout, " = %d", lastval); + fprintf_filtered(gdb_stdout, "\n"); + lastval++; + } + if (TYPE_TAG_NAME(type)) + fprintf_filtered(gdb_stdout, "};\n"); + else + fprintf_filtered(gdb_stdout, "} %s;\n", req->name); +} + +/* + * Given an enum type with no tagname, determine its value. + */ +static void +eval_enum(struct type *type, struct gnu_request *req) +{ + register int i; + int len; + int lastval; + + len = TYPE_NFIELDS (type); + lastval = 0; + + for (i = 0; i < len; i++) { + if (lastval != TYPE_FIELD_BITPOS (type, i)) { + lastval = TYPE_FIELD_BITPOS (type, i); + } + if (STREQ(TYPE_FIELD_NAME(type, i), req->name)) { + req->tagname = "(unknown)"; + req->value = lastval; + return; + } + lastval++; + } +} + +/* + * Walk through a struct type's list of fields looking for the desired + * member field, and when found, return its relevant data. + */ +static void +get_member_data(struct gnu_request *req, struct type *type) +{ + register short i; + struct field *nextfield; + short nfields; + struct type *typedef_type; + + req->member_offset = -1; + +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(type)->nfields; + nextfield = TYPE_MAIN_TYPE(type)->fields; +#else + nfields = type->nfields; + nextfield = type->fields; +#endif + + if (nfields == 0) { + struct type *newtype; + newtype = lookup_transparent_type(req->name); + if (newtype) { + console("get_member_data(%s.%s): switching type from %lx to %lx\n", + req->name, req->member, type, newtype); +#ifdef TYPE_MAIN_TYPE + nfields = TYPE_MAIN_TYPE(newtype)->nfields; + nextfield = TYPE_MAIN_TYPE(newtype)->fields; +#else + nfields = newtype->nfields; + nextfield = newtype->fields; +#endif + } + } + + for (i = 0; i < nfields; i++) { + if (STREQ(req->member, nextfield->name)) { + req->member_offset = nextfield->loc.bitpos; + req->member_length = TYPE_LENGTH(nextfield->type); + req->member_typecode = TYPE_CODE(nextfield->type); + if ((req->member_typecode == TYPE_CODE_TYPEDEF) && + (typedef_type = check_typedef(nextfield->type))) + req->member_length = TYPE_LENGTH(typedef_type); + return; + } + nextfield++; + } +} + +#ifdef NEEDS_NEW_FUNCTIONALITY +/* + * Kick off a gdb stack trace, keeping copies of the starting frame and pc. + */ + +CORE_ADDR gdb_starting_pc; +CORE_ADDR gdb_starting_fp; + +static void +gdb_stack_trace(struct gnu_request *req) +{ + target_has_stack = TRUE; + target_has_registers = TRUE; + stop_soon_quietly = TRUE; + gdb_starting_pc = req->pc; + gdb_starting_fp = req->sp; + sprintf(req->buf, "backtrace"); + execute_command(req->buf, TRUE); +} +#endif + +/* + * Check whether a command exists. If it doesn't, the command will be + * returned indirectly via the error_hook. + */ +static void +gdb_command_exists(struct gnu_request *req) +{ + extern struct cmd_list_element *cmdlist; + register struct cmd_list_element *c; + + req->value = FALSE; + c = lookup_cmd(&req->name, cmdlist, "", 0, 1); + req->value = TRUE; +} + +static void +gdb_function_numargs(struct gnu_request *req) +{ + struct symbol *sym; + + sym = find_pc_function(req->pc); + + if (!sym || TYPE_CODE(sym->type) != TYPE_CODE_FUNC) { + req->flags |= GNU_COMMAND_FAILED; + return; + } + + req->value = (ulong)TYPE_NFIELDS(sym->type); +} + +struct load_module *gdb_current_load_module = NULL; + +static void +gdb_add_symbol_file(struct gnu_request *req) +{ + register struct objfile *loaded_objfile = NULL; + register struct objfile *objfile; + register struct minimal_symbol *m; + struct load_module *lm; + struct syment *sp; + struct syment *spx; + int external, subsequent, found; + off_t offset; + ulong value, adjusted; + struct symbol *sym; + struct expression *expr; + struct cleanup *old_chain; + int i; + int allsect = 0; + char *secname; + char buf[80]; + + gdb_current_load_module = lm = (struct load_module *)req->addr; + + req->name = lm->mod_namelist; + gdb_delete_symbol_file(req); + + for (i = 0 ; i < lm->mod_sections; i++) { + if (STREQ(lm->mod_section_data[i].name, ".text") && + (lm->mod_section_data[i].flags & SEC_FOUND)) + allsect = 1; + } + + if (!allsect) { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start ? lm->mod_text_start : lm->mod_base); + if (lm->mod_data_start) { + sprintf(buf, " -s .data 0x%lx", lm->mod_data_start); + strcat(req->buf, buf); + } + if (lm->mod_bss_start) { + sprintf(buf, " -s .bss 0x%lx", lm->mod_bss_start); + strcat(req->buf, buf); + } + if (lm->mod_rodata_start) { + sprintf(buf, " -s .rodata 0x%lx", lm->mod_rodata_start); + strcat(req->buf, buf); + } + } else { + sprintf(req->buf, "add-symbol-file %s 0x%lx", lm->mod_namelist, + lm->mod_text_start); + for (i = 0; i < lm->mod_sections; i++) { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + strcat(req->buf, buf); + } + } + } + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, "gdb_add_symbol_file: %s\n", req->buf); + } + + execute_command(req->buf, FALSE); + + ALL_OBJFILES(objfile) { + if (same_file(objfile->name, lm->mod_namelist)) { + loaded_objfile = objfile; + break; + } + } + + if (!loaded_objfile) + req->flags |= GNU_COMMAND_FAILED; +} + +void +patch_load_module(struct objfile *objfile, struct minimal_symbol *msymbol) +{ + register int i; + struct syment *sp, *spx; + struct load_module *lm; + struct mod_section_data *msd; + struct section_offsets *section_offsets; + ulong start; + char *name; + int external; + struct obj_section *s; + extern void print_gdb_version (struct ui_file *); + + if (!gdb_kernel_objfile) { + gdb_kernel_objfile = objfile; + return; + } + + if (!(lm = gdb_current_load_module) || + (msymbol && !IN_MODULE(SYMBOL_VALUE_ADDRESS(msymbol), lm))) + return; + + if (msymbol) { + for (sp = lm->mod_load_symtable; + sp < lm->mod_load_symend; sp++) { + + if ((sp->value < lm->mod_data_start) || + !STREQ(sp->name, msymbol->ginfo.name)) + continue; + + for (external = FALSE, + spx = lm->mod_ext_symtable; + spx < lm->mod_ext_symend; + spx++) { + if (STREQ(sp->name, spx->name)) { + external = TRUE; + break; + } + } + if (external) + continue; + + if (gdb_CRASHDEBUG(1)) { + fprintf_filtered(gdb_stdout, + "patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), + sp->value); + } + + console("patch %s from %lx to %lx\n", + msymbol->ginfo.name, + SYMBOL_VALUE_ADDRESS(msymbol), sp->value); + + SYMBOL_VALUE_ADDRESS(msymbol) = sp->value; + + break; + } + return; + } + + for (s = objfile->sections; s < objfile->sections_end; ++s) { + name = (char *)s->the_bfd_section->name; + + for (i = 0; i < lm->mod_sections; i++) { + msd = &lm->mod_section_data[i]; + if (STREQ(msd->name, name)) { + s->addr = lm->mod_base + msd->offset; + s->endaddr = s->addr + msd->size; + } + } + } + + section_offsets = objfile->section_offsets; + + if (objfile->sect_index_text != -1) + section_offsets->offsets[SECT_OFF_TEXT(objfile)] = + lm->mod_text_start; + + if (objfile->sect_index_data != -1) + section_offsets->offsets[SECT_OFF_DATA(objfile)] = + lm->mod_data_start; + + if (objfile->sect_index_bss != -1) + section_offsets->offsets[SECT_OFF_BSS(objfile)] = + lm->mod_bss_start; + + if (objfile->sect_index_rodata != -1) + section_offsets->offsets[SECT_OFF_RODATA(objfile)] = + lm->mod_rodata_start; + +#ifdef DEPRECATED_SECT_OFF_MAX + if (gdb_CRASHDEBUG(1)) { + for (i = 0; i < SECT_OFF_MAX; i++) { + if (ANOFFSET(objfile->section_offsets, i)) { + fprintf_filtered(gdb_stdout, + "section_offsets[%d]: %lx\n", i, + ANOFFSET(objfile->section_offsets, i)); + } + } + } +#endif +} + +static void +gdb_delete_symbol_file(struct gnu_request *req) +{ + register struct objfile *objfile; + + ALL_OBJFILES(objfile) { + if (STREQ(objfile->name, req->name)) { + free_objfile(objfile); + break; + } + } + + if (gdb_CRASHDEBUG(1)) + ALL_OBJFILES(objfile) + fprintf_filtered(gdb_stdout, "%s\n", objfile->name); +} + +/* + * Walk through all minimal_symbols, patching their values with the + * correct addresses. + */ +static void +gdb_patch_symbol_values(struct gnu_request *req) +{ + struct minimal_symbol *msymbol; + struct objfile *objfile; + + req->name = PATCH_KERNEL_SYMBOLS_START; + patch_kernel_symbol(req); + + ALL_MSYMBOLS (objfile, msymbol) + { + req->name = msymbol->ginfo.name; + req->addr = (ulong)(&SYMBOL_VALUE_ADDRESS(msymbol)); + if (!patch_kernel_symbol(req)) { + req->flags |= GNU_COMMAND_FAILED; + break; + } + } + + req->name = PATCH_KERNEL_SYMBOLS_STOP; + patch_kernel_symbol(req); + + clear_symtab_users(); + gdb_merge_flags |= KERNEL_SYMBOLS_PATCHED; +} + +static void +gdb_get_symbol_type(struct gnu_request *req) +{ + struct expression *expr; + struct value *val; + struct cleanup *old_chain = NULL; + struct type *type; + struct type *target_type; + + req->typecode = TYPE_CODE_UNDEF; + + expr = parse_expression (req->name); + old_chain = make_cleanup (free_current_contents, &expr); + val = evaluate_type (expr); + + type = VALUE_TYPE(val); + +#ifdef TYPE_MAIN_TYPE + req->typename = TYPE_MAIN_TYPE(type)->name; + req->typecode = TYPE_MAIN_TYPE(type)->code; + req->length = type->length; + target_type = TYPE_MAIN_TYPE(type)->target_type; +#else + req->typename = type->name; + req->typecode = type->code; + req->length = type->length; + target_type = type->target_type; +#endif + + if (target_type) { +#ifdef TYPE_MAIN_TYPE + req->target_typename = TYPE_MAIN_TYPE(target_type)->name; + req->target_typecode = TYPE_MAIN_TYPE(target_type)->code; + req->target_length = target_type->length; +#else + req->target_typename = target_type->name; + req->target_typecode = target_type->code; + req->target_length = target_type->length; +#endif + } + + if (req->member) + get_member_data(req, type); + + do_cleanups (old_chain); +} + +static void +gdb_debug_command(struct gnu_request *req) +{ + +} + +/* + * Only necessary on "patched" kernel symbol sessions, and called only by + * lookup_symbol(), pull a symbol value bait-and-switch operation by altering + * either a data symbol's address value or a text symbol's block start address. + */ +static void +gdb_bait_and_switch(char *name, struct symbol *sym) +{ + struct minimal_symbol *msym; + struct block *block; + + if ((gdb_merge_flags & KERNEL_SYMBOLS_PATCHED) && + (msym = lookup_minimal_symbol(name, NULL, gdb_kernel_objfile))) { + if (sym->aclass == LOC_BLOCK) { + block = (struct block *)SYMBOL_BLOCK_VALUE(sym); + BLOCK_START(block) = SYMBOL_VALUE_ADDRESS(msym); + } else + SYMBOL_VALUE_ADDRESS(sym) = SYMBOL_VALUE_ADDRESS(msym); + } +} + +#endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/target.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/target.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/target.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/target.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,2458 @@ +/* Select target systems and architectures at runtime for GDB. + + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + Contributed by Cygnus Support. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include +#include "gdb_string.h" +#include "target.h" +#include "gdbcmd.h" +#include "symtab.h" +#include "inferior.h" +#include "bfd.h" +#include "symfile.h" +#include "objfiles.h" +#include "gdb_wait.h" +#include "dcache.h" +#include +#include "regcache.h" +#include "gdb_assert.h" +#include "gdbcore.h" + +static void target_info (char *, int); + +static void maybe_kill_then_create_inferior (char *, char *, char **); + +static void maybe_kill_then_attach (char *, int); + +static void kill_or_be_killed (int); + +static void default_terminal_info (char *, int); + +static int default_region_size_ok_for_hw_watchpoint (int); + +static int nosymbol (char *, CORE_ADDR *); + +static void tcomplain (void); + +static int nomemory (CORE_ADDR, char *, int, int, struct target_ops *); + +static int return_zero (void); + +static int return_one (void); + +static int return_minus_one (void); + +void target_ignore (void); + +static void target_command (char *, int); + +static struct target_ops *find_default_run_target (char *); + +static void nosupport_runtime (void); + +static LONGEST default_xfer_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, + ULONGEST offset, LONGEST len); + +/* Transfer LEN bytes between target address MEMADDR and GDB address + MYADDR. Returns 0 for success, errno code for failure (which + includes partial transfers -- if you want a more useful response to + partial transfers, try either target_read_memory_partial or + target_write_memory_partial). */ + +static int target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, + int write); + +static void init_dummy_target (void); + +static void debug_to_open (char *, int); + +static void debug_to_close (int); + +static void debug_to_attach (char *, int); + +static void debug_to_detach (char *, int); + +static void debug_to_disconnect (char *, int); + +static void debug_to_resume (ptid_t, int, enum target_signal); + +static ptid_t debug_to_wait (ptid_t, struct target_waitstatus *); + +static void debug_to_fetch_registers (int); + +static void debug_to_store_registers (int); + +static void debug_to_prepare_to_store (void); + +static int debug_to_xfer_memory (CORE_ADDR, char *, int, int, + struct mem_attrib *, struct target_ops *); + +static void debug_to_files_info (struct target_ops *); + +static int debug_to_insert_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_breakpoint (CORE_ADDR, char *); + +static int debug_to_can_use_hw_breakpoint (int, int, int); + +static int debug_to_insert_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_remove_hw_breakpoint (CORE_ADDR, char *); + +static int debug_to_insert_watchpoint (CORE_ADDR, int, int); + +static int debug_to_remove_watchpoint (CORE_ADDR, int, int); + +static int debug_to_stopped_by_watchpoint (void); + +static CORE_ADDR debug_to_stopped_data_address (void); + +static int debug_to_region_size_ok_for_hw_watchpoint (int); + +static void debug_to_terminal_init (void); + +static void debug_to_terminal_inferior (void); + +static void debug_to_terminal_ours_for_output (void); + +static void debug_to_terminal_save_ours (void); + +static void debug_to_terminal_ours (void); + +static void debug_to_terminal_info (char *, int); + +static void debug_to_kill (void); + +static void debug_to_load (char *, int); + +static int debug_to_lookup_symbol (char *, CORE_ADDR *); + +static void debug_to_create_inferior (char *, char *, char **); + +static void debug_to_mourn_inferior (void); + +static int debug_to_can_run (void); + +static void debug_to_notice_signals (ptid_t); + +static int debug_to_thread_alive (ptid_t); + +static void debug_to_stop (void); + +/* Pointer to array of target architecture structures; the size of the + array; the current index into the array; the allocated size of the + array. */ +struct target_ops **target_structs; +unsigned target_struct_size; +unsigned target_struct_index; +unsigned target_struct_allocsize; +#define DEFAULT_ALLOCSIZE 10 + +/* The initial current target, so that there is always a semi-valid + current target. */ + +static struct target_ops dummy_target; + +/* Top of target stack. */ + +static struct target_ops *target_stack; + +/* The target structure we are currently using to talk to a process + or file or whatever "inferior" we have. */ + +struct target_ops current_target; + +/* Command list for target. */ + +static struct cmd_list_element *targetlist = NULL; + +/* Nonzero if we are debugging an attached outside process + rather than an inferior. */ + +int attach_flag; + +/* Non-zero if we want to see trace of target level stuff. */ + +static int targetdebug = 0; + +static void setup_target_debug (void); + +DCACHE *target_dcache; + +/* The user just typed 'target' without the name of a target. */ + +static void +target_command (char *arg, int from_tty) +{ + fputs_filtered ("Argument required (target name). Try `help target'\n", + gdb_stdout); +} + +/* Add a possible target architecture to the list. */ + +void +add_target (struct target_ops *t) +{ + /* Provide default values for all "must have" methods. */ + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; + + if (!target_structs) + { + target_struct_allocsize = DEFAULT_ALLOCSIZE; + target_structs = (struct target_ops **) xmalloc + (target_struct_allocsize * sizeof (*target_structs)); + } + if (target_struct_size >= target_struct_allocsize) + { + target_struct_allocsize *= 2; + target_structs = (struct target_ops **) + xrealloc ((char *) target_structs, + target_struct_allocsize * sizeof (*target_structs)); + } + target_structs[target_struct_size++] = t; + + if (targetlist == NULL) + add_prefix_cmd ("target", class_run, target_command, + "Connect to a target machine or process.\n\ +The first argument is the type or protocol of the target machine.\n\ +Remaining arguments are interpreted by the target protocol. For more\n\ +information on the arguments for a particular protocol, type\n\ +`help target ' followed by the protocol name.", + &targetlist, "target ", 0, &cmdlist); + add_cmd (t->to_shortname, no_class, t->to_open, t->to_doc, &targetlist); +} + +/* Stub functions */ + +void +target_ignore (void) +{ +} + +void +target_load (char *arg, int from_tty) +{ + dcache_invalidate (target_dcache); + (*current_target.to_load) (arg, from_tty); +} + +static int +nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *t) +{ + errno = EIO; /* Can't read/write this location */ + return 0; /* No bytes handled */ +} + +static void +tcomplain (void) +{ + error ("You can't do that when your target is `%s'", + current_target.to_shortname); +} + +void +noprocess (void) +{ + error ("You can't do that without a process to debug."); +} + +static int +nosymbol (char *name, CORE_ADDR *addrp) +{ + return 1; /* Symbol does not exist in target env */ +} + +static void +nosupport_runtime (void) +{ + if (ptid_equal (inferior_ptid, null_ptid)) + noprocess (); + else + error ("No run-time support for this"); +} + + +static void +default_terminal_info (char *args, int from_tty) +{ + printf_unfiltered ("No saved terminal information.\n"); +} + +/* This is the default target_create_inferior and target_attach function. + If the current target is executing, it asks whether to kill it off. + If this function returns without calling error(), it has killed off + the target, and the operation should be attempted. */ + +static void +kill_or_be_killed (int from_tty) +{ + if (target_has_execution) + { + printf_unfiltered ("You are already running a program:\n"); + target_files_info (); + if (query ("Kill it? ")) + { + target_kill (); + if (target_has_execution) + error ("Killing the program did not help."); + return; + } + else + { + error ("Program not killed."); + } + } + tcomplain (); +} + +static void +maybe_kill_then_attach (char *args, int from_tty) +{ + kill_or_be_killed (from_tty); + target_attach (args, from_tty); +} + +static void +maybe_kill_then_create_inferior (char *exec, char *args, char **env) +{ + kill_or_be_killed (0); + target_create_inferior (exec, args, env); +} + +/* Go through the target stack from top to bottom, copying over zero + entries in current_target, then filling in still empty entries. In + effect, we are doing class inheritance through the pushed target + vectors. + + NOTE: cagney/2003-10-17: The problem with this inheritance, as it + is currently implemented, is that it discards any knowledge of + which target an inherited method originally belonged to. + Consequently, new new target methods should instead explicitly and + locally search the target stack for the target that can handle the + request. */ + +static void +update_current_target (void) +{ + struct target_ops *t; + + /* First, reset curren'ts contents. */ + memset (¤t_target, 0, sizeof (current_target)); + +#define INHERIT(FIELD, TARGET) \ + if (!current_target.FIELD) \ + current_target.FIELD = (TARGET)->FIELD + + for (t = target_stack; t; t = t->beneath) + { + INHERIT (to_shortname, t); + INHERIT (to_longname, t); + INHERIT (to_doc, t); + INHERIT (to_open, t); + INHERIT (to_close, t); + INHERIT (to_attach, t); + INHERIT (to_post_attach, t); + INHERIT (to_detach, t); + INHERIT (to_disconnect, t); + INHERIT (to_resume, t); + INHERIT (to_wait, t); + INHERIT (to_post_wait, t); + INHERIT (to_fetch_registers, t); + INHERIT (to_store_registers, t); + INHERIT (to_prepare_to_store, t); + INHERIT (to_xfer_memory, t); + INHERIT (to_files_info, t); + INHERIT (to_insert_breakpoint, t); + INHERIT (to_remove_breakpoint, t); + INHERIT (to_can_use_hw_breakpoint, t); + INHERIT (to_insert_hw_breakpoint, t); + INHERIT (to_remove_hw_breakpoint, t); + INHERIT (to_insert_watchpoint, t); + INHERIT (to_remove_watchpoint, t); + INHERIT (to_stopped_data_address, t); + INHERIT (to_stopped_by_watchpoint, t); + INHERIT (to_have_continuable_watchpoint, t); + INHERIT (to_region_size_ok_for_hw_watchpoint, t); + INHERIT (to_terminal_init, t); + INHERIT (to_terminal_inferior, t); + INHERIT (to_terminal_ours_for_output, t); + INHERIT (to_terminal_ours, t); + INHERIT (to_terminal_save_ours, t); + INHERIT (to_terminal_info, t); + INHERIT (to_kill, t); + INHERIT (to_load, t); + INHERIT (to_lookup_symbol, t); + INHERIT (to_create_inferior, t); + INHERIT (to_post_startup_inferior, t); + INHERIT (to_acknowledge_created_inferior, t); + INHERIT (to_insert_fork_catchpoint, t); + INHERIT (to_remove_fork_catchpoint, t); + INHERIT (to_insert_vfork_catchpoint, t); + INHERIT (to_remove_vfork_catchpoint, t); + INHERIT (to_follow_fork, t); + INHERIT (to_insert_exec_catchpoint, t); + INHERIT (to_remove_exec_catchpoint, t); + INHERIT (to_reported_exec_events_per_exec_call, t); + INHERIT (to_has_exited, t); + INHERIT (to_mourn_inferior, t); + INHERIT (to_can_run, t); + INHERIT (to_notice_signals, t); + INHERIT (to_thread_alive, t); + INHERIT (to_find_new_threads, t); + INHERIT (to_pid_to_str, t); + INHERIT (to_extra_thread_info, t); + INHERIT (to_stop, t); + /* Do not inherit to_xfer_partial. */ + INHERIT (to_rcmd, t); + INHERIT (to_enable_exception_callback, t); + INHERIT (to_get_current_exception_event, t); + INHERIT (to_pid_to_exec_file, t); + INHERIT (to_stratum, t); + INHERIT (to_has_all_memory, t); + INHERIT (to_has_memory, t); + INHERIT (to_has_stack, t); + INHERIT (to_has_registers, t); + INHERIT (to_has_execution, t); + INHERIT (to_has_thread_control, t); + INHERIT (to_sections, t); + INHERIT (to_sections_end, t); + INHERIT (to_can_async_p, t); + INHERIT (to_is_async_p, t); + INHERIT (to_async, t); + INHERIT (to_async_mask_value, t); + INHERIT (to_find_memory_regions, t); + INHERIT (to_make_corefile_notes, t); + INHERIT (to_get_thread_local_address, t); + INHERIT (to_magic, t); + } +#undef INHERIT + + /* Clean up a target struct so it no longer has any zero pointers in + it. Some entries are defaulted to a method that print an error, + others are hard-wired to a standard recursive default. */ + +#define de_fault(field, value) \ + if (!current_target.field) \ + current_target.field = value + + de_fault (to_open, + (void (*) (char *, int)) + tcomplain); + de_fault (to_close, + (void (*) (int)) + target_ignore); + de_fault (to_attach, + maybe_kill_then_attach); + de_fault (to_post_attach, + (void (*) (int)) + target_ignore); + de_fault (to_detach, + (void (*) (char *, int)) + target_ignore); + de_fault (to_disconnect, + (void (*) (char *, int)) + tcomplain); + de_fault (to_resume, + (void (*) (ptid_t, int, enum target_signal)) + noprocess); + de_fault (to_wait, + (ptid_t (*) (ptid_t, struct target_waitstatus *)) + noprocess); + de_fault (to_post_wait, + (void (*) (ptid_t, int)) + target_ignore); + de_fault (to_fetch_registers, + (void (*) (int)) + target_ignore); + de_fault (to_store_registers, + (void (*) (int)) + noprocess); + de_fault (to_prepare_to_store, + (void (*) (void)) + noprocess); + de_fault (to_xfer_memory, + (int (*) (CORE_ADDR, char *, int, int, struct mem_attrib *, struct target_ops *)) + nomemory); + de_fault (to_files_info, + (void (*) (struct target_ops *)) + target_ignore); + de_fault (to_insert_breakpoint, + memory_insert_breakpoint); + de_fault (to_remove_breakpoint, + memory_remove_breakpoint); + de_fault (to_can_use_hw_breakpoint, + (int (*) (int, int, int)) + return_zero); + de_fault (to_insert_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_remove_hw_breakpoint, + (int (*) (CORE_ADDR, char *)) + return_minus_one); + de_fault (to_insert_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_remove_watchpoint, + (int (*) (CORE_ADDR, int, int)) + return_minus_one); + de_fault (to_stopped_by_watchpoint, + (int (*) (void)) + return_zero); + de_fault (to_stopped_data_address, + (CORE_ADDR (*) (void)) + return_zero); + de_fault (to_region_size_ok_for_hw_watchpoint, + default_region_size_ok_for_hw_watchpoint); + de_fault (to_terminal_init, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_inferior, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours_for_output, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_save_ours, + (void (*) (void)) + target_ignore); + de_fault (to_terminal_info, + default_terminal_info); + de_fault (to_kill, + (void (*) (void)) + noprocess); + de_fault (to_load, + (void (*) (char *, int)) + tcomplain); + de_fault (to_lookup_symbol, + (int (*) (char *, CORE_ADDR *)) + nosymbol); + de_fault (to_create_inferior, + maybe_kill_then_create_inferior); + de_fault (to_post_startup_inferior, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_acknowledge_created_inferior, + (void (*) (int)) + target_ignore); + de_fault (to_insert_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_fork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_insert_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_vfork_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_follow_fork, + (int (*) (int)) + target_ignore); + de_fault (to_insert_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_remove_exec_catchpoint, + (int (*) (int)) + tcomplain); + de_fault (to_reported_exec_events_per_exec_call, + (int (*) (void)) + return_one); + de_fault (to_has_exited, + (int (*) (int, int, int *)) + return_zero); + de_fault (to_mourn_inferior, + (void (*) (void)) + noprocess); + de_fault (to_can_run, + return_zero); + de_fault (to_notice_signals, + (void (*) (ptid_t)) + target_ignore); + de_fault (to_thread_alive, + (int (*) (ptid_t)) + return_zero); + de_fault (to_find_new_threads, + (void (*) (void)) + target_ignore); + de_fault (to_extra_thread_info, + (char *(*) (struct thread_info *)) + return_zero); + de_fault (to_stop, + (void (*) (void)) + target_ignore); + current_target.to_xfer_partial = default_xfer_partial; + de_fault (to_rcmd, + (void (*) (char *, struct ui_file *)) + tcomplain); + de_fault (to_enable_exception_callback, + (struct symtab_and_line * (*) (enum exception_event_kind, int)) + nosupport_runtime); + de_fault (to_get_current_exception_event, + (struct exception_event_record * (*) (void)) + nosupport_runtime); + de_fault (to_pid_to_exec_file, + (char *(*) (int)) + return_zero); + de_fault (to_can_async_p, + (int (*) (void)) + return_zero); + de_fault (to_is_async_p, + (int (*) (void)) + return_zero); + de_fault (to_async, + (void (*) (void (*) (enum inferior_event_type, void*), void*)) + tcomplain); +#undef de_fault + + /* Finally, position the target-stack beneath the squashed + "current_target". That way code looking for a non-inherited + target method can quickly and simply find it. */ + current_target.beneath = target_stack; +} + +/* Push a new target type into the stack of the existing target accessors, + possibly superseding some of the existing accessors. + + Result is zero if the pushed target ended up on top of the stack, + nonzero if at least one target is on top of it. + + Rather than allow an empty stack, we always have the dummy target at + the bottom stratum, so we can call the function vectors without + checking them. */ + +int +push_target (struct target_ops *t) +{ + struct target_ops **cur; + + /* Check magic number. If wrong, it probably means someone changed + the struct definition, but not all the places that initialize one. */ + if (t->to_magic != OPS_MAGIC) + { + fprintf_unfiltered (gdb_stderr, + "Magic number of %s target struct wrong\n", + t->to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + } + + /* Find the proper stratum to install this target in. */ + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum) + break; + } + + /* If there's already targets at this stratum, remove them. */ + /* FIXME: cagney/2003-10-15: I think this should be poping all + targets to CUR, and not just those at this stratum level. */ + while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum) + { + /* There's already something at this stratum level. Close it, + and un-hook it from the stack. */ + struct target_ops *tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + target_close (tmp, 0); + } + + /* We have removed all targets in our stratum, now add the new one. */ + t->beneath = (*cur); + (*cur) = t; + + update_current_target (); + + if (targetdebug) + setup_target_debug (); + + /* Not on top? */ + return (t != target_stack); +} + +/* Remove a target_ops vector from the stack, wherever it may be. + Return how many times it was removed (0 or 1). */ + +int +unpush_target (struct target_ops *t) +{ + struct target_ops **cur; + struct target_ops *tmp; + + /* Look for the specified target. Note that we assume that a target + can only occur once in the target stack. */ + + for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath) + { + if ((*cur) == t) + break; + } + + if ((*cur) == NULL) + return 0; /* Didn't find target_ops, quit now */ + + /* NOTE: cagney/2003-12-06: In '94 the close call was made + unconditional by moving it to before the above check that the + target was in the target stack (something about "Change the way + pushing and popping of targets work to support target overlays + and inheritance"). This doesn't make much sense - only open + targets should be closed. */ + target_close (t, 0); + + /* Unchain the target */ + tmp = (*cur); + (*cur) = (*cur)->beneath; + tmp->beneath = NULL; + + update_current_target (); + + return 1; +} + +void +pop_target (void) +{ + target_close (¤t_target, 0); /* Let it clean up */ + if (unpush_target (target_stack) == 1) + return; + + fprintf_unfiltered (gdb_stderr, + "pop_target couldn't find target %s\n", + current_target.to_shortname); + internal_error (__FILE__, __LINE__, "failed internal consistency check"); +} + +#undef MIN +#define MIN(A, B) (((A) <= (B)) ? (A) : (B)) + +/* target_read_string -- read a null terminated string, up to LEN bytes, + from MEMADDR in target. Set *ERRNOP to the errno code, or 0 if successful. + Set *STRING to a pointer to malloc'd memory containing the data; the caller + is responsible for freeing it. Return the number of bytes successfully + read. */ + +int +target_read_string (CORE_ADDR memaddr, char **string, int len, int *errnop) +{ + int tlen, origlen, offset, i; + char buf[4]; + int errcode = 0; + char *buffer; + int buffer_allocated; + char *bufptr; + unsigned int nbytes_read = 0; + + /* Small for testing. */ + buffer_allocated = 4; + buffer = xmalloc (buffer_allocated); + bufptr = buffer; + + origlen = len; + + while (len > 0) + { + tlen = MIN (len, 4 - (memaddr & 3)); + offset = memaddr & 3; + + errcode = target_xfer_memory (memaddr & ~3, buf, 4, 0); + if (errcode != 0) + { + /* The transfer request might have crossed the boundary to an + unallocated region of memory. Retry the transfer, requesting + a single byte. */ + tlen = 1; + offset = 0; + errcode = target_xfer_memory (memaddr, buf, 1, 0); + if (errcode != 0) + goto done; + } + + if (bufptr - buffer + tlen > buffer_allocated) + { + unsigned int bytes; + bytes = bufptr - buffer; + buffer_allocated *= 2; + buffer = xrealloc (buffer, buffer_allocated); + bufptr = buffer + bytes; + } + + for (i = 0; i < tlen; i++) + { + *bufptr++ = buf[i + offset]; + if (buf[i + offset] == '\000') + { + nbytes_read += i + 1; + goto done; + } + } + + memaddr += tlen; + len -= tlen; + nbytes_read += tlen; + } +done: + if (errnop != NULL) + *errnop = errcode; + if (string != NULL) + *string = buffer; + return nbytes_read; +} + +/* Find a section containing ADDR. */ +struct section_table * +target_section_by_addr (struct target_ops *target, CORE_ADDR addr) +{ + struct section_table *secp; + for (secp = target->to_sections; + secp < target->to_sections_end; + secp++) + { + if (addr >= secp->addr && addr < secp->endaddr) + return secp; + } + return NULL; +} + +/* Read LEN bytes of target memory at address MEMADDR, placing the results in + GDB's memory at MYADDR. Returns either 0 for success or an errno value + if any error occurs. + + If an error occurs, no guarantee is made about the contents of the data at + MYADDR. In particular, the caller should not depend upon partial reads + filling the buffer with good data. There is no way for the caller to know + how much good data might have been transfered anyway. Callers that can + deal with partial reads should call target_read_memory_partial. */ + +int +target_read_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 0); +} + +int +target_write_memory (CORE_ADDR memaddr, char *myaddr, int len) +{ + return target_xfer_memory (memaddr, myaddr, len, 1); +} + +static int trust_readonly = 0; + +/* Move memory to or from the targets. The top target gets priority; + if it cannot handle it, it is offered to the next one down, etc. + + Result is -1 on error, or the number of bytes transfered. */ + +int +do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib) +{ + int res; + int done = 0; + struct target_ops *t; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + return 0; + + /* to_xfer_memory is not guaranteed to set errno, even when it returns + 0. */ + errno = 0; + + if (!write && trust_readonly) + { + struct section_table *secp; + /* User-settable option, "trust-readonly-sections". If true, + then memory from any SEC_READONLY bfd section may be read + directly from the bfd file. */ + secp = target_section_by_addr (¤t_target, memaddr); + if (secp != NULL + && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section) + & SEC_READONLY)) + return xfer_memory (memaddr, myaddr, len, 0, attrib, ¤t_target); + } + + /* The quick case is that the top target can handle the transfer. */ + res = current_target.to_xfer_memory + (memaddr, myaddr, len, write, attrib, ¤t_target); + + /* If res <= 0 then we call it again in the loop. Ah well. */ + if (res <= 0) + { + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + res = t->to_xfer_memory (memaddr, myaddr, len, write, attrib, t); + if (res > 0) + break; /* Handled all or part of xfer */ + if (t->to_has_all_memory) + break; + } + + if (res <= 0) + return -1; + } + + return res; +} + + +/* Perform a memory transfer. Iterate until the entire region has + been transfered. + + Result is 0 or errno value. */ + +static int +target_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write) +{ + int res; + int reg_len; + struct mem_region *region; + +#ifdef CRASH_MERGE + int gdb_readmem_callback(ulong, void *, int, int); + if (gdb_readmem_callback(memaddr, myaddr, len, write)) + return 0; +#endif + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + return 0; + } + + while (len > 0) + { + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write) + return EIO; + break; + + case MEM_WO: + if (!write) + return EIO; + break; + } + + while (reg_len > 0) + { + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write, + ®ion->attrib); + + if (res <= 0) + { + /* If this address is for nonexistent memory, read zeros + if reading, or do nothing if writing. Return + error. */ + if (!write) + memset (myaddr, 0, len); + if (errno == 0) + return EIO; + else + return errno; + } + + memaddr += res; + myaddr += res; + len -= res; + reg_len -= res; + } + } + + return 0; /* We managed to cover it all somehow. */ +} + + +/* Perform a partial memory transfer. + + Result is -1 on error, or the number of bytes transfered. */ + +static int +target_xfer_memory_partial (CORE_ADDR memaddr, char *myaddr, int len, + int write_p, int *err) +{ + int res; + int reg_len; + struct mem_region *region; + + /* Zero length requests are ok and require no work. */ + if (len == 0) + { + *err = 0; + return 0; + } + + region = lookup_mem_region(memaddr); + if (memaddr + len < region->hi) + reg_len = len; + else + reg_len = region->hi - memaddr; + + switch (region->attrib.mode) + { + case MEM_RO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + + case MEM_WO: + if (write_p) + { + *err = EIO; + return -1; + } + break; + } + + if (region->attrib.cache) + res = dcache_xfer_memory (target_dcache, memaddr, myaddr, + reg_len, write_p); + else + res = do_xfer_memory (memaddr, myaddr, reg_len, write_p, + ®ion->attrib); + + if (res <= 0) + { + if (errno != 0) + *err = errno; + else + *err = EIO; + + return -1; + } + + *err = 0; + return res; +} + +int +target_read_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 0, err); +} + +int +target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err) +{ + return target_xfer_memory_partial (memaddr, buf, len, 1, err); +} + +/* More generic transfers. */ + +static LONGEST +default_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, + const void *writebuf, ULONGEST offset, LONGEST len) +{ + if (object == TARGET_OBJECT_MEMORY + && ops->to_xfer_memory != NULL) + /* If available, fall back to the target's "to_xfer_memory" + method. */ + { + int xfered = -1; + errno = 0; + if (writebuf != NULL) + { + void *buffer = xmalloc (len); + struct cleanup *cleanup = make_cleanup (xfree, buffer); + memcpy (buffer, writebuf, len); + xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL, + ops); + do_cleanups (cleanup); + } + if (readbuf != NULL) + xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL, + ops); + if (xfered > 0) + return xfered; + else if (xfered == 0 && errno == 0) + /* "to_xfer_memory" uses 0, cross checked against ERRNO as one + indication of an error. */ + return 0; + else + return -1; + } + else if (ops->beneath != NULL) + return ops->beneath->to_xfer_partial (ops->beneath, object, annex, + readbuf, writebuf, offset, len); + else + return -1; +} + +/* Target vector read/write partial wrapper functions. + + NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial + (inbuf, outbuf)", instead of separate read/write methods, make life + easier. */ + +LONGEST +target_read_partial (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len); +} + +LONGEST +target_write_partial (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + gdb_assert (ops->to_xfer_partial != NULL); + return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len); +} + +/* Wrappers to perform the full transfer. */ +LONGEST +target_read (struct target_ops *ops, + enum target_object object, + const char *annex, void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_read_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +LONGEST +target_write (struct target_ops *ops, + enum target_object object, + const char *annex, const void *buf, + ULONGEST offset, LONGEST len) +{ + LONGEST xfered = 0; + while (xfered < len) + { + LONGEST xfer = target_write_partial (ops, object, annex, + (bfd_byte *) buf + xfered, + offset + xfered, len - xfered); + /* Call an observer, notifying them of the xfer progress? */ + if (xfer <= 0) + /* Call memory_error? */ + return -1; + xfered += xfer; + QUIT; + } + return len; +} + +/* Memory transfer methods. */ + +void +get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf, + LONGEST len) +{ + if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len) + != len) + memory_error (EIO, addr); +} + +ULONGEST +get_target_memory_unsigned (struct target_ops *ops, + CORE_ADDR addr, int len) +{ + char buf[sizeof (ULONGEST)]; + + gdb_assert (len <= sizeof (buf)); + get_target_memory (ops, addr, buf, len); + return extract_unsigned_integer (buf, len); +} + +static void +target_info (char *args, int from_tty) +{ + struct target_ops *t; + int has_all_mem = 0; + + if (symfile_objfile != NULL) + printf_unfiltered ("Symbols from \"%s\".\n", symfile_objfile->name); + +#ifdef FILES_INFO_HOOK + if (FILES_INFO_HOOK ()) + return; +#endif + + for (t = target_stack; t != NULL; t = t->beneath) + { + if (!t->to_has_memory) + continue; + + if ((int) (t->to_stratum) <= (int) dummy_stratum) + continue; + if (has_all_mem) + printf_unfiltered ("\tWhile running this, GDB does not access memory from...\n"); + printf_unfiltered ("%s:\n", t->to_longname); + (t->to_files_info) (t); + has_all_mem = t->to_has_all_memory; + } +} + +/* This is to be called by the open routine before it does + anything. */ + +void +target_preopen (int from_tty) +{ + dont_repeat (); + + if (target_has_execution) + { + if (!from_tty + || query ("A program is being debugged already. Kill it? ")) + target_kill (); + else + error ("Program not killed."); + } + + /* Calling target_kill may remove the target from the stack. But if + it doesn't (which seems like a win for UDI), remove it now. */ + + if (target_has_execution) + pop_target (); +} + +/* Detach a target after doing deferred register stores. */ + +void +target_detach (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_detach) (args, from_tty); +} + +void +target_disconnect (char *args, int from_tty) +{ + /* Handle any optimized stores to the inferior. */ +#ifdef DO_DEFERRED_STORES + DO_DEFERRED_STORES; +#endif + (current_target.to_disconnect) (args, from_tty); +} + +void +target_link (char *modname, CORE_ADDR *t_reloc) +{ + if (DEPRECATED_STREQ (current_target.to_shortname, "rombug")) + { + (current_target.to_lookup_symbol) (modname, t_reloc); + if (*t_reloc == 0) + error ("Unable to link to %s and get relocation in rombug", modname); + } + else + *t_reloc = (CORE_ADDR) -1; +} + +int +target_async_mask (int mask) +{ + int saved_async_masked_status = target_async_mask_value; + target_async_mask_value = mask; + return saved_async_masked_status; +} + +/* Look through the list of possible targets for a target that can + execute a run or attach command without any other data. This is + used to locate the default process stratum. + + Result is always valid (error() is called for errors). */ + +static struct target_ops * +find_default_run_target (char *do_mesg) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + if (count != 1) + error ("Don't know how to %s. Try \"help target\".", do_mesg); + + return runable; +} + +void +find_default_attach (char *args, int from_tty) +{ + struct target_ops *t; + + t = find_default_run_target ("attach"); + (t->to_attach) (args, from_tty); + return; +} + +void +find_default_create_inferior (char *exec_file, char *allargs, char **env) +{ + struct target_ops *t; + + t = find_default_run_target ("run"); + (t->to_create_inferior) (exec_file, allargs, env); + return; +} + +static int +default_region_size_ok_for_hw_watchpoint (int byte_count) +{ + return (byte_count <= TYPE_LENGTH (builtin_type_void_data_ptr)); +} + +static int +return_zero (void) +{ + return 0; +} + +static int +return_one (void) +{ + return 1; +} + +static int +return_minus_one (void) +{ + return -1; +} + +/* + * Resize the to_sections pointer. Also make sure that anyone that + * was holding on to an old value of it gets updated. + * Returns the old size. + */ + +int +target_resize_to_sections (struct target_ops *target, int num_added) +{ + struct target_ops **t; + struct section_table *old_value; + int old_count; + + old_value = target->to_sections; + + if (target->to_sections) + { + old_count = target->to_sections_end - target->to_sections; + target->to_sections = (struct section_table *) + xrealloc ((char *) target->to_sections, + (sizeof (struct section_table)) * (num_added + old_count)); + } + else + { + old_count = 0; + target->to_sections = (struct section_table *) + xmalloc ((sizeof (struct section_table)) * num_added); + } + target->to_sections_end = target->to_sections + (num_added + old_count); + + /* Check to see if anyone else was pointing to this structure. + If old_value was null, then no one was. */ + + if (old_value) + { + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_sections == old_value) + { + (*t)->to_sections = target->to_sections; + (*t)->to_sections_end = target->to_sections_end; + } + } + } + + return old_count; + +} + +/* Remove all target sections taken from ABFD. + + Scan the current target stack for targets whose section tables + refer to sections from BFD, and remove those sections. We use this + when we notice that the inferior has unloaded a shared object, for + example. */ +void +remove_target_sections (bfd *abfd) +{ + struct target_ops **t; + + for (t = target_structs; t < target_structs + target_struct_size; t++) + { + struct section_table *src, *dest; + + dest = (*t)->to_sections; + for (src = (*t)->to_sections; src < (*t)->to_sections_end; src++) + if (src->bfd != abfd) + { + /* Keep this section. */ + if (dest < src) *dest = *src; + dest++; + } + + /* If we've dropped any sections, resize the section table. */ + if (dest < src) + target_resize_to_sections (*t, dest - src); + } +} + + + + +/* Find a single runnable target in the stack and return it. If for + some reason there is more than one, return NULL. */ + +struct target_ops * +find_run_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; ++t) + { + if ((*t)->to_can_run && target_can_run (*t)) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* Find a single core_stratum target in the list of targets and return it. + If for some reason there is more than one, return NULL. */ + +struct target_ops * +find_core_target (void) +{ + struct target_ops **t; + struct target_ops *runable = NULL; + int count; + + count = 0; + + for (t = target_structs; t < target_structs + target_struct_size; + ++t) + { + if ((*t)->to_stratum == core_stratum) + { + runable = *t; + ++count; + } + } + + return (count == 1 ? runable : NULL); +} + +/* + * Find the next target down the stack from the specified target. + */ + +struct target_ops * +find_target_beneath (struct target_ops *t) +{ + return t->beneath; +} + + +/* The inferior process has died. Long live the inferior! */ + +void +generic_mourn_inferior (void) +{ + extern int show_breakpoint_hit_counts; + + inferior_ptid = null_ptid; + attach_flag = 0; + breakpoint_init_inferior (inf_exited); + registers_changed (); + +#ifdef CLEAR_DEFERRED_STORES + /* Delete any pending stores to the inferior... */ + CLEAR_DEFERRED_STORES; +#endif + + reopen_exec_file (); + reinit_frame_cache (); + + /* It is confusing to the user for ignore counts to stick around + from previous runs of the inferior. So clear them. */ + /* However, it is more confusing for the ignore counts to disappear when + using hit counts. So don't clear them if we're counting hits. */ + if (!show_breakpoint_hit_counts) + breakpoint_clear_ignore_counts (); + + if (detach_hook) + detach_hook (); +} + +/* Helper function for child_wait and the Lynx derivatives of child_wait. + HOSTSTATUS is the waitstatus from wait() or the equivalent; store our + translation of that in OURSTATUS. */ +void +store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus) +{ +#ifdef CHILD_SPECIAL_WAITSTATUS + /* CHILD_SPECIAL_WAITSTATUS should return nonzero and set *OURSTATUS + if it wants to deal with hoststatus. */ + if (CHILD_SPECIAL_WAITSTATUS (ourstatus, hoststatus)) + return; +#endif + + if (WIFEXITED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_EXITED; + ourstatus->value.integer = WEXITSTATUS (hoststatus); + } + else if (!WIFSTOPPED (hoststatus)) + { + ourstatus->kind = TARGET_WAITKIND_SIGNALLED; + ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus)); + } + else + { + ourstatus->kind = TARGET_WAITKIND_STOPPED; + ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus)); + } +} + +/* Returns zero to leave the inferior alone, one to interrupt it. */ +int (*target_activity_function) (void); +int target_activity_fd; + +/* Convert a normal process ID to a string. Returns the string in a static + buffer. */ + +char * +normal_pid_to_str (ptid_t ptid) +{ + static char buf[30]; + + sprintf (buf, "process %d", PIDGET (ptid)); + return buf; +} + +/* Error-catcher for target_find_memory_regions */ +static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2) +{ + error ("No target."); + return 0; +} + +/* Error-catcher for target_make_corefile_notes */ +static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2) +{ + error ("No target."); + return NULL; +} + +/* Set up the handful of non-empty slots needed by the dummy target + vector. */ + +static void +init_dummy_target (void) +{ + dummy_target.to_shortname = "None"; + dummy_target.to_longname = "None"; + dummy_target.to_doc = ""; + dummy_target.to_attach = find_default_attach; + dummy_target.to_create_inferior = find_default_create_inferior; + dummy_target.to_pid_to_str = normal_pid_to_str; + dummy_target.to_stratum = dummy_stratum; + dummy_target.to_find_memory_regions = dummy_find_memory_regions; + dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; + dummy_target.to_magic = OPS_MAGIC; +} + + +static struct target_ops debug_target; + +static void +debug_to_open (char *args, int from_tty) +{ + debug_target.to_open (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_open (%s, %d)\n", args, from_tty); +} + +static void +debug_to_close (int quitting) +{ + target_close (&debug_target, quitting); + fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting); +} + +void +target_close (struct target_ops *targ, int quitting) +{ + if (targ->to_xclose != NULL) + targ->to_xclose (targ, quitting); + else if (targ->to_close != NULL) + targ->to_close (quitting); +} + +static void +debug_to_attach (char *args, int from_tty) +{ + debug_target.to_attach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_attach (%s, %d)\n", args, from_tty); +} + + +static void +debug_to_post_attach (int pid) +{ + debug_target.to_post_attach (pid); + + fprintf_unfiltered (gdb_stdlog, "target_post_attach (%d)\n", pid); +} + +static void +debug_to_detach (char *args, int from_tty) +{ + debug_target.to_detach (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_detach (%s, %d)\n", args, from_tty); +} + +static void +debug_to_disconnect (char *args, int from_tty) +{ + debug_target.to_disconnect (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_disconnect (%s, %d)\n", + args, from_tty); +} + +static void +debug_to_resume (ptid_t ptid, int step, enum target_signal siggnal) +{ + debug_target.to_resume (ptid, step, siggnal); + + fprintf_unfiltered (gdb_stdlog, "target_resume (%d, %s, %s)\n", PIDGET (ptid), + step ? "step" : "continue", + target_signal_to_name (siggnal)); +} + +static ptid_t +debug_to_wait (ptid_t ptid, struct target_waitstatus *status) +{ + ptid_t retval; + + retval = debug_target.to_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, + "target_wait (%d, status) = %d, ", PIDGET (ptid), + PIDGET (retval)); + fprintf_unfiltered (gdb_stdlog, "status->kind = "); + switch (status->kind) + { + case TARGET_WAITKIND_EXITED: + fprintf_unfiltered (gdb_stdlog, "exited, status = %d\n", + status->value.integer); + break; + case TARGET_WAITKIND_STOPPED: + fprintf_unfiltered (gdb_stdlog, "stopped, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_SIGNALLED: + fprintf_unfiltered (gdb_stdlog, "signalled, signal = %s\n", + target_signal_to_name (status->value.sig)); + break; + case TARGET_WAITKIND_LOADED: + fprintf_unfiltered (gdb_stdlog, "loaded\n"); + break; + case TARGET_WAITKIND_FORKED: + fprintf_unfiltered (gdb_stdlog, "forked\n"); + break; + case TARGET_WAITKIND_VFORKED: + fprintf_unfiltered (gdb_stdlog, "vforked\n"); + break; + case TARGET_WAITKIND_EXECD: + fprintf_unfiltered (gdb_stdlog, "execd\n"); + break; + case TARGET_WAITKIND_SPURIOUS: + fprintf_unfiltered (gdb_stdlog, "spurious\n"); + break; + default: + fprintf_unfiltered (gdb_stdlog, "unknown???\n"); + break; + } + + return retval; +} + +static void +debug_to_post_wait (ptid_t ptid, int status) +{ + debug_target.to_post_wait (ptid, status); + + fprintf_unfiltered (gdb_stdlog, "target_post_wait (%d, %d)\n", + PIDGET (ptid), status); +} + +static void +debug_print_register (const char * func, int regno) +{ + fprintf_unfiltered (gdb_stdlog, "%s ", func); + if (regno >= 0 && regno < NUM_REGS + NUM_PSEUDO_REGS + && REGISTER_NAME (regno) != NULL && REGISTER_NAME (regno)[0] != '\0') + fprintf_unfiltered (gdb_stdlog, "(%s)", REGISTER_NAME (regno)); + else + fprintf_unfiltered (gdb_stdlog, "(%d)", regno); + if (regno >= 0) + { + int i; + unsigned char buf[MAX_REGISTER_SIZE]; + deprecated_read_register_gen (regno, buf); + fprintf_unfiltered (gdb_stdlog, " = "); + for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++) + { + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); + } + if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST)) + { + fprintf_unfiltered (gdb_stdlog, " 0x%s %s", + paddr_nz (read_register (regno)), + paddr_d (read_register (regno))); + } + } + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_fetch_registers (int regno) +{ + debug_target.to_fetch_registers (regno); + debug_print_register ("target_fetch_registers", regno); +} + +static void +debug_to_store_registers (int regno) +{ + debug_target.to_store_registers (regno); + debug_print_register ("target_store_registers", regno); + fprintf_unfiltered (gdb_stdlog, "\n"); +} + +static void +debug_to_prepare_to_store (void) +{ + debug_target.to_prepare_to_store (); + + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n"); +} + +static int +debug_to_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct mem_attrib *attrib, + struct target_ops *target) +{ + int retval; + + retval = debug_target.to_xfer_memory (memaddr, myaddr, len, write, + attrib, target); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_memory (0x%x, xxx, %d, %s, xxx) = %d", + (unsigned int) memaddr, /* possable truncate long long */ + len, write ? "write" : "read", retval); + + + + if (retval > 0) + { + int i; + + fputs_unfiltered (", bytes =", gdb_stdlog); + for (i = 0; i < retval; i++) + { + if ((((long) &(myaddr[i])) & 0xf) == 0) + fprintf_unfiltered (gdb_stdlog, "\n"); + fprintf_unfiltered (gdb_stdlog, " %02x", myaddr[i] & 0xff); + } + } + + fputc_unfiltered ('\n', gdb_stdlog); + + return retval; +} + +static void +debug_to_files_info (struct target_ops *target) +{ + debug_target.to_files_info (target); + + fprintf_unfiltered (gdb_stdlog, "target_files_info (xxx)\n"); +} + +static int +debug_to_insert_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_can_use_hw_breakpoint (int type, int cnt, int from_tty) +{ + int retval; + + retval = debug_target.to_can_use_hw_breakpoint (type, cnt, from_tty); + + fprintf_unfiltered (gdb_stdlog, + "target_can_use_hw_breakpoint (%ld, %ld, %ld) = %ld\n", + (unsigned long) type, + (unsigned long) cnt, + (unsigned long) from_tty, + (unsigned long) retval); + return retval; +} + +static int +debug_to_region_size_ok_for_hw_watchpoint (int byte_count) +{ + CORE_ADDR retval; + + retval = debug_target.to_region_size_ok_for_hw_watchpoint (byte_count); + + fprintf_unfiltered (gdb_stdlog, + "TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT (%ld) = 0x%lx\n", + (unsigned long) byte_count, + (unsigned long) retval); + return retval; +} + +static int +debug_to_stopped_by_watchpoint (void) +{ + int retval; + + retval = debug_target.to_stopped_by_watchpoint (); + + fprintf_unfiltered (gdb_stdlog, + "STOPPED_BY_WATCHPOINT () = %ld\n", + (unsigned long) retval); + return retval; +} + +static CORE_ADDR +debug_to_stopped_data_address (void) +{ + CORE_ADDR retval; + + retval = debug_target.to_stopped_data_address (); + + fprintf_unfiltered (gdb_stdlog, + "target_stopped_data_address () = 0x%lx\n", + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_insert_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_hw_breakpoint (CORE_ADDR addr, char *save) +{ + int retval; + + retval = debug_target.to_remove_hw_breakpoint (addr, save); + + fprintf_unfiltered (gdb_stdlog, + "target_remove_hw_breakpoint (0x%lx, xxx) = %ld\n", + (unsigned long) addr, + (unsigned long) retval); + return retval; +} + +static int +debug_to_insert_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static int +debug_to_remove_watchpoint (CORE_ADDR addr, int len, int type) +{ + int retval; + + retval = debug_target.to_insert_watchpoint (addr, len, type); + + fprintf_unfiltered (gdb_stdlog, + "target_insert_watchpoint (0x%lx, %d, %d) = %ld\n", + (unsigned long) addr, len, type, (unsigned long) retval); + return retval; +} + +static void +debug_to_terminal_init (void) +{ + debug_target.to_terminal_init (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_init ()\n"); +} + +static void +debug_to_terminal_inferior (void) +{ + debug_target.to_terminal_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_inferior ()\n"); +} + +static void +debug_to_terminal_ours_for_output (void) +{ + debug_target.to_terminal_ours_for_output (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours_for_output ()\n"); +} + +static void +debug_to_terminal_ours (void) +{ + debug_target.to_terminal_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_ours ()\n"); +} + +static void +debug_to_terminal_save_ours (void) +{ + debug_target.to_terminal_save_ours (); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_save_ours ()\n"); +} + +static void +debug_to_terminal_info (char *arg, int from_tty) +{ + debug_target.to_terminal_info (arg, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_terminal_info (%s, %d)\n", arg, + from_tty); +} + +static void +debug_to_kill (void) +{ + debug_target.to_kill (); + + fprintf_unfiltered (gdb_stdlog, "target_kill ()\n"); +} + +static void +debug_to_load (char *args, int from_tty) +{ + debug_target.to_load (args, from_tty); + + fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty); +} + +static int +debug_to_lookup_symbol (char *name, CORE_ADDR *addrp) +{ + int retval; + + retval = debug_target.to_lookup_symbol (name, addrp); + + fprintf_unfiltered (gdb_stdlog, "target_lookup_symbol (%s, xxx)\n", name); + + return retval; +} + +static void +debug_to_create_inferior (char *exec_file, char *args, char **env) +{ + debug_target.to_create_inferior (exec_file, args, env); + + fprintf_unfiltered (gdb_stdlog, "target_create_inferior (%s, %s, xxx)\n", + exec_file, args); +} + +static void +debug_to_post_startup_inferior (ptid_t ptid) +{ + debug_target.to_post_startup_inferior (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_post_startup_inferior (%d)\n", + PIDGET (ptid)); +} + +static void +debug_to_acknowledge_created_inferior (int pid) +{ + debug_target.to_acknowledge_created_inferior (pid); + + fprintf_unfiltered (gdb_stdlog, "target_acknowledge_created_inferior (%d)\n", + pid); +} + +static int +debug_to_insert_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_fork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_fork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_fork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_insert_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_vfork_catchpoint (%d)= %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_vfork_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_vfork_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_vfork_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_follow_fork (int follow_child) +{ + int retval = debug_target.to_follow_fork (follow_child); + + fprintf_unfiltered (gdb_stdlog, "target_follow_fork (%d) = %d\n", + follow_child, retval); + + return retval; +} + +static int +debug_to_insert_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_insert_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_insert_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_remove_exec_catchpoint (int pid) +{ + int retval; + + retval = debug_target.to_remove_exec_catchpoint (pid); + + fprintf_unfiltered (gdb_stdlog, "target_remove_exec_catchpoint (%d) = %d\n", + pid, retval); + + return retval; +} + +static int +debug_to_reported_exec_events_per_exec_call (void) +{ + int reported_exec_events; + + reported_exec_events = debug_target.to_reported_exec_events_per_exec_call (); + + fprintf_unfiltered (gdb_stdlog, + "target_reported_exec_events_per_exec_call () = %d\n", + reported_exec_events); + + return reported_exec_events; +} + +static int +debug_to_has_exited (int pid, int wait_status, int *exit_status) +{ + int has_exited; + + has_exited = debug_target.to_has_exited (pid, wait_status, exit_status); + + fprintf_unfiltered (gdb_stdlog, "target_has_exited (%d, %d, %d) = %d\n", + pid, wait_status, *exit_status, has_exited); + + return has_exited; +} + +static void +debug_to_mourn_inferior (void) +{ + debug_target.to_mourn_inferior (); + + fprintf_unfiltered (gdb_stdlog, "target_mourn_inferior ()\n"); +} + +static int +debug_to_can_run (void) +{ + int retval; + + retval = debug_target.to_can_run (); + + fprintf_unfiltered (gdb_stdlog, "target_can_run () = %d\n", retval); + + return retval; +} + +static void +debug_to_notice_signals (ptid_t ptid) +{ + debug_target.to_notice_signals (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_notice_signals (%d)\n", + PIDGET (ptid)); +} + +static int +debug_to_thread_alive (ptid_t ptid) +{ + int retval; + + retval = debug_target.to_thread_alive (ptid); + + fprintf_unfiltered (gdb_stdlog, "target_thread_alive (%d) = %d\n", + PIDGET (ptid), retval); + + return retval; +} + +static void +debug_to_find_new_threads (void) +{ + debug_target.to_find_new_threads (); + + fputs_unfiltered ("target_find_new_threads ()\n", gdb_stdlog); +} + +static void +debug_to_stop (void) +{ + debug_target.to_stop (); + + fprintf_unfiltered (gdb_stdlog, "target_stop ()\n"); +} + +static LONGEST +debug_to_xfer_partial (struct target_ops *ops, enum target_object object, + const char *annex, void *readbuf, const void *writebuf, + ULONGEST offset, LONGEST len) +{ + LONGEST retval; + + retval = debug_target.to_xfer_partial (&debug_target, object, annex, + readbuf, writebuf, offset, len); + + fprintf_unfiltered (gdb_stdlog, + "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n", + (int) object, (annex ? annex : "(null)"), + (long) readbuf, (long) writebuf, paddr_nz (offset), + paddr_d (len), paddr_d (retval)); + + return retval; +} + +static void +debug_to_rcmd (char *command, + struct ui_file *outbuf) +{ + debug_target.to_rcmd (command, outbuf); + fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command); +} + +static struct symtab_and_line * +debug_to_enable_exception_callback (enum exception_event_kind kind, int enable) +{ + struct symtab_and_line *result; + result = debug_target.to_enable_exception_callback (kind, enable); + fprintf_unfiltered (gdb_stdlog, + "target get_exception_callback_sal (%d, %d)\n", + kind, enable); + return result; +} + +static struct exception_event_record * +debug_to_get_current_exception_event (void) +{ + struct exception_event_record *result; + result = debug_target.to_get_current_exception_event (); + fprintf_unfiltered (gdb_stdlog, "target get_current_exception_event ()\n"); + return result; +} + +static char * +debug_to_pid_to_exec_file (int pid) +{ + char *exec_file; + + exec_file = debug_target.to_pid_to_exec_file (pid); + + fprintf_unfiltered (gdb_stdlog, "target_pid_to_exec_file (%d) = %s\n", + pid, exec_file); + + return exec_file; +} + +static void +setup_target_debug (void) +{ + memcpy (&debug_target, ¤t_target, sizeof debug_target); + + current_target.to_open = debug_to_open; + current_target.to_close = debug_to_close; + current_target.to_attach = debug_to_attach; + current_target.to_post_attach = debug_to_post_attach; + current_target.to_detach = debug_to_detach; + current_target.to_disconnect = debug_to_disconnect; + current_target.to_resume = debug_to_resume; + current_target.to_wait = debug_to_wait; + current_target.to_post_wait = debug_to_post_wait; + current_target.to_fetch_registers = debug_to_fetch_registers; + current_target.to_store_registers = debug_to_store_registers; + current_target.to_prepare_to_store = debug_to_prepare_to_store; + current_target.to_xfer_memory = debug_to_xfer_memory; + current_target.to_files_info = debug_to_files_info; + current_target.to_insert_breakpoint = debug_to_insert_breakpoint; + current_target.to_remove_breakpoint = debug_to_remove_breakpoint; + current_target.to_can_use_hw_breakpoint = debug_to_can_use_hw_breakpoint; + current_target.to_insert_hw_breakpoint = debug_to_insert_hw_breakpoint; + current_target.to_remove_hw_breakpoint = debug_to_remove_hw_breakpoint; + current_target.to_insert_watchpoint = debug_to_insert_watchpoint; + current_target.to_remove_watchpoint = debug_to_remove_watchpoint; + current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint; + current_target.to_stopped_data_address = debug_to_stopped_data_address; + current_target.to_region_size_ok_for_hw_watchpoint = debug_to_region_size_ok_for_hw_watchpoint; + current_target.to_terminal_init = debug_to_terminal_init; + current_target.to_terminal_inferior = debug_to_terminal_inferior; + current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output; + current_target.to_terminal_ours = debug_to_terminal_ours; + current_target.to_terminal_save_ours = debug_to_terminal_save_ours; + current_target.to_terminal_info = debug_to_terminal_info; + current_target.to_kill = debug_to_kill; + current_target.to_load = debug_to_load; + current_target.to_lookup_symbol = debug_to_lookup_symbol; + current_target.to_create_inferior = debug_to_create_inferior; + current_target.to_post_startup_inferior = debug_to_post_startup_inferior; + current_target.to_acknowledge_created_inferior = debug_to_acknowledge_created_inferior; + current_target.to_insert_fork_catchpoint = debug_to_insert_fork_catchpoint; + current_target.to_remove_fork_catchpoint = debug_to_remove_fork_catchpoint; + current_target.to_insert_vfork_catchpoint = debug_to_insert_vfork_catchpoint; + current_target.to_remove_vfork_catchpoint = debug_to_remove_vfork_catchpoint; + current_target.to_follow_fork = debug_to_follow_fork; + current_target.to_insert_exec_catchpoint = debug_to_insert_exec_catchpoint; + current_target.to_remove_exec_catchpoint = debug_to_remove_exec_catchpoint; + current_target.to_reported_exec_events_per_exec_call = debug_to_reported_exec_events_per_exec_call; + current_target.to_has_exited = debug_to_has_exited; + current_target.to_mourn_inferior = debug_to_mourn_inferior; + current_target.to_can_run = debug_to_can_run; + current_target.to_notice_signals = debug_to_notice_signals; + current_target.to_thread_alive = debug_to_thread_alive; + current_target.to_find_new_threads = debug_to_find_new_threads; + current_target.to_stop = debug_to_stop; + current_target.to_xfer_partial = debug_to_xfer_partial; + current_target.to_rcmd = debug_to_rcmd; + current_target.to_enable_exception_callback = debug_to_enable_exception_callback; + current_target.to_get_current_exception_event = debug_to_get_current_exception_event; + current_target.to_pid_to_exec_file = debug_to_pid_to_exec_file; + +} + + +static char targ_desc[] = +"Names of targets and files being debugged.\n\ +Shows the entire stack of targets currently in use (including the exec-file,\n\ +core-file, and process, if any), as well as the symbol file name."; + +static void +do_monitor_command (char *cmd, + int from_tty) +{ + if ((current_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain) + || (current_target.to_rcmd == debug_to_rcmd + && (debug_target.to_rcmd + == (void (*) (char *, struct ui_file *)) tcomplain))) + { + error ("\"monitor\" command not supported by this target.\n"); + } + target_rcmd (cmd, gdb_stdtarg); +} + +void +initialize_targets (void) +{ + init_dummy_target (); + push_target (&dummy_target); + + add_info ("target", target_info, targ_desc); + add_info ("files", target_info, targ_desc); + + add_show_from_set + (add_set_cmd ("target", class_maintenance, var_zinteger, + (char *) &targetdebug, + "Set target debugging.\n\ +When non-zero, target debugging is enabled.", &setdebuglist), + &showdebuglist); + + add_setshow_boolean_cmd ("trust-readonly-sections", class_support, + &trust_readonly, "\ +Set mode for reading from readonly sections.\n\ +When this mode is on, memory reads from readonly sections (such as .text)\n\ +will be read from the object file instead of from the target. This will\n\ +result in significant performance improvement for remote targets.", "\ +Show mode for reading from readonly sections.\n", + NULL, NULL, + &setlist, &showlist); + + add_com ("monitor", class_obscure, do_monitor_command, + "Send a command to the remote monitor (remote targets only)."); + + target_dcache = dcache_init (); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ui-file.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ui-file.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ui-file.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/ui-file.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,630 @@ +/* UI_FILE - a generic STDIO like output stream. + + Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Implement the ``struct ui_file'' object. */ + +#include "defs.h" +#include "ui-file.h" +#include "gdb_string.h" + +#include + +static ui_file_isatty_ftype null_file_isatty; +static ui_file_write_ftype null_file_write; +static ui_file_fputs_ftype null_file_fputs; +static ui_file_read_ftype null_file_read; +static ui_file_flush_ftype null_file_flush; +static ui_file_delete_ftype null_file_delete; +static ui_file_rewind_ftype null_file_rewind; +static ui_file_put_ftype null_file_put; + +struct ui_file + { + int *magic; + ui_file_flush_ftype *to_flush; + ui_file_write_ftype *to_write; + ui_file_fputs_ftype *to_fputs; + ui_file_read_ftype *to_read; + ui_file_delete_ftype *to_delete; + ui_file_isatty_ftype *to_isatty; + ui_file_rewind_ftype *to_rewind; + ui_file_put_ftype *to_put; + void *to_data; + }; +int ui_file_magic; + +struct ui_file * +ui_file_new (void) +{ + struct ui_file *file = xmalloc (sizeof (struct ui_file)); + file->magic = &ui_file_magic; + set_ui_file_data (file, NULL, null_file_delete); + set_ui_file_flush (file, null_file_flush); + set_ui_file_write (file, null_file_write); + set_ui_file_fputs (file, null_file_fputs); + set_ui_file_read (file, null_file_read); + set_ui_file_isatty (file, null_file_isatty); + set_ui_file_rewind (file, null_file_rewind); + set_ui_file_put (file, null_file_put); + return file; +} + +void +ui_file_delete (struct ui_file *file) +{ + file->to_delete (file); + xfree (file); +} + +static int +null_file_isatty (struct ui_file *file) +{ + return 0; +} + +static void +null_file_rewind (struct ui_file *file) +{ + return; +} + +static void +null_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + return; +} + +static void +null_file_flush (struct ui_file *file) +{ + return; +} + +static void +null_file_write (struct ui_file *file, + const char *buf, + long sizeof_buf) +{ + if (file->to_fputs == null_file_fputs) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The fputs method isn't null, slowly pass the write request + onto that. FYI, this isn't as bad as it may look - the + current (as of 1999-11-07) printf_* function calls fputc and + fputc does exactly the below. By having a write function it + is possible to clean up that code. */ + int i; + char b[2]; + b[1] = '\0'; + for (i = 0; i < sizeof_buf; i++) + { + b[0] = buf[i]; + file->to_fputs (b, file); + } + return; + } +} + +static long +null_file_read (struct ui_file *file, + char *buf, + long sizeof_buf) +{ + errno = EBADF; + return 0; +} + +static void +null_file_fputs (const char *buf, struct ui_file *file) +{ + if (file->to_write == null_file_write) + /* Both the write and fputs methods are null. Discard the + request. */ + return; + else + { + /* The write method was implemented, use that. */ + file->to_write (file, buf, strlen (buf)); + } +} + +static void +null_file_delete (struct ui_file *file) +{ + return; +} + +void * +ui_file_data (struct ui_file *file) +{ + if (file->magic != &ui_file_magic) + internal_error (__FILE__, __LINE__, + "ui_file_data: bad magic number"); + return file->to_data; +} + +void +gdb_flush (struct ui_file *file) +{ + file->to_flush (file); +} + +int +ui_file_isatty (struct ui_file *file) +{ + return file->to_isatty (file); +} + +void +ui_file_rewind (struct ui_file *file) +{ + file->to_rewind (file); +} + +void +ui_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + file->to_put (file, write, dest); +} + +void +ui_file_write (struct ui_file *file, + const char *buf, + long length_buf) +{ + file->to_write (file, buf, length_buf); +} + +long +ui_file_read (struct ui_file *file, char *buf, long length_buf) +{ + return file->to_read (file, buf, length_buf); +} + +void +fputs_unfiltered (const char *buf, struct ui_file *file) +{ + file->to_fputs (buf, file); +} + +void +set_ui_file_flush (struct ui_file *file, ui_file_flush_ftype *flush) +{ + file->to_flush = flush; +} + +void +set_ui_file_isatty (struct ui_file *file, ui_file_isatty_ftype *isatty) +{ + file->to_isatty = isatty; +} + +void +set_ui_file_rewind (struct ui_file *file, ui_file_rewind_ftype *rewind) +{ + file->to_rewind = rewind; +} + +void +set_ui_file_put (struct ui_file *file, ui_file_put_ftype *put) +{ + file->to_put = put; +} + +void +set_ui_file_write (struct ui_file *file, + ui_file_write_ftype *write) +{ + file->to_write = write; +} + +void +set_ui_file_read (struct ui_file *file, ui_file_read_ftype *read) +{ + file->to_read = read; +} + +void +set_ui_file_fputs (struct ui_file *file, ui_file_fputs_ftype *fputs) +{ + file->to_fputs = fputs; +} + +void +set_ui_file_data (struct ui_file *file, void *data, + ui_file_delete_ftype *delete) +{ + file->to_data = data; + file->to_delete = delete; +} + +/* ui_file utility function for converting a ``struct ui_file'' into + a memory buffer''. */ + +struct accumulated_ui_file +{ + char *buffer; + long length; +}; + +static void +do_ui_file_xstrdup (void *context, const char *buffer, long length) +{ + struct accumulated_ui_file *acc = context; + if (acc->buffer == NULL) + acc->buffer = xmalloc (length + 1); + else + acc->buffer = xrealloc (acc->buffer, acc->length + length + 1); + memcpy (acc->buffer + acc->length, buffer, length); + acc->length += length; + acc->buffer[acc->length] = '\0'; +} + +char * +ui_file_xstrdup (struct ui_file *file, + long *length) +{ + struct accumulated_ui_file acc; + acc.buffer = NULL; + acc.length = 0; + ui_file_put (file, do_ui_file_xstrdup, &acc); + if (acc.buffer == NULL) + acc.buffer = xstrdup (""); + *length = acc.length; + return acc.buffer; +} + +/* A pure memory based ``struct ui_file'' that can be used an output + buffer. The buffers accumulated contents are available via + ui_file_put(). */ + +struct mem_file + { + int *magic; + char *buffer; + int sizeof_buffer; + int length_buffer; + }; + +static ui_file_rewind_ftype mem_file_rewind; +static ui_file_put_ftype mem_file_put; +static ui_file_write_ftype mem_file_write; +static ui_file_delete_ftype mem_file_delete; +static struct ui_file *mem_file_new (void); +static int mem_file_magic; + +static struct ui_file * +mem_file_new (void) +{ + struct mem_file *stream = XMALLOC (struct mem_file); + struct ui_file *file = ui_file_new (); + set_ui_file_data (file, stream, mem_file_delete); + set_ui_file_rewind (file, mem_file_rewind); + set_ui_file_put (file, mem_file_put); + set_ui_file_write (file, mem_file_write); + stream->magic = &mem_file_magic; + stream->buffer = NULL; + stream->sizeof_buffer = 0; + stream->length_buffer = 0; + return file; +} + +static void +mem_file_delete (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_delete: bad magic number"); + if (stream->buffer != NULL) + xfree (stream->buffer); + xfree (stream); +} + +struct ui_file * +mem_fileopen (void) +{ + return mem_file_new (); +} + +static void +mem_file_rewind (struct ui_file *file) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_rewind: bad magic number"); + stream->length_buffer = 0; +} + +static void +mem_file_put (struct ui_file *file, + ui_file_put_method_ftype *write, + void *dest) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_put: bad magic number"); + if (stream->length_buffer > 0) + write (dest, stream->buffer, stream->length_buffer); +} + +void +mem_file_write (struct ui_file *file, + const char *buffer, + long length_buffer) +{ + struct mem_file *stream = ui_file_data (file); + if (stream->magic != &mem_file_magic) + internal_error (__FILE__, __LINE__, + "mem_file_write: bad magic number"); + if (stream->buffer == NULL) + { + stream->length_buffer = length_buffer; + stream->sizeof_buffer = length_buffer; + stream->buffer = xmalloc (stream->sizeof_buffer); + memcpy (stream->buffer, buffer, length_buffer); + } + else + { + int new_length = stream->length_buffer + length_buffer; + if (new_length >= stream->sizeof_buffer) + { + stream->sizeof_buffer = new_length; + stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer); + } + memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer); + stream->length_buffer = new_length; + } +} + +/* ``struct ui_file'' implementation that maps directly onto + 's FILE. */ + +static ui_file_write_ftype stdio_file_write; +static ui_file_fputs_ftype stdio_file_fputs; +static ui_file_read_ftype stdio_file_read; +static ui_file_isatty_ftype stdio_file_isatty; +static ui_file_delete_ftype stdio_file_delete; +static struct ui_file *stdio_file_new (FILE * file, int close_p); +static ui_file_flush_ftype stdio_file_flush; + +static int stdio_file_magic; + +struct stdio_file + { + int *magic; + FILE *file; + int close_p; + }; + +static struct ui_file * +stdio_file_new (FILE *file, int close_p) +{ + struct ui_file *ui_file = ui_file_new (); + struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file)); + stdio->magic = &stdio_file_magic; + stdio->file = file; + stdio->close_p = close_p; + set_ui_file_data (ui_file, stdio, stdio_file_delete); + set_ui_file_flush (ui_file, stdio_file_flush); + set_ui_file_write (ui_file, stdio_file_write); + set_ui_file_fputs (ui_file, stdio_file_fputs); + set_ui_file_read (ui_file, stdio_file_read); + set_ui_file_isatty (ui_file, stdio_file_isatty); + return ui_file; +} + +static void +stdio_file_delete (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_delete: bad magic number"); + if (stdio->close_p) + { + fclose (stdio->file); + } + xfree (stdio); +} + +static void +stdio_file_flush (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_flush: bad magic number"); + fflush (stdio->file); +} + +static long +stdio_file_read (struct ui_file *file, char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_read: bad magic number"); + return read (fileno (stdio->file), buf, length_buf); +} + +static void +stdio_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_write: bad magic number"); + fwrite (buf, length_buf, 1, stdio->file); +} + +static void +stdio_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_fputs: bad magic number"); + fputs (linebuffer, stdio->file); +} + +static int +stdio_file_isatty (struct ui_file *file) +{ + struct stdio_file *stdio = ui_file_data (file); + if (stdio->magic != &stdio_file_magic) + internal_error (__FILE__, __LINE__, + "stdio_file_isatty: bad magic number"); + return (isatty (fileno (stdio->file))); +} + +/* Like fdopen(). Create a ui_file from a previously opened FILE. */ + +struct ui_file * +stdio_fileopen (FILE *file) +{ + return stdio_file_new (file, 0); +} + +struct ui_file * +gdb_fopen (char *name, char *mode) +{ + FILE *f = fopen (name, mode); + if (f == NULL) + return NULL; + return stdio_file_new (f, 1); +} + +#ifdef CRASH_MERGE +void +replace_ui_file_FILE(struct ui_file *file, FILE *fp) +{ + struct stdio_file *stdio_file; + + stdio_file = (struct stdio_file *)ui_file_data(file); + stdio_file->file = fp; +} +#endif + +/* ``struct ui_file'' implementation that maps onto two ui-file objects. */ + +static ui_file_write_ftype tee_file_write; +static ui_file_fputs_ftype tee_file_fputs; +static ui_file_isatty_ftype tee_file_isatty; +static ui_file_delete_ftype tee_file_delete; +static ui_file_flush_ftype tee_file_flush; + +static int tee_file_magic; + +struct tee_file + { + int *magic; + struct ui_file *one, *two; + int close_one, close_two; + }; + +struct ui_file * +tee_file_new (struct ui_file *one, int close_one, + struct ui_file *two, int close_two) +{ + struct ui_file *ui_file = ui_file_new (); + struct tee_file *tee = xmalloc (sizeof (struct tee_file)); + tee->magic = &tee_file_magic; + tee->one = one; + tee->two = two; + tee->close_one = close_one; + tee->close_two = close_two; + set_ui_file_data (ui_file, tee, tee_file_delete); + set_ui_file_flush (ui_file, tee_file_flush); + set_ui_file_write (ui_file, tee_file_write); + set_ui_file_fputs (ui_file, tee_file_fputs); + set_ui_file_isatty (ui_file, tee_file_isatty); + return ui_file; +} + +static void +tee_file_delete (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_delete: bad magic number"); + if (tee->close_one) + ui_file_delete (tee->one); + if (tee->close_two) + ui_file_delete (tee->two); + + xfree (tee); +} + +static void +tee_file_flush (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_flush: bad magic number"); + tee->one->to_flush (tee->one); + tee->two->to_flush (tee->two); +} + +static void +tee_file_write (struct ui_file *file, const char *buf, long length_buf) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_write: bad magic number"); + ui_file_write (tee->one, buf, length_buf); + ui_file_write (tee->two, buf, length_buf); +} + +static void +tee_file_fputs (const char *linebuffer, struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_fputs: bad magic number"); + tee->one->to_fputs (linebuffer, tee->one); + tee->two->to_fputs (linebuffer, tee->two); +} + +static int +tee_file_isatty (struct ui_file *file) +{ + struct tee_file *tee = ui_file_data (file); + if (tee->magic != &tee_file_magic) + internal_error (__FILE__, __LINE__, + "tee_file_isatty: bad magic number"); + return (0); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/utils.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/utils.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/gdb/utils.c 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/gdb/utils.c 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,3068 @@ +/* General utility routines for GDB, the GNU debugger. + + Copyright 1986, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, + 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software + Foundation, Inc. + Portions Copyright (C) 2001, 2002 Mission Critical Linux, Inc. + Copyright (c) 2002, 2003, 2004, 2005 Red Hat, Inc. All rights reserved. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "defs.h" +#include "gdb_assert.h" +#include +#include "gdb_string.h" +#include "event-top.h" + +#ifdef TUI +#include "tui/tui.h" /* For tui_get_command_dimension. */ +#endif + +#ifdef __GO32__ +#include +#endif + +/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */ +#ifdef reg +#undef reg +#endif + +#include +#include "gdbcmd.h" +#include "serial.h" +#include "bfd.h" +#include "target.h" +#include "demangle.h" +#include "expression.h" +#include "language.h" +#include "charset.h" +#include "annotate.h" +#include "filenames.h" + +#include "inferior.h" /* for signed_pointer_to_address */ + +#include /* For MAXPATHLEN */ + +#ifdef HAVE_CURSES_H +#include +#endif +#ifdef HAVE_TERM_H +#include +#endif + +#include "readline/readline.h" + +#ifdef NEED_DECLARATION_MALLOC +extern PTR malloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_REALLOC +extern PTR realloc (); /* OK: PTR */ +#endif +#ifdef NEED_DECLARATION_FREE +extern void free (); +#endif +/* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) +extern char *canonicalize_file_name (const char *); +#endif + +/* readline defines this. */ +#undef savestring + +void (*error_begin_hook) (void); + +/* Holds the last error message issued by gdb */ + +static struct ui_file *gdb_lasterr; + +/* Prototypes for local functions */ + +static void vfprintf_maybe_filtered (struct ui_file *, const char *, + va_list, int); + +static void fputs_maybe_filtered (const char *, struct ui_file *, int); + +static void do_my_cleanups (struct cleanup **, struct cleanup *); + +static void prompt_for_continue (void); + +static void set_screen_size (void); +static void set_width (void); + +/* Chain of cleanup actions established with make_cleanup, + to be executed if an error happens. */ + +static struct cleanup *cleanup_chain; /* cleaned up after a failed command */ +static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */ +static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */ +static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */ +/* cleaned up on each error from within an execution command */ +static struct cleanup *exec_error_cleanup_chain; + +/* Pointer to what is left to do for an execution command after the + target stops. Used only in asynchronous mode, by targets that + support async execution. The finish and until commands use it. So + does the target extended-remote command. */ +struct continuation *cmd_continuation; +struct continuation *intermediate_continuation; + +/* Nonzero if we have job control. */ + +int job_control; + +/* Nonzero means a quit has been requested. */ + +int quit_flag; + +/* Nonzero means quit immediately if Control-C is typed now, rather + than waiting until QUIT is executed. Be careful in setting this; + code which executes with immediate_quit set has to be very careful + about being able to deal with being interrupted at any time. It is + almost always better to use QUIT; the only exception I can think of + is being able to quit out of a system call (using EINTR loses if + the SIGINT happens between the previous QUIT and the system call). + To immediately quit in the case in which a SIGINT happens between + the previous QUIT and setting immediate_quit (desirable anytime we + expect to block), call QUIT after setting immediate_quit. */ + +int immediate_quit; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form rather than raw. */ + +int demangle = 1; + +/* Nonzero means that encoded C++/ObjC names should be printed out in their + C++/ObjC form even in assembler language displays. If this is set, but + DEMANGLE is zero, names are printed raw, i.e. DEMANGLE controls. */ + +int asm_demangle = 0; + +/* Nonzero means that strings with character values >0x7F should be printed + as octal escapes. Zero means just print the value (e.g. it's an + international character, and the terminal or window can cope.) */ + +int sevenbit_strings = 0; + +/* String to be printed before error messages, if any. */ + +char *error_pre_print; + +/* String to be printed before quit messages, if any. */ + +char *quit_pre_print; + +/* String to be printed before warning messages, if any. */ + +char *warning_pre_print = "\nwarning: "; + +int pagination_enabled = 1; + + +/* Add a new cleanup to the cleanup_chain, + and return the previous chain pointer + to be passed later to do_cleanups or discard_cleanups. + Args are FUNCTION to clean up with, and ARG to pass to it. */ + +struct cleanup * +make_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&cleanup_chain, function, arg); +} + +struct cleanup * +make_final_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&final_cleanup_chain, function, arg); +} + +struct cleanup * +make_run_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&run_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_cleanup_chain, function, arg); +} + +struct cleanup * +make_exec_error_cleanup (make_cleanup_ftype *function, void *arg) +{ + return make_my_cleanup (&exec_error_cleanup_chain, function, arg); +} + +static void +do_freeargv (void *arg) +{ + freeargv ((char **) arg); +} + +struct cleanup * +make_cleanup_freeargv (char **arg) +{ + return make_my_cleanup (&cleanup_chain, do_freeargv, arg); +} + +static void +do_bfd_close_cleanup (void *arg) +{ + bfd_close (arg); +} + +struct cleanup * +make_cleanup_bfd_close (bfd *abfd) +{ + return make_cleanup (do_bfd_close_cleanup, abfd); +} + +static void +do_close_cleanup (void *arg) +{ + int *fd = arg; + close (*fd); + xfree (fd); +} + +struct cleanup * +make_cleanup_close (int fd) +{ + int *saved_fd = xmalloc (sizeof (fd)); + *saved_fd = fd; + return make_cleanup (do_close_cleanup, saved_fd); +} + +static void +do_ui_file_delete (void *arg) +{ + ui_file_delete (arg); +} + +struct cleanup * +make_cleanup_ui_file_delete (struct ui_file *arg) +{ + return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg); +} + +struct cleanup * +make_my_cleanup (struct cleanup **pmy_chain, make_cleanup_ftype *function, + void *arg) +{ + struct cleanup *new + = (struct cleanup *) xmalloc (sizeof (struct cleanup)); + struct cleanup *old_chain = *pmy_chain; + + new->next = *pmy_chain; + new->function = function; + new->arg = arg; + *pmy_chain = new; + + return old_chain; +} + +/* Discard cleanups and do the actions they describe + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +do_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&cleanup_chain, old_chain); +} + +void +do_final_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +do_run_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&run_cleanup_chain, old_chain); +} + +void +do_exec_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_cleanup_chain, old_chain); +} + +void +do_exec_error_cleanups (struct cleanup *old_chain) +{ + do_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +static void +do_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; /* Do this first incase recursion */ + (*ptr->function) (ptr->arg); + xfree (ptr); + } +} + +/* Discard cleanups, not doing the actions they describe, + until we get back to the point OLD_CHAIN in the cleanup_chain. */ + +void +discard_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&cleanup_chain, old_chain); +} + +void +discard_final_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&final_cleanup_chain, old_chain); +} + +void +discard_exec_error_cleanups (struct cleanup *old_chain) +{ + discard_my_cleanups (&exec_error_cleanup_chain, old_chain); +} + +void +discard_my_cleanups (struct cleanup **pmy_chain, + struct cleanup *old_chain) +{ + struct cleanup *ptr; + while ((ptr = *pmy_chain) != old_chain) + { + *pmy_chain = ptr->next; + xfree (ptr); + } +} + +/* Set the cleanup_chain to 0, and return the old cleanup chain. */ +struct cleanup * +save_cleanups (void) +{ + return save_my_cleanups (&cleanup_chain); +} + +struct cleanup * +save_final_cleanups (void) +{ + return save_my_cleanups (&final_cleanup_chain); +} + +struct cleanup * +save_my_cleanups (struct cleanup **pmy_chain) +{ + struct cleanup *old_chain = *pmy_chain; + + *pmy_chain = 0; + return old_chain; +} + +/* Restore the cleanup chain from a previously saved chain. */ +void +restore_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&cleanup_chain, chain); +} + +void +restore_final_cleanups (struct cleanup *chain) +{ + restore_my_cleanups (&final_cleanup_chain, chain); +} + +void +restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) +{ + *pmy_chain = chain; +} + +/* This function is useful for cleanups. + Do + + foo = xmalloc (...); + old_chain = make_cleanup (free_current_contents, &foo); + + to arrange to free the object thus allocated. */ + +void +free_current_contents (void *ptr) +{ + void **location = ptr; + if (location == NULL) + internal_error (__FILE__, __LINE__, + "free_current_contents: NULL pointer"); + if (*location != NULL) + { + xfree (*location); + *location = NULL; + } +} + +/* Provide a known function that does nothing, to use as a base for + for a possibly long chain of cleanups. This is useful where we + use the cleanup chain for handling normal cleanups as well as dealing + with cleanups that need to be done as a result of a call to error(). + In such cases, we may not be certain where the first cleanup is, unless + we have a do-nothing one to always use as the base. */ + +void +null_cleanup (void *arg) +{ +} + +/* Add a continuation to the continuation list, the global list + cmd_continuation. The new continuation will be added at the front.*/ +void +add_continuation (void (*continuation_hook) (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = cmd_continuation; + cmd_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = cmd_continuation; + cmd_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_continuations (void) +{ + struct continuation *continuation_ptr; + + while (cmd_continuation) + { + continuation_ptr = cmd_continuation; + cmd_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + +/* Add a continuation to the continuation list, the global list + intermediate_continuation. The new continuation will be added at the front.*/ +void +add_intermediate_continuation (void (*continuation_hook) + (struct continuation_arg *), + struct continuation_arg *arg_list) +{ + struct continuation *continuation_ptr; + + continuation_ptr = + (struct continuation *) xmalloc (sizeof (struct continuation)); + continuation_ptr->continuation_hook = continuation_hook; + continuation_ptr->arg_list = arg_list; + continuation_ptr->next = intermediate_continuation; + intermediate_continuation = continuation_ptr; +} + +/* Walk down the cmd_continuation list, and execute all the + continuations. There is a problem though. In some cases new + continuations may be added while we are in the middle of this + loop. If this happens they will be added in the front, and done + before we have a chance of exhausting those that were already + there. We need to then save the beginning of the list in a pointer + and do the continuations from there on, instead of using the + global beginning of list as our iteration pointer.*/ +void +do_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + struct continuation *saved_continuation; + + /* Copy the list header into another pointer, and set the global + list header to null, so that the global list can change as a side + effect of invoking the continuations and the processing of + the preexisting continuations will not be affected. */ + continuation_ptr = intermediate_continuation; + intermediate_continuation = NULL; + + /* Work now on the list we have set aside. */ + while (continuation_ptr) + { + (continuation_ptr->continuation_hook) (continuation_ptr->arg_list); + saved_continuation = continuation_ptr; + continuation_ptr = continuation_ptr->next; + xfree (saved_continuation); + } +} + +/* Walk down the cmd_continuation list, and get rid of all the + continuations. */ +void +discard_all_intermediate_continuations (void) +{ + struct continuation *continuation_ptr; + + while (intermediate_continuation) + { + continuation_ptr = intermediate_continuation; + intermediate_continuation = continuation_ptr->next; + xfree (continuation_ptr); + } +} + + + +/* Print a warning message. The first argument STRING is the warning + message, used as an fprintf format string, the second is the + va_list of arguments for that string. A warning is unfiltered (not + paginated) so that the user does not need to page through each + screen full of warnings when there are lots of them. */ + +void +vwarning (const char *string, va_list args) +{ + if (warning_hook) + (*warning_hook) (string, args); + else + { + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + if (warning_pre_print) + fputs_unfiltered (warning_pre_print, gdb_stderr); + vfprintf_unfiltered (gdb_stderr, string, args); + fprintf_unfiltered (gdb_stderr, "\n"); + va_end (args); + } +} + +/* Print a warning message. + The first argument STRING is the warning message, used as a fprintf string, + and the remaining args are passed as arguments to it. + The primary difference between warnings and errors is that a warning + does not force the return to command level. */ + +void +warning (const char *string, ...) +{ + va_list args; + va_start (args, string); + vwarning (string, args); + va_end (args); +} + +/* Print an error message and return to command level. + The first argument STRING is the error message, used as a fprintf string, + and the remaining args are passed as arguments to it. */ + +NORETURN void +verror (const char *string, va_list args) +{ + struct ui_file *tmp_stream = mem_fileopen (); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + error_stream (tmp_stream); +} + +NORETURN void +error (const char *string, ...) +{ + va_list args; + va_start (args, string); + verror (string, args); + va_end (args); +} + +static void +do_write (void *data, const char *buffer, long length_buffer) +{ + ui_file_write (data, buffer, length_buffer); +} + +/* Cause a silent error to occur. Any error message is recorded + though it is not issued. */ +NORETURN void +error_silent (const char *string, ...) +{ + va_list args; + struct ui_file *tmp_stream = mem_fileopen (); + va_start (args, string); + make_cleanup_ui_file_delete (tmp_stream); + vfprintf_unfiltered (tmp_stream, string, args); + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (tmp_stream, do_write, gdb_lasterr); + va_end (args); + + throw_exception (RETURN_ERROR); +} + +/* Output an error message including any pre-print text to gdb_stderr. */ +void +error_output_message (char *pre_print, char *msg) +{ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (pre_print) + fputs_filtered (pre_print, gdb_stderr); + fputs_filtered (msg, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +} + +NORETURN void +error_stream (struct ui_file *stream) +{ + if (error_begin_hook) + error_begin_hook (); + + /* Copy the stream into the GDB_LASTERR buffer. */ + ui_file_rewind (gdb_lasterr); + ui_file_put (stream, do_write, gdb_lasterr); + + /* Write the message plus any error_pre_print to gdb_stderr. */ + target_terminal_ours (); + wrap_here (""); /* Force out any buffered output */ + gdb_flush (gdb_stdout); + annotate_error_begin (); + if (error_pre_print) + fputs_filtered (error_pre_print, gdb_stderr); + ui_file_put (stream, do_write, gdb_stderr); + fprintf_filtered (gdb_stderr, "\n"); +#ifdef CRASH_MERGE + if (error_hook) + (*error_hook)(); + else { + int console(char *, ...); + console("verror() called without error_hook\n"); + } +#endif + throw_exception (RETURN_ERROR); +} + +/* Get the last error message issued by gdb */ + +char * +error_last_message (void) +{ + long len; + return ui_file_xstrdup (gdb_lasterr, &len); +} + +/* This is to be called by main() at the very beginning */ + +void +error_init (void) +{ + gdb_lasterr = mem_fileopen (); +} + +/* Print a message reporting an internal error/warning. Ask the user + if they want to continue, dump core, or just exit. Return + something to indicate a quit. */ + +struct internal_problem +{ + const char *name; + /* FIXME: cagney/2002-08-15: There should be ``maint set/show'' + commands available for controlling these variables. */ + enum auto_boolean should_quit; + enum auto_boolean should_dump_core; +}; + +/* Report a problem, internal to GDB, to the user. Once the problem + has been reported, and assuming GDB didn't quit, the caller can + either allow execution to resume or throw an error. */ + +static void +internal_vproblem (struct internal_problem *problem, + const char *file, int line, const char *fmt, va_list ap) +{ + static int dejavu; + int quit_p; + int dump_core_p; + char *reason; + + /* Don't allow infinite error/warning recursion. */ + { + static char msg[] = "Recursive internal problem.\n"; + switch (dejavu) + { + case 0: + dejavu = 1; + break; + case 1: + dejavu = 2; + fputs_unfiltered (msg, gdb_stderr); + abort (); /* NOTE: GDB has only three calls to abort(). */ + default: + dejavu = 3; + write (STDERR_FILENO, msg, sizeof (msg)); + exit (1); + } + } + + /* Try to get the message out and at the start of a new line. */ + target_terminal_ours (); + begin_line (); + + /* Create a string containing the full error/warning message. Need + to call query with this full string, as otherwize the reason + (error/warning) and question become separated. Format using a + style similar to a compiler error message. Include extra detail + so that the user knows that they are living on the edge. */ + { + char *msg; + xvasprintf (&msg, fmt, ap); + xasprintf (&reason, "\ +%s:%d: %s: %s\n\ +A problem internal to GDB has been detected,\n\ +further debugging may prove unreliable.", file, line, problem->name, msg); + xfree (msg); + make_cleanup (xfree, reason); + } + + switch (problem->should_quit) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to quit GDB. When in batch mode + this lessens the likelhood of GDB going into an infinate + loop. */ + quit_p = query ("%s\nQuit this debugging session? ", reason); + break; + case AUTO_BOOLEAN_TRUE: + quit_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + quit_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + switch (problem->should_dump_core) + { + case AUTO_BOOLEAN_AUTO: + /* Default (yes/batch case) is to dump core. This leaves a GDB + `dropping' so that it is easier to see that something went + wrong in GDB. */ + dump_core_p = query ("%s\nCreate a core file of GDB? ", reason); + break; + break; + case AUTO_BOOLEAN_TRUE: + dump_core_p = 1; + break; + case AUTO_BOOLEAN_FALSE: + dump_core_p = 0; + break; + default: + internal_error (__FILE__, __LINE__, "bad switch"); + } + + if (quit_p) + { + if (dump_core_p) + abort (); /* NOTE: GDB has only three calls to abort(). */ + else + exit (1); + } + else + { + if (dump_core_p) + { + if (fork () == 0) + abort (); /* NOTE: GDB has only three calls to abort(). */ + } + } + + dejavu = 0; +} + +static struct internal_problem internal_error_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +NORETURN void +internal_verror (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_error_problem, file, line, fmt, ap); + throw_exception (RETURN_ERROR); +} + +NORETURN void +internal_error (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_verror (file, line, string, ap); + va_end (ap); +} + +static struct internal_problem internal_warning_problem = { + "internal-error", AUTO_BOOLEAN_AUTO, AUTO_BOOLEAN_AUTO +}; + +void +internal_vwarning (const char *file, int line, const char *fmt, va_list ap) +{ + internal_vproblem (&internal_warning_problem, file, line, fmt, ap); +} + +void +internal_warning (const char *file, int line, const char *string, ...) +{ + va_list ap; + va_start (ap, string); + internal_vwarning (file, line, string, ap); + va_end (ap); +} + +/* The strerror() function can return NULL for errno values that are + out of range. Provide a "safe" version that always returns a + printable string. */ + +char * +safe_strerror (int errnum) +{ + char *msg; + static char buf[32]; + + msg = strerror (errnum); + if (msg == NULL) + { + sprintf (buf, "(undocumented errno %d)", errnum); + msg = buf; + } + return (msg); +} + +/* Print the system error message for errno, and also mention STRING + as the file name for which the error was encountered. + Then return to command level. */ + +NORETURN void +perror_with_name (const char *string) +{ + char *err; + char *combined; + + err = safe_strerror (errno); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* I understand setting these is a matter of taste. Still, some people + may clear errno but not know about bfd_error. Doing this here is not + unreasonable. */ + bfd_set_error (bfd_error_no_error); + errno = 0; + + error ("%s.", combined); +} + +/* Print the system error message for ERRCODE, and also mention STRING + as the file name for which the error was encountered. */ + +void +print_sys_errmsg (const char *string, int errcode) +{ + char *err; + char *combined; + + err = safe_strerror (errcode); + combined = (char *) alloca (strlen (err) + strlen (string) + 3); + strcpy (combined, string); + strcat (combined, ": "); + strcat (combined, err); + + /* We want anything which was printed on stdout to come out first, before + this message. */ + gdb_flush (gdb_stdout); + fprintf_unfiltered (gdb_stderr, "%s.\n", combined); +} + +/* Control C eventually causes this to be called, at a convenient time. */ + +void +quit (void) +{ + struct serial *gdb_stdout_serial = serial_fdopen (1); + + target_terminal_ours (); + + /* We want all output to appear now, before we print "Quit". We + have 3 levels of buffering we have to flush (it's possible that + some of these should be changed to flush the lower-level ones + too): */ + + /* 1. The _filtered buffer. */ + wrap_here ((char *) 0); + + /* 2. The stdio buffer. */ + gdb_flush (gdb_stdout); + gdb_flush (gdb_stderr); + + /* 3. The system-level buffer. */ + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + + annotate_error_begin (); + + /* Don't use *_filtered; we don't want to prompt the user to continue. */ + if (quit_pre_print) + fputs_unfiltered (quit_pre_print, gdb_stderr); + +#ifdef __MSDOS__ + /* No steenking SIGINT will ever be coming our way when the + program is resumed. Don't lie. */ + fprintf_unfiltered (gdb_stderr, "Quit\n"); +#else + if (job_control + /* If there is no terminal switching for this target, then we can't + possibly get screwed by the lack of job control. */ + || current_target.to_terminal_ours == NULL) + fprintf_unfiltered (gdb_stderr, "Quit\n"); + else + fprintf_unfiltered (gdb_stderr, + "Quit (expect signal SIGINT when the program is resumed)\n"); +#endif + throw_exception (RETURN_QUIT); +} + +/* Control C comes here */ +void +request_quit (int signo) +{ + quit_flag = 1; + /* Restore the signal handler. Harmless with BSD-style signals, needed + for System V-style signals. So just always do it, rather than worrying + about USG defines and stuff like that. */ + signal (signo, request_quit); + + if (immediate_quit) + quit (); +} + +/* Memory management stuff (malloc friends). */ + +static void * +mmalloc (void *md, size_t size) +{ + return malloc (size); /* NOTE: GDB's only call to malloc() */ +} + +static void * +mrealloc (void *md, void *ptr, size_t size) +{ + if (ptr == 0) /* Guard against old realloc's */ + return mmalloc (md, size); + else + return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */ +} + +static void * +mcalloc (void *md, size_t number, size_t size) +{ + return calloc (number, size); /* NOTE: GDB's only call to calloc() */ +} + +static void +mfree (void *md, void *ptr) +{ + free (ptr); /* NOTE: GDB's only call to free() */ +} + +/* This used to do something interesting with USE_MMALLOC. + * It can be retired any time. -- chastain 2004-01-19. */ +void +init_malloc (void *md) +{ +} + +/* Called when a memory allocation fails, with the number of bytes of + memory requested in SIZE. */ + +NORETURN void +nomem (long size) +{ + if (size > 0) + { + internal_error (__FILE__, __LINE__, + "virtual memory exhausted: can't allocate %ld bytes.", + size); + } + else + { + internal_error (__FILE__, __LINE__, "virtual memory exhausted."); + } +} + +/* The xmmalloc() family of memory management routines. + + These are are like the mmalloc() family except that they implement + consistent semantics and guard against typical memory management + problems: if a malloc fails, an internal error is thrown; if + free(NULL) is called, it is ignored; if *alloc(0) is called, NULL + is returned. + + All these routines are implemented using the mmalloc() family. */ + +void * +xmmalloc (void *md, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmrealloc (void *md, void *ptr, size_t size) +{ + void *val; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (size == 0) + size = 1; + + if (ptr != NULL) + val = mrealloc (md, ptr, size); + else + val = mmalloc (md, size); + if (val == NULL) + nomem (size); + + return (val); +} + +void * +xmcalloc (void *md, size_t number, size_t size) +{ + void *mem; + + /* See libiberty/xmalloc.c. This function need's to match that's + semantics. It never returns NULL. */ + if (number == 0 || size == 0) + { + number = 1; + size = 1; + } + + mem = mcalloc (md, number, size); + if (mem == NULL) + nomem (number * size); + + return mem; +} + +void +xmfree (void *md, void *ptr) +{ + if (ptr != NULL) + mfree (md, ptr); +} + +/* The xmalloc() (libiberty.h) family of memory management routines. + + These are like the ISO-C malloc() family except that they implement + consistent semantics and guard against typical memory management + problems. See xmmalloc() above for further information. + + All these routines are wrappers to the xmmalloc() family. */ + +/* NOTE: These are declared using PTR to ensure consistency with + "libiberty.h". xfree() is GDB local. */ + +PTR /* OK: PTR */ +xmalloc (size_t size) +{ + return xmmalloc (NULL, size); +} + +PTR /* OK: PTR */ +xrealloc (PTR ptr, size_t size) /* OK: PTR */ +{ + return xmrealloc (NULL, ptr, size); +} + +PTR /* OK: PTR */ +xcalloc (size_t number, size_t size) +{ + return xmcalloc (NULL, number, size); +} + +void +xfree (void *ptr) +{ + xmfree (NULL, ptr); +} + + +/* Like asprintf/vasprintf but get an internal_error if the call + fails. */ + +char * +xstrprintf (const char *format, ...) +{ + char *ret; + va_list args; + va_start (args, format); + xvasprintf (&ret, format, args); + va_end (args); + return ret; +} + +void +xasprintf (char **ret, const char *format, ...) +{ + va_list args; + va_start (args, format); + xvasprintf (ret, format, args); + va_end (args); +} + +void +xvasprintf (char **ret, const char *format, va_list ap) +{ + int status = vasprintf (ret, format, ap); + /* NULL could be returned due to a memory allocation problem; a + badly format string; or something else. */ + if ((*ret) == NULL) + internal_error (__FILE__, __LINE__, + "vasprintf returned NULL buffer (errno %d)", errno); + /* A negative status with a non-NULL buffer shouldn't never + happen. But to be sure. */ + if (status < 0) + internal_error (__FILE__, __LINE__, + "vasprintf call failed (errno %d)", errno); +} + + +/* My replacement for the read system call. + Used like `read' but keeps going if `read' returns too soon. */ + +int +myread (int desc, char *addr, int len) +{ + int val; + int orglen = len; + + while (len > 0) + { + val = read (desc, addr, len); + if (val < 0) + return val; + if (val == 0) + return orglen - len; + len -= val; + addr += val; + } + return orglen; +} + +/* Make a copy of the string at PTR with SIZE characters + (and add a null character at the end in the copy). + Uses malloc to get the space. Returns the address of the copy. */ + +char * +savestring (const char *ptr, size_t size) +{ + char *p = (char *) xmalloc (size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +msavestring (void *md, const char *ptr, size_t size) +{ + char *p = (char *) xmmalloc (md, size + 1); + memcpy (p, ptr, size); + p[size] = 0; + return p; +} + +char * +mstrsave (void *md, const char *ptr) +{ + return (msavestring (md, ptr, strlen (ptr))); +} + +void +print_spaces (int n, struct ui_file *file) +{ + fputs_unfiltered (n_spaces (n), file); +} + +/* Print a host address. */ + +void +gdb_print_host_address (const void *addr, struct ui_file *stream) +{ + + /* We could use the %p conversion specifier to fprintf if we had any + way of knowing whether this host supports it. But the following + should work on the Alpha and on 32 bit machines. */ + + fprintf_filtered (stream, "0x%lx", (unsigned long) addr); +} + +/* Ask user a y-or-n question and return 1 iff answer is yes. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +/* VARARGS */ +int +query (const char *ctlstr, ...) +{ + va_list args; + int answer; + int ans2; + int retval; + + va_start (args, ctlstr); + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer "yes" if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return 1; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-query\n"); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(y or n) "); + + if (annotation_level > 1) + printf_filtered ("\n\032\032query\n"); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = 1; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + if (answer == 'Y') + { + retval = 1; + break; + } + if (answer == 'N') + { + retval = 0; + break; + } + printf_filtered ("Please answer y or n.\n"); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-query\n"); + return retval; +} + + +/* This function supports the nquery() and yquery() functions. + Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or default the answer to the specified default. + DEFCHAR is either 'y' or 'n' and refers to the default answer. + CTLSTR is the control string and should end in "? ". It should + not say how to answer, because we do that. + ARGS are the arguments passed along with the CTLSTR argument to + printf. */ + +static int +defaulted_query (const char *ctlstr, const char defchar, va_list args) +{ + int answer; + int ans2; + int retval; + int def_value; + char def_answer, not_def_answer; + char *y_string, *n_string; + + /* Set up according to which answer is the default. */ + if (defchar == 'y') + { + def_value = 1; + def_answer = 'Y'; + not_def_answer = 'N'; + y_string = "[y]"; + n_string = "n"; + } + else + { + def_value = 0; + def_answer = 'N'; + not_def_answer = 'Y'; + y_string = "y"; + n_string = "[n]"; + } + + if (query_hook) + { + return query_hook (ctlstr, args); + } + + /* Automatically answer default value if input is not from a terminal. */ + if (!input_from_terminal_p ()) + return def_value; + + while (1) + { + wrap_here (""); /* Flush any buffered output */ + gdb_flush (gdb_stdout); + + if (annotation_level > 1) + printf_filtered ("\n\032\032pre-%cquery\n", defchar); + + vfprintf_filtered (gdb_stdout, ctlstr, args); + printf_filtered ("(%s or %s) ", y_string, n_string); + + if (annotation_level > 1) + printf_filtered ("\n\032\032%cquery\n", defchar); + + wrap_here (""); + gdb_flush (gdb_stdout); + + answer = fgetc (stdin); + clearerr (stdin); /* in case of C-d */ + if (answer == EOF) /* C-d */ + { + retval = def_value; + break; + } + /* Eat rest of input line, to EOF or newline */ + if (answer != '\n') + do + { + ans2 = fgetc (stdin); + clearerr (stdin); + } + while (ans2 != EOF && ans2 != '\n' && ans2 != '\r'); + + if (answer >= 'a') + answer -= 040; + /* Check answer. For the non-default, the user must specify + the non-default explicitly. */ + if (answer == not_def_answer) + { + retval = !def_value; + break; + } + /* Otherwise, for the default, the user may either specify + the required input or have it default by entering nothing. */ + if (answer == def_answer || answer == '\n' || + answer == '\r' || answer == EOF) + { + retval = def_value; + break; + } + /* Invalid entries are not defaulted and require another selection. */ + printf_filtered ("Please answer %s or %s.\n", + y_string, n_string); + } + + if (annotation_level > 1) + printf_filtered ("\n\032\032post-%cquery\n", defchar); + return retval; +} + + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 0 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +nquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'n', args); + va_end (args); +} + +/* Ask user a y-or-n question and return 0 if answer is no, 1 if + answer is yes, or 1 if answer is defaulted. + Takes three args which are given to printf to print the question. + The first, a control string, should end in "? ". + It should not say how to answer, because we do that. */ + +int +yquery (const char *ctlstr, ...) +{ + va_list args; + + va_start (args, ctlstr); + return defaulted_query (ctlstr, 'y', args); + va_end (args); +} + +/* Print an error message saying that we couldn't make sense of a + \^mumble sequence in a string or character constant. START and END + indicate a substring of some larger string that contains the + erroneous backslash sequence, missing the initial backslash. */ +static NORETURN int +no_control_char_error (const char *start, const char *end) +{ + int len = end - start; + char *copy = alloca (end - start + 1); + + memcpy (copy, start, len); + copy[len] = '\0'; + + error ("There is no control character `\\%s' in the `%s' character set.", + copy, target_charset ()); +} + +/* Parse a C escape sequence. STRING_PTR points to a variable + containing a pointer to the string to parse. That pointer + should point to the character after the \. That pointer + is updated past the characters we use. The value of the + escape sequence is returned. + + A negative value means the sequence \ newline was seen, + which is supposed to be equivalent to nothing at all. + + If \ is followed by a null character, we return a negative + value and leave the string pointer pointing at the null character. + + If \ is followed by 000, we return 0 and leave the string pointer + after the zeros. A value of 0 does not mean end of string. */ + +int +parse_escape (char **string_ptr) +{ + int target_char; + int c = *(*string_ptr)++; + if (c_parse_backslash (c, &target_char)) + return target_char; + else + switch (c) + { + case '\n': + return -2; + case 0: + (*string_ptr)--; + return 0; + case '^': + { + /* Remember where this escape sequence started, for reporting + errors. */ + char *sequence_start_pos = *string_ptr - 1; + + c = *(*string_ptr)++; + + if (c == '?') + { + /* XXXCHARSET: What is `delete' in the host character set? */ + c = 0177; + + if (!host_char_to_target (c, &target_char)) + error ("There is no character corresponding to `Delete' " + "in the target character set `%s'.", host_charset ()); + + return target_char; + } + else if (c == '\\') + target_char = parse_escape (string_ptr); + else + { + if (!host_char_to_target (c, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + } + + /* Now target_char is something like `c', and we want to find + its control-character equivalent. */ + if (!target_char_to_control_char (target_char, &target_char)) + no_control_char_error (sequence_start_pos, *string_ptr); + + return target_char; + } + + /* XXXCHARSET: we need to use isdigit and value-of-digit + methods of the host character set here. */ + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + { + int i = c - '0'; + int count = 0; + while (++count < 3) + { + c = (**string_ptr); + if (c >= '0' && c <= '7') + { + (*string_ptr)++; + i *= 8; + i += c - '0'; + } + else + { + break; + } + } + return i; + } + default: + if (!host_char_to_target (c, &target_char)) + error + ("The escape sequence `\%c' is equivalent to plain `%c', which" + " has no equivalent\n" "in the `%s' character set.", c, c, + target_charset ()); + return target_char; + } +} + +/* Print the character C on STREAM as part of the contents of a literal + string whose delimiter is QUOTER. Note that this routine should only + be call for printing things which are independent of the language + of the program being debugged. */ + +static void +printchar (int c, void (*do_fputs) (const char *, struct ui_file *), + void (*do_fprintf) (struct ui_file *, const char *, ...), + struct ui_file *stream, int quoter) +{ + + c &= 0xFF; /* Avoid sign bit follies */ + + if (c < 0x20 || /* Low control chars */ + (c >= 0x7F && c < 0xA0) || /* DEL, High controls */ + (sevenbit_strings && c >= 0x80)) + { /* high order bit set */ + switch (c) + { + case '\n': + do_fputs ("\\n", stream); + break; + case '\b': + do_fputs ("\\b", stream); + break; + case '\t': + do_fputs ("\\t", stream); + break; + case '\f': + do_fputs ("\\f", stream); + break; + case '\r': + do_fputs ("\\r", stream); + break; + case '\033': + do_fputs ("\\e", stream); + break; + case '\007': + do_fputs ("\\a", stream); + break; + default: + do_fprintf (stream, "\\%.3o", (unsigned int) c); + break; + } + } + else + { + if (c == '\\' || c == quoter) + do_fputs ("\\", stream); + do_fprintf (stream, "%c", c); + } +} + +/* Print the character C on STREAM as part of the contents of a + literal string whose delimiter is QUOTER. Note that these routines + should only be call for printing things which are independent of + the language of the program being debugged. */ + +void +fputstr_filtered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter); +} + +void +fputstr_unfiltered (const char *str, int quoter, struct ui_file *stream) +{ + while (*str) + printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + +void +fputstrn_unfiltered (const char *str, int n, int quoter, + struct ui_file *stream) +{ + int i; + for (i = 0; i < n; i++) + printchar (str[i], fputs_unfiltered, fprintf_unfiltered, stream, quoter); +} + + +/* Number of lines per page or UINT_MAX if paging is disabled. */ +static unsigned int lines_per_page; + +/* Number of chars per line or UINT_MAX if line folding is disabled. */ +static unsigned int chars_per_line; + +/* Current count of lines printed on this page, chars on this line. */ +static unsigned int lines_printed, chars_printed; + +/* Buffer and start column of buffered text, for doing smarter word- + wrapping. When someone calls wrap_here(), we start buffering output + that comes through fputs_filtered(). If we see a newline, we just + spit it out and forget about the wrap_here(). If we see another + wrap_here(), we spit it out and remember the newer one. If we see + the end of the line, we spit out a newline, the indent, and then + the buffered output. */ + +/* Malloc'd buffer with chars_per_line+2 bytes. Contains characters which + are waiting to be output (they have already been counted in chars_printed). + When wrap_buffer[0] is null, the buffer is empty. */ +static char *wrap_buffer; + +/* Pointer in wrap_buffer to the next character to fill. */ +static char *wrap_pointer; + +/* String to indent by if the wrap occurs. Must not be NULL if wrap_column + is non-zero. */ +static char *wrap_indent; + +/* Column number on the screen where wrap_buffer begins, or 0 if wrapping + is not in effect. */ +static int wrap_column; + + +/* Inialize the number of lines per page and chars per line. */ + +void +init_page_info (void) +{ +#if defined(TUI) + if (!tui_get_command_dimension (&chars_per_line, &lines_per_page)) +#endif + { + int rows, cols; + +#if defined(__GO32__) + rows = ScreenRows (); + cols = ScreenCols (); + lines_per_page = rows; + chars_per_line = cols; +#else + /* Make sure Readline has initialized its terminal settings. */ + rl_reset_terminal (NULL); + + /* Get the screen size from Readline. */ + rl_get_screen_size (&rows, &cols); + lines_per_page = rows; + chars_per_line = cols; + + /* Readline should have fetched the termcap entry for us. */ + if (tgetnum ("li") < 0 || getenv ("EMACS")) + { + /* The number of lines per page is not mentioned in the + terminal description. This probably means that paging is + not useful (e.g. emacs shell window), so disable paging. */ + lines_per_page = UINT_MAX; + } + + /* FIXME: Get rid of this junk. */ +#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER) + SIGWINCH_HANDLER (SIGWINCH); +#endif + + /* If the output is not a terminal, don't paginate it. */ + if (!ui_file_isatty (gdb_stdout)) + lines_per_page = UINT_MAX; +#endif + } + + set_screen_size (); + set_width (); +} + +/* Set the screen size based on LINES_PER_PAGE and CHARS_PER_LINE. */ + +static void +set_screen_size (void) +{ + int rows = lines_per_page; + int cols = chars_per_line; + + if (rows <= 0) + rows = INT_MAX; + + if (cols <= 0) + rl_get_screen_size (NULL, &cols); + + /* Update Readline's idea of the terminal size. */ + rl_set_screen_size (rows, cols); +} + +/* Reinitialize WRAP_BUFFER according to the current value of + CHARS_PER_LINE. */ + +static void +set_width (void) +{ + if (chars_per_line == 0) + init_page_info (); + + if (!wrap_buffer) + { + wrap_buffer = (char *) xmalloc (chars_per_line + 2); + wrap_buffer[0] = '\0'; + } + else + wrap_buffer = (char *) xrealloc (wrap_buffer, chars_per_line + 2); + wrap_pointer = wrap_buffer; /* Start it at the beginning. */ +} + +static void +set_width_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); + set_width (); +} + +static void +set_height_command (char *args, int from_tty, struct cmd_list_element *c) +{ + set_screen_size (); +} + +/* Wait, so the user can read what's on the screen. Prompt the user + to continue by pressing RETURN. */ + +static void +prompt_for_continue (void) +{ + char *ignore; + char cont_prompt[120]; + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032pre-prompt-for-continue\n"); + + strcpy (cont_prompt, + "---Type to continue, or q to quit---"); + if (annotation_level > 1) + strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); + + /* We must do this *before* we call gdb_readline, else it will eventually + call us -- thinking that we're trying to print beyond the end of the + screen. */ + reinitialize_more_filter (); + + immediate_quit++; + /* On a real operating system, the user can quit with SIGINT. + But not on GO32. + + 'q' is provided on all systems so users don't have to change habits + from system to system, and because telling them what to do in + the prompt is more user-friendly than expecting them to think of + SIGINT. */ + /* Call readline, not gdb_readline, because GO32 readline handles control-C + whereas control-C to gdb_readline will cause the user to get dumped + out to DOS. */ + ignore = gdb_readline_wrapper (cont_prompt); + + if (annotation_level > 1) + printf_unfiltered ("\n\032\032post-prompt-for-continue\n"); + + if (ignore) + { + char *p = ignore; + while (*p == ' ' || *p == '\t') + ++p; + if (p[0] == 'q') + { + if (!event_loop_p) + request_quit (SIGINT); + else + async_request_quit (0); + } + xfree (ignore); + } + immediate_quit--; + + /* Now we have to do this again, so that GDB will know that it doesn't + need to save the ---Type --- line at the top of the screen. */ + reinitialize_more_filter (); + + dont_repeat (); /* Forget prev cmd -- CR won't repeat it. */ +} + +/* Reinitialize filter; ie. tell it to reset to original values. */ + +void +reinitialize_more_filter (void) +{ + lines_printed = 0; + chars_printed = 0; +} + +/* Indicate that if the next sequence of characters overflows the line, + a newline should be inserted here rather than when it hits the end. + If INDENT is non-null, it is a string to be printed to indent the + wrapped part on the next line. INDENT must remain accessible until + the next call to wrap_here() or until a newline is printed through + fputs_filtered(). + + If the line is already overfull, we immediately print a newline and + the indentation, and disable further wrapping. + + If we don't know the width of lines, but we know the page height, + we must not wrap words, but should still keep track of newlines + that were explicitly printed. + + INDENT should not contain tabs, as that will mess up the char count + on the next line. FIXME. + + This routine is guaranteed to force out any output which has been + squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be + used to force out output from the wrap_buffer. */ + +void +wrap_here (char *indent) +{ + /* This should have been allocated, but be paranoid anyway. */ + if (!wrap_buffer) + internal_error (__FILE__, __LINE__, "failed internal consistency check"); + + if (wrap_buffer[0]) + { + *wrap_pointer = '\0'; + fputs_unfiltered (wrap_buffer, gdb_stdout); + } + wrap_pointer = wrap_buffer; + wrap_buffer[0] = '\0'; + if (chars_per_line == UINT_MAX) /* No line overflow checking */ + { + wrap_column = 0; + } + else if (chars_printed >= chars_per_line) + { + puts_filtered ("\n"); + if (indent != NULL) + puts_filtered (indent); + wrap_column = 0; + } + else + { + wrap_column = chars_printed; + if (indent == NULL) + wrap_indent = ""; + else + wrap_indent = indent; + } +} + +/* Print input string to gdb_stdout, filtered, with wrap, + arranging strings in columns of n chars. String can be + right or left justified in the column. Never prints + trailing spaces. String should never be longer than + width. FIXME: this could be useful for the EXAMINE + command, which currently doesn't tabulate very well */ + +void +puts_filtered_tabular (char *string, int width, int right) +{ + int spaces = 0; + int stringlen; + char *spacebuf; + + gdb_assert (chars_per_line > 0); + if (chars_per_line == UINT_MAX) + { + fputs_filtered (string, gdb_stdout); + fputs_filtered ("\n", gdb_stdout); + return; + } + + if (((chars_printed - 1) / width + 2) * width >= chars_per_line) + fputs_filtered ("\n", gdb_stdout); + + if (width >= chars_per_line) + width = chars_per_line - 1; + + stringlen = strlen (string); + + if (chars_printed > 0) + spaces = width - (chars_printed - 1) % width - 1; + if (right) + spaces += width - stringlen; + + spacebuf = alloca (spaces + 1); + spacebuf[spaces] = '\0'; + while (spaces--) + spacebuf[spaces] = ' '; + + fputs_filtered (spacebuf, gdb_stdout); + fputs_filtered (string, gdb_stdout); +} + + +/* Ensure that whatever gets printed next, using the filtered output + commands, starts at the beginning of the line. I.E. if there is + any pending output for the current line, flush it and start a new + line. Otherwise do nothing. */ + +void +begin_line (void) +{ + if (chars_printed > 0) + { + puts_filtered ("\n"); + } +} + + +/* Like fputs but if FILTER is true, pause after every screenful. + + Regardless of FILTER can wrap at points other than the final + character of a line. + + Unlike fputs, fputs_maybe_filtered does not return a value. + It is OK for LINEBUFFER to be NULL, in which case just don't print + anything. + + Note that a longjmp to top level may occur in this routine (only if + FILTER is true) (since prompt_for_continue may do so) so this + routine should not be called when cleanups are not in place. */ + +static void +fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, + int filter) +{ + const char *lineptr; + + if (linebuffer == 0) + return; + + /* Don't do any filtering if it is disabled. */ + if ((stream != gdb_stdout) || !pagination_enabled + || (lines_per_page == UINT_MAX && chars_per_line == UINT_MAX)) + { + fputs_unfiltered (linebuffer, stream); + return; + } + + /* Go through and output each character. Show line extension + when this is necessary; prompt user for new page when this is + necessary. */ + + lineptr = linebuffer; + while (*lineptr) + { + /* Possible new page. */ + if (filter && (lines_printed >= lines_per_page - 1)) + prompt_for_continue (); + + while (*lineptr && *lineptr != '\n') + { + /* Print a single line. */ + if (*lineptr == '\t') + { + if (wrap_column) + *wrap_pointer++ = '\t'; + else + fputc_unfiltered ('\t', stream); + /* Shifting right by 3 produces the number of tab stops + we have already passed, and then adding one and + shifting left 3 advances to the next tab stop. */ + chars_printed = ((chars_printed >> 3) + 1) << 3; + lineptr++; + } + else + { + if (wrap_column) + *wrap_pointer++ = *lineptr; + else + fputc_unfiltered (*lineptr, stream); + chars_printed++; + lineptr++; + } + + if (chars_printed >= chars_per_line) + { + unsigned int save_chars = chars_printed; + + chars_printed = 0; + lines_printed++; + /* If we aren't actually wrapping, don't output newline -- + if chars_per_line is right, we probably just overflowed + anyway; if it's wrong, let us keep going. */ + if (wrap_column) + fputc_unfiltered ('\n', stream); + + /* Possible new page. */ + if (lines_printed >= lines_per_page - 1) + prompt_for_continue (); + + /* Now output indentation and wrapped string */ + if (wrap_column) + { + fputs_unfiltered (wrap_indent, stream); + *wrap_pointer = '\0'; /* Null-terminate saved stuff */ + fputs_unfiltered (wrap_buffer, stream); /* and eject it */ + /* FIXME, this strlen is what prevents wrap_indent from + containing tabs. However, if we recurse to print it + and count its chars, we risk trouble if wrap_indent is + longer than (the user settable) chars_per_line. + Note also that this can set chars_printed > chars_per_line + if we are printing a long string. */ + chars_printed = strlen (wrap_indent) + + (save_chars - wrap_column); + wrap_pointer = wrap_buffer; /* Reset buffer */ + wrap_buffer[0] = '\0'; + wrap_column = 0; /* And disable fancy wrap */ + } + } + } + + if (*lineptr == '\n') + { + chars_printed = 0; + wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */ + lines_printed++; + fputc_unfiltered ('\n', stream); + lineptr++; + } + } +} + +void +fputs_filtered (const char *linebuffer, struct ui_file *stream) +{ + fputs_maybe_filtered (linebuffer, stream, 1); +} + +int +putchar_unfiltered (int c) +{ + char buf = c; + ui_file_write (gdb_stdout, &buf, 1); + return c; +} + +/* Write character C to gdb_stdout using GDB's paging mechanism and return C. + May return nonlocally. */ + +int +putchar_filtered (int c) +{ + return fputc_filtered (c, gdb_stdout); +} + +int +fputc_unfiltered (int c, struct ui_file *stream) +{ + char buf = c; + ui_file_write (stream, &buf, 1); + return c; +} + +int +fputc_filtered (int c, struct ui_file *stream) +{ + char buf[2]; + + buf[0] = c; + buf[1] = 0; + fputs_filtered (buf, stream); + return c; +} + +/* puts_debug is like fputs_unfiltered, except it prints special + characters in printable fashion. */ + +void +puts_debug (char *prefix, char *string, char *suffix) +{ + int ch; + + /* Print prefix and suffix after each line. */ + static int new_line = 1; + static int return_p = 0; + static char *prev_prefix = ""; + static char *prev_suffix = ""; + + if (*string == '\n') + return_p = 0; + + /* If the prefix is changing, print the previous suffix, a new line, + and the new prefix. */ + if ((return_p || (strcmp (prev_prefix, prefix) != 0)) && !new_line) + { + fputs_unfiltered (prev_suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + fputs_unfiltered (prefix, gdb_stdlog); + } + + /* Print prefix if we printed a newline during the previous call. */ + if (new_line) + { + new_line = 0; + fputs_unfiltered (prefix, gdb_stdlog); + } + + prev_prefix = prefix; + prev_suffix = suffix; + + /* Output characters in a printable format. */ + while ((ch = *string++) != '\0') + { + switch (ch) + { + default: + if (isprint (ch)) + fputc_unfiltered (ch, gdb_stdlog); + + else + fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff); + break; + + case '\\': + fputs_unfiltered ("\\\\", gdb_stdlog); + break; + case '\b': + fputs_unfiltered ("\\b", gdb_stdlog); + break; + case '\f': + fputs_unfiltered ("\\f", gdb_stdlog); + break; + case '\n': + new_line = 1; + fputs_unfiltered ("\\n", gdb_stdlog); + break; + case '\r': + fputs_unfiltered ("\\r", gdb_stdlog); + break; + case '\t': + fputs_unfiltered ("\\t", gdb_stdlog); + break; + case '\v': + fputs_unfiltered ("\\v", gdb_stdlog); + break; + } + + return_p = ch == '\r'; + } + + /* Print suffix if we printed a newline. */ + if (new_line) + { + fputs_unfiltered (suffix, gdb_stdlog); + fputs_unfiltered ("\n", gdb_stdlog); + } +} + + +/* Print a variable number of ARGS using format FORMAT. If this + information is going to put the amount written (since the last call + to REINITIALIZE_MORE_FILTER or the last page break) over the page size, + call prompt_for_continue to get the users permision to continue. + + Unlike fprintf, this function does not return a value. + + We implement three variants, vfprintf (takes a vararg list and stream), + fprintf (takes a stream to write on), and printf (the usual). + + Note also that a longjmp to top level may occur in this routine + (since prompt_for_continue may do so) so this routine should not be + called when cleanups are not in place. */ + +static void +vfprintf_maybe_filtered (struct ui_file *stream, const char *format, + va_list args, int filter) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_maybe_filtered (linebuffer, stream, filter); + do_cleanups (old_cleanups); +} + + +void +vfprintf_filtered (struct ui_file *stream, const char *format, va_list args) +{ + vfprintf_maybe_filtered (stream, format, args, 1); +} + +void +vfprintf_unfiltered (struct ui_file *stream, const char *format, va_list args) +{ + char *linebuffer; + struct cleanup *old_cleanups; + + xvasprintf (&linebuffer, format, args); + old_cleanups = make_cleanup (xfree, linebuffer); + fputs_unfiltered (linebuffer, stream); + do_cleanups (old_cleanups); +} + +void +vprintf_filtered (const char *format, va_list args) +{ + vfprintf_maybe_filtered (gdb_stdout, format, args, 1); +} + +void +vprintf_unfiltered (const char *format, va_list args) +{ + vfprintf_unfiltered (gdb_stdout, format, args); +} + +void +fprintf_filtered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (stream, format, args); + va_end (args); +} + +void +fprintf_unfiltered (struct ui_file *stream, const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (stream, format, args); + va_end (args); +} + +/* Like fprintf_filtered, but prints its result indented. + Called as fprintfi_filtered (spaces, stream, format, ...); */ + +void +fprintfi_filtered (int spaces, struct ui_file *stream, const char *format, + ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, stream); + + vfprintf_filtered (stream, format, args); + va_end (args); +} + + +void +printf_filtered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + + +void +printf_unfiltered (const char *format, ...) +{ + va_list args; + va_start (args, format); + vfprintf_unfiltered (gdb_stdout, format, args); + va_end (args); +} + +/* Like printf_filtered, but prints it's result indented. + Called as printfi_filtered (spaces, format, ...); */ + +void +printfi_filtered (int spaces, const char *format, ...) +{ + va_list args; + va_start (args, format); + print_spaces_filtered (spaces, gdb_stdout); + vfprintf_filtered (gdb_stdout, format, args); + va_end (args); +} + +/* Easy -- but watch out! + + This routine is *not* a replacement for puts()! puts() appends a newline. + This one doesn't, and had better not! */ + +void +puts_filtered (const char *string) +{ + fputs_filtered (string, gdb_stdout); +} + +void +puts_unfiltered (const char *string) +{ + fputs_unfiltered (string, gdb_stdout); +} + +/* Return a pointer to N spaces and a null. The pointer is good + until the next call to here. */ +char * +n_spaces (int n) +{ + char *t; + static char *spaces = 0; + static int max_spaces = -1; + + if (n > max_spaces) + { + if (spaces) + xfree (spaces); + spaces = (char *) xmalloc (n + 1); + for (t = spaces + n; t != spaces;) + *--t = ' '; + spaces[n] = '\0'; + max_spaces = n; + } + + return spaces + max_spaces - n; +} + +/* Print N spaces. */ +void +print_spaces_filtered (int n, struct ui_file *stream) +{ + fputs_filtered (n_spaces (n), stream); +} + +/* C++/ObjC demangler stuff. */ + +/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language + LANG, using demangling args ARG_MODE, and print it filtered to STREAM. + If the name is not mangled, or the language for the name is unknown, or + demangling is off, the name is printed in its "raw" form. */ + +void +fprintf_symbol_filtered (struct ui_file *stream, char *name, + enum language lang, int arg_mode) +{ + char *demangled; + + if (name != NULL) + { + /* If user wants to see raw output, no problem. */ + if (!demangle) + { + fputs_filtered (name, stream); + } + else + { + demangled = language_demangle (language_def (lang), name, arg_mode); + fputs_filtered (demangled ? demangled : name, stream); + if (demangled != NULL) + { + xfree (demangled); + } + } + } +} + +/* Do a strcmp() type operation on STRING1 and STRING2, ignoring any + differences in whitespace. Returns 0 if they match, non-zero if they + don't (slightly different than strcmp()'s range of return values). + + As an extra hack, string1=="FOO(ARGS)" matches string2=="FOO". + This "feature" is useful when searching for matching C++ function names + (such as if the user types 'break FOO', where FOO is a mangled C++ + function). */ + +int +strcmp_iw (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + return (*string1 != '\0' && *string1 != '(') || (*string2 != '\0'); +} + +/* This is like strcmp except that it ignores whitespace and treats + '(' as the first non-NULL character in terms of ordering. Like + strcmp (and unlike strcmp_iw), it returns negative if STRING1 < + STRING2, 0 if STRING2 = STRING2, and positive if STRING1 > STRING2 + according to that ordering. + + If a list is sorted according to this function and if you want to + find names in the list that match some fixed NAME according to + strcmp_iw(LIST_ELT, NAME), then the place to start looking is right + where this function would put NAME. + + Here are some examples of why using strcmp to sort is a bad idea: + + Whitespace example: + + Say your partial symtab contains: "foo", "goo". Then, if + we try to do a search for "foo", strcmp will locate this + after "foo" and before "goo". Then lookup_partial_symbol + will start looking at strings beginning with "goo", and will never + see the correct match of "foo". + + Parenthesis example: + + In practice, this is less like to be an issue, but I'll give it a + shot. Let's assume that '$' is a legitimate character to occur in + symbols. (Which may well even be the case on some systems.) Then + say that the partial symbol table contains "foo$" and "foo(int)". + strcmp will put them in this order, since '$' < '('. Now, if the + user searches for "foo", then strcmp will sort "foo" before "foo$". + Then lookup_partial_symbol will notice that strcmp_iw("foo$", + "foo") is false, so it won't proceed to the actual match of + "foo(int)" with "foo". */ + +int +strcmp_iw_ordered (const char *string1, const char *string2) +{ + while ((*string1 != '\0') && (*string2 != '\0')) + { + while (isspace (*string1)) + { + string1++; + } + while (isspace (*string2)) + { + string2++; + } + if (*string1 != *string2) + { + break; + } + if (*string1 != '\0') + { + string1++; + string2++; + } + } + + switch (*string1) + { + /* Characters are non-equal unless they're both '\0'; we want to + make sure we get the comparison right according to our + comparison in the cases where one of them is '\0' or '('. */ + case '\0': + if (*string2 == '\0') + return 0; + else + return -1; + case '(': + if (*string2 == '\0') + return 1; + else + return -1; + default: + if (*string2 == '(') + return 1; + else + return *string1 - *string2; + } +} + +/* A simple comparison function with opposite semantics to strcmp. */ + +int +streq (const char *lhs, const char *rhs) +{ + return !strcmp (lhs, rhs); +} + + +/* + ** subset_compare() + ** Answer whether string_to_compare is a full or partial match to + ** template_string. The partial match must be in sequence starting + ** at index 0. + */ +int +subset_compare (char *string_to_compare, char *template_string) +{ + int match; + if (template_string != (char *) NULL && string_to_compare != (char *) NULL + && strlen (string_to_compare) <= strlen (template_string)) + match = + (strncmp + (template_string, string_to_compare, strlen (string_to_compare)) == 0); + else + match = 0; + return match; +} + + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_on_command (char *arg, int from_tty) +{ + pagination_enabled = 1; +} + +static void pagination_on_command (char *arg, int from_tty); +static void +pagination_off_command (char *arg, int from_tty) +{ + pagination_enabled = 0; +} + + +void +initialize_utils (void) +{ + struct cmd_list_element *c; + + c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, + "Set number of characters gdb thinks are in a line.", + &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_width_command); + + c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, + "Set number of lines gdb thinks are in a page.", &setlist); + add_show_from_set (c, &showlist); + set_cmd_sfunc (c, set_height_command); + + init_page_info (); + + add_show_from_set + (add_set_cmd ("demangle", class_support, var_boolean, + (char *) &demangle, + "Set demangling of encoded C++/ObjC names when displaying symbols.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("pagination", class_support, + var_boolean, (char *) &pagination_enabled, + "Set state of pagination.", &setlist), &showlist); + + if (xdb_commands) + { + add_com ("am", class_support, pagination_on_command, + "Enable pagination"); + add_com ("sm", class_support, pagination_off_command, + "Disable pagination"); + } + + add_show_from_set + (add_set_cmd ("sevenbit-strings", class_support, var_boolean, + (char *) &sevenbit_strings, + "Set printing of 8-bit characters in strings as \\nnn.", + &setprintlist), &showprintlist); + + add_show_from_set + (add_set_cmd ("asm-demangle", class_support, var_boolean, + (char *) &asm_demangle, + "Set demangling of C++/ObjC names in disassembly listings.", + &setprintlist), &showprintlist); +} + +/* Machine specific function to handle SIGWINCH signal. */ + +#ifdef SIGWINCH_HANDLER_BODY +SIGWINCH_HANDLER_BODY +#endif +/* print routines to handle variable size regs, etc. */ +/* temporary storage using circular buffer */ +#define NUMCELLS 16 +#define CELLSIZE 32 +static char * +get_cell (void) +{ + static char buf[NUMCELLS][CELLSIZE]; + static int cell = 0; + if (++cell >= NUMCELLS) + cell = 0; + return buf[cell]; +} + +int +strlen_paddr (void) +{ + return (TARGET_ADDR_BIT / 8 * 2); +} + +char * +paddr (CORE_ADDR addr) +{ + return phex (addr, TARGET_ADDR_BIT / 8); +} + +char * +paddr_nz (CORE_ADDR addr) +{ + return phex_nz (addr, TARGET_ADDR_BIT / 8); +} + +static void +decimal2str (char *paddr_str, char *sign, ULONGEST addr) +{ + /* steal code from valprint.c:print_decimal(). Should this worry + about the real size of addr as the above does? */ + unsigned long temp[3]; + int i = 0; + do + { + temp[i] = addr % (1000 * 1000 * 1000); + addr /= (1000 * 1000 * 1000); + i++; + } + while (addr != 0 && i < (sizeof (temp) / sizeof (temp[0]))); + switch (i) + { + case 1: + sprintf (paddr_str, "%s%lu", sign, temp[0]); + break; + case 2: + sprintf (paddr_str, "%s%lu%09lu", sign, temp[1], temp[0]); + break; + case 3: + sprintf (paddr_str, "%s%lu%09lu%09lu", sign, temp[2], temp[1], temp[0]); + break; + default: + internal_error (__FILE__, __LINE__, + "failed internal consistency check"); + } +} + +char * +paddr_u (CORE_ADDR addr) +{ + char *paddr_str = get_cell (); + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +char * +paddr_d (LONGEST addr) +{ + char *paddr_str = get_cell (); + if (addr < 0) + decimal2str (paddr_str, "-", -addr); + else + decimal2str (paddr_str, "", addr); + return paddr_str; +} + +/* eliminate warning from compiler on 32-bit systems */ +static int thirty_two = 32; + +char * +phex (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + str = get_cell (); + sprintf (str, "%08lx%08lx", + (unsigned long) (l >> thirty_two), + (unsigned long) (l & 0xffffffff)); + break; + case 4: + str = get_cell (); + sprintf (str, "%08lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%04x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex (l, sizeof (l)); + break; + } + return str; +} + +char * +phex_nz (ULONGEST l, int sizeof_l) +{ + char *str; + switch (sizeof_l) + { + case 8: + { + unsigned long high = (unsigned long) (l >> thirty_two); + str = get_cell (); + if (high == 0) + sprintf (str, "%lx", (unsigned long) (l & 0xffffffff)); + else + sprintf (str, "%lx%08lx", high, (unsigned long) (l & 0xffffffff)); + break; + } + case 4: + str = get_cell (); + sprintf (str, "%lx", (unsigned long) l); + break; + case 2: + str = get_cell (); + sprintf (str, "%x", (unsigned short) (l & 0xffff)); + break; + default: + str = phex_nz (l, sizeof (l)); + break; + } + return str; +} + + +/* Convert a CORE_ADDR into a string. */ +const char * +core_addr_to_string (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex (addr, sizeof (addr))); + return str; +} + +const char * +core_addr_to_string_nz (const CORE_ADDR addr) +{ + char *str = get_cell (); + strcpy (str, "0x"); + strcat (str, phex_nz (addr, sizeof (addr))); + return str; +} + +/* Convert a string back into a CORE_ADDR. */ +CORE_ADDR +string_to_core_addr (const char *my_string) +{ + CORE_ADDR addr = 0; + if (my_string[0] == '0' && tolower (my_string[1]) == 'x') + { + /* Assume that it is in decimal. */ + int i; + for (i = 2; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 16); + else if (isxdigit (my_string[i])) + addr = (tolower (my_string[i]) - 'a' + 0xa) + (addr * 16); + else + internal_error (__FILE__, __LINE__, "invalid hex"); + } + } + else + { + /* Assume that it is in decimal. */ + int i; + for (i = 0; my_string[i] != '\0'; i++) + { + if (isdigit (my_string[i])) + addr = (my_string[i] - '0') + (addr * 10); + else + internal_error (__FILE__, __LINE__, "invalid decimal"); + } + } + return addr; +} + +char * +gdb_realpath (const char *filename) +{ + /* Method 1: The system has a compile time upper bound on a filename + path. Use that and realpath() to canonicalize the name. This is + the most common case. Note that, if there isn't a compile time + upper bound, you want to avoid realpath() at all costs. */ +#if defined(HAVE_REALPATH) + { +# if defined (PATH_MAX) + char buf[PATH_MAX]; +# define USE_REALPATH +# elif defined (MAXPATHLEN) + char buf[MAXPATHLEN]; +# define USE_REALPATH +# endif +# if defined (USE_REALPATH) + const char *rp = realpath (filename, buf); + if (rp == NULL) + rp = filename; + return xstrdup (rp); +# endif + } +#endif /* HAVE_REALPATH */ + + /* Method 2: The host system (i.e., GNU) has the function + canonicalize_file_name() which malloc's a chunk of memory and + returns that, use that. */ +#if defined(HAVE_CANONICALIZE_FILE_NAME) + { + char *rp = canonicalize_file_name (filename); + if (rp == NULL) + return xstrdup (filename); + else + return rp; + } +#endif + + /* FIXME: cagney/2002-11-13: + + Method 2a: Use realpath() with a NULL buffer. Some systems, due + to the problems described in in method 3, have modified their + realpath() implementation so that it will allocate a buffer when + NULL is passed in. Before this can be used, though, some sort of + configure time test would need to be added. Otherwize the code + will likely core dump. */ + + /* Method 3: Now we're getting desperate! The system doesn't have a + compile time buffer size and no alternative function. Query the + OS, using pathconf(), for the buffer limit. Care is needed + though, some systems do not limit PATH_MAX (return -1 for + pathconf()) making it impossible to pass a correctly sized buffer + to realpath() (it could always overflow). On those systems, we + skip this. */ +#if defined (HAVE_REALPATH) && defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA) + { + /* Find out the max path size. */ + long path_max = pathconf ("/", _PC_PATH_MAX); + if (path_max > 0) + { + /* PATH_MAX is bounded. */ + char *buf = alloca (path_max); + char *rp = realpath (filename, buf); + return xstrdup (rp ? rp : filename); + } + } +#endif + + /* This system is a lost cause, just dup the buffer. */ + return xstrdup (filename); +} + +/* Return a copy of FILENAME, with its directory prefix canonicalized + by gdb_realpath. */ + +char * +xfullpath (const char *filename) +{ + const char *base_name = lbasename (filename); + char *dir_name; + char *real_path; + char *result; + + /* Extract the basename of filename, and return immediately + a copy of filename if it does not contain any directory prefix. */ + if (base_name == filename) + return xstrdup (filename); + + dir_name = alloca ((size_t) (base_name - filename + 2)); + /* Allocate enough space to store the dir_name + plus one extra + character sometimes needed under Windows (see below), and + then the closing \000 character */ + strncpy (dir_name, filename, base_name - filename); + dir_name[base_name - filename] = '\000'; + +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + /* We need to be careful when filename is of the form 'd:foo', which + is equivalent of d:./foo, which is totally different from d:/foo. */ + if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':') + { + dir_name[2] = '.'; + dir_name[3] = '\000'; + } +#endif + + /* Canonicalize the directory prefix, and build the resulting + filename. If the dirname realpath already contains an ending + directory separator, avoid doubling it. */ + real_path = gdb_realpath (dir_name); + if (IS_DIR_SEPARATOR (real_path[strlen (real_path) - 1])) + result = concat (real_path, base_name, NULL); + else + result = concat (real_path, SLASH_STRING, base_name, NULL); + + xfree (real_path); + return result; +} + + +/* This is the 32-bit CRC function used by the GNU separate debug + facility. An executable may contain a section named + .gnu_debuglink, which holds the name of a separate executable file + containing its debug info, and a checksum of that file's contents, + computed using this function. */ +unsigned long +gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) +{ + static const unsigned long crc32_table[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d + }; + unsigned char *end; + + crc = ~crc & 0xffffffff; + for (end = buf + len; buf < end; ++buf) + crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); + return ~crc & 0xffffffff;; +} + +ULONGEST +align_up (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v + n - 1) & -n; +} + +ULONGEST +align_down (ULONGEST v, int n) +{ + /* Check that N is really a power of two. */ + gdb_assert (n && (n & (n-1)) == 0); + return (v & -n); +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/include/obstack.h /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/include/obstack.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/include/obstack.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/include/obstack.h 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,612 @@ +/* obstack.h - object stack macros + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserve + + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@gnu.org. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Summary: + +All the apparent functions defined here are macros. The idea +is that you would use these pre-tested macros to solve a +very specific set of problems, and they would run fast. +Caution: no side-effects in arguments please!! They may be +evaluated MANY times!! + +These macros operate a stack of objects. Each object starts life +small, and may grow to maturity. (Consider building a word syllable +by syllable.) An object can move while it is growing. Once it has +been "finished" it never changes address again. So the "top of the +stack" is typically an immature growing object, while the rest of the +stack is of mature, fixed size and fixed address objects. + +These routines grab large chunks of memory, using a function you +supply, called `obstack_chunk_alloc'. On occasion, they free chunks, +by calling `obstack_chunk_free'. You must define them and declare +them before using any obstack macros. + +Each independent stack is represented by a `struct obstack'. +Each of the obstack macros expects a pointer to such a structure +as the first argument. + +One motivation for this package is the problem of growing char strings +in symbol tables. Unless you are "fascist pig with a read-only mind" +--Gosper's immortal quote from HAKMEM item 154, out of context--you +would not like to put any arbitrary upper limit on the length of your +symbols. + +In practice this often means you will build many short symbols and a +few long symbols. At the time you are reading a symbol you don't know +how long it is. One traditional method is to read a symbol into a +buffer, realloc()ating the buffer every time you try to read a symbol +that is longer than the buffer. This is beaut, but you still will +want to copy the symbol from the buffer to a more permanent +symbol-table entry say about half the time. + +With obstacks, you can work differently. Use one obstack for all symbol +names. As you read a symbol, grow the name in the obstack gradually. +When the name is complete, finalize it. Then, if the symbol exists already, +free the newly read name. + +The way we do this is to take a large chunk, allocating memory from +low addresses. When you want to build a symbol in the chunk you just +add chars above the current "high water mark" in the chunk. When you +have finished adding chars, because you got to the end of the symbol, +you know how long the chars are, and you can create a new object. +Mostly the chars will not burst over the highest address of the chunk, +because you would typically expect a chunk to be (say) 100 times as +long as an average object. + +In case that isn't clear, when we have enough chars to make up +the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) +so we just point to it where it lies. No moving of chars is +needed and this is the second win: potentially long strings need +never be explicitly shuffled. Once an object is formed, it does not +change its address during its lifetime. + +When the chars burst over a chunk boundary, we allocate a larger +chunk, and then copy the partly formed object from the end of the old +chunk to the beginning of the new larger chunk. We then carry on +accreting characters to the end of the object as we normally would. + +A special macro is provided to add a single char at a time to a +growing object. This allows the use of register variables, which +break the ordinary 'growth' macro. + +Summary: + We allocate large chunks. + We carve out one object at a time from the current chunk. + Once carved, an object never moves. + We are free to append data of any size to the currently + growing object. + Exactly one object is growing in an obstack at any one time. + You can run one obstack per control block. + You may have as many control blocks as you dare. + Because of the way we do it, you can `unwind' an obstack + back to a previous state. (You may remove objects much + as you would with a stack.) +*/ + + +/* Don't do the contents of this file more than once. */ + +#ifndef _OBSTACK_H +#define _OBSTACK_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use subtraction of (char *) 0 instead of casting to int + because on word-addressable machines a simple cast to int + may ignore the byte-within-word field of the pointer. */ + +#ifndef __PTR_TO_INT +# define __PTR_TO_INT(P) ((P) - (char *) 0) +#endif + +#ifndef __INT_TO_PTR +# define __INT_TO_PTR(P) ((P) + (char *) 0) +#endif + +/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is + defined, as with GNU C, use that; that way we don't pollute the + namespace with 's symbols. Otherwise, if is + available, include it and use ptrdiff_t. In traditional C, long is + the best that we can do. */ + +#ifdef __PTRDIFF_TYPE__ +# define PTR_INT_TYPE __PTRDIFF_TYPE__ +#else +# ifdef HAVE_STDDEF_H +# include +# define PTR_INT_TYPE ptrdiff_t +# else +# define PTR_INT_TYPE long +# endif +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +# if defined __STDC__ && __STDC__ +# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) +# else +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# endif +#else +# ifdef memcpy +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# else +# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) +# endif +#endif + +struct _obstack_chunk /* Lives at front of each chunk. */ +{ + char *limit; /* 1 past end of this chunk */ + struct _obstack_chunk *prev; /* address of prior chunk or NULL */ + char contents[4]; /* objects begin here */ +}; + +struct obstack /* control current object in current chunk */ +{ + long chunk_size; /* preferred size to allocate chunks in */ + struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ + char *object_base; /* address of object we are building */ + char *next_free; /* where to add next char to current object */ + char *chunk_limit; /* address of char after current chunk */ + PTR_INT_TYPE temp; /* Temporary for some macros. */ + int alignment_mask; /* Mask of alignment for each object. */ +#if defined __STDC__ && __STDC__ + /* These prototypes vary based on `use_extra_arg', and we use + casts to the prototypeless function type in all assignments, + but having prototypes here quiets -Wstrict-prototypes. */ + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#else + struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ + void (*freefun) (); /* User's function to free a chunk. */ + char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#endif + unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ + unsigned maybe_empty_object:1;/* There is a possibility that the current + chunk contains a zero-length object. This + prevents freeing the chunk if we allocate + a bigger chunk to replace it. */ + unsigned alloc_failed:1; /* No longer used, as we now call the failed + handler on error, but retained for binary + compatibility. */ +}; + +/* Declare the external functions we use; they are in obstack.c. */ + +#if defined __STDC__ && __STDC__ +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); +#else +extern void _obstack_newchunk (); +extern void _obstack_free (); +extern int _obstack_begin (); +extern int _obstack_begin_1 (); +extern int _obstack_memory_used (); +#endif + +#if defined __STDC__ && __STDC__ + +/* Do the function-declarations after the structs + but before defining the macros. */ + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + +#endif /* __STDC__ */ + +/* Non-ANSI C cannot really support alternative functions for these macros, + so we do not declare them. */ + +/* Error handler called when `obstack_chunk_alloc' failed to allocate + more memory. This can be set to a user defined function. The + default action is to print a message and abort. */ +#if defined __STDC__ && __STDC__ +extern void (*obstack_alloc_failed_handler) (void); +#else +extern void (*obstack_alloc_failed_handler) (); +#endif + +/* Exit value used when `print_and_abort' is used. */ +extern int obstack_exit_failure; + +/* Pointer to beginning of object being allocated or to be allocated next. + Note that this might not be the final address of the object + because a new chunk might be needed to hold the final size. */ + +#define obstack_base(h) ((h)->object_base) + +/* Size for allocating ordinary chunks. */ + +#define obstack_chunk_size(h) ((h)->chunk_size) + +/* Pointer to next byte not yet allocated in current chunk. */ + +#define obstack_next_free(h) ((h)->next_free) + +/* Mask specifying low bits that should be clear in address of an object. */ + +#define obstack_alignment_mask(h) ((h)->alignment_mask) + +/* To prevent prototype warnings provide complete argument list in + standard C version. */ +#if defined __STDC__ && __STDC__ + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) (void *, long)) (chunkfun), \ + (void (*) (void *, void *)) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) + +#else + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)()) (newfreefun)) + +#endif + +#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + +#define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +#define obstack_memory_used(h) _obstack_memory_used (h) + +#if defined __GNUC__ && defined __STDC__ && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) +# define __extension__ +# endif + +/* For GNU C, if not -traditional, + we can define these macros to compute all args only once + without using a global variable. + Also, we can avoid using the `temp' slot, to make faster code. */ + +# define obstack_object_size(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->next_free - __o->object_base); }) + +# define obstack_room(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->chunk_limit - __o->next_free); }) + +# define obstack_make_room(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + (void) 0; }) + +# define obstack_empty_p(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + +# define obstack_grow(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len > __o->chunk_limit) \ + _obstack_newchunk (__o, __len); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + (void) 0; }) + +# define obstack_grow0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, __len + 1); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + *(__o->next_free)++ = 0; \ + (void) 0; }) + +# define obstack_1grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ + obstack_1grow_fast (__o, datum); \ + (void) 0; }) + +/* These assume that the obstack alignment is good enough for pointers or ints, + and that the data added so far to the current object + shares that much alignment. */ + +# define obstack_ptr_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + obstack_ptr_grow_fast (__o, datum); }) + +# define obstack_int_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ + obstack_int_grow_fast (__o, datum); }) + +# define obstack_ptr_grow_fast(OBSTACK,aptr) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(const void **) __o1->next_free = (aptr); \ + __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +# define obstack_int_grow_fast(OBSTACK,aint) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(int *) __o1->next_free = (aint); \ + __o1->next_free += sizeof (int); \ + (void) 0; }) + +# define obstack_blank(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + obstack_blank_fast (__o, __len); \ + (void) 0; }) + +# define obstack_alloc(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_blank (__h, (length)); \ + obstack_finish (__h); }) + +# define obstack_copy(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow (__h, (where), (length)); \ + obstack_finish (__h); }) + +# define obstack_copy0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow0 (__h, (where), (length)); \ + obstack_finish (__h); }) + +/* The local variable is named __o1 to avoid a name conflict + when obstack_blank is called. */ +# define obstack_finish(OBSTACK) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + void *value; \ + value = (void *) __o1->object_base; \ + if (__o1->next_free == value) \ + __o1->maybe_empty_object = 1; \ + __o1->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ + & ~ (__o1->alignment_mask)); \ + if (__o1->next_free - (char *)__o1->chunk \ + > __o1->chunk_limit - (char *)__o1->chunk) \ + __o1->next_free = __o1->chunk_limit; \ + __o1->object_base = __o1->next_free; \ + value; }) + +# define obstack_free(OBSTACK, OBJ) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + void *__obj = (void *) (OBJ); \ + if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ + __o->next_free = __o->object_base = (char *) __obj; \ + else (obstack_free) (__o, __obj); }) + +#else /* not __GNUC__ or not __STDC__ */ + +# define obstack_object_size(h) \ + (unsigned) ((h)->next_free - (h)->object_base) + +# define obstack_room(h) \ + (unsigned) ((h)->chunk_limit - (h)->next_free) + +# define obstack_empty_p(h) \ + ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + +/* Note that the call to _obstack_newchunk is enclosed in (..., 0) + so that we can avoid having void expressions + in the arms of the conditional expression. + Casting the third operand to void was tried before, + but some compilers won't accept it. */ + +# define obstack_make_room(h,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) + +# define obstack_grow(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp) + +# define obstack_grow0(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp, \ + *((h)->next_free)++ = 0) + +# define obstack_1grow(h,datum) \ +( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ + obstack_1grow_fast (h, datum)) + +# define obstack_ptr_grow(h,datum) \ +( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ + obstack_ptr_grow_fast (h, datum)) + +# define obstack_int_grow(h,datum) \ +( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ + obstack_int_grow_fast (h, datum)) + +# define obstack_ptr_grow_fast(h,aptr) \ + (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +# define obstack_int_grow_fast(h,aint) \ + (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + +# define obstack_blank(h,length) \ +( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + obstack_blank_fast (h, (h)->temp)) + +# define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) + +# define obstack_copy(h,where,length) \ + (obstack_grow ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_copy0(h,where,length) \ + (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_finish(h) \ +( ((h)->next_free == (h)->object_base \ + ? (((h)->maybe_empty_object = 1), 0) \ + : 0), \ + (h)->temp = __PTR_TO_INT ((h)->object_base), \ + (h)->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ + & ~ ((h)->alignment_mask)), \ + (((h)->next_free - (char *) (h)->chunk \ + > (h)->chunk_limit - (char *) (h)->chunk) \ + ? ((h)->next_free = (h)->chunk_limit) : 0), \ + (h)->object_base = (h)->next_free, \ + __INT_TO_PTR ((h)->temp)) + +# if defined __STDC__ && __STDC__ +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) +# else +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) +# endif + +#endif /* not __GNUC__ or not __STDC__ */ + +#ifdef __cplusplus +} /* C++ */ +#endif + +#endif /* obstack.h */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/gdb-6.1/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/gdb-6.1/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,23927 @@ + +# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. +# +# Makefile for directory with subdirs to build. +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation +# Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# ------------------------------- +# Standard Autoconf-set variables +# ------------------------------- +VPATH=@srcdir@ + +build_alias=@build_alias@ +build=@build@ +host_alias=@host_alias@ +host=@host@ +target_alias=@target_alias@ +target=@target@ + +program_transform_name = @program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +srcdir = @srcdir@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +includedir = @includedir@ +oldincludedir = @oldincludedir@ +infodir = @infodir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +# ------------------------------------------------- +# Miscellaneous non-standard autoconf-set variables +# ------------------------------------------------- + +links=@configlinks@ +# The file containing GCC's version number. +gcc_version_trigger = @gcc_version_trigger@ +gcc_version = @gcc_version@ + +# The gcc driver likes to know the arguments it was configured with. +TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ + +gxx_include_dir = @gxx_include_dir@ +libstdcxx_incdir = @libstdcxx_incdir@ + +tooldir = @tooldir@ +build_tooldir = @build_tooldir@ + +# Directory in which the compiler finds executables, libraries, etc. +libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) +GDB_NLM_DEPS = + +# This is the name of the environment variable used for the path to +# the libraries. +RPATH_ENVVAR = @RPATH_ENVVAR@ + +# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared +# was used. +SET_LIB_PATH = @SET_LIB_PATH@ + +# configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. +REALLY_SET_LIB_PATH = \ + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + +# This is the list of directories to be built for the build system. +BUILD_CONFIGDIRS = libiberty +# Build programs are put under this directory. +BUILD_SUBDIR = @build_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the build system. +BUILD_CONFIGARGS = @build_configargs@ + +# This is the list of directories to built for the host system. +SUBDIRS = @configdirs@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the host system. +HOST_CONFIGARGS = @host_configargs@ + +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = @target_configdirs@ +# Target libraries are put under this directory: +TARGET_SUBDIR = @target_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the target. +TARGET_CONFIGARGS = @target_configargs@ + +# ---------------------------------------------- +# Programs producing files for the BUILD machine +# ---------------------------------------------- + +SHELL = @config_shell@ + +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) + +# compilers to use to create programs which must be run in the build +# environment. +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + +ifeq ($(ARCH), ppc64) +CFLAGS_FOR_BUILD += -m64 -fPIC +endif + +CXX_FOR_BUILD = $(CXX) + +# Special variables passed down in EXTRA_GCC_FLAGS. They are defined +# here so that they can be overridden by Makefile fragments. +BUILD_PREFIX = @BUILD_PREFIX@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + +BISON=@BISON@ +USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -L $$s/bison/ ; \ + else \ + echo bison ; \ + fi` + +DEFAULT_YACC = @DEFAULT_YACC@ +YACC=@YACC@ +USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -y -L $$s/bison/ ; \ + elif [ -f $$r/byacc/byacc ] ; then \ + echo $$r/byacc/byacc ; \ + else \ + echo ${DEFAULT_YACC} ; \ + fi` + +DEFAULT_LEX = @DEFAULT_LEX@ +LEX=@LEX@ +USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ + then echo $$r/flex/flex ; \ + else echo ${DEFAULT_LEX} ; fi` + +DEFAULT_M4 = @DEFAULT_M4@ +M4 = `if [ -f $$r/m4/m4 ] ; \ + then echo $$r/m4/m4 ; \ + else echo ${DEFAULT_M4} ; fi` + +# For an installed makeinfo, we require it to be from texinfo 4.2 or +# higher, else we use the "missing" dummy. +MAKEINFO=@MAKEINFO@ +USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ + then echo $$r/texinfo/makeinfo/makeinfo ; \ + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` + +# This just becomes part of the MAKEINFO definition passed down to +# sub-makes. It lets flags be given on the command line while still +# using the makeinfo from the object tree. +# (Default to avoid splitting info files by setting the threshold high.) +MAKEINFOFLAGS = --split-size=5000000 + +EXPECT = `if [ -f $$r/expect/expect ] ; \ + then echo $$r/expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ + then echo $$s/dejagnu/runtest ; \ + else echo runtest ; fi` + +# --------------------------------------------- +# Programs producing files for the HOST machine +# --------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +AS = @AS@ + +AR = @AR@ +AR_FLAGS = rc + +CC = @CC@ +CFLAGS = @CFLAGS@ +ifeq ($(ARCH), ppc64) +CFLAGS += -m64 -fPIC +endif +LIBCFLAGS = $(CFLAGS) + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + +DLLTOOL = @DLLTOOL@ + +NM = @NM@ + +LD = @LD@ +LDFLAGS = + +RANLIB = @RANLIB@ + +WINDRES = @WINDRES@ + +PICFLAG = + +# ----------------------------------------------- +# Programs producing files for the TARGET machine +# ----------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: + +FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ + +AR_FOR_TARGET=@AR_FOR_TARGET@ +USUAL_AR_FOR_TARGET = ` \ + if [ -f $$r/binutils/ar ] ; then \ + echo $$r/binutils/ar ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AR); \ + else \ + echo ar | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +AS_FOR_TARGET=@AS_FOR_TARGET@ +USUAL_AS_FOR_TARGET = ` \ + if [ -f $$r/gas/as-new ] ; then \ + echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AS); \ + else \ + echo as | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +CC_FOR_TARGET = @CC_FOR_TARGET@ +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +# If GCC_FOR_TARGET is not overriden on the command line, then this +# variable is passed down to the gcc Makefile, where it is used to +# build libgcc2.a. We define it here so that it can itself be +# overridden on the command line. +GCC_FOR_TARGET=@GCC_FOR_TARGET@ +USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + +CXX_FOR_TARGET = @CXX_FOR_TARGET@ +RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ +USUAL_DLLTOOL_FOR_TARGET = ` \ + if [ -f $$r/binutils/dlltool ] ; then \ + echo $$r/binutils/dlltool ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(DLLTOOL); \ + else \ + echo dlltool | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ + +LD_FOR_TARGET=@LD_FOR_TARGET@ +USUAL_LD_FOR_TARGET = ` \ + if [ -f $$r/ld/ld-new ] ; then \ + echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(LD); \ + else \ + echo ld | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +LDFLAGS_FOR_TARGET = + +NM_FOR_TARGET=@NM_FOR_TARGET@ +USUAL_NM_FOR_TARGET = ` \ + if [ -f $$r/binutils/nm-new ] ; then \ + echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(NM); \ + else \ + echo nm | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +USUAL_RANLIB_FOR_TARGET = ` \ + if [ -f $$r/binutils/ranlib ] ; then \ + echo $$r/binutils/ranlib ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + if [ x'$(RANLIB)' != x ]; then \ + echo $(RANLIB); \ + else \ + echo ranlib; \ + fi; \ + else \ + echo ranlib | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ +USUAL_WINDRES_FOR_TARGET = ` \ + if [ -f $$r/binutils/windres ] ; then \ + echo $$r/binutils/windres ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(WINDRES); \ + else \ + echo windres | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +PICFLAG_FOR_TARGET = + +# ------------------------------------ +# Miscellaneous targets and flag lists +# ------------------------------------ + +# The first rule in the file had better be this one. Don't put any above it. +# This lives here to allow makefile fragments to contain dependencies. +all: all.normal +.PHONY: all + +#### host and target specific makefile fragments come in here. +@target_makefile_frag@ +@alphaieee_frag@ +@ospace_frag@ +@host_makefile_frag@ +### + +# Flags to pass down to all sub-makes. +BASE_FLAGS_TO_PASS = \ + "DESTDIR=$(DESTDIR)" \ + "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ + "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ + "bindir=$(bindir)" \ + "datadir=$(datadir)" \ + "exec_prefix=$(exec_prefix)" \ + "includedir=$(includedir)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "libexecdir=$(libexecdir)" \ + "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ + "localstatedir=$(localstatedir)" \ + "mandir=$(mandir)" \ + "oldincludedir=$(oldincludedir)" \ + "prefix=$(prefix)" \ + "sbindir=$(sbindir)" \ + "sharedstatedir=$(sharedstatedir)" \ + "sysconfdir=$(sysconfdir)" \ + "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "gcc_version=$(gcc_version)" \ + "gcc_version_trigger=$(gcc_version_trigger)" \ + "target_alias=$(target_alias)" \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "SHELL=$(SHELL)" \ + "YACC=$(YACC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ + "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ + "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "CONFIG_SHELL=$(SHELL)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + +# Flags to pass down to most sub-makes, in which we're building with +# the host environment. +EXTRA_HOST_FLAGS = \ + 'AR=$(AR)' \ + 'AS=$(AS)' \ + 'CC=$(CC)' \ + 'CXX=$(CXX)' \ + 'DLLTOOL=$(DLLTOOL)' \ + 'LD=$(LD)' \ + 'NM=$(NM)' \ + 'RANLIB=$(RANLIB)' \ + 'WINDRES=$(WINDRES)' + +FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) + +# Flags that are concerned with the location of the X11 include files +# and library files +# +# NOTE: until the top-level is getting the values via autoconf, it only +# causes problems to have this top-level Makefile overriding the autoconf-set +# values in child directories. Only variables that don't conflict with +# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. +# +X11_FLAGS_TO_PASS = \ + 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ + 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' + +# Flags to pass down to makes which are built with the target environment. +# The double $ decreases the length of the command line; the variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +EXTRA_TARGET_FLAGS = \ + 'AR=$$(AR_FOR_TARGET)' \ + 'AS=$$(AS_FOR_TARGET)' \ + 'CC=$$(CC_FOR_TARGET)' \ + 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ + 'CXX=$$(CXX_FOR_TARGET)' \ + 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ + 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ + 'LD=$$(LD_FOR_TARGET)' \ + 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ + 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ + 'NM=$$(NM_FOR_TARGET)' \ + 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'WINDRES=$$(WINDRES_FOR_TARGET)' + +TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) + +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. +# If any variables are added here, they must be added to do-*, below. +# The BUILD_* variables are a special case, which are used for the gcc +# cross-building scheme. +EXTRA_GCC_FLAGS = \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + +GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) + +.PHONY: configure-host +configure-host: maybe-configure-gcc \ + maybe-configure-ash \ + maybe-configure-autoconf \ + maybe-configure-automake \ + maybe-configure-bash \ + maybe-configure-bfd \ + maybe-configure-opcodes \ + maybe-configure-binutils \ + maybe-configure-bison \ + maybe-configure-byacc \ + maybe-configure-bzip2 \ + maybe-configure-dejagnu \ + maybe-configure-diff \ + maybe-configure-dosutils \ + maybe-configure-etc \ + maybe-configure-fastjar \ + maybe-configure-fileutils \ + maybe-configure-findutils \ + maybe-configure-find \ + maybe-configure-flex \ + maybe-configure-gas \ + maybe-configure-gawk \ + maybe-configure-gettext \ + maybe-configure-gnuserv \ + maybe-configure-gprof \ + maybe-configure-gzip \ + maybe-configure-hello \ + maybe-configure-indent \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ + maybe-configure-ld \ + maybe-configure-libgui \ + maybe-configure-libiberty \ + maybe-configure-libtool \ + maybe-configure-m4 \ + maybe-configure-make \ + maybe-configure-mmalloc \ + maybe-configure-patch \ + maybe-configure-perl \ + maybe-configure-prms \ + maybe-configure-rcs \ + maybe-configure-readline \ + maybe-configure-release \ + maybe-configure-recode \ + maybe-configure-sed \ + maybe-configure-send-pr \ + maybe-configure-shellutils \ + maybe-configure-sid \ + maybe-configure-sim \ + maybe-configure-tar \ + maybe-configure-texinfo \ + maybe-configure-textutils \ + maybe-configure-time \ + maybe-configure-uudecode \ + maybe-configure-wdiff \ + maybe-configure-zip \ + maybe-configure-zlib \ + maybe-configure-gdb \ + maybe-configure-expect \ + maybe-configure-guile \ + maybe-configure-tk \ + maybe-configure-tix \ + maybe-configure-libtermcap \ + maybe-configure-utils +.PHONY: configure-target +configure-target: \ + maybe-configure-target-libstdc++-v3 \ + maybe-configure-target-newlib \ + maybe-configure-target-libf2c \ + maybe-configure-target-libobjc \ + maybe-configure-target-libtermcap \ + maybe-configure-target-winsup \ + maybe-configure-target-libgloss \ + maybe-configure-target-libiberty \ + maybe-configure-target-gperf \ + maybe-configure-target-examples \ + maybe-configure-target-libffi \ + maybe-configure-target-libjava \ + maybe-configure-target-zlib \ + maybe-configure-target-boehm-gc \ + maybe-configure-target-qthreads \ + maybe-configure-target-rda \ + maybe-configure-target-libada + +# The target built for a native build. +.PHONY: all.normal +all.normal: @all_build_modules@ all-host all-target + +.PHONY: all-host +all-host: maybe-all-gcc \ + maybe-all-ash \ + maybe-all-autoconf \ + maybe-all-automake \ + maybe-all-bash \ + maybe-all-bfd \ + maybe-all-opcodes \ + maybe-all-binutils \ + maybe-all-bison \ + maybe-all-byacc \ + maybe-all-bzip2 \ + maybe-all-dejagnu \ + maybe-all-diff \ + maybe-all-dosutils \ + maybe-all-etc \ + maybe-all-fastjar \ + maybe-all-fileutils \ + maybe-all-findutils \ + maybe-all-find \ + maybe-all-flex \ + maybe-all-gas \ + maybe-all-gawk \ + maybe-all-gettext \ + maybe-all-gnuserv \ + maybe-all-gprof \ + maybe-all-gzip \ + maybe-all-hello \ + maybe-all-indent \ + maybe-all-intl \ + maybe-all-tcl \ + maybe-all-itcl \ + maybe-all-ld \ + maybe-all-libgui \ + maybe-all-libiberty \ + maybe-all-libtool \ + maybe-all-m4 \ + maybe-all-make \ + maybe-all-mmalloc \ + maybe-all-patch \ + maybe-all-perl \ + maybe-all-prms \ + maybe-all-rcs \ + maybe-all-readline \ + maybe-all-release \ + maybe-all-recode \ + maybe-all-sed \ + maybe-all-send-pr \ + maybe-all-shellutils \ + maybe-all-sid \ + maybe-all-sim \ + maybe-all-tar \ + maybe-all-texinfo \ + maybe-all-textutils \ + maybe-all-time \ + maybe-all-uudecode \ + maybe-all-wdiff \ + maybe-all-zip \ + maybe-all-zlib \ + maybe-all-gdb \ + maybe-all-expect \ + maybe-all-guile \ + maybe-all-tk \ + maybe-all-tix \ + maybe-all-libtermcap +# maybe-all-utils +.PHONY: all-target +all-target: \ + maybe-all-target-libstdc++-v3 \ + maybe-all-target-newlib \ + maybe-all-target-libf2c \ + maybe-all-target-libobjc \ + maybe-all-target-libtermcap \ + maybe-all-target-winsup \ + maybe-all-target-libgloss \ + maybe-all-target-libiberty \ + maybe-all-target-gperf \ + maybe-all-target-examples \ + maybe-all-target-libffi \ + maybe-all-target-libjava \ + maybe-all-target-zlib \ + maybe-all-target-boehm-gc \ + maybe-all-target-qthreads \ + maybe-all-target-rda \ + maybe-all-target-libada + +# Do a target for all the subdirectories. A ``make do-X'' will do a +# ``make X'' in all subdirectories (because, in general, there is a +# dependency (below) of X upon do-X, a ``make X'' will also do this, +# but it may do additional work as well). + +.PHONY: do-info +do-info: info-host info-target + +.PHONY: info-host +info-host: maybe-info-gcc \ + maybe-info-ash \ + maybe-info-autoconf \ + maybe-info-automake \ + maybe-info-bash \ + maybe-info-bfd \ + maybe-info-opcodes \ + maybe-info-binutils \ + maybe-info-bison \ + maybe-info-byacc \ + maybe-info-bzip2 \ + maybe-info-dejagnu \ + maybe-info-diff \ + maybe-info-dosutils \ + maybe-info-etc \ + maybe-info-fastjar \ + maybe-info-fileutils \ + maybe-info-findutils \ + maybe-info-find \ + maybe-info-flex \ + maybe-info-gas \ + maybe-info-gawk \ + maybe-info-gettext \ + maybe-info-gnuserv \ + maybe-info-gprof \ + maybe-info-gzip \ + maybe-info-hello \ + maybe-info-indent \ + maybe-info-intl \ + maybe-info-tcl \ + maybe-info-itcl \ + maybe-info-ld \ + maybe-info-libgui \ + maybe-info-libiberty \ + maybe-info-libtool \ + maybe-info-m4 \ + maybe-info-make \ + maybe-info-mmalloc \ + maybe-info-patch \ + maybe-info-perl \ + maybe-info-prms \ + maybe-info-rcs \ + maybe-info-readline \ + maybe-info-release \ + maybe-info-recode \ + maybe-info-sed \ + maybe-info-send-pr \ + maybe-info-shellutils \ + maybe-info-sid \ + maybe-info-sim \ + maybe-info-tar \ + maybe-info-texinfo \ + maybe-info-textutils \ + maybe-info-time \ + maybe-info-uudecode \ + maybe-info-wdiff \ + maybe-info-zip \ + maybe-info-zlib \ + maybe-info-gdb \ + maybe-info-expect \ + maybe-info-guile \ + maybe-info-tk \ + maybe-info-tix \ + maybe-info-libtermcap \ + maybe-info-utils + +.PHONY: info-target +info-target: \ + maybe-info-target-libstdc++-v3 \ + maybe-info-target-newlib \ + maybe-info-target-libf2c \ + maybe-info-target-libobjc \ + maybe-info-target-libtermcap \ + maybe-info-target-winsup \ + maybe-info-target-libgloss \ + maybe-info-target-libiberty \ + maybe-info-target-gperf \ + maybe-info-target-examples \ + maybe-info-target-libffi \ + maybe-info-target-libjava \ + maybe-info-target-zlib \ + maybe-info-target-boehm-gc \ + maybe-info-target-qthreads \ + maybe-info-target-rda \ + maybe-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-info-gcc info-gcc +maybe-info-gcc: +info-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-info-ash info-ash +maybe-info-ash: + +info-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-autoconf info-autoconf +maybe-info-autoconf: + +info-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-automake info-automake +maybe-info-automake: + +info-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bash info-bash +maybe-info-bash: + +info-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bfd info-bfd +maybe-info-bfd: + +info-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-opcodes info-opcodes +maybe-info-opcodes: + +info-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-binutils info-binutils +maybe-info-binutils: + +info-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bison info-bison +maybe-info-bison: + +info-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-byacc info-byacc +maybe-info-byacc: + +info-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bzip2 info-bzip2 +maybe-info-bzip2: + +info-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dejagnu info-dejagnu +maybe-info-dejagnu: + +info-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-diff info-diff +maybe-info-diff: + +info-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dosutils info-dosutils +maybe-info-dosutils: + +info-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-etc info-etc +maybe-info-etc: + +info-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fastjar info-fastjar +maybe-info-fastjar: + +info-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fileutils info-fileutils +maybe-info-fileutils: + +info-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-findutils info-findutils +maybe-info-findutils: + +info-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-find info-find +maybe-info-find: + +info-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-flex info-flex +maybe-info-flex: + +info-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gas info-gas +maybe-info-gas: + +info-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gawk info-gawk +maybe-info-gawk: + +info-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gettext info-gettext +maybe-info-gettext: + +info-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gnuserv info-gnuserv +maybe-info-gnuserv: + +info-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: + +info-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gzip info-gzip +maybe-info-gzip: + +info-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-hello info-hello +maybe-info-hello: + +info-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-indent info-indent +maybe-info-indent: + +info-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-intl info-intl +maybe-info-intl: + +info-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tcl info-tcl +maybe-info-tcl: + +info-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-itcl info-itcl +maybe-info-itcl: + +info-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-ld info-ld +maybe-info-ld: + +info-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libgui info-libgui +maybe-info-libgui: + +info-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libiberty info-libiberty +maybe-info-libiberty: + +info-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtool info-libtool +maybe-info-libtool: + +info-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-m4 info-m4 +maybe-info-m4: + +info-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-make info-make +maybe-info-make: + +info-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-mmalloc info-mmalloc +maybe-info-mmalloc: + +info-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-patch info-patch +maybe-info-patch: + +info-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-perl info-perl +maybe-info-perl: + +info-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-prms info-prms +maybe-info-prms: + +info-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-rcs info-rcs +maybe-info-rcs: + +info-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-readline info-readline +maybe-info-readline: + +info-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-release info-release +maybe-info-release: + +info-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-recode info-recode +maybe-info-recode: + +info-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sed info-sed +maybe-info-sed: + +info-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-send-pr info-send-pr +maybe-info-send-pr: + +info-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-shellutils info-shellutils +maybe-info-shellutils: + +info-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sid info-sid +maybe-info-sid: + +info-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sim info-sim +maybe-info-sim: + +info-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tar info-tar +maybe-info-tar: + +info-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-texinfo info-texinfo +maybe-info-texinfo: + +info-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-textutils info-textutils +maybe-info-textutils: + +info-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-time info-time +maybe-info-time: + +info-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-uudecode info-uudecode +maybe-info-uudecode: + +info-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-wdiff info-wdiff +maybe-info-wdiff: + +info-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zip info-zip +maybe-info-zip: + +info-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zlib info-zlib +maybe-info-zlib: + +info-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gdb info-gdb +maybe-info-gdb: + +info-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-expect info-expect +maybe-info-expect: + +info-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-guile info-guile +maybe-info-guile: + +info-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tk info-tk +maybe-info-tk: + +info-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tix info-tix +maybe-info-tix: + +info-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtermcap info-libtermcap +maybe-info-libtermcap: + +info-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-utils info-utils +maybe-info-utils: + +info-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3 +maybe-info-target-libstdc++-v3: + +info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-newlib info-target-newlib +maybe-info-target-newlib: + +info-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libf2c info-target-libf2c +maybe-info-target-libf2c: + +info-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libobjc info-target-libobjc +maybe-info-target-libobjc: + +info-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libtermcap info-target-libtermcap +maybe-info-target-libtermcap: + +info-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-winsup info-target-winsup +maybe-info-target-winsup: + +info-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libgloss info-target-libgloss +maybe-info-target-libgloss: + +info-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libiberty info-target-libiberty +maybe-info-target-libiberty: + +info-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-gperf info-target-gperf +maybe-info-target-gperf: + +info-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-examples info-target-examples +maybe-info-target-examples: + +info-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libffi info-target-libffi +maybe-info-target-libffi: + +info-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libjava info-target-libjava +maybe-info-target-libjava: + +info-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-zlib info-target-zlib +maybe-info-target-zlib: + +info-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc +maybe-info-target-boehm-gc: + +info-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-qthreads info-target-qthreads +maybe-info-target-qthreads: + +info-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-rda info-target-rda +maybe-info-target-rda: + +info-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libada info-target-libada +maybe-info-target-libada: + +info-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +.PHONY: do-dvi +do-dvi: dvi-host dvi-target + +.PHONY: dvi-host +dvi-host: maybe-dvi-gcc \ + maybe-dvi-ash \ + maybe-dvi-autoconf \ + maybe-dvi-automake \ + maybe-dvi-bash \ + maybe-dvi-bfd \ + maybe-dvi-opcodes \ + maybe-dvi-binutils \ + maybe-dvi-bison \ + maybe-dvi-byacc \ + maybe-dvi-bzip2 \ + maybe-dvi-dejagnu \ + maybe-dvi-diff \ + maybe-dvi-dosutils \ + maybe-dvi-etc \ + maybe-dvi-fastjar \ + maybe-dvi-fileutils \ + maybe-dvi-findutils \ + maybe-dvi-find \ + maybe-dvi-flex \ + maybe-dvi-gas \ + maybe-dvi-gawk \ + maybe-dvi-gettext \ + maybe-dvi-gnuserv \ + maybe-dvi-gprof \ + maybe-dvi-gzip \ + maybe-dvi-hello \ + maybe-dvi-indent \ + maybe-dvi-intl \ + maybe-dvi-tcl \ + maybe-dvi-itcl \ + maybe-dvi-ld \ + maybe-dvi-libgui \ + maybe-dvi-libiberty \ + maybe-dvi-libtool \ + maybe-dvi-m4 \ + maybe-dvi-make \ + maybe-dvi-mmalloc \ + maybe-dvi-patch \ + maybe-dvi-perl \ + maybe-dvi-prms \ + maybe-dvi-rcs \ + maybe-dvi-readline \ + maybe-dvi-release \ + maybe-dvi-recode \ + maybe-dvi-sed \ + maybe-dvi-send-pr \ + maybe-dvi-shellutils \ + maybe-dvi-sid \ + maybe-dvi-sim \ + maybe-dvi-tar \ + maybe-dvi-texinfo \ + maybe-dvi-textutils \ + maybe-dvi-time \ + maybe-dvi-uudecode \ + maybe-dvi-wdiff \ + maybe-dvi-zip \ + maybe-dvi-zlib \ + maybe-dvi-gdb \ + maybe-dvi-expect \ + maybe-dvi-guile \ + maybe-dvi-tk \ + maybe-dvi-tix \ + maybe-dvi-libtermcap \ + maybe-dvi-utils + +.PHONY: dvi-target +dvi-target: \ + maybe-dvi-target-libstdc++-v3 \ + maybe-dvi-target-newlib \ + maybe-dvi-target-libf2c \ + maybe-dvi-target-libobjc \ + maybe-dvi-target-libtermcap \ + maybe-dvi-target-winsup \ + maybe-dvi-target-libgloss \ + maybe-dvi-target-libiberty \ + maybe-dvi-target-gperf \ + maybe-dvi-target-examples \ + maybe-dvi-target-libffi \ + maybe-dvi-target-libjava \ + maybe-dvi-target-zlib \ + maybe-dvi-target-boehm-gc \ + maybe-dvi-target-qthreads \ + maybe-dvi-target-rda \ + maybe-dvi-target-libada + +# GCC, the eternal special case +.PHONY: maybe-dvi-gcc dvi-gcc +maybe-dvi-gcc: +dvi-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-dvi-ash dvi-ash +maybe-dvi-ash: + +dvi-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-autoconf dvi-autoconf +maybe-dvi-autoconf: + +dvi-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-automake dvi-automake +maybe-dvi-automake: + +dvi-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bash dvi-bash +maybe-dvi-bash: + +dvi-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bfd dvi-bfd +maybe-dvi-bfd: + +dvi-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-opcodes dvi-opcodes +maybe-dvi-opcodes: + +dvi-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-binutils dvi-binutils +maybe-dvi-binutils: + +dvi-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bison dvi-bison +maybe-dvi-bison: + +dvi-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-byacc dvi-byacc +maybe-dvi-byacc: + +dvi-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bzip2 dvi-bzip2 +maybe-dvi-bzip2: + +dvi-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dejagnu dvi-dejagnu +maybe-dvi-dejagnu: + +dvi-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-diff dvi-diff +maybe-dvi-diff: + +dvi-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dosutils dvi-dosutils +maybe-dvi-dosutils: + +dvi-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-etc dvi-etc +maybe-dvi-etc: + +dvi-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fastjar dvi-fastjar +maybe-dvi-fastjar: + +dvi-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fileutils dvi-fileutils +maybe-dvi-fileutils: + +dvi-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-findutils dvi-findutils +maybe-dvi-findutils: + +dvi-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-find dvi-find +maybe-dvi-find: + +dvi-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-flex dvi-flex +maybe-dvi-flex: + +dvi-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gas dvi-gas +maybe-dvi-gas: + +dvi-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gawk dvi-gawk +maybe-dvi-gawk: + +dvi-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gettext dvi-gettext +maybe-dvi-gettext: + +dvi-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gnuserv dvi-gnuserv +maybe-dvi-gnuserv: + +dvi-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: + +dvi-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gzip dvi-gzip +maybe-dvi-gzip: + +dvi-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-hello dvi-hello +maybe-dvi-hello: + +dvi-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-indent dvi-indent +maybe-dvi-indent: + +dvi-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-intl dvi-intl +maybe-dvi-intl: + +dvi-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tcl dvi-tcl +maybe-dvi-tcl: + +dvi-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-itcl dvi-itcl +maybe-dvi-itcl: + +dvi-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-ld dvi-ld +maybe-dvi-ld: + +dvi-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libgui dvi-libgui +maybe-dvi-libgui: + +dvi-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libiberty dvi-libiberty +maybe-dvi-libiberty: + +dvi-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtool dvi-libtool +maybe-dvi-libtool: + +dvi-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-m4 dvi-m4 +maybe-dvi-m4: + +dvi-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-make dvi-make +maybe-dvi-make: + +dvi-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-mmalloc dvi-mmalloc +maybe-dvi-mmalloc: + +dvi-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-patch dvi-patch +maybe-dvi-patch: + +dvi-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-perl dvi-perl +maybe-dvi-perl: + +dvi-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-prms dvi-prms +maybe-dvi-prms: + +dvi-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-rcs dvi-rcs +maybe-dvi-rcs: + +dvi-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-readline dvi-readline +maybe-dvi-readline: + +dvi-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-release dvi-release +maybe-dvi-release: + +dvi-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-recode dvi-recode +maybe-dvi-recode: + +dvi-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sed dvi-sed +maybe-dvi-sed: + +dvi-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-send-pr dvi-send-pr +maybe-dvi-send-pr: + +dvi-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-shellutils dvi-shellutils +maybe-dvi-shellutils: + +dvi-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sid dvi-sid +maybe-dvi-sid: + +dvi-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sim dvi-sim +maybe-dvi-sim: + +dvi-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tar dvi-tar +maybe-dvi-tar: + +dvi-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-texinfo dvi-texinfo +maybe-dvi-texinfo: + +dvi-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-textutils dvi-textutils +maybe-dvi-textutils: + +dvi-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-time dvi-time +maybe-dvi-time: + +dvi-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-uudecode dvi-uudecode +maybe-dvi-uudecode: + +dvi-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-wdiff dvi-wdiff +maybe-dvi-wdiff: + +dvi-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zip dvi-zip +maybe-dvi-zip: + +dvi-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zlib dvi-zlib +maybe-dvi-zlib: + +dvi-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gdb dvi-gdb +maybe-dvi-gdb: + +dvi-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-expect dvi-expect +maybe-dvi-expect: + +dvi-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-guile dvi-guile +maybe-dvi-guile: + +dvi-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tk dvi-tk +maybe-dvi-tk: + +dvi-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tix dvi-tix +maybe-dvi-tix: + +dvi-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtermcap dvi-libtermcap +maybe-dvi-libtermcap: + +dvi-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-utils dvi-utils +maybe-dvi-utils: + +dvi-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3 +maybe-dvi-target-libstdc++-v3: + +dvi-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-newlib dvi-target-newlib +maybe-dvi-target-newlib: + +dvi-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c +maybe-dvi-target-libf2c: + +dvi-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc +maybe-dvi-target-libobjc: + +dvi-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap +maybe-dvi-target-libtermcap: + +dvi-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-winsup dvi-target-winsup +maybe-dvi-target-winsup: + +dvi-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss +maybe-dvi-target-libgloss: + +dvi-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty +maybe-dvi-target-libiberty: + +dvi-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-gperf dvi-target-gperf +maybe-dvi-target-gperf: + +dvi-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-examples dvi-target-examples +maybe-dvi-target-examples: + +dvi-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libffi dvi-target-libffi +maybe-dvi-target-libffi: + +dvi-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libjava dvi-target-libjava +maybe-dvi-target-libjava: + +dvi-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-zlib dvi-target-zlib +maybe-dvi-target-zlib: + +dvi-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc +maybe-dvi-target-boehm-gc: + +dvi-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads +maybe-dvi-target-qthreads: + +dvi-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-rda dvi-target-rda +maybe-dvi-target-rda: + +dvi-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libada dvi-target-libada +maybe-dvi-target-libada: + +dvi-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +.PHONY: do-TAGS +do-TAGS: TAGS-host TAGS-target + +.PHONY: TAGS-host +TAGS-host: maybe-TAGS-gcc \ + maybe-TAGS-ash \ + maybe-TAGS-autoconf \ + maybe-TAGS-automake \ + maybe-TAGS-bash \ + maybe-TAGS-bfd \ + maybe-TAGS-opcodes \ + maybe-TAGS-binutils \ + maybe-TAGS-bison \ + maybe-TAGS-byacc \ + maybe-TAGS-bzip2 \ + maybe-TAGS-dejagnu \ + maybe-TAGS-diff \ + maybe-TAGS-dosutils \ + maybe-TAGS-etc \ + maybe-TAGS-fastjar \ + maybe-TAGS-fileutils \ + maybe-TAGS-findutils \ + maybe-TAGS-find \ + maybe-TAGS-flex \ + maybe-TAGS-gas \ + maybe-TAGS-gawk \ + maybe-TAGS-gettext \ + maybe-TAGS-gnuserv \ + maybe-TAGS-gprof \ + maybe-TAGS-gzip \ + maybe-TAGS-hello \ + maybe-TAGS-indent \ + maybe-TAGS-intl \ + maybe-TAGS-tcl \ + maybe-TAGS-itcl \ + maybe-TAGS-ld \ + maybe-TAGS-libgui \ + maybe-TAGS-libiberty \ + maybe-TAGS-libtool \ + maybe-TAGS-m4 \ + maybe-TAGS-make \ + maybe-TAGS-mmalloc \ + maybe-TAGS-patch \ + maybe-TAGS-perl \ + maybe-TAGS-prms \ + maybe-TAGS-rcs \ + maybe-TAGS-readline \ + maybe-TAGS-release \ + maybe-TAGS-recode \ + maybe-TAGS-sed \ + maybe-TAGS-send-pr \ + maybe-TAGS-shellutils \ + maybe-TAGS-sid \ + maybe-TAGS-sim \ + maybe-TAGS-tar \ + maybe-TAGS-texinfo \ + maybe-TAGS-textutils \ + maybe-TAGS-time \ + maybe-TAGS-uudecode \ + maybe-TAGS-wdiff \ + maybe-TAGS-zip \ + maybe-TAGS-zlib \ + maybe-TAGS-gdb \ + maybe-TAGS-expect \ + maybe-TAGS-guile \ + maybe-TAGS-tk \ + maybe-TAGS-tix \ + maybe-TAGS-libtermcap \ + maybe-TAGS-utils + +.PHONY: TAGS-target +TAGS-target: \ + maybe-TAGS-target-libstdc++-v3 \ + maybe-TAGS-target-newlib \ + maybe-TAGS-target-libf2c \ + maybe-TAGS-target-libobjc \ + maybe-TAGS-target-libtermcap \ + maybe-TAGS-target-winsup \ + maybe-TAGS-target-libgloss \ + maybe-TAGS-target-libiberty \ + maybe-TAGS-target-gperf \ + maybe-TAGS-target-examples \ + maybe-TAGS-target-libffi \ + maybe-TAGS-target-libjava \ + maybe-TAGS-target-zlib \ + maybe-TAGS-target-boehm-gc \ + maybe-TAGS-target-qthreads \ + maybe-TAGS-target-rda \ + maybe-TAGS-target-libada + +# GCC, the eternal special case +.PHONY: maybe-TAGS-gcc TAGS-gcc +maybe-TAGS-gcc: +TAGS-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-TAGS-ash TAGS-ash +maybe-TAGS-ash: + +TAGS-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-autoconf TAGS-autoconf +maybe-TAGS-autoconf: + +TAGS-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-automake TAGS-automake +maybe-TAGS-automake: + +TAGS-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bash TAGS-bash +maybe-TAGS-bash: + +TAGS-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bfd TAGS-bfd +maybe-TAGS-bfd: + +TAGS-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-opcodes TAGS-opcodes +maybe-TAGS-opcodes: + +TAGS-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-binutils TAGS-binutils +maybe-TAGS-binutils: + +TAGS-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bison TAGS-bison +maybe-TAGS-bison: + +TAGS-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-byacc TAGS-byacc +maybe-TAGS-byacc: + +TAGS-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bzip2 TAGS-bzip2 +maybe-TAGS-bzip2: + +TAGS-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu +maybe-TAGS-dejagnu: + +TAGS-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-diff TAGS-diff +maybe-TAGS-diff: + +TAGS-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dosutils TAGS-dosutils +maybe-TAGS-dosutils: + +TAGS-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-etc TAGS-etc +maybe-TAGS-etc: + +TAGS-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fastjar TAGS-fastjar +maybe-TAGS-fastjar: + +TAGS-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fileutils TAGS-fileutils +maybe-TAGS-fileutils: + +TAGS-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-findutils TAGS-findutils +maybe-TAGS-findutils: + +TAGS-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-find TAGS-find +maybe-TAGS-find: + +TAGS-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-flex TAGS-flex +maybe-TAGS-flex: + +TAGS-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gas TAGS-gas +maybe-TAGS-gas: + +TAGS-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gawk TAGS-gawk +maybe-TAGS-gawk: + +TAGS-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gettext TAGS-gettext +maybe-TAGS-gettext: + +TAGS-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv +maybe-TAGS-gnuserv: + +TAGS-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: + +TAGS-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gzip TAGS-gzip +maybe-TAGS-gzip: + +TAGS-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-hello TAGS-hello +maybe-TAGS-hello: + +TAGS-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-indent TAGS-indent +maybe-TAGS-indent: + +TAGS-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-intl TAGS-intl +maybe-TAGS-intl: + +TAGS-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tcl TAGS-tcl +maybe-TAGS-tcl: + +TAGS-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-itcl TAGS-itcl +maybe-TAGS-itcl: + +TAGS-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-ld TAGS-ld +maybe-TAGS-ld: + +TAGS-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libgui TAGS-libgui +maybe-TAGS-libgui: + +TAGS-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libiberty TAGS-libiberty +maybe-TAGS-libiberty: + +TAGS-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtool TAGS-libtool +maybe-TAGS-libtool: + +TAGS-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-m4 TAGS-m4 +maybe-TAGS-m4: + +TAGS-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-make TAGS-make +maybe-TAGS-make: + +TAGS-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc +maybe-TAGS-mmalloc: + +TAGS-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-patch TAGS-patch +maybe-TAGS-patch: + +TAGS-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-perl TAGS-perl +maybe-TAGS-perl: + +TAGS-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-prms TAGS-prms +maybe-TAGS-prms: + +TAGS-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-rcs TAGS-rcs +maybe-TAGS-rcs: + +TAGS-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-readline TAGS-readline +maybe-TAGS-readline: + +TAGS-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-release TAGS-release +maybe-TAGS-release: + +TAGS-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-recode TAGS-recode +maybe-TAGS-recode: + +TAGS-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sed TAGS-sed +maybe-TAGS-sed: + +TAGS-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-send-pr TAGS-send-pr +maybe-TAGS-send-pr: + +TAGS-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-shellutils TAGS-shellutils +maybe-TAGS-shellutils: + +TAGS-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sid TAGS-sid +maybe-TAGS-sid: + +TAGS-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sim TAGS-sim +maybe-TAGS-sim: + +TAGS-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tar TAGS-tar +maybe-TAGS-tar: + +TAGS-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-texinfo TAGS-texinfo +maybe-TAGS-texinfo: + +TAGS-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-textutils TAGS-textutils +maybe-TAGS-textutils: + +TAGS-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-time TAGS-time +maybe-TAGS-time: + +TAGS-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-uudecode TAGS-uudecode +maybe-TAGS-uudecode: + +TAGS-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-wdiff TAGS-wdiff +maybe-TAGS-wdiff: + +TAGS-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zip TAGS-zip +maybe-TAGS-zip: + +TAGS-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zlib TAGS-zlib +maybe-TAGS-zlib: + +TAGS-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gdb TAGS-gdb +maybe-TAGS-gdb: + +TAGS-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-expect TAGS-expect +maybe-TAGS-expect: + +TAGS-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-guile TAGS-guile +maybe-TAGS-guile: + +TAGS-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tk TAGS-tk +maybe-TAGS-tk: + +TAGS-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tix TAGS-tix +maybe-TAGS-tix: + +TAGS-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap +maybe-TAGS-libtermcap: + +TAGS-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-utils TAGS-utils +maybe-TAGS-utils: + +TAGS-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3 +maybe-TAGS-target-libstdc++-v3: + +TAGS-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib +maybe-TAGS-target-newlib: + +TAGS-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c +maybe-TAGS-target-libf2c: + +TAGS-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc +maybe-TAGS-target-libobjc: + +TAGS-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap +maybe-TAGS-target-libtermcap: + +TAGS-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup +maybe-TAGS-target-winsup: + +TAGS-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss +maybe-TAGS-target-libgloss: + +TAGS-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty +maybe-TAGS-target-libiberty: + +TAGS-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf +maybe-TAGS-target-gperf: + +TAGS-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-examples TAGS-target-examples +maybe-TAGS-target-examples: + +TAGS-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi +maybe-TAGS-target-libffi: + +TAGS-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava +maybe-TAGS-target-libjava: + +TAGS-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib +maybe-TAGS-target-zlib: + +TAGS-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc +maybe-TAGS-target-boehm-gc: + +TAGS-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads +maybe-TAGS-target-qthreads: + +TAGS-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-rda TAGS-target-rda +maybe-TAGS-target-rda: + +TAGS-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libada TAGS-target-libada +maybe-TAGS-target-libada: + +TAGS-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +.PHONY: do-install-info +do-install-info: install-info-host install-info-target + +.PHONY: install-info-host +install-info-host: maybe-install-info-gcc \ + maybe-install-info-ash \ + maybe-install-info-autoconf \ + maybe-install-info-automake \ + maybe-install-info-bash \ + maybe-install-info-bfd \ + maybe-install-info-opcodes \ + maybe-install-info-binutils \ + maybe-install-info-bison \ + maybe-install-info-byacc \ + maybe-install-info-bzip2 \ + maybe-install-info-dejagnu \ + maybe-install-info-diff \ + maybe-install-info-dosutils \ + maybe-install-info-etc \ + maybe-install-info-fastjar \ + maybe-install-info-fileutils \ + maybe-install-info-findutils \ + maybe-install-info-find \ + maybe-install-info-flex \ + maybe-install-info-gas \ + maybe-install-info-gawk \ + maybe-install-info-gettext \ + maybe-install-info-gnuserv \ + maybe-install-info-gprof \ + maybe-install-info-gzip \ + maybe-install-info-hello \ + maybe-install-info-indent \ + maybe-install-info-intl \ + maybe-install-info-tcl \ + maybe-install-info-itcl \ + maybe-install-info-ld \ + maybe-install-info-libgui \ + maybe-install-info-libiberty \ + maybe-install-info-libtool \ + maybe-install-info-m4 \ + maybe-install-info-make \ + maybe-install-info-mmalloc \ + maybe-install-info-patch \ + maybe-install-info-perl \ + maybe-install-info-prms \ + maybe-install-info-rcs \ + maybe-install-info-readline \ + maybe-install-info-release \ + maybe-install-info-recode \ + maybe-install-info-sed \ + maybe-install-info-send-pr \ + maybe-install-info-shellutils \ + maybe-install-info-sid \ + maybe-install-info-sim \ + maybe-install-info-tar \ + maybe-install-info-texinfo \ + maybe-install-info-textutils \ + maybe-install-info-time \ + maybe-install-info-uudecode \ + maybe-install-info-wdiff \ + maybe-install-info-zip \ + maybe-install-info-zlib \ + maybe-install-info-gdb \ + maybe-install-info-expect \ + maybe-install-info-guile \ + maybe-install-info-tk \ + maybe-install-info-tix \ + maybe-install-info-libtermcap \ + maybe-install-info-utils + +.PHONY: install-info-target +install-info-target: \ + maybe-install-info-target-libstdc++-v3 \ + maybe-install-info-target-newlib \ + maybe-install-info-target-libf2c \ + maybe-install-info-target-libobjc \ + maybe-install-info-target-libtermcap \ + maybe-install-info-target-winsup \ + maybe-install-info-target-libgloss \ + maybe-install-info-target-libiberty \ + maybe-install-info-target-gperf \ + maybe-install-info-target-examples \ + maybe-install-info-target-libffi \ + maybe-install-info-target-libjava \ + maybe-install-info-target-zlib \ + maybe-install-info-target-boehm-gc \ + maybe-install-info-target-qthreads \ + maybe-install-info-target-rda \ + maybe-install-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-install-info-gcc install-info-gcc +maybe-install-info-gcc: +install-info-gcc: \ + configure-gcc \ + info-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-install-info-ash install-info-ash +maybe-install-info-ash: + +install-info-ash: \ + configure-ash \ + info-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-autoconf install-info-autoconf +maybe-install-info-autoconf: + +install-info-autoconf: \ + configure-autoconf \ + info-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-automake install-info-automake +maybe-install-info-automake: + +install-info-automake: \ + configure-automake \ + info-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bash install-info-bash +maybe-install-info-bash: + +install-info-bash: \ + configure-bash \ + info-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bfd install-info-bfd +maybe-install-info-bfd: + +install-info-bfd: \ + configure-bfd \ + info-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-opcodes install-info-opcodes +maybe-install-info-opcodes: + +install-info-opcodes: \ + configure-opcodes \ + info-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-binutils install-info-binutils +maybe-install-info-binutils: + +install-info-binutils: \ + configure-binutils \ + info-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bison install-info-bison +maybe-install-info-bison: + +install-info-bison: \ + configure-bison \ + info-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-byacc install-info-byacc +maybe-install-info-byacc: + +install-info-byacc: \ + configure-byacc \ + info-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bzip2 install-info-bzip2 +maybe-install-info-bzip2: + +install-info-bzip2: \ + configure-bzip2 \ + info-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dejagnu install-info-dejagnu +maybe-install-info-dejagnu: + +install-info-dejagnu: \ + configure-dejagnu \ + info-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-diff install-info-diff +maybe-install-info-diff: + +install-info-diff: \ + configure-diff \ + info-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dosutils install-info-dosutils +maybe-install-info-dosutils: + +install-info-dosutils: \ + configure-dosutils \ + info-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-etc install-info-etc +maybe-install-info-etc: + +install-info-etc: \ + configure-etc \ + info-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fastjar install-info-fastjar +maybe-install-info-fastjar: + +install-info-fastjar: \ + configure-fastjar \ + info-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fileutils install-info-fileutils +maybe-install-info-fileutils: + +install-info-fileutils: \ + configure-fileutils \ + info-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-findutils install-info-findutils +maybe-install-info-findutils: + +install-info-findutils: \ + configure-findutils \ + info-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-find install-info-find +maybe-install-info-find: + +install-info-find: \ + configure-find \ + info-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-flex install-info-flex +maybe-install-info-flex: + +install-info-flex: \ + configure-flex \ + info-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gas install-info-gas +maybe-install-info-gas: + +install-info-gas: \ + configure-gas \ + info-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gawk install-info-gawk +maybe-install-info-gawk: + +install-info-gawk: \ + configure-gawk \ + info-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gettext install-info-gettext +maybe-install-info-gettext: + +install-info-gettext: \ + configure-gettext \ + info-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gnuserv install-info-gnuserv +maybe-install-info-gnuserv: + +install-info-gnuserv: \ + configure-gnuserv \ + info-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: + +install-info-gprof: \ + configure-gprof \ + info-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gzip install-info-gzip +maybe-install-info-gzip: + +install-info-gzip: \ + configure-gzip \ + info-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-hello install-info-hello +maybe-install-info-hello: + +install-info-hello: \ + configure-hello \ + info-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-indent install-info-indent +maybe-install-info-indent: + +install-info-indent: \ + configure-indent \ + info-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-intl install-info-intl +maybe-install-info-intl: + +install-info-intl: \ + configure-intl \ + info-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tcl install-info-tcl +maybe-install-info-tcl: + +install-info-tcl: \ + configure-tcl \ + info-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-itcl install-info-itcl +maybe-install-info-itcl: + +install-info-itcl: \ + configure-itcl \ + info-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-ld install-info-ld +maybe-install-info-ld: + +install-info-ld: \ + configure-ld \ + info-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libgui install-info-libgui +maybe-install-info-libgui: + +install-info-libgui: \ + configure-libgui \ + info-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libiberty install-info-libiberty +maybe-install-info-libiberty: + +install-info-libiberty: \ + configure-libiberty \ + info-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtool install-info-libtool +maybe-install-info-libtool: + +install-info-libtool: \ + configure-libtool \ + info-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-m4 install-info-m4 +maybe-install-info-m4: + +install-info-m4: \ + configure-m4 \ + info-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-make install-info-make +maybe-install-info-make: + +install-info-make: \ + configure-make \ + info-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-mmalloc install-info-mmalloc +maybe-install-info-mmalloc: + +install-info-mmalloc: \ + configure-mmalloc \ + info-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-patch install-info-patch +maybe-install-info-patch: + +install-info-patch: \ + configure-patch \ + info-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-perl install-info-perl +maybe-install-info-perl: + +install-info-perl: \ + configure-perl \ + info-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-prms install-info-prms +maybe-install-info-prms: + +install-info-prms: \ + configure-prms \ + info-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-rcs install-info-rcs +maybe-install-info-rcs: + +install-info-rcs: \ + configure-rcs \ + info-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-readline install-info-readline +maybe-install-info-readline: + +install-info-readline: \ + configure-readline \ + info-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-release install-info-release +maybe-install-info-release: + +install-info-release: \ + configure-release \ + info-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-recode install-info-recode +maybe-install-info-recode: + +install-info-recode: \ + configure-recode \ + info-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sed install-info-sed +maybe-install-info-sed: + +install-info-sed: \ + configure-sed \ + info-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-send-pr install-info-send-pr +maybe-install-info-send-pr: + +install-info-send-pr: \ + configure-send-pr \ + info-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-shellutils install-info-shellutils +maybe-install-info-shellutils: + +install-info-shellutils: \ + configure-shellutils \ + info-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sid install-info-sid +maybe-install-info-sid: + +install-info-sid: \ + configure-sid \ + info-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sim install-info-sim +maybe-install-info-sim: + +install-info-sim: \ + configure-sim \ + info-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tar install-info-tar +maybe-install-info-tar: + +install-info-tar: \ + configure-tar \ + info-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-texinfo install-info-texinfo +maybe-install-info-texinfo: + +install-info-texinfo: \ + configure-texinfo \ + info-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-textutils install-info-textutils +maybe-install-info-textutils: + +install-info-textutils: \ + configure-textutils \ + info-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-time install-info-time +maybe-install-info-time: + +install-info-time: \ + configure-time \ + info-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-uudecode install-info-uudecode +maybe-install-info-uudecode: + +install-info-uudecode: \ + configure-uudecode \ + info-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-wdiff install-info-wdiff +maybe-install-info-wdiff: + +install-info-wdiff: \ + configure-wdiff \ + info-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zip install-info-zip +maybe-install-info-zip: + +install-info-zip: \ + configure-zip \ + info-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zlib install-info-zlib +maybe-install-info-zlib: + +install-info-zlib: \ + configure-zlib \ + info-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gdb install-info-gdb +maybe-install-info-gdb: + +install-info-gdb: \ + configure-gdb \ + info-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-expect install-info-expect +maybe-install-info-expect: + +install-info-expect: \ + configure-expect \ + info-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-guile install-info-guile +maybe-install-info-guile: + +install-info-guile: \ + configure-guile \ + info-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tk install-info-tk +maybe-install-info-tk: + +install-info-tk: \ + configure-tk \ + info-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tix install-info-tix +maybe-install-info-tix: + +install-info-tix: \ + configure-tix \ + info-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtermcap install-info-libtermcap +maybe-install-info-libtermcap: + +install-info-libtermcap: \ + configure-libtermcap \ + info-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-utils install-info-utils +maybe-install-info-utils: + +install-info-utils: \ + configure-utils \ + info-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3 +maybe-install-info-target-libstdc++-v3: + +install-info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 \ + info-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-newlib install-info-target-newlib +maybe-install-info-target-newlib: + +install-info-target-newlib: \ + configure-target-newlib \ + info-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c +maybe-install-info-target-libf2c: + +install-info-target-libf2c: \ + configure-target-libf2c \ + info-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc +maybe-install-info-target-libobjc: + +install-info-target-libobjc: \ + configure-target-libobjc \ + info-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap +maybe-install-info-target-libtermcap: + +install-info-target-libtermcap: \ + configure-target-libtermcap \ + info-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-winsup install-info-target-winsup +maybe-install-info-target-winsup: + +install-info-target-winsup: \ + configure-target-winsup \ + info-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss +maybe-install-info-target-libgloss: + +install-info-target-libgloss: \ + configure-target-libgloss \ + info-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty +maybe-install-info-target-libiberty: + +install-info-target-libiberty: \ + configure-target-libiberty \ + info-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-gperf install-info-target-gperf +maybe-install-info-target-gperf: + +install-info-target-gperf: \ + configure-target-gperf \ + info-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-examples install-info-target-examples +maybe-install-info-target-examples: + +install-info-target-examples: \ + configure-target-examples \ + info-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libffi install-info-target-libffi +maybe-install-info-target-libffi: + +install-info-target-libffi: \ + configure-target-libffi \ + info-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libjava install-info-target-libjava +maybe-install-info-target-libjava: + +install-info-target-libjava: \ + configure-target-libjava \ + info-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-zlib install-info-target-zlib +maybe-install-info-target-zlib: + +install-info-target-zlib: \ + configure-target-zlib \ + info-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc +maybe-install-info-target-boehm-gc: + +install-info-target-boehm-gc: \ + configure-target-boehm-gc \ + info-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads +maybe-install-info-target-qthreads: + +install-info-target-qthreads: \ + configure-target-qthreads \ + info-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-rda install-info-target-rda +maybe-install-info-target-rda: + +install-info-target-rda: \ + configure-target-rda \ + info-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libada install-info-target-libada +maybe-install-info-target-libada: + +install-info-target-libada: \ + configure-target-libada \ + info-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +.PHONY: do-installcheck +do-installcheck: installcheck-host installcheck-target + +.PHONY: installcheck-host +installcheck-host: maybe-installcheck-gcc \ + maybe-installcheck-ash \ + maybe-installcheck-autoconf \ + maybe-installcheck-automake \ + maybe-installcheck-bash \ + maybe-installcheck-bfd \ + maybe-installcheck-opcodes \ + maybe-installcheck-binutils \ + maybe-installcheck-bison \ + maybe-installcheck-byacc \ + maybe-installcheck-bzip2 \ + maybe-installcheck-dejagnu \ + maybe-installcheck-diff \ + maybe-installcheck-dosutils \ + maybe-installcheck-etc \ + maybe-installcheck-fastjar \ + maybe-installcheck-fileutils \ + maybe-installcheck-findutils \ + maybe-installcheck-find \ + maybe-installcheck-flex \ + maybe-installcheck-gas \ + maybe-installcheck-gawk \ + maybe-installcheck-gettext \ + maybe-installcheck-gnuserv \ + maybe-installcheck-gprof \ + maybe-installcheck-gzip \ + maybe-installcheck-hello \ + maybe-installcheck-indent \ + maybe-installcheck-intl \ + maybe-installcheck-tcl \ + maybe-installcheck-itcl \ + maybe-installcheck-ld \ + maybe-installcheck-libgui \ + maybe-installcheck-libiberty \ + maybe-installcheck-libtool \ + maybe-installcheck-m4 \ + maybe-installcheck-make \ + maybe-installcheck-mmalloc \ + maybe-installcheck-patch \ + maybe-installcheck-perl \ + maybe-installcheck-prms \ + maybe-installcheck-rcs \ + maybe-installcheck-readline \ + maybe-installcheck-release \ + maybe-installcheck-recode \ + maybe-installcheck-sed \ + maybe-installcheck-send-pr \ + maybe-installcheck-shellutils \ + maybe-installcheck-sid \ + maybe-installcheck-sim \ + maybe-installcheck-tar \ + maybe-installcheck-texinfo \ + maybe-installcheck-textutils \ + maybe-installcheck-time \ + maybe-installcheck-uudecode \ + maybe-installcheck-wdiff \ + maybe-installcheck-zip \ + maybe-installcheck-zlib \ + maybe-installcheck-gdb \ + maybe-installcheck-expect \ + maybe-installcheck-guile \ + maybe-installcheck-tk \ + maybe-installcheck-tix \ + maybe-installcheck-libtermcap \ + maybe-installcheck-utils + +.PHONY: installcheck-target +installcheck-target: \ + maybe-installcheck-target-libstdc++-v3 \ + maybe-installcheck-target-newlib \ + maybe-installcheck-target-libf2c \ + maybe-installcheck-target-libobjc \ + maybe-installcheck-target-libtermcap \ + maybe-installcheck-target-winsup \ + maybe-installcheck-target-libgloss \ + maybe-installcheck-target-libiberty \ + maybe-installcheck-target-gperf \ + maybe-installcheck-target-examples \ + maybe-installcheck-target-libffi \ + maybe-installcheck-target-libjava \ + maybe-installcheck-target-zlib \ + maybe-installcheck-target-boehm-gc \ + maybe-installcheck-target-qthreads \ + maybe-installcheck-target-rda \ + maybe-installcheck-target-libada + +# GCC, the eternal special case +.PHONY: maybe-installcheck-gcc installcheck-gcc +maybe-installcheck-gcc: +installcheck-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-installcheck-ash installcheck-ash +maybe-installcheck-ash: + +installcheck-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-autoconf installcheck-autoconf +maybe-installcheck-autoconf: + +installcheck-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-automake installcheck-automake +maybe-installcheck-automake: + +installcheck-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bash installcheck-bash +maybe-installcheck-bash: + +installcheck-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bfd installcheck-bfd +maybe-installcheck-bfd: + +installcheck-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-opcodes installcheck-opcodes +maybe-installcheck-opcodes: + +installcheck-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-binutils installcheck-binutils +maybe-installcheck-binutils: + +installcheck-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bison installcheck-bison +maybe-installcheck-bison: + +installcheck-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-byacc installcheck-byacc +maybe-installcheck-byacc: + +installcheck-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bzip2 installcheck-bzip2 +maybe-installcheck-bzip2: + +installcheck-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu +maybe-installcheck-dejagnu: + +installcheck-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-diff installcheck-diff +maybe-installcheck-diff: + +installcheck-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dosutils installcheck-dosutils +maybe-installcheck-dosutils: + +installcheck-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-etc installcheck-etc +maybe-installcheck-etc: + +installcheck-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fastjar installcheck-fastjar +maybe-installcheck-fastjar: + +installcheck-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fileutils installcheck-fileutils +maybe-installcheck-fileutils: + +installcheck-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-findutils installcheck-findutils +maybe-installcheck-findutils: + +installcheck-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-find installcheck-find +maybe-installcheck-find: + +installcheck-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-flex installcheck-flex +maybe-installcheck-flex: + +installcheck-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gas installcheck-gas +maybe-installcheck-gas: + +installcheck-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gawk installcheck-gawk +maybe-installcheck-gawk: + +installcheck-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gettext installcheck-gettext +maybe-installcheck-gettext: + +installcheck-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv +maybe-installcheck-gnuserv: + +installcheck-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: + +installcheck-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gzip installcheck-gzip +maybe-installcheck-gzip: + +installcheck-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-hello installcheck-hello +maybe-installcheck-hello: + +installcheck-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-indent installcheck-indent +maybe-installcheck-indent: + +installcheck-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-intl installcheck-intl +maybe-installcheck-intl: + +installcheck-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tcl installcheck-tcl +maybe-installcheck-tcl: + +installcheck-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-itcl installcheck-itcl +maybe-installcheck-itcl: + +installcheck-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-ld installcheck-ld +maybe-installcheck-ld: + +installcheck-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libgui installcheck-libgui +maybe-installcheck-libgui: + +installcheck-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libiberty installcheck-libiberty +maybe-installcheck-libiberty: + +installcheck-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtool installcheck-libtool +maybe-installcheck-libtool: + +installcheck-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-m4 installcheck-m4 +maybe-installcheck-m4: + +installcheck-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-make installcheck-make +maybe-installcheck-make: + +installcheck-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc +maybe-installcheck-mmalloc: + +installcheck-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-patch installcheck-patch +maybe-installcheck-patch: + +installcheck-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-perl installcheck-perl +maybe-installcheck-perl: + +installcheck-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-prms installcheck-prms +maybe-installcheck-prms: + +installcheck-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-rcs installcheck-rcs +maybe-installcheck-rcs: + +installcheck-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-readline installcheck-readline +maybe-installcheck-readline: + +installcheck-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-release installcheck-release +maybe-installcheck-release: + +installcheck-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-recode installcheck-recode +maybe-installcheck-recode: + +installcheck-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sed installcheck-sed +maybe-installcheck-sed: + +installcheck-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-send-pr installcheck-send-pr +maybe-installcheck-send-pr: + +installcheck-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-shellutils installcheck-shellutils +maybe-installcheck-shellutils: + +installcheck-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sid installcheck-sid +maybe-installcheck-sid: + +installcheck-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sim installcheck-sim +maybe-installcheck-sim: + +installcheck-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tar installcheck-tar +maybe-installcheck-tar: + +installcheck-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-texinfo installcheck-texinfo +maybe-installcheck-texinfo: + +installcheck-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-textutils installcheck-textutils +maybe-installcheck-textutils: + +installcheck-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-time installcheck-time +maybe-installcheck-time: + +installcheck-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-uudecode installcheck-uudecode +maybe-installcheck-uudecode: + +installcheck-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-wdiff installcheck-wdiff +maybe-installcheck-wdiff: + +installcheck-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zip installcheck-zip +maybe-installcheck-zip: + +installcheck-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zlib installcheck-zlib +maybe-installcheck-zlib: + +installcheck-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gdb installcheck-gdb +maybe-installcheck-gdb: + +installcheck-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-expect installcheck-expect +maybe-installcheck-expect: + +installcheck-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-guile installcheck-guile +maybe-installcheck-guile: + +installcheck-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tk installcheck-tk +maybe-installcheck-tk: + +installcheck-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tix installcheck-tix +maybe-installcheck-tix: + +installcheck-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap +maybe-installcheck-libtermcap: + +installcheck-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-utils installcheck-utils +maybe-installcheck-utils: + +installcheck-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3 +maybe-installcheck-target-libstdc++-v3: + +installcheck-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib +maybe-installcheck-target-newlib: + +installcheck-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c +maybe-installcheck-target-libf2c: + +installcheck-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc +maybe-installcheck-target-libobjc: + +installcheck-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap +maybe-installcheck-target-libtermcap: + +installcheck-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup +maybe-installcheck-target-winsup: + +installcheck-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss +maybe-installcheck-target-libgloss: + +installcheck-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty +maybe-installcheck-target-libiberty: + +installcheck-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf +maybe-installcheck-target-gperf: + +installcheck-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-examples installcheck-target-examples +maybe-installcheck-target-examples: + +installcheck-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi +maybe-installcheck-target-libffi: + +installcheck-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava +maybe-installcheck-target-libjava: + +installcheck-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib +maybe-installcheck-target-zlib: + +installcheck-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc +maybe-installcheck-target-boehm-gc: + +installcheck-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads +maybe-installcheck-target-qthreads: + +installcheck-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-rda installcheck-target-rda +maybe-installcheck-target-rda: + +installcheck-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libada installcheck-target-libada +maybe-installcheck-target-libada: + +installcheck-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +.PHONY: do-mostlyclean +do-mostlyclean: mostlyclean-host mostlyclean-target + +.PHONY: mostlyclean-host +mostlyclean-host: maybe-mostlyclean-gcc \ + maybe-mostlyclean-ash \ + maybe-mostlyclean-autoconf \ + maybe-mostlyclean-automake \ + maybe-mostlyclean-bash \ + maybe-mostlyclean-bfd \ + maybe-mostlyclean-opcodes \ + maybe-mostlyclean-binutils \ + maybe-mostlyclean-bison \ + maybe-mostlyclean-byacc \ + maybe-mostlyclean-bzip2 \ + maybe-mostlyclean-dejagnu \ + maybe-mostlyclean-diff \ + maybe-mostlyclean-dosutils \ + maybe-mostlyclean-etc \ + maybe-mostlyclean-fastjar \ + maybe-mostlyclean-fileutils \ + maybe-mostlyclean-findutils \ + maybe-mostlyclean-find \ + maybe-mostlyclean-flex \ + maybe-mostlyclean-gas \ + maybe-mostlyclean-gawk \ + maybe-mostlyclean-gettext \ + maybe-mostlyclean-gnuserv \ + maybe-mostlyclean-gprof \ + maybe-mostlyclean-gzip \ + maybe-mostlyclean-hello \ + maybe-mostlyclean-indent \ + maybe-mostlyclean-intl \ + maybe-mostlyclean-tcl \ + maybe-mostlyclean-itcl \ + maybe-mostlyclean-ld \ + maybe-mostlyclean-libgui \ + maybe-mostlyclean-libiberty \ + maybe-mostlyclean-libtool \ + maybe-mostlyclean-m4 \ + maybe-mostlyclean-make \ + maybe-mostlyclean-mmalloc \ + maybe-mostlyclean-patch \ + maybe-mostlyclean-perl \ + maybe-mostlyclean-prms \ + maybe-mostlyclean-rcs \ + maybe-mostlyclean-readline \ + maybe-mostlyclean-release \ + maybe-mostlyclean-recode \ + maybe-mostlyclean-sed \ + maybe-mostlyclean-send-pr \ + maybe-mostlyclean-shellutils \ + maybe-mostlyclean-sid \ + maybe-mostlyclean-sim \ + maybe-mostlyclean-tar \ + maybe-mostlyclean-texinfo \ + maybe-mostlyclean-textutils \ + maybe-mostlyclean-time \ + maybe-mostlyclean-uudecode \ + maybe-mostlyclean-wdiff \ + maybe-mostlyclean-zip \ + maybe-mostlyclean-zlib \ + maybe-mostlyclean-gdb \ + maybe-mostlyclean-expect \ + maybe-mostlyclean-guile \ + maybe-mostlyclean-tk \ + maybe-mostlyclean-tix \ + maybe-mostlyclean-libtermcap \ + maybe-mostlyclean-utils + +.PHONY: mostlyclean-target +mostlyclean-target: \ + maybe-mostlyclean-target-libstdc++-v3 \ + maybe-mostlyclean-target-newlib \ + maybe-mostlyclean-target-libf2c \ + maybe-mostlyclean-target-libobjc \ + maybe-mostlyclean-target-libtermcap \ + maybe-mostlyclean-target-winsup \ + maybe-mostlyclean-target-libgloss \ + maybe-mostlyclean-target-libiberty \ + maybe-mostlyclean-target-gperf \ + maybe-mostlyclean-target-examples \ + maybe-mostlyclean-target-libffi \ + maybe-mostlyclean-target-libjava \ + maybe-mostlyclean-target-zlib \ + maybe-mostlyclean-target-boehm-gc \ + maybe-mostlyclean-target-qthreads \ + maybe-mostlyclean-target-rda \ + maybe-mostlyclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc +maybe-mostlyclean-gcc: +mostlyclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-mostlyclean-ash mostlyclean-ash +maybe-mostlyclean-ash: + +mostlyclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf +maybe-mostlyclean-autoconf: + +mostlyclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-automake mostlyclean-automake +maybe-mostlyclean-automake: + +mostlyclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bash mostlyclean-bash +maybe-mostlyclean-bash: + +mostlyclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd +maybe-mostlyclean-bfd: + +mostlyclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes +maybe-mostlyclean-opcodes: + +mostlyclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils +maybe-mostlyclean-binutils: + +mostlyclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bison mostlyclean-bison +maybe-mostlyclean-bison: + +mostlyclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc +maybe-mostlyclean-byacc: + +mostlyclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2 +maybe-mostlyclean-bzip2: + +mostlyclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu +maybe-mostlyclean-dejagnu: + +mostlyclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-diff mostlyclean-diff +maybe-mostlyclean-diff: + +mostlyclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils +maybe-mostlyclean-dosutils: + +mostlyclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-etc mostlyclean-etc +maybe-mostlyclean-etc: + +mostlyclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar +maybe-mostlyclean-fastjar: + +mostlyclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils +maybe-mostlyclean-fileutils: + +mostlyclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils +maybe-mostlyclean-findutils: + +mostlyclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-find mostlyclean-find +maybe-mostlyclean-find: + +mostlyclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-flex mostlyclean-flex +maybe-mostlyclean-flex: + +mostlyclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gas mostlyclean-gas +maybe-mostlyclean-gas: + +mostlyclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk +maybe-mostlyclean-gawk: + +mostlyclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext +maybe-mostlyclean-gettext: + +mostlyclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv +maybe-mostlyclean-gnuserv: + +mostlyclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: + +mostlyclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip +maybe-mostlyclean-gzip: + +mostlyclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-hello mostlyclean-hello +maybe-mostlyclean-hello: + +mostlyclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-indent mostlyclean-indent +maybe-mostlyclean-indent: + +mostlyclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-intl mostlyclean-intl +maybe-mostlyclean-intl: + +mostlyclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl +maybe-mostlyclean-tcl: + +# tcl doesn't support mostlyclean. +mostlyclean-tcl: + + +.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl +maybe-mostlyclean-itcl: + +mostlyclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-ld mostlyclean-ld +maybe-mostlyclean-ld: + +mostlyclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui +maybe-mostlyclean-libgui: + +mostlyclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty +maybe-mostlyclean-libiberty: + +mostlyclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool +maybe-mostlyclean-libtool: + +mostlyclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-m4 mostlyclean-m4 +maybe-mostlyclean-m4: + +mostlyclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-make mostlyclean-make +maybe-mostlyclean-make: + +mostlyclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc +maybe-mostlyclean-mmalloc: + +mostlyclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-patch mostlyclean-patch +maybe-mostlyclean-patch: + +mostlyclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-perl mostlyclean-perl +maybe-mostlyclean-perl: + +mostlyclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-prms mostlyclean-prms +maybe-mostlyclean-prms: + +mostlyclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs +maybe-mostlyclean-rcs: + +mostlyclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-readline mostlyclean-readline +maybe-mostlyclean-readline: + +mostlyclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-release mostlyclean-release +maybe-mostlyclean-release: + +mostlyclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-recode mostlyclean-recode +maybe-mostlyclean-recode: + +mostlyclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sed mostlyclean-sed +maybe-mostlyclean-sed: + +mostlyclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr +maybe-mostlyclean-send-pr: + +mostlyclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils +maybe-mostlyclean-shellutils: + +mostlyclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sid mostlyclean-sid +maybe-mostlyclean-sid: + +mostlyclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sim mostlyclean-sim +maybe-mostlyclean-sim: + +mostlyclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tar mostlyclean-tar +maybe-mostlyclean-tar: + +mostlyclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo +maybe-mostlyclean-texinfo: + +mostlyclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils +maybe-mostlyclean-textutils: + +mostlyclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-time mostlyclean-time +maybe-mostlyclean-time: + +mostlyclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode +maybe-mostlyclean-uudecode: + +mostlyclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff +maybe-mostlyclean-wdiff: + +mostlyclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zip mostlyclean-zip +maybe-mostlyclean-zip: + +mostlyclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib +maybe-mostlyclean-zlib: + +mostlyclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb +maybe-mostlyclean-gdb: + +mostlyclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-expect mostlyclean-expect +maybe-mostlyclean-expect: + +mostlyclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-guile mostlyclean-guile +maybe-mostlyclean-guile: + +mostlyclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tk mostlyclean-tk +maybe-mostlyclean-tk: + +mostlyclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tix mostlyclean-tix +maybe-mostlyclean-tix: + +mostlyclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap +maybe-mostlyclean-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-libtermcap: + + +.PHONY: maybe-mostlyclean-utils mostlyclean-utils +maybe-mostlyclean-utils: + +mostlyclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3 +maybe-mostlyclean-target-libstdc++-v3: + +mostlyclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib +maybe-mostlyclean-target-newlib: + +mostlyclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c +maybe-mostlyclean-target-libf2c: + +mostlyclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc +maybe-mostlyclean-target-libobjc: + +mostlyclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap +maybe-mostlyclean-target-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-target-libtermcap: + + +.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup +maybe-mostlyclean-target-winsup: + +mostlyclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss +maybe-mostlyclean-target-libgloss: + +mostlyclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty +maybe-mostlyclean-target-libiberty: + +mostlyclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf +maybe-mostlyclean-target-gperf: + +mostlyclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples +maybe-mostlyclean-target-examples: + +mostlyclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi +maybe-mostlyclean-target-libffi: + +mostlyclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava +maybe-mostlyclean-target-libjava: + +mostlyclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib +maybe-mostlyclean-target-zlib: + +mostlyclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc +maybe-mostlyclean-target-boehm-gc: + +mostlyclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads +maybe-mostlyclean-target-qthreads: + +mostlyclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda +maybe-mostlyclean-target-rda: + +mostlyclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada +maybe-mostlyclean-target-libada: + +mostlyclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +.PHONY: do-clean +do-clean: clean-host clean-target + +.PHONY: clean-host +clean-host: maybe-clean-gcc \ + maybe-clean-ash \ + maybe-clean-autoconf \ + maybe-clean-automake \ + maybe-clean-bash \ + maybe-clean-bfd \ + maybe-clean-opcodes \ + maybe-clean-binutils \ + maybe-clean-bison \ + maybe-clean-byacc \ + maybe-clean-bzip2 \ + maybe-clean-dejagnu \ + maybe-clean-diff \ + maybe-clean-dosutils \ + maybe-clean-etc \ + maybe-clean-fastjar \ + maybe-clean-fileutils \ + maybe-clean-findutils \ + maybe-clean-find \ + maybe-clean-flex \ + maybe-clean-gas \ + maybe-clean-gawk \ + maybe-clean-gettext \ + maybe-clean-gnuserv \ + maybe-clean-gprof \ + maybe-clean-gzip \ + maybe-clean-hello \ + maybe-clean-indent \ + maybe-clean-intl \ + maybe-clean-tcl \ + maybe-clean-itcl \ + maybe-clean-ld \ + maybe-clean-libgui \ + maybe-clean-libiberty \ + maybe-clean-libtool \ + maybe-clean-m4 \ + maybe-clean-make \ + maybe-clean-mmalloc \ + maybe-clean-patch \ + maybe-clean-perl \ + maybe-clean-prms \ + maybe-clean-rcs \ + maybe-clean-readline \ + maybe-clean-release \ + maybe-clean-recode \ + maybe-clean-sed \ + maybe-clean-send-pr \ + maybe-clean-shellutils \ + maybe-clean-sid \ + maybe-clean-sim \ + maybe-clean-tar \ + maybe-clean-texinfo \ + maybe-clean-textutils \ + maybe-clean-time \ + maybe-clean-uudecode \ + maybe-clean-wdiff \ + maybe-clean-zip \ + maybe-clean-zlib \ + maybe-clean-gdb \ + maybe-clean-expect \ + maybe-clean-guile \ + maybe-clean-tk \ + maybe-clean-tix \ + maybe-clean-libtermcap \ + maybe-clean-utils + +.PHONY: clean-target +clean-target: \ + maybe-clean-target-libstdc++-v3 \ + maybe-clean-target-newlib \ + maybe-clean-target-libf2c \ + maybe-clean-target-libobjc \ + maybe-clean-target-libtermcap \ + maybe-clean-target-winsup \ + maybe-clean-target-libgloss \ + maybe-clean-target-libiberty \ + maybe-clean-target-gperf \ + maybe-clean-target-examples \ + maybe-clean-target-libffi \ + maybe-clean-target-libjava \ + maybe-clean-target-zlib \ + maybe-clean-target-boehm-gc \ + maybe-clean-target-qthreads \ + maybe-clean-target-rda \ + maybe-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-clean-gcc clean-gcc +maybe-clean-gcc: +clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-clean-ash clean-ash +maybe-clean-ash: + +clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-autoconf clean-autoconf +maybe-clean-autoconf: + +clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-automake clean-automake +maybe-clean-automake: + +clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bash clean-bash +maybe-clean-bash: + +clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bfd clean-bfd +maybe-clean-bfd: + +clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-opcodes clean-opcodes +maybe-clean-opcodes: + +clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-binutils clean-binutils +maybe-clean-binutils: + +clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bison clean-bison +maybe-clean-bison: + +clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-byacc clean-byacc +maybe-clean-byacc: + +clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bzip2 clean-bzip2 +maybe-clean-bzip2: + +clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dejagnu clean-dejagnu +maybe-clean-dejagnu: + +clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-diff clean-diff +maybe-clean-diff: + +clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dosutils clean-dosutils +maybe-clean-dosutils: + +clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-etc clean-etc +maybe-clean-etc: + +clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fastjar clean-fastjar +maybe-clean-fastjar: + +clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fileutils clean-fileutils +maybe-clean-fileutils: + +clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-findutils clean-findutils +maybe-clean-findutils: + +clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-find clean-find +maybe-clean-find: + +clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-flex clean-flex +maybe-clean-flex: + +clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gas clean-gas +maybe-clean-gas: + +clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gawk clean-gawk +maybe-clean-gawk: + +clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gettext clean-gettext +maybe-clean-gettext: + +clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gnuserv clean-gnuserv +maybe-clean-gnuserv: + +clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: + +clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gzip clean-gzip +maybe-clean-gzip: + +clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-hello clean-hello +maybe-clean-hello: + +clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-indent clean-indent +maybe-clean-indent: + +clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-intl clean-intl +maybe-clean-intl: + +clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tcl clean-tcl +maybe-clean-tcl: + +clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-itcl clean-itcl +maybe-clean-itcl: + +clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-ld clean-ld +maybe-clean-ld: + +clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libgui clean-libgui +maybe-clean-libgui: + +clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libiberty clean-libiberty +maybe-clean-libiberty: + +clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtool clean-libtool +maybe-clean-libtool: + +clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-m4 clean-m4 +maybe-clean-m4: + +clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-make clean-make +maybe-clean-make: + +clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-mmalloc clean-mmalloc +maybe-clean-mmalloc: + +clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-patch clean-patch +maybe-clean-patch: + +clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-perl clean-perl +maybe-clean-perl: + +clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-prms clean-prms +maybe-clean-prms: + +clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-rcs clean-rcs +maybe-clean-rcs: + +clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-readline clean-readline +maybe-clean-readline: + +clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-release clean-release +maybe-clean-release: + +clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-recode clean-recode +maybe-clean-recode: + +clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sed clean-sed +maybe-clean-sed: + +clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-send-pr clean-send-pr +maybe-clean-send-pr: + +clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-shellutils clean-shellutils +maybe-clean-shellutils: + +clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sid clean-sid +maybe-clean-sid: + +clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sim clean-sim +maybe-clean-sim: + +clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tar clean-tar +maybe-clean-tar: + +clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-texinfo clean-texinfo +maybe-clean-texinfo: + +clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-textutils clean-textutils +maybe-clean-textutils: + +clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-time clean-time +maybe-clean-time: + +clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-uudecode clean-uudecode +maybe-clean-uudecode: + +clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-wdiff clean-wdiff +maybe-clean-wdiff: + +clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zip clean-zip +maybe-clean-zip: + +clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zlib clean-zlib +maybe-clean-zlib: + +clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gdb clean-gdb +maybe-clean-gdb: + +clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-expect clean-expect +maybe-clean-expect: + +clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-guile clean-guile +maybe-clean-guile: + +clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tk clean-tk +maybe-clean-tk: + +clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tix clean-tix +maybe-clean-tix: + +clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtermcap clean-libtermcap +maybe-clean-libtermcap: + +# libtermcap doesn't support clean. +clean-libtermcap: + + +.PHONY: maybe-clean-utils clean-utils +maybe-clean-utils: + +clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3 +maybe-clean-target-libstdc++-v3: + +clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-newlib clean-target-newlib +maybe-clean-target-newlib: + +clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libf2c clean-target-libf2c +maybe-clean-target-libf2c: + +clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libobjc clean-target-libobjc +maybe-clean-target-libobjc: + +clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap +maybe-clean-target-libtermcap: + +# libtermcap doesn't support clean. +clean-target-libtermcap: + + +.PHONY: maybe-clean-target-winsup clean-target-winsup +maybe-clean-target-winsup: + +clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libgloss clean-target-libgloss +maybe-clean-target-libgloss: + +clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libiberty clean-target-libiberty +maybe-clean-target-libiberty: + +clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-gperf clean-target-gperf +maybe-clean-target-gperf: + +clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-examples clean-target-examples +maybe-clean-target-examples: + +clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libffi clean-target-libffi +maybe-clean-target-libffi: + +clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libjava clean-target-libjava +maybe-clean-target-libjava: + +clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-zlib clean-target-zlib +maybe-clean-target-zlib: + +clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc +maybe-clean-target-boehm-gc: + +clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-qthreads clean-target-qthreads +maybe-clean-target-qthreads: + +clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-rda clean-target-rda +maybe-clean-target-rda: + +clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libada clean-target-libada +maybe-clean-target-libada: + +clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +.PHONY: do-distclean +do-distclean: distclean-host distclean-target + +.PHONY: distclean-host +distclean-host: maybe-distclean-gcc \ + maybe-distclean-ash \ + maybe-distclean-autoconf \ + maybe-distclean-automake \ + maybe-distclean-bash \ + maybe-distclean-bfd \ + maybe-distclean-opcodes \ + maybe-distclean-binutils \ + maybe-distclean-bison \ + maybe-distclean-byacc \ + maybe-distclean-bzip2 \ + maybe-distclean-dejagnu \ + maybe-distclean-diff \ + maybe-distclean-dosutils \ + maybe-distclean-etc \ + maybe-distclean-fastjar \ + maybe-distclean-fileutils \ + maybe-distclean-findutils \ + maybe-distclean-find \ + maybe-distclean-flex \ + maybe-distclean-gas \ + maybe-distclean-gawk \ + maybe-distclean-gettext \ + maybe-distclean-gnuserv \ + maybe-distclean-gprof \ + maybe-distclean-gzip \ + maybe-distclean-hello \ + maybe-distclean-indent \ + maybe-distclean-intl \ + maybe-distclean-tcl \ + maybe-distclean-itcl \ + maybe-distclean-ld \ + maybe-distclean-libgui \ + maybe-distclean-libiberty \ + maybe-distclean-libtool \ + maybe-distclean-m4 \ + maybe-distclean-make \ + maybe-distclean-mmalloc \ + maybe-distclean-patch \ + maybe-distclean-perl \ + maybe-distclean-prms \ + maybe-distclean-rcs \ + maybe-distclean-readline \ + maybe-distclean-release \ + maybe-distclean-recode \ + maybe-distclean-sed \ + maybe-distclean-send-pr \ + maybe-distclean-shellutils \ + maybe-distclean-sid \ + maybe-distclean-sim \ + maybe-distclean-tar \ + maybe-distclean-texinfo \ + maybe-distclean-textutils \ + maybe-distclean-time \ + maybe-distclean-uudecode \ + maybe-distclean-wdiff \ + maybe-distclean-zip \ + maybe-distclean-zlib \ + maybe-distclean-gdb \ + maybe-distclean-expect \ + maybe-distclean-guile \ + maybe-distclean-tk \ + maybe-distclean-tix \ + maybe-distclean-libtermcap \ + maybe-distclean-utils + +.PHONY: distclean-target +distclean-target: \ + maybe-distclean-target-libstdc++-v3 \ + maybe-distclean-target-newlib \ + maybe-distclean-target-libf2c \ + maybe-distclean-target-libobjc \ + maybe-distclean-target-libtermcap \ + maybe-distclean-target-winsup \ + maybe-distclean-target-libgloss \ + maybe-distclean-target-libiberty \ + maybe-distclean-target-gperf \ + maybe-distclean-target-examples \ + maybe-distclean-target-libffi \ + maybe-distclean-target-libjava \ + maybe-distclean-target-zlib \ + maybe-distclean-target-boehm-gc \ + maybe-distclean-target-qthreads \ + maybe-distclean-target-rda \ + maybe-distclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-distclean-gcc distclean-gcc +maybe-distclean-gcc: +distclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-distclean-ash distclean-ash +maybe-distclean-ash: + +distclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-autoconf distclean-autoconf +maybe-distclean-autoconf: + +distclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-automake distclean-automake +maybe-distclean-automake: + +distclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bash distclean-bash +maybe-distclean-bash: + +distclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bfd distclean-bfd +maybe-distclean-bfd: + +distclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-opcodes distclean-opcodes +maybe-distclean-opcodes: + +distclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-binutils distclean-binutils +maybe-distclean-binutils: + +distclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bison distclean-bison +maybe-distclean-bison: + +distclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-byacc distclean-byacc +maybe-distclean-byacc: + +distclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bzip2 distclean-bzip2 +maybe-distclean-bzip2: + +distclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dejagnu distclean-dejagnu +maybe-distclean-dejagnu: + +distclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-diff distclean-diff +maybe-distclean-diff: + +distclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dosutils distclean-dosutils +maybe-distclean-dosutils: + +distclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-etc distclean-etc +maybe-distclean-etc: + +distclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fastjar distclean-fastjar +maybe-distclean-fastjar: + +distclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fileutils distclean-fileutils +maybe-distclean-fileutils: + +distclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-findutils distclean-findutils +maybe-distclean-findutils: + +distclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-find distclean-find +maybe-distclean-find: + +distclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-flex distclean-flex +maybe-distclean-flex: + +distclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gas distclean-gas +maybe-distclean-gas: + +distclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gawk distclean-gawk +maybe-distclean-gawk: + +distclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gettext distclean-gettext +maybe-distclean-gettext: + +distclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gnuserv distclean-gnuserv +maybe-distclean-gnuserv: + +distclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: + +distclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gzip distclean-gzip +maybe-distclean-gzip: + +distclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-hello distclean-hello +maybe-distclean-hello: + +distclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-indent distclean-indent +maybe-distclean-indent: + +distclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-intl distclean-intl +maybe-distclean-intl: + +distclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tcl distclean-tcl +maybe-distclean-tcl: + +distclean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-itcl distclean-itcl +maybe-distclean-itcl: + +distclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-ld distclean-ld +maybe-distclean-ld: + +distclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libgui distclean-libgui +maybe-distclean-libgui: + +distclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libiberty distclean-libiberty +maybe-distclean-libiberty: + +distclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtool distclean-libtool +maybe-distclean-libtool: + +distclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-m4 distclean-m4 +maybe-distclean-m4: + +distclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-make distclean-make +maybe-distclean-make: + +distclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-mmalloc distclean-mmalloc +maybe-distclean-mmalloc: + +distclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-patch distclean-patch +maybe-distclean-patch: + +distclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-perl distclean-perl +maybe-distclean-perl: + +distclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-prms distclean-prms +maybe-distclean-prms: + +distclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-rcs distclean-rcs +maybe-distclean-rcs: + +distclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-readline distclean-readline +maybe-distclean-readline: + +distclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-release distclean-release +maybe-distclean-release: + +distclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-recode distclean-recode +maybe-distclean-recode: + +distclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sed distclean-sed +maybe-distclean-sed: + +distclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-send-pr distclean-send-pr +maybe-distclean-send-pr: + +distclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-shellutils distclean-shellutils +maybe-distclean-shellutils: + +distclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sid distclean-sid +maybe-distclean-sid: + +distclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sim distclean-sim +maybe-distclean-sim: + +distclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tar distclean-tar +maybe-distclean-tar: + +distclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-texinfo distclean-texinfo +maybe-distclean-texinfo: + +distclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-textutils distclean-textutils +maybe-distclean-textutils: + +distclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-time distclean-time +maybe-distclean-time: + +distclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-uudecode distclean-uudecode +maybe-distclean-uudecode: + +distclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-wdiff distclean-wdiff +maybe-distclean-wdiff: + +distclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zip distclean-zip +maybe-distclean-zip: + +distclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zlib distclean-zlib +maybe-distclean-zlib: + +distclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gdb distclean-gdb +maybe-distclean-gdb: + +distclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-expect distclean-expect +maybe-distclean-expect: + +distclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-guile distclean-guile +maybe-distclean-guile: + +distclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tk distclean-tk +maybe-distclean-tk: + +distclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tix distclean-tix +maybe-distclean-tix: + +distclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtermcap distclean-libtermcap +maybe-distclean-libtermcap: + +# libtermcap doesn't support distclean. +distclean-libtermcap: + + +.PHONY: maybe-distclean-utils distclean-utils +maybe-distclean-utils: + +distclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3 +maybe-distclean-target-libstdc++-v3: + +distclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-newlib distclean-target-newlib +maybe-distclean-target-newlib: + +distclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c +maybe-distclean-target-libf2c: + +distclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc +maybe-distclean-target-libobjc: + +distclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap +maybe-distclean-target-libtermcap: + +# libtermcap doesn't support distclean. +distclean-target-libtermcap: + + +.PHONY: maybe-distclean-target-winsup distclean-target-winsup +maybe-distclean-target-winsup: + +distclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss +maybe-distclean-target-libgloss: + +distclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty +maybe-distclean-target-libiberty: + +distclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-gperf distclean-target-gperf +maybe-distclean-target-gperf: + +distclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-examples distclean-target-examples +maybe-distclean-target-examples: + +distclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libffi distclean-target-libffi +maybe-distclean-target-libffi: + +distclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libjava distclean-target-libjava +maybe-distclean-target-libjava: + +distclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-zlib distclean-target-zlib +maybe-distclean-target-zlib: + +distclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc +maybe-distclean-target-boehm-gc: + +distclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads +maybe-distclean-target-qthreads: + +distclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-rda distclean-target-rda +maybe-distclean-target-rda: + +distclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libada distclean-target-libada +maybe-distclean-target-libada: + +distclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +.PHONY: do-maintainer-clean +do-maintainer-clean: maintainer-clean-host maintainer-clean-target + +.PHONY: maintainer-clean-host +maintainer-clean-host: maybe-maintainer-clean-gcc \ + maybe-maintainer-clean-ash \ + maybe-maintainer-clean-autoconf \ + maybe-maintainer-clean-automake \ + maybe-maintainer-clean-bash \ + maybe-maintainer-clean-bfd \ + maybe-maintainer-clean-opcodes \ + maybe-maintainer-clean-binutils \ + maybe-maintainer-clean-bison \ + maybe-maintainer-clean-byacc \ + maybe-maintainer-clean-bzip2 \ + maybe-maintainer-clean-dejagnu \ + maybe-maintainer-clean-diff \ + maybe-maintainer-clean-dosutils \ + maybe-maintainer-clean-etc \ + maybe-maintainer-clean-fastjar \ + maybe-maintainer-clean-fileutils \ + maybe-maintainer-clean-findutils \ + maybe-maintainer-clean-find \ + maybe-maintainer-clean-flex \ + maybe-maintainer-clean-gas \ + maybe-maintainer-clean-gawk \ + maybe-maintainer-clean-gettext \ + maybe-maintainer-clean-gnuserv \ + maybe-maintainer-clean-gprof \ + maybe-maintainer-clean-gzip \ + maybe-maintainer-clean-hello \ + maybe-maintainer-clean-indent \ + maybe-maintainer-clean-intl \ + maybe-maintainer-clean-tcl \ + maybe-maintainer-clean-itcl \ + maybe-maintainer-clean-ld \ + maybe-maintainer-clean-libgui \ + maybe-maintainer-clean-libiberty \ + maybe-maintainer-clean-libtool \ + maybe-maintainer-clean-m4 \ + maybe-maintainer-clean-make \ + maybe-maintainer-clean-mmalloc \ + maybe-maintainer-clean-patch \ + maybe-maintainer-clean-perl \ + maybe-maintainer-clean-prms \ + maybe-maintainer-clean-rcs \ + maybe-maintainer-clean-readline \ + maybe-maintainer-clean-release \ + maybe-maintainer-clean-recode \ + maybe-maintainer-clean-sed \ + maybe-maintainer-clean-send-pr \ + maybe-maintainer-clean-shellutils \ + maybe-maintainer-clean-sid \ + maybe-maintainer-clean-sim \ + maybe-maintainer-clean-tar \ + maybe-maintainer-clean-texinfo \ + maybe-maintainer-clean-textutils \ + maybe-maintainer-clean-time \ + maybe-maintainer-clean-uudecode \ + maybe-maintainer-clean-wdiff \ + maybe-maintainer-clean-zip \ + maybe-maintainer-clean-zlib \ + maybe-maintainer-clean-gdb \ + maybe-maintainer-clean-expect \ + maybe-maintainer-clean-guile \ + maybe-maintainer-clean-tk \ + maybe-maintainer-clean-tix \ + maybe-maintainer-clean-libtermcap \ + maybe-maintainer-clean-utils + +.PHONY: maintainer-clean-target +maintainer-clean-target: \ + maybe-maintainer-clean-target-libstdc++-v3 \ + maybe-maintainer-clean-target-newlib \ + maybe-maintainer-clean-target-libf2c \ + maybe-maintainer-clean-target-libobjc \ + maybe-maintainer-clean-target-libtermcap \ + maybe-maintainer-clean-target-winsup \ + maybe-maintainer-clean-target-libgloss \ + maybe-maintainer-clean-target-libiberty \ + maybe-maintainer-clean-target-gperf \ + maybe-maintainer-clean-target-examples \ + maybe-maintainer-clean-target-libffi \ + maybe-maintainer-clean-target-libjava \ + maybe-maintainer-clean-target-zlib \ + maybe-maintainer-clean-target-boehm-gc \ + maybe-maintainer-clean-target-qthreads \ + maybe-maintainer-clean-target-rda \ + maybe-maintainer-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc +maybe-maintainer-clean-gcc: +maintainer-clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash +maybe-maintainer-clean-ash: + +maintainer-clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf +maybe-maintainer-clean-autoconf: + +maintainer-clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake +maybe-maintainer-clean-automake: + +maintainer-clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash +maybe-maintainer-clean-bash: + +maintainer-clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd +maybe-maintainer-clean-bfd: + +maintainer-clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes +maybe-maintainer-clean-opcodes: + +maintainer-clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils +maybe-maintainer-clean-binutils: + +maintainer-clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison +maybe-maintainer-clean-bison: + +maintainer-clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc +maybe-maintainer-clean-byacc: + +maintainer-clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2 +maybe-maintainer-clean-bzip2: + +maintainer-clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu +maybe-maintainer-clean-dejagnu: + +maintainer-clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff +maybe-maintainer-clean-diff: + +maintainer-clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils +maybe-maintainer-clean-dosutils: + +maintainer-clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc +maybe-maintainer-clean-etc: + +maintainer-clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar +maybe-maintainer-clean-fastjar: + +maintainer-clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils +maybe-maintainer-clean-fileutils: + +maintainer-clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils +maybe-maintainer-clean-findutils: + +maintainer-clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-find maintainer-clean-find +maybe-maintainer-clean-find: + +maintainer-clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex +maybe-maintainer-clean-flex: + +maintainer-clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas +maybe-maintainer-clean-gas: + +maintainer-clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk +maybe-maintainer-clean-gawk: + +maintainer-clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext +maybe-maintainer-clean-gettext: + +maintainer-clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv +maybe-maintainer-clean-gnuserv: + +maintainer-clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: + +maintainer-clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip +maybe-maintainer-clean-gzip: + +maintainer-clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello +maybe-maintainer-clean-hello: + +maintainer-clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent +maybe-maintainer-clean-indent: + +maintainer-clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl +maybe-maintainer-clean-intl: + +maintainer-clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl +maybe-maintainer-clean-tcl: + +maintainer-clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl +maybe-maintainer-clean-itcl: + +maintainer-clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld +maybe-maintainer-clean-ld: + +maintainer-clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui +maybe-maintainer-clean-libgui: + +maintainer-clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty +maybe-maintainer-clean-libiberty: + +maintainer-clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool +maybe-maintainer-clean-libtool: + +maintainer-clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4 +maybe-maintainer-clean-m4: + +maintainer-clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-make maintainer-clean-make +maybe-maintainer-clean-make: + +maintainer-clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc +maybe-maintainer-clean-mmalloc: + +maintainer-clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch +maybe-maintainer-clean-patch: + +maintainer-clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl +maybe-maintainer-clean-perl: + +maintainer-clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms +maybe-maintainer-clean-prms: + +maintainer-clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs +maybe-maintainer-clean-rcs: + +maintainer-clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +maybe-maintainer-clean-readline: + +maintainer-clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-release maintainer-clean-release +maybe-maintainer-clean-release: + +maintainer-clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode +maybe-maintainer-clean-recode: + +maintainer-clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed +maybe-maintainer-clean-sed: + +maintainer-clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr +maybe-maintainer-clean-send-pr: + +maintainer-clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils +maybe-maintainer-clean-shellutils: + +maintainer-clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid +maybe-maintainer-clean-sid: + +maintainer-clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim +maybe-maintainer-clean-sim: + +maintainer-clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar +maybe-maintainer-clean-tar: + +maintainer-clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo +maybe-maintainer-clean-texinfo: + +maintainer-clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils +maybe-maintainer-clean-textutils: + +maintainer-clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-time maintainer-clean-time +maybe-maintainer-clean-time: + +maintainer-clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode +maybe-maintainer-clean-uudecode: + +maintainer-clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff +maybe-maintainer-clean-wdiff: + +maintainer-clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip +maybe-maintainer-clean-zip: + +maintainer-clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib +maybe-maintainer-clean-zlib: + +maintainer-clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb +maybe-maintainer-clean-gdb: + +maintainer-clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect +maybe-maintainer-clean-expect: + +maintainer-clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile +maybe-maintainer-clean-guile: + +maintainer-clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk +maybe-maintainer-clean-tk: + +maintainer-clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix +maybe-maintainer-clean-tix: + +maintainer-clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap +maybe-maintainer-clean-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-libtermcap: + + +.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils +maybe-maintainer-clean-utils: + +maintainer-clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3 +maybe-maintainer-clean-target-libstdc++-v3: + +maintainer-clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib +maybe-maintainer-clean-target-newlib: + +maintainer-clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c +maybe-maintainer-clean-target-libf2c: + +maintainer-clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc +maybe-maintainer-clean-target-libobjc: + +maintainer-clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap +maybe-maintainer-clean-target-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-target-libtermcap: + + +.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup +maybe-maintainer-clean-target-winsup: + +maintainer-clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss +maybe-maintainer-clean-target-libgloss: + +maintainer-clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty +maybe-maintainer-clean-target-libiberty: + +maintainer-clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf +maybe-maintainer-clean-target-gperf: + +maintainer-clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples +maybe-maintainer-clean-target-examples: + +maintainer-clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi +maybe-maintainer-clean-target-libffi: + +maintainer-clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava +maybe-maintainer-clean-target-libjava: + +maintainer-clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib +maybe-maintainer-clean-target-zlib: + +maintainer-clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc +maybe-maintainer-clean-target-boehm-gc: + +maintainer-clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads +maybe-maintainer-clean-target-qthreads: + +maintainer-clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda +maybe-maintainer-clean-target-rda: + +maintainer-clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada +maybe-maintainer-clean-target-libada: + +maintainer-clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + + +# Here are the targets which correspond to the do-X targets. + +.PHONY: info installcheck dvi install-info +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean +info: do-info +installcheck: do-installcheck +dvi: do-dvi + +# Make sure makeinfo is built before we do a `make info', if we're +# in fact building texinfo. +do-info: maybe-all-texinfo + +install-info: do-install-info dir.info + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f dir.info ] ; then \ + $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \ + else true ; fi + +local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log + +local-distclean: + -rm -f Makefile config.status config.cache mh-frag mt-frag + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -if [ "$(TARGET_SUBDIR)" != "." ]; then \ + rm -rf $(TARGET_SUBDIR); \ + else true; fi + -rm -rf $(BUILD_SUBDIR) + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +clean: do-clean local-clean +mostlyclean: do-mostlyclean local-clean +distclean: do-distclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean + +# Extra dependency for clean-target, owing to the mixed nature of gcc +clean-target: clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc + +# Check target. + +.PHONY: check do-check +check: do-check + +# Only include modules actually being configured and built. +do-check: maybe-check-gcc \ + maybe-check-ash \ + maybe-check-autoconf \ + maybe-check-automake \ + maybe-check-bash \ + maybe-check-bfd \ + maybe-check-opcodes \ + maybe-check-binutils \ + maybe-check-bison \ + maybe-check-byacc \ + maybe-check-bzip2 \ + maybe-check-dejagnu \ + maybe-check-diff \ + maybe-check-dosutils \ + maybe-check-etc \ + maybe-check-fastjar \ + maybe-check-fileutils \ + maybe-check-findutils \ + maybe-check-find \ + maybe-check-flex \ + maybe-check-gas \ + maybe-check-gawk \ + maybe-check-gettext \ + maybe-check-gnuserv \ + maybe-check-gprof \ + maybe-check-gzip \ + maybe-check-hello \ + maybe-check-indent \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ + maybe-check-ld \ + maybe-check-libgui \ + maybe-check-libiberty \ + maybe-check-libtool \ + maybe-check-m4 \ + maybe-check-make \ + maybe-check-mmalloc \ + maybe-check-patch \ + maybe-check-perl \ + maybe-check-prms \ + maybe-check-rcs \ + maybe-check-readline \ + maybe-check-release \ + maybe-check-recode \ + maybe-check-sed \ + maybe-check-send-pr \ + maybe-check-shellutils \ + maybe-check-sid \ + maybe-check-sim \ + maybe-check-tar \ + maybe-check-texinfo \ + maybe-check-textutils \ + maybe-check-time \ + maybe-check-uudecode \ + maybe-check-wdiff \ + maybe-check-zip \ + maybe-check-zlib \ + maybe-check-gdb \ + maybe-check-expect \ + maybe-check-guile \ + maybe-check-tk \ + maybe-check-tix \ + maybe-check-libtermcap \ + maybe-check-utils \ + maybe-check-target-libstdc++-v3 \ + maybe-check-target-newlib \ + maybe-check-target-libf2c \ + maybe-check-target-libobjc \ + maybe-check-target-libtermcap \ + maybe-check-target-winsup \ + maybe-check-target-libgloss \ + maybe-check-target-libiberty \ + maybe-check-target-gperf \ + maybe-check-target-examples \ + maybe-check-target-libffi \ + maybe-check-target-libjava \ + maybe-check-target-zlib \ + maybe-check-target-boehm-gc \ + maybe-check-target-qthreads \ + maybe-check-target-rda \ + maybe-check-target-libada + +# Automated reporting of test results. + +warning.log: build.log + $(srcdir)/contrib/warn_summary build.log > $@ + +mail-report.log: + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +mail-report-with-warnings.log: warning.log + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t -i warning.log >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +# Installation targets. + +.PHONY: install uninstall +install: installdirs install-host install-target + +.PHONY: install-host-nogcc +install-host-nogcc: \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-host +install-host: maybe-install-gcc \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-target +install-target: \ + maybe-install-target-libstdc++-v3 \ + maybe-install-target-newlib \ + maybe-install-target-libf2c \ + maybe-install-target-libobjc \ + maybe-install-target-libtermcap \ + maybe-install-target-winsup \ + maybe-install-target-libgloss \ + maybe-install-target-libiberty \ + maybe-install-target-gperf \ + maybe-install-target-examples \ + maybe-install-target-libffi \ + maybe-install-target-libjava \ + maybe-install-target-zlib \ + maybe-install-target-boehm-gc \ + maybe-install-target-qthreads \ + maybe-install-target-rda \ + maybe-install-target-libada + +uninstall: + @echo "the uninstall target is not supported in this tree" + +.PHONY: install.all +install.all: install-no-fixedincludes + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}` ; export r ; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ + else \ + true ; \ + fi + +# install-no-fixedincludes is used because Cygnus can not distribute +# the fixed header files. +.PHONY: install-no-fixedincludes +install-no-fixedincludes: installdirs install-host-nogcc \ + install-target gcc-no-fixedincludes + +### other supporting targets + +MAKEDIRS= \ + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) +.PHONY: installdirs +installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) + +dir.info: do-install-info + if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ + $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ + mv -f dir.info.new dir.info ; \ + else true ; \ + fi + +dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" + +etags tags: TAGS + +# Right now this just builds TAGS in each subdirectory. emacs19 has the +# ability to use several tags files at once, so there is probably no need +# to combine them into one big TAGS file (like CVS 1.3 does). We could +# (if we felt like it) have this Makefile write a piece of elisp which +# the user could load to tell emacs19 where all the TAGS files we just +# built are. +TAGS: do-TAGS + +# -------------------------------------- +# Modules which run on the build machine +# -------------------------------------- + +.PHONY: configure-build-libiberty maybe-configure-build-libiberty +maybe-configure-build-libiberty: +configure-build-libiberty: + @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/libiberty; \ + cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 + +.PHONY: all-build-libiberty maybe-all-build-libiberty +maybe-all-build-libiberty: +all-build-libiberty: configure-build-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all) + + +# -------------------------------------- +# Modules which run on the host machine +# -------------------------------------- + +.PHONY: configure-ash maybe-configure-ash +maybe-configure-ash: +configure-ash: + @test ! -f ash/Makefile || exit 0; \ + [ -d ash ] || mkdir ash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ash; \ + cd ash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ash maybe-all-ash +maybe-all-ash: +all-ash: configure-ash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ash maybe-check-ash +maybe-check-ash: + +check-ash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ash maybe-install-ash +maybe-install-ash: + +install-ash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-autoconf maybe-configure-autoconf +maybe-configure-autoconf: +configure-autoconf: + @test ! -f autoconf/Makefile || exit 0; \ + [ -d autoconf ] || mkdir autoconf; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in autoconf; \ + cd autoconf || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-autoconf maybe-all-autoconf +maybe-all-autoconf: +all-autoconf: configure-autoconf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-autoconf maybe-check-autoconf +maybe-check-autoconf: + +check-autoconf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-autoconf maybe-install-autoconf +maybe-install-autoconf: + +install-autoconf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-automake maybe-configure-automake +maybe-configure-automake: +configure-automake: + @test ! -f automake/Makefile || exit 0; \ + [ -d automake ] || mkdir automake; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in automake; \ + cd automake || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-automake maybe-all-automake +maybe-all-automake: +all-automake: configure-automake + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-automake maybe-check-automake +maybe-check-automake: + +check-automake: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-automake maybe-install-automake +maybe-install-automake: + +install-automake: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bash maybe-configure-bash +maybe-configure-bash: +configure-bash: + @test ! -f bash/Makefile || exit 0; \ + [ -d bash ] || mkdir bash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bash; \ + cd bash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bash maybe-all-bash +maybe-all-bash: +all-bash: configure-bash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bash maybe-check-bash +maybe-check-bash: + +check-bash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bash maybe-install-bash +maybe-install-bash: + +install-bash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bfd maybe-configure-bfd +maybe-configure-bfd: +configure-bfd: + @test ! -f bfd/Makefile || exit 0; \ + [ -d bfd ] || mkdir bfd; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bfd; \ + cd bfd || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bfd maybe-all-bfd +maybe-all-bfd: +all-bfd: configure-bfd + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bfd maybe-check-bfd +maybe-check-bfd: + +check-bfd: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bfd maybe-install-bfd +maybe-install-bfd: + +install-bfd: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-opcodes maybe-configure-opcodes +maybe-configure-opcodes: +configure-opcodes: + @test ! -f opcodes/Makefile || exit 0; \ + [ -d opcodes ] || mkdir opcodes; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in opcodes; \ + cd opcodes || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-opcodes maybe-all-opcodes +maybe-all-opcodes: +all-opcodes: configure-opcodes + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-opcodes maybe-check-opcodes +maybe-check-opcodes: + +check-opcodes: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-opcodes maybe-install-opcodes +maybe-install-opcodes: + +install-opcodes: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-binutils maybe-configure-binutils +maybe-configure-binutils: +configure-binutils: + @test ! -f binutils/Makefile || exit 0; \ + [ -d binutils ] || mkdir binutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in binutils; \ + cd binutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-binutils maybe-all-binutils +maybe-all-binutils: +all-binutils: configure-binutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-binutils maybe-check-binutils +maybe-check-binutils: + +check-binutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-binutils maybe-install-binutils +maybe-install-binutils: + +install-binutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bison maybe-configure-bison +maybe-configure-bison: +configure-bison: + @test ! -f bison/Makefile || exit 0; \ + [ -d bison ] || mkdir bison; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bison; \ + cd bison || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bison maybe-all-bison +maybe-all-bison: +all-bison: configure-bison + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bison maybe-check-bison +maybe-check-bison: + +# This module is only tested in a native toolchain. +check-bison: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-bison maybe-install-bison +maybe-install-bison: + +install-bison: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-byacc maybe-configure-byacc +maybe-configure-byacc: +configure-byacc: + @test ! -f byacc/Makefile || exit 0; \ + [ -d byacc ] || mkdir byacc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in byacc; \ + cd byacc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-byacc maybe-all-byacc +maybe-all-byacc: +all-byacc: configure-byacc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-byacc maybe-check-byacc +maybe-check-byacc: + +# This module is only tested in a native toolchain. +check-byacc: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-byacc maybe-install-byacc +maybe-install-byacc: + +install-byacc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bzip2 maybe-configure-bzip2 +maybe-configure-bzip2: +configure-bzip2: + @test ! -f bzip2/Makefile || exit 0; \ + [ -d bzip2 ] || mkdir bzip2; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bzip2; \ + cd bzip2 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bzip2 maybe-all-bzip2 +maybe-all-bzip2: +all-bzip2: configure-bzip2 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bzip2 maybe-check-bzip2 +maybe-check-bzip2: + +check-bzip2: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bzip2 maybe-install-bzip2 +maybe-install-bzip2: + +install-bzip2: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dejagnu maybe-configure-dejagnu +maybe-configure-dejagnu: +configure-dejagnu: + @test ! -f dejagnu/Makefile || exit 0; \ + [ -d dejagnu ] || mkdir dejagnu; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dejagnu; \ + cd dejagnu || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dejagnu maybe-all-dejagnu +maybe-all-dejagnu: +all-dejagnu: configure-dejagnu + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dejagnu maybe-check-dejagnu +maybe-check-dejagnu: + +check-dejagnu: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-dejagnu maybe-install-dejagnu +maybe-install-dejagnu: + +install-dejagnu: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-diff maybe-configure-diff +maybe-configure-diff: +configure-diff: + @test ! -f diff/Makefile || exit 0; \ + [ -d diff ] || mkdir diff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in diff; \ + cd diff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-diff maybe-all-diff +maybe-all-diff: +all-diff: configure-diff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-diff maybe-check-diff +maybe-check-diff: + +check-diff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-diff maybe-install-diff +maybe-install-diff: + +install-diff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dosutils maybe-configure-dosutils +maybe-configure-dosutils: +configure-dosutils: + @test ! -f dosutils/Makefile || exit 0; \ + [ -d dosutils ] || mkdir dosutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dosutils; \ + cd dosutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dosutils maybe-all-dosutils +maybe-all-dosutils: +all-dosutils: configure-dosutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dosutils maybe-check-dosutils +maybe-check-dosutils: + +check-dosutils: + + +.PHONY: install-dosutils maybe-install-dosutils +maybe-install-dosutils: + +install-dosutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-etc maybe-configure-etc +maybe-configure-etc: +configure-etc: + @test ! -f etc/Makefile || exit 0; \ + [ -d etc ] || mkdir etc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in etc; \ + cd etc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-etc maybe-all-etc +maybe-all-etc: +all-etc: configure-etc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-etc maybe-check-etc +maybe-check-etc: + +check-etc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-etc maybe-install-etc +maybe-install-etc: + +install-etc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fastjar maybe-configure-fastjar +maybe-configure-fastjar: +configure-fastjar: + @test ! -f fastjar/Makefile || exit 0; \ + [ -d fastjar ] || mkdir fastjar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fastjar; \ + cd fastjar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fastjar maybe-all-fastjar +maybe-all-fastjar: +all-fastjar: configure-fastjar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fastjar maybe-check-fastjar +maybe-check-fastjar: + +# This module is only tested in a native toolchain. +check-fastjar: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-fastjar maybe-install-fastjar +maybe-install-fastjar: + +install-fastjar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fileutils maybe-configure-fileutils +maybe-configure-fileutils: +configure-fileutils: + @test ! -f fileutils/Makefile || exit 0; \ + [ -d fileutils ] || mkdir fileutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fileutils; \ + cd fileutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fileutils maybe-all-fileutils +maybe-all-fileutils: +all-fileutils: configure-fileutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fileutils maybe-check-fileutils +maybe-check-fileutils: + +check-fileutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-fileutils maybe-install-fileutils +maybe-install-fileutils: + +install-fileutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-findutils maybe-configure-findutils +maybe-configure-findutils: +configure-findutils: + @test ! -f findutils/Makefile || exit 0; \ + [ -d findutils ] || mkdir findutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in findutils; \ + cd findutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-findutils maybe-all-findutils +maybe-all-findutils: +all-findutils: configure-findutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-findutils maybe-check-findutils +maybe-check-findutils: + +check-findutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-findutils maybe-install-findutils +maybe-install-findutils: + +install-findutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-find maybe-configure-find +maybe-configure-find: +configure-find: + @test ! -f find/Makefile || exit 0; \ + [ -d find ] || mkdir find; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in find; \ + cd find || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-find maybe-all-find +maybe-all-find: +all-find: configure-find + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-find maybe-check-find +maybe-check-find: + +check-find: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-find maybe-install-find +maybe-install-find: + +install-find: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-flex maybe-configure-flex +maybe-configure-flex: +configure-flex: + @test ! -f flex/Makefile || exit 0; \ + [ -d flex ] || mkdir flex; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in flex; \ + cd flex || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-flex maybe-all-flex +maybe-all-flex: +all-flex: configure-flex + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-flex maybe-check-flex +maybe-check-flex: + +# This module is only tested in a native toolchain. +check-flex: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-flex maybe-install-flex +maybe-install-flex: + +install-flex: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gas maybe-configure-gas +maybe-configure-gas: +configure-gas: + @test ! -f gas/Makefile || exit 0; \ + [ -d gas ] || mkdir gas; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gas; \ + cd gas || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gas maybe-all-gas +maybe-all-gas: +all-gas: configure-gas + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gas maybe-check-gas +maybe-check-gas: + +check-gas: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gas maybe-install-gas +maybe-install-gas: + +install-gas: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gawk maybe-configure-gawk +maybe-configure-gawk: +configure-gawk: + @test ! -f gawk/Makefile || exit 0; \ + [ -d gawk ] || mkdir gawk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gawk; \ + cd gawk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gawk maybe-all-gawk +maybe-all-gawk: +all-gawk: configure-gawk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gawk maybe-check-gawk +maybe-check-gawk: + +check-gawk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gawk maybe-install-gawk +maybe-install-gawk: + +install-gawk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gettext maybe-configure-gettext +maybe-configure-gettext: +configure-gettext: + @test ! -f gettext/Makefile || exit 0; \ + [ -d gettext ] || mkdir gettext; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gettext; \ + cd gettext || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gettext maybe-all-gettext +maybe-all-gettext: +all-gettext: configure-gettext + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gettext maybe-check-gettext +maybe-check-gettext: + +check-gettext: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gettext maybe-install-gettext +maybe-install-gettext: + +install-gettext: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gnuserv maybe-configure-gnuserv +maybe-configure-gnuserv: +configure-gnuserv: + @test ! -f gnuserv/Makefile || exit 0; \ + [ -d gnuserv ] || mkdir gnuserv; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gnuserv; \ + cd gnuserv || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gnuserv maybe-all-gnuserv +maybe-all-gnuserv: +all-gnuserv: configure-gnuserv + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gnuserv maybe-check-gnuserv +maybe-check-gnuserv: + +check-gnuserv: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gnuserv maybe-install-gnuserv +maybe-install-gnuserv: + +install-gnuserv: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: +configure-gprof: + @test ! -f gprof/Makefile || exit 0; \ + [ -d gprof ] || mkdir gprof; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gprof; \ + cd gprof || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +all-gprof: configure-gprof + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: + +check-gprof: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: + +install-gprof: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gzip maybe-configure-gzip +maybe-configure-gzip: +configure-gzip: + @test ! -f gzip/Makefile || exit 0; \ + [ -d gzip ] || mkdir gzip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gzip; \ + cd gzip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gzip maybe-all-gzip +maybe-all-gzip: +all-gzip: configure-gzip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gzip maybe-check-gzip +maybe-check-gzip: + +check-gzip: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gzip maybe-install-gzip +maybe-install-gzip: + +install-gzip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-hello maybe-configure-hello +maybe-configure-hello: +configure-hello: + @test ! -f hello/Makefile || exit 0; \ + [ -d hello ] || mkdir hello; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in hello; \ + cd hello || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-hello maybe-all-hello +maybe-all-hello: +all-hello: configure-hello + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-hello maybe-check-hello +maybe-check-hello: + +check-hello: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-hello maybe-install-hello +maybe-install-hello: + +install-hello: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-indent maybe-configure-indent +maybe-configure-indent: +configure-indent: + @test ! -f indent/Makefile || exit 0; \ + [ -d indent ] || mkdir indent; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in indent; \ + cd indent || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-indent maybe-all-indent +maybe-all-indent: +all-indent: configure-indent + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-indent maybe-check-indent +maybe-check-indent: + +check-indent: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-indent maybe-install-indent +maybe-install-indent: + +install-indent: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-intl maybe-configure-intl +maybe-configure-intl: +configure-intl: + @test ! -f intl/Makefile || exit 0; \ + [ -d intl ] || mkdir intl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in intl; \ + cd intl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-intl maybe-all-intl +maybe-all-intl: +all-intl: configure-intl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-intl maybe-check-intl +maybe-check-intl: + +check-intl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-intl maybe-install-intl +maybe-install-intl: + +install-intl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tcl maybe-configure-tcl +maybe-configure-tcl: +configure-tcl: + @test ! -f tcl/Makefile || exit 0; \ + [ -d tcl ] || mkdir tcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tcl; \ + cd tcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tcl maybe-all-tcl +maybe-all-tcl: +all-tcl: configure-tcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tcl maybe-check-tcl +maybe-check-tcl: + +check-tcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tcl maybe-install-tcl +maybe-install-tcl: + +install-tcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-itcl maybe-configure-itcl +maybe-configure-itcl: +configure-itcl: + @test ! -f itcl/Makefile || exit 0; \ + [ -d itcl ] || mkdir itcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in itcl; \ + cd itcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-itcl maybe-all-itcl +maybe-all-itcl: +all-itcl: configure-itcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-itcl maybe-check-itcl +maybe-check-itcl: + +check-itcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-itcl maybe-install-itcl +maybe-install-itcl: + +install-itcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-ld maybe-configure-ld +maybe-configure-ld: +configure-ld: + @test ! -f ld/Makefile || exit 0; \ + [ -d ld ] || mkdir ld; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ld; \ + cd ld || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ld maybe-all-ld +maybe-all-ld: +all-ld: configure-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ld maybe-check-ld +maybe-check-ld: + +check-ld: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ld maybe-install-ld +maybe-install-ld: + +install-ld: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libgui maybe-configure-libgui +maybe-configure-libgui: +configure-libgui: + @test ! -f libgui/Makefile || exit 0; \ + [ -d libgui ] || mkdir libgui; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libgui; \ + cd libgui || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libgui maybe-all-libgui +maybe-all-libgui: +all-libgui: configure-libgui + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libgui maybe-check-libgui +maybe-check-libgui: + +check-libgui: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libgui maybe-install-libgui +maybe-install-libgui: + +install-libgui: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libiberty maybe-configure-libiberty +maybe-configure-libiberty: +configure-libiberty: + @test ! -f libiberty/Makefile || exit 0; \ + [ -d libiberty ] || mkdir libiberty; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libiberty; \ + cd libiberty || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libiberty maybe-all-libiberty +maybe-all-libiberty: +all-libiberty: configure-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libiberty maybe-check-libiberty +maybe-check-libiberty: + +check-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libiberty maybe-install-libiberty +maybe-install-libiberty: + +install-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libtool maybe-configure-libtool +maybe-configure-libtool: +configure-libtool: + @test ! -f libtool/Makefile || exit 0; \ + [ -d libtool ] || mkdir libtool; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtool; \ + cd libtool || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtool maybe-all-libtool +maybe-all-libtool: +all-libtool: configure-libtool + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtool maybe-check-libtool +maybe-check-libtool: + +check-libtool: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libtool maybe-install-libtool +maybe-install-libtool: + +install-libtool: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-m4 maybe-configure-m4 +maybe-configure-m4: +configure-m4: + @test ! -f m4/Makefile || exit 0; \ + [ -d m4 ] || mkdir m4; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in m4; \ + cd m4 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-m4 maybe-all-m4 +maybe-all-m4: +all-m4: configure-m4 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-m4 maybe-check-m4 +maybe-check-m4: + +check-m4: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-m4 maybe-install-m4 +maybe-install-m4: + +install-m4: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-make maybe-configure-make +maybe-configure-make: +configure-make: + @test ! -f make/Makefile || exit 0; \ + [ -d make ] || mkdir make; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in make; \ + cd make || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-make maybe-all-make +maybe-all-make: +all-make: configure-make + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-make maybe-check-make +maybe-check-make: + +check-make: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-make maybe-install-make +maybe-install-make: + +install-make: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-mmalloc maybe-configure-mmalloc +maybe-configure-mmalloc: +configure-mmalloc: + @test ! -f mmalloc/Makefile || exit 0; \ + [ -d mmalloc ] || mkdir mmalloc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in mmalloc; \ + cd mmalloc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-mmalloc maybe-all-mmalloc +maybe-all-mmalloc: +all-mmalloc: configure-mmalloc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-mmalloc maybe-check-mmalloc +maybe-check-mmalloc: + +check-mmalloc: + + +.PHONY: install-mmalloc maybe-install-mmalloc +maybe-install-mmalloc: + +install-mmalloc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-patch maybe-configure-patch +maybe-configure-patch: +configure-patch: + @test ! -f patch/Makefile || exit 0; \ + [ -d patch ] || mkdir patch; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in patch; \ + cd patch || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-patch maybe-all-patch +maybe-all-patch: +all-patch: configure-patch + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-patch maybe-check-patch +maybe-check-patch: + +check-patch: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-patch maybe-install-patch +maybe-install-patch: + +install-patch: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-perl maybe-configure-perl +maybe-configure-perl: +configure-perl: + @test ! -f perl/Makefile || exit 0; \ + [ -d perl ] || mkdir perl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in perl; \ + cd perl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-perl maybe-all-perl +maybe-all-perl: +all-perl: configure-perl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-perl maybe-check-perl +maybe-check-perl: + +check-perl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-perl maybe-install-perl +maybe-install-perl: + +install-perl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-prms maybe-configure-prms +maybe-configure-prms: +configure-prms: + @test ! -f prms/Makefile || exit 0; \ + [ -d prms ] || mkdir prms; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in prms; \ + cd prms || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-prms maybe-all-prms +maybe-all-prms: +all-prms: configure-prms + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-prms maybe-check-prms +maybe-check-prms: + +check-prms: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-prms maybe-install-prms +maybe-install-prms: + +install-prms: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-rcs maybe-configure-rcs +maybe-configure-rcs: +configure-rcs: + @test ! -f rcs/Makefile || exit 0; \ + [ -d rcs ] || mkdir rcs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in rcs; \ + cd rcs || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-rcs maybe-all-rcs +maybe-all-rcs: +all-rcs: configure-rcs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-rcs maybe-check-rcs +maybe-check-rcs: + +check-rcs: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-rcs maybe-install-rcs +maybe-install-rcs: + +install-rcs: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-readline maybe-configure-readline +maybe-configure-readline: +configure-readline: + @test ! -f readline/Makefile || exit 0; \ + [ -d readline ] || mkdir readline; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in readline; \ + cd readline || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-readline maybe-all-readline +maybe-all-readline: +all-readline: configure-readline + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-readline maybe-check-readline +maybe-check-readline: + +check-readline: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-readline maybe-install-readline +maybe-install-readline: + +install-readline: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-release maybe-configure-release +maybe-configure-release: +configure-release: + @test ! -f release/Makefile || exit 0; \ + [ -d release ] || mkdir release; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in release; \ + cd release || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-release maybe-all-release +maybe-all-release: +all-release: configure-release + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd release && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-release maybe-check-release +maybe-check-release: + +check-release: + + +.PHONY: install-release maybe-install-release +maybe-install-release: + +install-release: + + +.PHONY: configure-recode maybe-configure-recode +maybe-configure-recode: +configure-recode: + @test ! -f recode/Makefile || exit 0; \ + [ -d recode ] || mkdir recode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in recode; \ + cd recode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-recode maybe-all-recode +maybe-all-recode: +all-recode: configure-recode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-recode maybe-check-recode +maybe-check-recode: + +check-recode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-recode maybe-install-recode +maybe-install-recode: + +install-recode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sed maybe-configure-sed +maybe-configure-sed: +configure-sed: + @test ! -f sed/Makefile || exit 0; \ + [ -d sed ] || mkdir sed; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sed; \ + cd sed || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sed maybe-all-sed +maybe-all-sed: +all-sed: configure-sed + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sed maybe-check-sed +maybe-check-sed: + +check-sed: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sed maybe-install-sed +maybe-install-sed: + +install-sed: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-send-pr maybe-configure-send-pr +maybe-configure-send-pr: +configure-send-pr: + @test ! -f send-pr/Makefile || exit 0; \ + [ -d send-pr ] || mkdir send-pr; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in send-pr; \ + cd send-pr || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-send-pr maybe-all-send-pr +maybe-all-send-pr: +all-send-pr: configure-send-pr + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-send-pr maybe-check-send-pr +maybe-check-send-pr: + +check-send-pr: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-send-pr maybe-install-send-pr +maybe-install-send-pr: + +install-send-pr: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-shellutils maybe-configure-shellutils +maybe-configure-shellutils: +configure-shellutils: + @test ! -f shellutils/Makefile || exit 0; \ + [ -d shellutils ] || mkdir shellutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in shellutils; \ + cd shellutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-shellutils maybe-all-shellutils +maybe-all-shellutils: +all-shellutils: configure-shellutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-shellutils maybe-check-shellutils +maybe-check-shellutils: + +check-shellutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-shellutils maybe-install-shellutils +maybe-install-shellutils: + +install-shellutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sid maybe-configure-sid +maybe-configure-sid: +configure-sid: + @test ! -f sid/Makefile || exit 0; \ + [ -d sid ] || mkdir sid; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sid; \ + cd sid || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sid maybe-all-sid +maybe-all-sid: +all-sid: configure-sid + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sid maybe-check-sid +maybe-check-sid: + +check-sid: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sid maybe-install-sid +maybe-install-sid: + +install-sid: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sim maybe-configure-sim +maybe-configure-sim: +configure-sim: + @test ! -f sim/Makefile || exit 0; \ + [ -d sim ] || mkdir sim; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sim; \ + cd sim || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sim maybe-all-sim +maybe-all-sim: +all-sim: configure-sim + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sim maybe-check-sim +maybe-check-sim: + +check-sim: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sim maybe-install-sim +maybe-install-sim: + +install-sim: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tar maybe-configure-tar +maybe-configure-tar: +configure-tar: + @test ! -f tar/Makefile || exit 0; \ + [ -d tar ] || mkdir tar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tar; \ + cd tar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tar maybe-all-tar +maybe-all-tar: +all-tar: configure-tar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tar maybe-check-tar +maybe-check-tar: + +check-tar: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tar maybe-install-tar +maybe-install-tar: + +install-tar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-texinfo maybe-configure-texinfo +maybe-configure-texinfo: +configure-texinfo: + @test ! -f texinfo/Makefile || exit 0; \ + [ -d texinfo ] || mkdir texinfo; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in texinfo; \ + cd texinfo || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-texinfo maybe-all-texinfo +maybe-all-texinfo: +all-texinfo: configure-texinfo + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-texinfo maybe-check-texinfo +maybe-check-texinfo: + +check-texinfo: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-texinfo maybe-install-texinfo +maybe-install-texinfo: + +install-texinfo: + + +.PHONY: configure-textutils maybe-configure-textutils +maybe-configure-textutils: +configure-textutils: + @test ! -f textutils/Makefile || exit 0; \ + [ -d textutils ] || mkdir textutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in textutils; \ + cd textutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-textutils maybe-all-textutils +maybe-all-textutils: +all-textutils: configure-textutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-textutils maybe-check-textutils +maybe-check-textutils: + +check-textutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-textutils maybe-install-textutils +maybe-install-textutils: + +install-textutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-time maybe-configure-time +maybe-configure-time: +configure-time: + @test ! -f time/Makefile || exit 0; \ + [ -d time ] || mkdir time; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in time; \ + cd time || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-time maybe-all-time +maybe-all-time: +all-time: configure-time + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-time maybe-check-time +maybe-check-time: + +check-time: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-time maybe-install-time +maybe-install-time: + +install-time: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-uudecode maybe-configure-uudecode +maybe-configure-uudecode: +configure-uudecode: + @test ! -f uudecode/Makefile || exit 0; \ + [ -d uudecode ] || mkdir uudecode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in uudecode; \ + cd uudecode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-uudecode maybe-all-uudecode +maybe-all-uudecode: +all-uudecode: configure-uudecode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-uudecode maybe-check-uudecode +maybe-check-uudecode: + +check-uudecode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-uudecode maybe-install-uudecode +maybe-install-uudecode: + +install-uudecode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-wdiff maybe-configure-wdiff +maybe-configure-wdiff: +configure-wdiff: + @test ! -f wdiff/Makefile || exit 0; \ + [ -d wdiff ] || mkdir wdiff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in wdiff; \ + cd wdiff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-wdiff maybe-all-wdiff +maybe-all-wdiff: +all-wdiff: configure-wdiff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-wdiff maybe-check-wdiff +maybe-check-wdiff: + +check-wdiff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-wdiff maybe-install-wdiff +maybe-install-wdiff: + +install-wdiff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zip maybe-configure-zip +maybe-configure-zip: +configure-zip: + @test ! -f zip/Makefile || exit 0; \ + [ -d zip ] || mkdir zip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zip; \ + cd zip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zip maybe-all-zip +maybe-all-zip: +all-zip: configure-zip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zip maybe-check-zip +maybe-check-zip: + +# This module is only tested in a native toolchain. +check-zip: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-zip maybe-install-zip +maybe-install-zip: + +install-zip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zlib maybe-configure-zlib +maybe-configure-zlib: +configure-zlib: + @test ! -f zlib/Makefile || exit 0; \ + [ -d zlib ] || mkdir zlib; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zlib; \ + cd zlib || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zlib maybe-all-zlib +maybe-all-zlib: +all-zlib: configure-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zlib maybe-check-zlib +maybe-check-zlib: + +check-zlib: + + +.PHONY: install-zlib maybe-install-zlib +maybe-install-zlib: + +install-zlib: + + +.PHONY: configure-gdb maybe-configure-gdb +maybe-configure-gdb: +configure-gdb: + @test ! -f gdb/Makefile || exit 0; \ + [ -d gdb ] || mkdir gdb; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gdb; \ + cd gdb || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gdb maybe-all-gdb +maybe-all-gdb: +all-gdb: configure-gdb + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-gdb maybe-check-gdb +maybe-check-gdb: + +check-gdb: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-gdb maybe-install-gdb +maybe-install-gdb: + +install-gdb: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-expect maybe-configure-expect +maybe-configure-expect: +configure-expect: + @test ! -f expect/Makefile || exit 0; \ + [ -d expect ] || mkdir expect; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in expect; \ + cd expect || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-expect maybe-all-expect +maybe-all-expect: +all-expect: configure-expect + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-expect maybe-check-expect +maybe-check-expect: + +check-expect: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-expect maybe-install-expect +maybe-install-expect: + +install-expect: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-guile maybe-configure-guile +maybe-configure-guile: +configure-guile: + @test ! -f guile/Makefile || exit 0; \ + [ -d guile ] || mkdir guile; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in guile; \ + cd guile || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-guile maybe-all-guile +maybe-all-guile: +all-guile: configure-guile + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-guile maybe-check-guile +maybe-check-guile: + +check-guile: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-guile maybe-install-guile +maybe-install-guile: + +install-guile: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tk maybe-configure-tk +maybe-configure-tk: +configure-tk: + @test ! -f tk/Makefile || exit 0; \ + [ -d tk ] || mkdir tk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tk; \ + cd tk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tk maybe-all-tk +maybe-all-tk: +all-tk: configure-tk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tk maybe-check-tk +maybe-check-tk: + +check-tk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tk maybe-install-tk +maybe-install-tk: + +install-tk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tix maybe-configure-tix +maybe-configure-tix: +configure-tix: + @test ! -f tix/Makefile || exit 0; \ + [ -d tix ] || mkdir tix; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tix; \ + cd tix || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tix maybe-all-tix +maybe-all-tix: +all-tix: configure-tix + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tix maybe-check-tix +maybe-check-tix: + +check-tix: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tix maybe-install-tix +maybe-install-tix: + +install-tix: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-libtermcap maybe-configure-libtermcap +maybe-configure-libtermcap: +configure-libtermcap: + @test ! -f libtermcap/Makefile || exit 0; \ + [ -d libtermcap ] || mkdir libtermcap; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtermcap; \ + cd libtermcap || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtermcap maybe-all-libtermcap +maybe-all-libtermcap: +all-libtermcap: configure-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtermcap maybe-check-libtermcap +maybe-check-libtermcap: + +check-libtermcap: + + +.PHONY: install-libtermcap maybe-install-libtermcap +maybe-install-libtermcap: + +install-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-utils maybe-configure-utils +maybe-configure-utils: +configure-utils: + @test ! -f utils/Makefile || exit 0; \ + [ -d utils ] || mkdir utils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in utils; \ + cd utils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-utils maybe-all-utils +maybe-all-utils: +all-utils: configure-utils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-utils maybe-check-utils +maybe-check-utils: + +check-utils: + + +.PHONY: install-utils maybe-install-utils +maybe-install-utils: + +install-utils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) install) + + + +# --------------------------------------- +# Modules which run on the target machine +# --------------------------------------- + +.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 +maybe-configure-target-libstdc++-v3: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + +configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \ + cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ + libsrcdir="$$s/libstdc++-v3"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3 +maybe-all-target-libstdc++-v3: +all-target-libstdc++-v3: configure-target-libstdc++-v3 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3 +maybe-check-target-libstdc++-v3: + +check-target-libstdc++-v3: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3 +maybe-install-target-libstdc++-v3: + +install-target-libstdc++-v3: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-newlib maybe-configure-target-newlib +maybe-configure-target-newlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out + +configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/newlib; \ + cd "$(TARGET_SUBDIR)/newlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/newlib"; \ + libsrcdir="$$s/newlib"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-newlib maybe-all-target-newlib +maybe-all-target-newlib: +all-target-newlib: configure-target-newlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-newlib maybe-check-target-newlib +maybe-check-target-newlib: + +check-target-newlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-newlib maybe-install-target-newlib +maybe-install-target-newlib: + +install-target-newlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libf2c maybe-configure-target-libf2c +maybe-configure-target-libf2c: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out + +configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out + @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libf2c; \ + cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libf2c"; \ + libsrcdir="$$s/libf2c"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libf2c maybe-all-target-libf2c +maybe-all-target-libf2c: +all-target-libf2c: configure-target-libf2c + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libf2c maybe-check-target-libf2c +maybe-check-target-libf2c: + +check-target-libf2c: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libf2c maybe-install-target-libf2c +maybe-install-target-libf2c: + +install-target-libf2c: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libobjc maybe-configure-target-libobjc +maybe-configure-target-libobjc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out + +configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out + @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libobjc; \ + cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libobjc"; \ + libsrcdir="$$s/libobjc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libobjc maybe-all-target-libobjc +maybe-all-target-libobjc: +all-target-libobjc: configure-target-libobjc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libobjc maybe-check-target-libobjc +maybe-check-target-libobjc: + +check-target-libobjc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libobjc maybe-install-target-libobjc +maybe-install-target-libobjc: + +install-target-libobjc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap +maybe-configure-target-libtermcap: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out + +configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out + @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libtermcap; \ + cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libtermcap"; \ + libsrcdir="$$s/libtermcap"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libtermcap maybe-all-target-libtermcap +maybe-all-target-libtermcap: +all-target-libtermcap: configure-target-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libtermcap maybe-check-target-libtermcap +maybe-check-target-libtermcap: + +# Dummy target for uncheckable module. +check-target-libtermcap: + + +.PHONY: install-target-libtermcap maybe-install-target-libtermcap +maybe-install-target-libtermcap: + +install-target-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-winsup maybe-configure-target-winsup +maybe-configure-target-winsup: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out + +configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out + @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/winsup; \ + cd "$(TARGET_SUBDIR)/winsup" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/winsup"; \ + libsrcdir="$$s/winsup"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-winsup maybe-all-target-winsup +maybe-all-target-winsup: +all-target-winsup: configure-target-winsup + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-winsup maybe-check-target-winsup +maybe-check-target-winsup: + +check-target-winsup: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-winsup maybe-install-target-winsup +maybe-install-target-winsup: + +install-target-winsup: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libgloss maybe-configure-target-libgloss +maybe-configure-target-libgloss: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out + +configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out + @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libgloss; \ + cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libgloss"; \ + libsrcdir="$$s/libgloss"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libgloss maybe-all-target-libgloss +maybe-all-target-libgloss: +all-target-libgloss: configure-target-libgloss + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libgloss maybe-check-target-libgloss +maybe-check-target-libgloss: + +# Dummy target for uncheckable module. +check-target-libgloss: + + +.PHONY: install-target-libgloss maybe-install-target-libgloss +maybe-install-target-libgloss: + +install-target-libgloss: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libiberty maybe-configure-target-libiberty +maybe-configure-target-libiberty: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out + +configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out + @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libiberty; \ + cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libiberty maybe-all-target-libiberty +maybe-all-target-libiberty: +all-target-libiberty: configure-target-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libiberty maybe-check-target-libiberty +maybe-check-target-libiberty: + +check-target-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libiberty maybe-install-target-libiberty +maybe-install-target-libiberty: + +install-target-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-gperf maybe-configure-target-gperf +maybe-configure-target-gperf: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out + +configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out + @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/gperf; \ + cd "$(TARGET_SUBDIR)/gperf" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/gperf"; \ + libsrcdir="$$s/gperf"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-gperf maybe-all-target-gperf +maybe-all-target-gperf: +all-target-gperf: configure-target-gperf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-gperf maybe-check-target-gperf +maybe-check-target-gperf: + +check-target-gperf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-gperf maybe-install-target-gperf +maybe-install-target-gperf: + +install-target-gperf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-examples maybe-configure-target-examples +maybe-configure-target-examples: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/examples/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out + +configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out + @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/examples; \ + cd "$(TARGET_SUBDIR)/examples" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/examples"; \ + libsrcdir="$$s/examples"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-examples maybe-all-target-examples +maybe-all-target-examples: +all-target-examples: configure-target-examples + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-examples maybe-check-target-examples +maybe-check-target-examples: + +# Dummy target for uncheckable module. +check-target-examples: + + +.PHONY: install-target-examples maybe-install-target-examples +maybe-install-target-examples: + +# Dummy target for uninstallable. +install-target-examples: + + +.PHONY: configure-target-libffi maybe-configure-target-libffi +maybe-configure-target-libffi: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out + +configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out + @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libffi; \ + cd "$(TARGET_SUBDIR)/libffi" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libffi"; \ + libsrcdir="$$s/libffi"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libffi maybe-all-target-libffi +maybe-all-target-libffi: +all-target-libffi: configure-target-libffi + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libffi maybe-check-target-libffi +maybe-check-target-libffi: + +check-target-libffi: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libffi maybe-install-target-libffi +maybe-install-target-libffi: + +install-target-libffi: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libjava maybe-configure-target-libjava +maybe-configure-target-libjava: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out + +configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out + @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libjava; \ + cd "$(TARGET_SUBDIR)/libjava" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libjava"; \ + libsrcdir="$$s/libjava"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libjava maybe-all-target-libjava +maybe-all-target-libjava: +all-target-libjava: configure-target-libjava + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libjava maybe-check-target-libjava +maybe-check-target-libjava: + +check-target-libjava: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libjava maybe-install-target-libjava +maybe-install-target-libjava: + +install-target-libjava: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-zlib maybe-configure-target-zlib +maybe-configure-target-zlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out + +configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/zlib; \ + cd "$(TARGET_SUBDIR)/zlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/zlib"; \ + libsrcdir="$$s/zlib"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-zlib maybe-all-target-zlib +maybe-all-target-zlib: +all-target-zlib: configure-target-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-zlib maybe-check-target-zlib +maybe-check-target-zlib: + +check-target-zlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-zlib maybe-install-target-zlib +maybe-install-target-zlib: + +install-target-zlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc +maybe-configure-target-boehm-gc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out + +configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out + @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \ + cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/boehm-gc"; \ + libsrcdir="$$s/boehm-gc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc +maybe-all-target-boehm-gc: +all-target-boehm-gc: configure-target-boehm-gc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc +maybe-check-target-boehm-gc: + +check-target-boehm-gc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc +maybe-install-target-boehm-gc: + +install-target-boehm-gc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-qthreads maybe-configure-target-qthreads +maybe-configure-target-qthreads: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out + +configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out + @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/qthreads; \ + cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/qthreads"; \ + libsrcdir="$$s/qthreads"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-qthreads maybe-all-target-qthreads +maybe-all-target-qthreads: +all-target-qthreads: configure-target-qthreads + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-qthreads maybe-check-target-qthreads +maybe-check-target-qthreads: + +check-target-qthreads: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-qthreads maybe-install-target-qthreads +maybe-install-target-qthreads: + +install-target-qthreads: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-rda maybe-configure-target-rda +maybe-configure-target-rda: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/rda/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out + +configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out + @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/rda; \ + cd "$(TARGET_SUBDIR)/rda" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/rda"; \ + libsrcdir="$$s/rda"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-rda maybe-all-target-rda +maybe-all-target-rda: +all-target-rda: configure-target-rda + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-rda maybe-check-target-rda +maybe-check-target-rda: + +check-target-rda: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-rda maybe-install-target-rda +maybe-install-target-rda: + +install-target-rda: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libada maybe-configure-target-libada +maybe-configure-target-libada: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libada/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out + +configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out + @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libada; \ + cd "$(TARGET_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libada maybe-all-target-libada +maybe-all-target-libada: +all-target-libada: configure-target-libada + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libada maybe-check-target-libada +maybe-check-target-libada: + +check-target-libada: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libada maybe-install-target-libada +maybe-install-target-libada: + +install-target-libada: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + + +# ---------- +# GCC module +# ---------- + +# Unfortunately, while gcc _should_ be a host module, +# libgcc is a target module, and gen* programs are +# build modules. So GCC is a sort of hybrid. + +# gcc is the only module which uses GCC_FLAGS_TO_PASS. +# Don't use shared host config.cache, as it will confuse later +# directories; GCC wants slightly different values for some +# precious variables. *sigh* +.PHONY: configure-gcc maybe-configure-gcc +maybe-configure-gcc: +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that +# causes trouble. This wart will be fixed eventually by moving +# the bootstrap behavior to this file. +.PHONY: all-gcc maybe-all-gcc +maybe-all-gcc: +all-gcc: configure-gcc + @if [ -f gcc/stage_last ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ + else \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ + fi + +# Building GCC uses some tools for rebuilding "source" files +# like texinfo, bison/byacc, etc. So we must depend on those. +# +# While building GCC, it may be necessary to run various target +# programs like the assembler, linker, etc. So we depend on +# those too. +# +# In theory, on an SMP all those dependencies can be resolved +# in parallel. +# +GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap +.PHONY: $(GCC_STRAP_TARGETS) +$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + case "$@" in \ + *bootstrap4-lean ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3-lean ;; \ + *bootstrap4 ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3 ;; \ + *-lean ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare-lean ;; \ + * ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare ;; \ + esac; \ + $(SET_LIB_PATH) \ + echo "$$msg"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + +profiledbootstrap: all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries and training compiler"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building feedback based compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build + +.PHONY: cross +cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building the C and C++ compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all + +.PHONY: check-gcc maybe-check-gcc +maybe-check-gcc: +check-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ + else \ + true; \ + fi + +.PHONY: check-gcc-c++ +check-gcc-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + else \ + true; \ + fi + +.PHONY: check-c++ +check-c++: check-target-libstdc++-v3 check-gcc-c++ + +.PHONY: install-gcc maybe-install-gcc +maybe-install-gcc: +install-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + else \ + true; \ + fi + +# Install the gcc headers files, but not the fixed include files, +# which Cygnus is not allowed to distribute. This rule is very +# dependent on the workings of the gcc Makefile.in. +.PHONY: gcc-no-fixedincludes +gcc-no-fixedincludes: + @if [ -f ./gcc/Makefile ]; then \ + rm -rf gcc/tmp-include; \ + mv gcc/include gcc/tmp-include 2>/dev/null; \ + mkdir gcc/include; \ + cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ + touch gcc/stmp-fixinc gcc/include/fixed; \ + rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + rm -rf gcc/include; \ + mv gcc/tmp-include gcc/include 2>/dev/null; \ + else true; fi + +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- + +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. +# GCC needs to identify certain tools. +# GCC also needs the information exported by the intl configure script. +configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex +all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty +all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. +# GDB needs to know that the simulator is being built. +configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim +GDB_TK = @GDB_TK@ +all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) +install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui +configure-libgui: maybe-configure-tcl maybe-configure-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl + +# Host modules specific to binutils. +configure-bfd: configure-libiberty +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +install-binutils: maybe-install-opcodes +# libopcodes depends on libbfd +install-opcodes: maybe-install-bfd +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty + +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +configure-expect: maybe-configure-tcl maybe-configure-tk +all-expect: maybe-all-tcl maybe-all-tk +configure-itcl: maybe-configure-tcl maybe-configure-tk +all-itcl: maybe-all-tcl maybe-all-tk +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. +install-itcl: maybe-install-tcl +all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb +configure-tk: maybe-configure-tcl +all-tk: maybe-all-tcl +configure-tix: maybe-configure-tcl maybe-configure-tk +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty + +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty maybe-all-intl +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-tar: maybe-all-libiberty +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libada: $(ALL_GCC_C) +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-rda: $(ALL_GCC_C) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) + +# Dependencies of maybe-foo on foo. These are used because, for example, +# all-gcc only depends on all-gas if gas is present and being configured. +@maybe_dependencies@ + +# Serialization dependencies. Host configures don't work well in parallel to +# each other, due to contention over config.cache. Target configures and +# build configures are similar. +@serialization_dependencies@ + +# -------------------------------- +# Regenerating top level configury +# -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# work around various timestamp bugs on some systems. +# We use move-if-change so that it's only considered updated when it +# actually changes, because it has to depend on a phony target. +multilib.out: maybe-all-gcc + @r=`${PWD_COMMAND}`; export r; \ + echo "Checking multilib configuration..."; \ + $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ + $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ + +# Rebuilding Makefile.in, using autogen. +AUTOGEN = autogen +$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def + cd $(srcdir) && $(AUTOGEN) Makefile.def + +# Rebuilding Makefile. +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: configure $(gcc_version_trigger) + CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck + +# Rebuilding configure. +AUTOCONF = autoconf +$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4 + cd $(srcdir) && $(AUTOCONF) + +# ------------------------------ +# Special directives to GNU Make +# ------------------------------ + +# Don't pass command-line variables to submakes. +.NOEXPORT: +MAKEOVERRIDES= + +# end of Makefile.in diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/include/obstack.h /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/include/obstack.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/include/obstack.h 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/include/obstack.h 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,612 @@ +/* obstack.h - object stack macros + Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, + 1999, 2000 + Free Software Foundation, Inc. + Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserve + + + NOTE: The canonical source of this file is maintained with the GNU C Library. + Bugs can be reported to bug-glibc@gnu.org. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Summary: + +All the apparent functions defined here are macros. The idea +is that you would use these pre-tested macros to solve a +very specific set of problems, and they would run fast. +Caution: no side-effects in arguments please!! They may be +evaluated MANY times!! + +These macros operate a stack of objects. Each object starts life +small, and may grow to maturity. (Consider building a word syllable +by syllable.) An object can move while it is growing. Once it has +been "finished" it never changes address again. So the "top of the +stack" is typically an immature growing object, while the rest of the +stack is of mature, fixed size and fixed address objects. + +These routines grab large chunks of memory, using a function you +supply, called `obstack_chunk_alloc'. On occasion, they free chunks, +by calling `obstack_chunk_free'. You must define them and declare +them before using any obstack macros. + +Each independent stack is represented by a `struct obstack'. +Each of the obstack macros expects a pointer to such a structure +as the first argument. + +One motivation for this package is the problem of growing char strings +in symbol tables. Unless you are "fascist pig with a read-only mind" +--Gosper's immortal quote from HAKMEM item 154, out of context--you +would not like to put any arbitrary upper limit on the length of your +symbols. + +In practice this often means you will build many short symbols and a +few long symbols. At the time you are reading a symbol you don't know +how long it is. One traditional method is to read a symbol into a +buffer, realloc()ating the buffer every time you try to read a symbol +that is longer than the buffer. This is beaut, but you still will +want to copy the symbol from the buffer to a more permanent +symbol-table entry say about half the time. + +With obstacks, you can work differently. Use one obstack for all symbol +names. As you read a symbol, grow the name in the obstack gradually. +When the name is complete, finalize it. Then, if the symbol exists already, +free the newly read name. + +The way we do this is to take a large chunk, allocating memory from +low addresses. When you want to build a symbol in the chunk you just +add chars above the current "high water mark" in the chunk. When you +have finished adding chars, because you got to the end of the symbol, +you know how long the chars are, and you can create a new object. +Mostly the chars will not burst over the highest address of the chunk, +because you would typically expect a chunk to be (say) 100 times as +long as an average object. + +In case that isn't clear, when we have enough chars to make up +the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed) +so we just point to it where it lies. No moving of chars is +needed and this is the second win: potentially long strings need +never be explicitly shuffled. Once an object is formed, it does not +change its address during its lifetime. + +When the chars burst over a chunk boundary, we allocate a larger +chunk, and then copy the partly formed object from the end of the old +chunk to the beginning of the new larger chunk. We then carry on +accreting characters to the end of the object as we normally would. + +A special macro is provided to add a single char at a time to a +growing object. This allows the use of register variables, which +break the ordinary 'growth' macro. + +Summary: + We allocate large chunks. + We carve out one object at a time from the current chunk. + Once carved, an object never moves. + We are free to append data of any size to the currently + growing object. + Exactly one object is growing in an obstack at any one time. + You can run one obstack per control block. + You may have as many control blocks as you dare. + Because of the way we do it, you can `unwind' an obstack + back to a previous state. (You may remove objects much + as you would with a stack.) +*/ + + +/* Don't do the contents of this file more than once. */ + +#ifndef _OBSTACK_H +#define _OBSTACK_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* We use subtraction of (char *) 0 instead of casting to int + because on word-addressable machines a simple cast to int + may ignore the byte-within-word field of the pointer. */ + +#ifndef __PTR_TO_INT +# define __PTR_TO_INT(P) ((P) - (char *) 0) +#endif + +#ifndef __INT_TO_PTR +# define __INT_TO_PTR(P) ((P) + (char *) 0) +#endif + +/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is + defined, as with GNU C, use that; that way we don't pollute the + namespace with 's symbols. Otherwise, if is + available, include it and use ptrdiff_t. In traditional C, long is + the best that we can do. */ + +#ifdef __PTRDIFF_TYPE__ +# define PTR_INT_TYPE __PTRDIFF_TYPE__ +#else +# ifdef HAVE_STDDEF_H +# include +# define PTR_INT_TYPE ptrdiff_t +# else +# define PTR_INT_TYPE long +# endif +#endif + +#if defined _LIBC || defined HAVE_STRING_H +# include +# if defined __STDC__ && __STDC__ +# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N)) +# else +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# endif +#else +# ifdef memcpy +# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N)) +# else +# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N)) +# endif +#endif + +struct _obstack_chunk /* Lives at front of each chunk. */ +{ + char *limit; /* 1 past end of this chunk */ + struct _obstack_chunk *prev; /* address of prior chunk or NULL */ + char contents[4]; /* objects begin here */ +}; + +struct obstack /* control current object in current chunk */ +{ + long chunk_size; /* preferred size to allocate chunks in */ + struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ + char *object_base; /* address of object we are building */ + char *next_free; /* where to add next char to current object */ + char *chunk_limit; /* address of char after current chunk */ + PTR_INT_TYPE temp; /* Temporary for some macros. */ + int alignment_mask; /* Mask of alignment for each object. */ +#if defined __STDC__ && __STDC__ + /* These prototypes vary based on `use_extra_arg', and we use + casts to the prototypeless function type in all assignments, + but having prototypes here quiets -Wstrict-prototypes. */ + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#else + struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */ + void (*freefun) (); /* User's function to free a chunk. */ + char *extra_arg; /* first arg for chunk alloc/dealloc funcs */ +#endif + unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */ + unsigned maybe_empty_object:1;/* There is a possibility that the current + chunk contains a zero-length object. This + prevents freeing the chunk if we allocate + a bigger chunk to replace it. */ + unsigned alloc_failed:1; /* No longer used, as we now call the failed + handler on error, but retained for binary + compatibility. */ +}; + +/* Declare the external functions we use; they are in obstack.c. */ + +#if defined __STDC__ && __STDC__ +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); +#else +extern void _obstack_newchunk (); +extern void _obstack_free (); +extern int _obstack_begin (); +extern int _obstack_begin_1 (); +extern int _obstack_memory_used (); +#endif + +#if defined __STDC__ && __STDC__ + +/* Do the function-declarations after the structs + but before defining the macros. */ + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + +#endif /* __STDC__ */ + +/* Non-ANSI C cannot really support alternative functions for these macros, + so we do not declare them. */ + +/* Error handler called when `obstack_chunk_alloc' failed to allocate + more memory. This can be set to a user defined function. The + default action is to print a message and abort. */ +#if defined __STDC__ && __STDC__ +extern void (*obstack_alloc_failed_handler) (void); +#else +extern void (*obstack_alloc_failed_handler) (); +#endif + +/* Exit value used when `print_and_abort' is used. */ +extern int obstack_exit_failure; + +/* Pointer to beginning of object being allocated or to be allocated next. + Note that this might not be the final address of the object + because a new chunk might be needed to hold the final size. */ + +#define obstack_base(h) ((h)->object_base) + +/* Size for allocating ordinary chunks. */ + +#define obstack_chunk_size(h) ((h)->chunk_size) + +/* Pointer to next byte not yet allocated in current chunk. */ + +#define obstack_next_free(h) ((h)->next_free) + +/* Mask specifying low bits that should be clear in address of an object. */ + +#define obstack_alignment_mask(h) ((h)->alignment_mask) + +/* To prevent prototype warnings provide complete argument list in + standard C version. */ +#if defined __STDC__ && __STDC__ + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) (void *, long)) (chunkfun), \ + (void (*) (void *, void *)) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun)) + +#else + +# define obstack_init(h) \ + _obstack_begin ((h), 0, 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_begin(h, size) \ + _obstack_begin ((h), (size), 0, \ + (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free) + +# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \ + _obstack_begin ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun)) + +# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \ + _obstack_begin_1 ((h), (size), (alignment), \ + (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg)) + +# define obstack_chunkfun(h, newchunkfun) \ + ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun)) + +# define obstack_freefun(h, newfreefun) \ + ((h) -> freefun = (void (*)()) (newfreefun)) + +#endif + +#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar)) + +#define obstack_blank_fast(h,n) ((h)->next_free += (n)) + +#define obstack_memory_used(h) _obstack_memory_used (h) + +#if defined __GNUC__ && defined __STDC__ && __STDC__ +/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and + does not implement __extension__. But that compiler doesn't define + __GNUC_MINOR__. */ +# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) +# define __extension__ +# endif + +/* For GNU C, if not -traditional, + we can define these macros to compute all args only once + without using a global variable. + Also, we can avoid using the `temp' slot, to make faster code. */ + +# define obstack_object_size(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->next_free - __o->object_base); }) + +# define obstack_room(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (unsigned) (__o->chunk_limit - __o->next_free); }) + +# define obstack_make_room(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + (void) 0; }) + +# define obstack_empty_p(OBSTACK) \ + __extension__ \ + ({ struct obstack *__o = (OBSTACK); \ + (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); }) + +# define obstack_grow(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len > __o->chunk_limit) \ + _obstack_newchunk (__o, __len); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + (void) 0; }) + +# define obstack_grow0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->next_free + __len + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, __len + 1); \ + _obstack_memcpy (__o->next_free, (where), __len); \ + __o->next_free += __len; \ + *(__o->next_free)++ = 0; \ + (void) 0; }) + +# define obstack_1grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + 1 > __o->chunk_limit) \ + _obstack_newchunk (__o, 1); \ + obstack_1grow_fast (__o, datum); \ + (void) 0; }) + +/* These assume that the obstack alignment is good enough for pointers or ints, + and that the data added so far to the current object + shares that much alignment. */ + +# define obstack_ptr_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + obstack_ptr_grow_fast (__o, datum); }) + +# define obstack_int_grow(OBSTACK,datum) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + if (__o->next_free + sizeof (int) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (int)); \ + obstack_int_grow_fast (__o, datum); }) + +# define obstack_ptr_grow_fast(OBSTACK,aptr) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(const void **) __o1->next_free = (aptr); \ + __o1->next_free += sizeof (const void *); \ + (void) 0; }) + +# define obstack_int_grow_fast(OBSTACK,aint) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + *(int *) __o1->next_free = (aint); \ + __o1->next_free += sizeof (int); \ + (void) 0; }) + +# define obstack_blank(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + int __len = (length); \ + if (__o->chunk_limit - __o->next_free < __len) \ + _obstack_newchunk (__o, __len); \ + obstack_blank_fast (__o, __len); \ + (void) 0; }) + +# define obstack_alloc(OBSTACK,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_blank (__h, (length)); \ + obstack_finish (__h); }) + +# define obstack_copy(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow (__h, (where), (length)); \ + obstack_finish (__h); }) + +# define obstack_copy0(OBSTACK,where,length) \ +__extension__ \ +({ struct obstack *__h = (OBSTACK); \ + obstack_grow0 (__h, (where), (length)); \ + obstack_finish (__h); }) + +/* The local variable is named __o1 to avoid a name conflict + when obstack_blank is called. */ +# define obstack_finish(OBSTACK) \ +__extension__ \ +({ struct obstack *__o1 = (OBSTACK); \ + void *value; \ + value = (void *) __o1->object_base; \ + if (__o1->next_free == value) \ + __o1->maybe_empty_object = 1; \ + __o1->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ + & ~ (__o1->alignment_mask)); \ + if (__o1->next_free - (char *)__o1->chunk \ + > __o1->chunk_limit - (char *)__o1->chunk) \ + __o1->next_free = __o1->chunk_limit; \ + __o1->object_base = __o1->next_free; \ + value; }) + +# define obstack_free(OBSTACK, OBJ) \ +__extension__ \ +({ struct obstack *__o = (OBSTACK); \ + void *__obj = (void *) (OBJ); \ + if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \ + __o->next_free = __o->object_base = (char *) __obj; \ + else (obstack_free) (__o, __obj); }) + +#else /* not __GNUC__ or not __STDC__ */ + +# define obstack_object_size(h) \ + (unsigned) ((h)->next_free - (h)->object_base) + +# define obstack_room(h) \ + (unsigned) ((h)->chunk_limit - (h)->next_free) + +# define obstack_empty_p(h) \ + ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0) + +/* Note that the call to _obstack_newchunk is enclosed in (..., 0) + so that we can avoid having void expressions + in the arms of the conditional expression. + Casting the third operand to void was tried before, + but some compilers won't accept it. */ + +# define obstack_make_room(h,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0)) + +# define obstack_grow(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp) + +# define obstack_grow0(h,where,length) \ +( (h)->temp = (length), \ + (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \ + _obstack_memcpy ((h)->next_free, (where), (h)->temp), \ + (h)->next_free += (h)->temp, \ + *((h)->next_free)++ = 0) + +# define obstack_1grow(h,datum) \ +( (((h)->next_free + 1 > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), 1), 0) : 0), \ + obstack_1grow_fast (h, datum)) + +# define obstack_ptr_grow(h,datum) \ +( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ + obstack_ptr_grow_fast (h, datum)) + +# define obstack_int_grow(h,datum) \ +( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \ + ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ + obstack_int_grow_fast (h, datum)) + +# define obstack_ptr_grow_fast(h,aptr) \ + (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) + +# define obstack_int_grow_fast(h,aint) \ + (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr)) + +# define obstack_blank(h,length) \ +( (h)->temp = (length), \ + (((h)->chunk_limit - (h)->next_free < (h)->temp) \ + ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \ + obstack_blank_fast (h, (h)->temp)) + +# define obstack_alloc(h,length) \ + (obstack_blank ((h), (length)), obstack_finish ((h))) + +# define obstack_copy(h,where,length) \ + (obstack_grow ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_copy0(h,where,length) \ + (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) + +# define obstack_finish(h) \ +( ((h)->next_free == (h)->object_base \ + ? (((h)->maybe_empty_object = 1), 0) \ + : 0), \ + (h)->temp = __PTR_TO_INT ((h)->object_base), \ + (h)->next_free \ + = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \ + & ~ ((h)->alignment_mask)), \ + (((h)->next_free - (char *) (h)->chunk \ + > (h)->chunk_limit - (char *) (h)->chunk) \ + ? ((h)->next_free = (h)->chunk_limit) : 0), \ + (h)->object_base = (h)->next_free, \ + __INT_TO_PTR ((h)->temp)) + +# if defined __STDC__ && __STDC__ +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) +# else +# define obstack_free(h,obj) \ +( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ + (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ + ? (int) ((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk) \ + : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0))) +# endif + +#endif /* not __GNUC__ or not __STDC__ */ + +#ifdef __cplusplus +} /* C++ */ +#endif + +#endif /* obstack.h */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/Makefile.in /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/Makefile.in --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb-6.1/gdb-6.1/Makefile.in 1969-12-31 18:00:00.000000000 -0600 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb-6.1/gdb-6.1/Makefile.in 2007-11-20 19:29:52.000000000 -0600 @@ -0,0 +1,23927 @@ + +# Makefile.in is generated from Makefile.tpl by 'autogen Makefile.def'. +# +# Makefile for directory with subdirs to build. +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001, 2002, 2003 Free Software Foundation +# Copyright (c) 2004, 2005 Red Hat, Inc. All rights reserved +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# ------------------------------- +# Standard Autoconf-set variables +# ------------------------------- +VPATH=@srcdir@ + +build_alias=@build_alias@ +build=@build@ +host_alias=@host_alias@ +host=@host@ +target_alias=@target_alias@ +target=@target@ + +program_transform_name = @program_transform_name@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +srcdir = @srcdir@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +includedir = @includedir@ +oldincludedir = @oldincludedir@ +infodir = @infodir@ +mandir = @mandir@ +man1dir = $(mandir)/man1 +man2dir = $(mandir)/man2 +man3dir = $(mandir)/man3 +man4dir = $(mandir)/man4 +man5dir = $(mandir)/man5 +man6dir = $(mandir)/man6 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 +man9dir = $(mandir)/man9 + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ + +# ------------------------------------------------- +# Miscellaneous non-standard autoconf-set variables +# ------------------------------------------------- + +links=@configlinks@ +# The file containing GCC's version number. +gcc_version_trigger = @gcc_version_trigger@ +gcc_version = @gcc_version@ + +# The gcc driver likes to know the arguments it was configured with. +TOPLEVEL_CONFIGURE_ARGUMENTS=@TOPLEVEL_CONFIGURE_ARGUMENTS@ + +gxx_include_dir = @gxx_include_dir@ +libstdcxx_incdir = @libstdcxx_incdir@ + +tooldir = @tooldir@ +build_tooldir = @build_tooldir@ + +# Directory in which the compiler finds executables, libraries, etc. +libsubdir = $(libdir)/gcc/$(target_alias)/$(gcc_version) +GDB_NLM_DEPS = + +# This is the name of the environment variable used for the path to +# the libraries. +RPATH_ENVVAR = @RPATH_ENVVAR@ + +# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared +# was used. +SET_LIB_PATH = @SET_LIB_PATH@ + +# configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. +REALLY_SET_LIB_PATH = \ + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + +# This is the list of directories to be built for the build system. +BUILD_CONFIGDIRS = libiberty +# Build programs are put under this directory. +BUILD_SUBDIR = @build_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the build system. +BUILD_CONFIGARGS = @build_configargs@ + +# This is the list of directories to built for the host system. +SUBDIRS = @configdirs@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the host system. +HOST_CONFIGARGS = @host_configargs@ + +# This is set by the configure script to the list of directories which +# should be built using the target tools. +TARGET_CONFIGDIRS = @target_configdirs@ +# Target libraries are put under this directory: +TARGET_SUBDIR = @target_subdir@ +# This is set by the configure script to the arguments to use when configuring +# directories built for the target. +TARGET_CONFIGARGS = @target_configargs@ + +# ---------------------------------------------- +# Programs producing files for the BUILD machine +# ---------------------------------------------- + +SHELL = @config_shell@ + +# pwd command to use. Allow user to override default by setting PWDCMD in +# the environment to account for automounters. The make variable must not +# be called PWDCMD, otherwise the value set here is passed to make +# subprocesses and overrides the setting from the user's environment. +# Don't use PWD since it is a common shell environment variable and we +# don't want to corrupt it. +PWD_COMMAND = $${PWDCMD-pwd} + +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) + +# compilers to use to create programs which must be run in the build +# environment. +CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + +ifeq ($(ARCH), ppc64) +CFLAGS_FOR_BUILD += -m64 -fPIC +endif + +CXX_FOR_BUILD = $(CXX) + +# Special variables passed down in EXTRA_GCC_FLAGS. They are defined +# here so that they can be overridden by Makefile fragments. +BUILD_PREFIX = @BUILD_PREFIX@ +BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + +BISON=@BISON@ +USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -L $$s/bison/ ; \ + else \ + echo bison ; \ + fi` + +DEFAULT_YACC = @DEFAULT_YACC@ +YACC=@YACC@ +USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \ + echo $$r/bison/bison -y -L $$s/bison/ ; \ + elif [ -f $$r/byacc/byacc ] ; then \ + echo $$r/byacc/byacc ; \ + else \ + echo ${DEFAULT_YACC} ; \ + fi` + +DEFAULT_LEX = @DEFAULT_LEX@ +LEX=@LEX@ +USUAL_LEX = `if [ -f $$r/flex/flex ] ; \ + then echo $$r/flex/flex ; \ + else echo ${DEFAULT_LEX} ; fi` + +DEFAULT_M4 = @DEFAULT_M4@ +M4 = `if [ -f $$r/m4/m4 ] ; \ + then echo $$r/m4/m4 ; \ + else echo ${DEFAULT_M4} ; fi` + +# For an installed makeinfo, we require it to be from texinfo 4.2 or +# higher, else we use the "missing" dummy. +MAKEINFO=@MAKEINFO@ +USUAL_MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ + then echo $$r/texinfo/makeinfo/makeinfo ; \ + else if (makeinfo --version \ + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \ + then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` + +# This just becomes part of the MAKEINFO definition passed down to +# sub-makes. It lets flags be given on the command line while still +# using the makeinfo from the object tree. +# (Default to avoid splitting info files by setting the threshold high.) +MAKEINFOFLAGS = --split-size=5000000 + +EXPECT = `if [ -f $$r/expect/expect ] ; \ + then echo $$r/expect/expect ; \ + else echo expect ; fi` + +RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ + then echo $$s/dejagnu/runtest ; \ + else echo runtest ; fi` + +# --------------------------------------------- +# Programs producing files for the HOST machine +# --------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +AS = @AS@ + +AR = @AR@ +AR_FLAGS = rc + +CC = @CC@ +CFLAGS = @CFLAGS@ +ifeq ($(ARCH), ppc64) +CFLAGS += -m64 -fPIC +endif +LIBCFLAGS = $(CFLAGS) + +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates + +DLLTOOL = @DLLTOOL@ + +NM = @NM@ + +LD = @LD@ +LDFLAGS = + +RANLIB = @RANLIB@ + +WINDRES = @WINDRES@ + +PICFLAG = + +# ----------------------------------------------- +# Programs producing files for the TARGET machine +# ----------------------------------------------- + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: + +FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ + +AR_FOR_TARGET=@AR_FOR_TARGET@ +USUAL_AR_FOR_TARGET = ` \ + if [ -f $$r/binutils/ar ] ; then \ + echo $$r/binutils/ar ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AR); \ + else \ + echo ar | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +AS_FOR_TARGET=@AS_FOR_TARGET@ +USUAL_AS_FOR_TARGET = ` \ + if [ -f $$r/gas/as-new ] ; then \ + echo $$r/gas/as-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=as ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(AS); \ + else \ + echo as | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +CC_FOR_TARGET = @CC_FOR_TARGET@ +# During gcc bootstrap, if we use some random cc for stage1 then +# CFLAGS will be just -g. We want to ensure that TARGET libraries +# (which we know are built with gcc) are built with optimizations so +# prepend -O2 when setting CFLAGS_FOR_TARGET. +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +# If GCC_FOR_TARGET is not overriden on the command line, then this +# variable is passed down to the gcc Makefile, where it is used to +# build libgcc2.a. We define it here so that it can itself be +# overridden on the command line. +GCC_FOR_TARGET=@GCC_FOR_TARGET@ +USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) +LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) + +CXX_FOR_TARGET = @CXX_FOR_TARGET@ +RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@ +CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@ +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates + +DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ +USUAL_DLLTOOL_FOR_TARGET = ` \ + if [ -f $$r/binutils/dlltool ] ; then \ + echo $$r/binutils/dlltool ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(DLLTOOL); \ + else \ + echo dlltool | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +GCJ_FOR_TARGET = @GCJ_FOR_TARGET@ + +LD_FOR_TARGET=@LD_FOR_TARGET@ +USUAL_LD_FOR_TARGET = ` \ + if [ -f $$r/ld/ld-new ] ; then \ + echo $$r/ld/ld-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=ld ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(LD); \ + else \ + echo ld | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +LDFLAGS_FOR_TARGET = + +NM_FOR_TARGET=@NM_FOR_TARGET@ +USUAL_NM_FOR_TARGET = ` \ + if [ -f $$r/binutils/nm-new ] ; then \ + echo $$r/binutils/nm-new ; \ + elif [ -f $$r/gcc/xgcc ]; then \ + $(CC_FOR_TARGET) -print-prog-name=nm ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(NM); \ + else \ + echo nm | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@ +USUAL_RANLIB_FOR_TARGET = ` \ + if [ -f $$r/binutils/ranlib ] ; then \ + echo $$r/binutils/ranlib ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + if [ x'$(RANLIB)' != x ]; then \ + echo $(RANLIB); \ + else \ + echo ranlib; \ + fi; \ + else \ + echo ranlib | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@ +USUAL_WINDRES_FOR_TARGET = ` \ + if [ -f $$r/binutils/windres ] ; then \ + echo $$r/binutils/windres ; \ + else \ + if [ '$(host)' = '$(target)' ] ; then \ + echo $(WINDRES); \ + else \ + echo windres | sed '$(program_transform_name)' ; \ + fi; \ + fi` + +PICFLAG_FOR_TARGET = + +# ------------------------------------ +# Miscellaneous targets and flag lists +# ------------------------------------ + +# The first rule in the file had better be this one. Don't put any above it. +# This lives here to allow makefile fragments to contain dependencies. +all: all.normal +.PHONY: all + +#### host and target specific makefile fragments come in here. +@target_makefile_frag@ +@alphaieee_frag@ +@ospace_frag@ +@host_makefile_frag@ +### + +# Flags to pass down to all sub-makes. +BASE_FLAGS_TO_PASS = \ + "DESTDIR=$(DESTDIR)" \ + "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ + "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ + "bindir=$(bindir)" \ + "datadir=$(datadir)" \ + "exec_prefix=$(exec_prefix)" \ + "includedir=$(includedir)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "libexecdir=$(libexecdir)" \ + "lispdir=$(lispdir)" \ + "libstdcxx_incdir=$(libstdcxx_incdir)" \ + "libsubdir=$(libsubdir)" \ + "localstatedir=$(localstatedir)" \ + "mandir=$(mandir)" \ + "oldincludedir=$(oldincludedir)" \ + "prefix=$(prefix)" \ + "sbindir=$(sbindir)" \ + "sharedstatedir=$(sharedstatedir)" \ + "sysconfdir=$(sysconfdir)" \ + "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "gcc_version=$(gcc_version)" \ + "gcc_version_trigger=$(gcc_version_trigger)" \ + "target_alias=$(target_alias)" \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ + "RUNTEST=$(RUNTEST)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "SHELL=$(SHELL)" \ + "YACC=$(YACC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ + "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ + "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ + "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ + "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ + "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ + "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ + "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ + "CONFIG_SHELL=$(SHELL)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" + +# For any flags above that may contain shell code that varies from one +# target library to another. When doing recursive invocations of the +# top-level Makefile, we don't want the outer make to evaluate them, +# so we pass these variables down unchanged. They must not contain +# single nor double quotes. +RECURSE_FLAGS = \ + CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + RAW_CXX_FOR_TARGET='$(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' \ + +# Flags to pass down to most sub-makes, in which we're building with +# the host environment. +EXTRA_HOST_FLAGS = \ + 'AR=$(AR)' \ + 'AS=$(AS)' \ + 'CC=$(CC)' \ + 'CXX=$(CXX)' \ + 'DLLTOOL=$(DLLTOOL)' \ + 'LD=$(LD)' \ + 'NM=$(NM)' \ + 'RANLIB=$(RANLIB)' \ + 'WINDRES=$(WINDRES)' + +FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) + +# Flags that are concerned with the location of the X11 include files +# and library files +# +# NOTE: until the top-level is getting the values via autoconf, it only +# causes problems to have this top-level Makefile overriding the autoconf-set +# values in child directories. Only variables that don't conflict with +# autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. +# +X11_FLAGS_TO_PASS = \ + 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ + 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' + +# Flags to pass down to makes which are built with the target environment. +# The double $ decreases the length of the command line; the variables +# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. +EXTRA_TARGET_FLAGS = \ + 'AR=$$(AR_FOR_TARGET)' \ + 'AS=$$(AS_FOR_TARGET)' \ + 'CC=$$(CC_FOR_TARGET)' \ + 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ + 'CXX=$$(CXX_FOR_TARGET)' \ + 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ + 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ + 'LD=$$(LD_FOR_TARGET)' \ + 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ + 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ + 'NM=$$(NM_FOR_TARGET)' \ + 'RANLIB=$$(RANLIB_FOR_TARGET)' \ + 'WINDRES=$$(WINDRES_FOR_TARGET)' + +TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) + +# Flags to pass down to gcc. gcc builds a library, libgcc.a, so it +# unfortunately needs the native compiler and the target ar and +# ranlib. +# If any variables are added here, they must be added to do-*, below. +# The BUILD_* variables are a special case, which are used for the gcc +# cross-building scheme. +EXTRA_GCC_FLAGS = \ + 'BUILD_PREFIX=$(BUILD_PREFIX)' \ + 'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \ + "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \ + "`echo 'BOOT_ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" + +GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS) + +.PHONY: configure-host +configure-host: maybe-configure-gcc \ + maybe-configure-ash \ + maybe-configure-autoconf \ + maybe-configure-automake \ + maybe-configure-bash \ + maybe-configure-bfd \ + maybe-configure-opcodes \ + maybe-configure-binutils \ + maybe-configure-bison \ + maybe-configure-byacc \ + maybe-configure-bzip2 \ + maybe-configure-dejagnu \ + maybe-configure-diff \ + maybe-configure-dosutils \ + maybe-configure-etc \ + maybe-configure-fastjar \ + maybe-configure-fileutils \ + maybe-configure-findutils \ + maybe-configure-find \ + maybe-configure-flex \ + maybe-configure-gas \ + maybe-configure-gawk \ + maybe-configure-gettext \ + maybe-configure-gnuserv \ + maybe-configure-gprof \ + maybe-configure-gzip \ + maybe-configure-hello \ + maybe-configure-indent \ + maybe-configure-intl \ + maybe-configure-tcl \ + maybe-configure-itcl \ + maybe-configure-ld \ + maybe-configure-libgui \ + maybe-configure-libiberty \ + maybe-configure-libtool \ + maybe-configure-m4 \ + maybe-configure-make \ + maybe-configure-mmalloc \ + maybe-configure-patch \ + maybe-configure-perl \ + maybe-configure-prms \ + maybe-configure-rcs \ + maybe-configure-readline \ + maybe-configure-release \ + maybe-configure-recode \ + maybe-configure-sed \ + maybe-configure-send-pr \ + maybe-configure-shellutils \ + maybe-configure-sid \ + maybe-configure-sim \ + maybe-configure-tar \ + maybe-configure-texinfo \ + maybe-configure-textutils \ + maybe-configure-time \ + maybe-configure-uudecode \ + maybe-configure-wdiff \ + maybe-configure-zip \ + maybe-configure-zlib \ + maybe-configure-gdb \ + maybe-configure-expect \ + maybe-configure-guile \ + maybe-configure-tk \ + maybe-configure-tix \ + maybe-configure-libtermcap \ + maybe-configure-utils +.PHONY: configure-target +configure-target: \ + maybe-configure-target-libstdc++-v3 \ + maybe-configure-target-newlib \ + maybe-configure-target-libf2c \ + maybe-configure-target-libobjc \ + maybe-configure-target-libtermcap \ + maybe-configure-target-winsup \ + maybe-configure-target-libgloss \ + maybe-configure-target-libiberty \ + maybe-configure-target-gperf \ + maybe-configure-target-examples \ + maybe-configure-target-libffi \ + maybe-configure-target-libjava \ + maybe-configure-target-zlib \ + maybe-configure-target-boehm-gc \ + maybe-configure-target-qthreads \ + maybe-configure-target-rda \ + maybe-configure-target-libada + +# The target built for a native build. +.PHONY: all.normal +all.normal: @all_build_modules@ all-host all-target + +.PHONY: all-host +all-host: maybe-all-gcc \ + maybe-all-ash \ + maybe-all-autoconf \ + maybe-all-automake \ + maybe-all-bash \ + maybe-all-bfd \ + maybe-all-opcodes \ + maybe-all-binutils \ + maybe-all-bison \ + maybe-all-byacc \ + maybe-all-bzip2 \ + maybe-all-dejagnu \ + maybe-all-diff \ + maybe-all-dosutils \ + maybe-all-etc \ + maybe-all-fastjar \ + maybe-all-fileutils \ + maybe-all-findutils \ + maybe-all-find \ + maybe-all-flex \ + maybe-all-gas \ + maybe-all-gawk \ + maybe-all-gettext \ + maybe-all-gnuserv \ + maybe-all-gprof \ + maybe-all-gzip \ + maybe-all-hello \ + maybe-all-indent \ + maybe-all-intl \ + maybe-all-tcl \ + maybe-all-itcl \ + maybe-all-ld \ + maybe-all-libgui \ + maybe-all-libiberty \ + maybe-all-libtool \ + maybe-all-m4 \ + maybe-all-make \ + maybe-all-mmalloc \ + maybe-all-patch \ + maybe-all-perl \ + maybe-all-prms \ + maybe-all-rcs \ + maybe-all-readline \ + maybe-all-release \ + maybe-all-recode \ + maybe-all-sed \ + maybe-all-send-pr \ + maybe-all-shellutils \ + maybe-all-sid \ + maybe-all-sim \ + maybe-all-tar \ + maybe-all-texinfo \ + maybe-all-textutils \ + maybe-all-time \ + maybe-all-uudecode \ + maybe-all-wdiff \ + maybe-all-zip \ + maybe-all-zlib \ + maybe-all-gdb \ + maybe-all-expect \ + maybe-all-guile \ + maybe-all-tk \ + maybe-all-tix \ + maybe-all-libtermcap +# maybe-all-utils +.PHONY: all-target +all-target: \ + maybe-all-target-libstdc++-v3 \ + maybe-all-target-newlib \ + maybe-all-target-libf2c \ + maybe-all-target-libobjc \ + maybe-all-target-libtermcap \ + maybe-all-target-winsup \ + maybe-all-target-libgloss \ + maybe-all-target-libiberty \ + maybe-all-target-gperf \ + maybe-all-target-examples \ + maybe-all-target-libffi \ + maybe-all-target-libjava \ + maybe-all-target-zlib \ + maybe-all-target-boehm-gc \ + maybe-all-target-qthreads \ + maybe-all-target-rda \ + maybe-all-target-libada + +# Do a target for all the subdirectories. A ``make do-X'' will do a +# ``make X'' in all subdirectories (because, in general, there is a +# dependency (below) of X upon do-X, a ``make X'' will also do this, +# but it may do additional work as well). + +.PHONY: do-info +do-info: info-host info-target + +.PHONY: info-host +info-host: maybe-info-gcc \ + maybe-info-ash \ + maybe-info-autoconf \ + maybe-info-automake \ + maybe-info-bash \ + maybe-info-bfd \ + maybe-info-opcodes \ + maybe-info-binutils \ + maybe-info-bison \ + maybe-info-byacc \ + maybe-info-bzip2 \ + maybe-info-dejagnu \ + maybe-info-diff \ + maybe-info-dosutils \ + maybe-info-etc \ + maybe-info-fastjar \ + maybe-info-fileutils \ + maybe-info-findutils \ + maybe-info-find \ + maybe-info-flex \ + maybe-info-gas \ + maybe-info-gawk \ + maybe-info-gettext \ + maybe-info-gnuserv \ + maybe-info-gprof \ + maybe-info-gzip \ + maybe-info-hello \ + maybe-info-indent \ + maybe-info-intl \ + maybe-info-tcl \ + maybe-info-itcl \ + maybe-info-ld \ + maybe-info-libgui \ + maybe-info-libiberty \ + maybe-info-libtool \ + maybe-info-m4 \ + maybe-info-make \ + maybe-info-mmalloc \ + maybe-info-patch \ + maybe-info-perl \ + maybe-info-prms \ + maybe-info-rcs \ + maybe-info-readline \ + maybe-info-release \ + maybe-info-recode \ + maybe-info-sed \ + maybe-info-send-pr \ + maybe-info-shellutils \ + maybe-info-sid \ + maybe-info-sim \ + maybe-info-tar \ + maybe-info-texinfo \ + maybe-info-textutils \ + maybe-info-time \ + maybe-info-uudecode \ + maybe-info-wdiff \ + maybe-info-zip \ + maybe-info-zlib \ + maybe-info-gdb \ + maybe-info-expect \ + maybe-info-guile \ + maybe-info-tk \ + maybe-info-tix \ + maybe-info-libtermcap \ + maybe-info-utils + +.PHONY: info-target +info-target: \ + maybe-info-target-libstdc++-v3 \ + maybe-info-target-newlib \ + maybe-info-target-libf2c \ + maybe-info-target-libobjc \ + maybe-info-target-libtermcap \ + maybe-info-target-winsup \ + maybe-info-target-libgloss \ + maybe-info-target-libiberty \ + maybe-info-target-gperf \ + maybe-info-target-examples \ + maybe-info-target-libffi \ + maybe-info-target-libjava \ + maybe-info-target-zlib \ + maybe-info-target-boehm-gc \ + maybe-info-target-qthreads \ + maybe-info-target-rda \ + maybe-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-info-gcc info-gcc +maybe-info-gcc: +info-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-info-ash info-ash +maybe-info-ash: + +info-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-autoconf info-autoconf +maybe-info-autoconf: + +info-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-automake info-automake +maybe-info-automake: + +info-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bash info-bash +maybe-info-bash: + +info-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bfd info-bfd +maybe-info-bfd: + +info-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-opcodes info-opcodes +maybe-info-opcodes: + +info-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-binutils info-binutils +maybe-info-binutils: + +info-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bison info-bison +maybe-info-bison: + +info-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-byacc info-byacc +maybe-info-byacc: + +info-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-bzip2 info-bzip2 +maybe-info-bzip2: + +info-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dejagnu info-dejagnu +maybe-info-dejagnu: + +info-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-diff info-diff +maybe-info-diff: + +info-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-dosutils info-dosutils +maybe-info-dosutils: + +info-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-etc info-etc +maybe-info-etc: + +info-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fastjar info-fastjar +maybe-info-fastjar: + +info-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-fileutils info-fileutils +maybe-info-fileutils: + +info-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-findutils info-findutils +maybe-info-findutils: + +info-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-find info-find +maybe-info-find: + +info-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-flex info-flex +maybe-info-flex: + +info-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gas info-gas +maybe-info-gas: + +info-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gawk info-gawk +maybe-info-gawk: + +info-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gettext info-gettext +maybe-info-gettext: + +info-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gnuserv info-gnuserv +maybe-info-gnuserv: + +info-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gprof info-gprof +maybe-info-gprof: + +info-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gzip info-gzip +maybe-info-gzip: + +info-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-hello info-hello +maybe-info-hello: + +info-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-indent info-indent +maybe-info-indent: + +info-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-intl info-intl +maybe-info-intl: + +info-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tcl info-tcl +maybe-info-tcl: + +info-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-itcl info-itcl +maybe-info-itcl: + +info-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-ld info-ld +maybe-info-ld: + +info-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libgui info-libgui +maybe-info-libgui: + +info-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libiberty info-libiberty +maybe-info-libiberty: + +info-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtool info-libtool +maybe-info-libtool: + +info-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-m4 info-m4 +maybe-info-m4: + +info-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-make info-make +maybe-info-make: + +info-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-mmalloc info-mmalloc +maybe-info-mmalloc: + +info-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-patch info-patch +maybe-info-patch: + +info-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-perl info-perl +maybe-info-perl: + +info-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-prms info-prms +maybe-info-prms: + +info-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-rcs info-rcs +maybe-info-rcs: + +info-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-readline info-readline +maybe-info-readline: + +info-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-release info-release +maybe-info-release: + +info-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-recode info-recode +maybe-info-recode: + +info-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sed info-sed +maybe-info-sed: + +info-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-send-pr info-send-pr +maybe-info-send-pr: + +info-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-shellutils info-shellutils +maybe-info-shellutils: + +info-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sid info-sid +maybe-info-sid: + +info-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-sim info-sim +maybe-info-sim: + +info-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tar info-tar +maybe-info-tar: + +info-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-texinfo info-texinfo +maybe-info-texinfo: + +info-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-textutils info-textutils +maybe-info-textutils: + +info-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-time info-time +maybe-info-time: + +info-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-uudecode info-uudecode +maybe-info-uudecode: + +info-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-wdiff info-wdiff +maybe-info-wdiff: + +info-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zip info-zip +maybe-info-zip: + +info-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-zlib info-zlib +maybe-info-zlib: + +info-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-gdb info-gdb +maybe-info-gdb: + +info-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-expect info-expect +maybe-info-expect: + +info-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-guile info-guile +maybe-info-guile: + +info-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tk info-tk +maybe-info-tk: + +info-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-tix info-tix +maybe-info-tix: + +info-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-libtermcap info-libtermcap +maybe-info-libtermcap: + +info-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-utils info-utils +maybe-info-utils: + +info-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3 +maybe-info-target-libstdc++-v3: + +info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-newlib info-target-newlib +maybe-info-target-newlib: + +info-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libf2c info-target-libf2c +maybe-info-target-libf2c: + +info-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libobjc info-target-libobjc +maybe-info-target-libobjc: + +info-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libtermcap info-target-libtermcap +maybe-info-target-libtermcap: + +info-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-winsup info-target-winsup +maybe-info-target-winsup: + +info-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libgloss info-target-libgloss +maybe-info-target-libgloss: + +info-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libiberty info-target-libiberty +maybe-info-target-libiberty: + +info-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-gperf info-target-gperf +maybe-info-target-gperf: + +info-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-examples info-target-examples +maybe-info-target-examples: + +info-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libffi info-target-libffi +maybe-info-target-libffi: + +info-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libjava info-target-libjava +maybe-info-target-libjava: + +info-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-zlib info-target-zlib +maybe-info-target-zlib: + +info-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc +maybe-info-target-boehm-gc: + +info-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-qthreads info-target-qthreads +maybe-info-target-qthreads: + +info-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-rda info-target-rda +maybe-info-target-rda: + +info-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + +.PHONY: maybe-info-target-libada info-target-libada +maybe-info-target-libada: + +info-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + info) \ + || exit 1 + + + +.PHONY: do-dvi +do-dvi: dvi-host dvi-target + +.PHONY: dvi-host +dvi-host: maybe-dvi-gcc \ + maybe-dvi-ash \ + maybe-dvi-autoconf \ + maybe-dvi-automake \ + maybe-dvi-bash \ + maybe-dvi-bfd \ + maybe-dvi-opcodes \ + maybe-dvi-binutils \ + maybe-dvi-bison \ + maybe-dvi-byacc \ + maybe-dvi-bzip2 \ + maybe-dvi-dejagnu \ + maybe-dvi-diff \ + maybe-dvi-dosutils \ + maybe-dvi-etc \ + maybe-dvi-fastjar \ + maybe-dvi-fileutils \ + maybe-dvi-findutils \ + maybe-dvi-find \ + maybe-dvi-flex \ + maybe-dvi-gas \ + maybe-dvi-gawk \ + maybe-dvi-gettext \ + maybe-dvi-gnuserv \ + maybe-dvi-gprof \ + maybe-dvi-gzip \ + maybe-dvi-hello \ + maybe-dvi-indent \ + maybe-dvi-intl \ + maybe-dvi-tcl \ + maybe-dvi-itcl \ + maybe-dvi-ld \ + maybe-dvi-libgui \ + maybe-dvi-libiberty \ + maybe-dvi-libtool \ + maybe-dvi-m4 \ + maybe-dvi-make \ + maybe-dvi-mmalloc \ + maybe-dvi-patch \ + maybe-dvi-perl \ + maybe-dvi-prms \ + maybe-dvi-rcs \ + maybe-dvi-readline \ + maybe-dvi-release \ + maybe-dvi-recode \ + maybe-dvi-sed \ + maybe-dvi-send-pr \ + maybe-dvi-shellutils \ + maybe-dvi-sid \ + maybe-dvi-sim \ + maybe-dvi-tar \ + maybe-dvi-texinfo \ + maybe-dvi-textutils \ + maybe-dvi-time \ + maybe-dvi-uudecode \ + maybe-dvi-wdiff \ + maybe-dvi-zip \ + maybe-dvi-zlib \ + maybe-dvi-gdb \ + maybe-dvi-expect \ + maybe-dvi-guile \ + maybe-dvi-tk \ + maybe-dvi-tix \ + maybe-dvi-libtermcap \ + maybe-dvi-utils + +.PHONY: dvi-target +dvi-target: \ + maybe-dvi-target-libstdc++-v3 \ + maybe-dvi-target-newlib \ + maybe-dvi-target-libf2c \ + maybe-dvi-target-libobjc \ + maybe-dvi-target-libtermcap \ + maybe-dvi-target-winsup \ + maybe-dvi-target-libgloss \ + maybe-dvi-target-libiberty \ + maybe-dvi-target-gperf \ + maybe-dvi-target-examples \ + maybe-dvi-target-libffi \ + maybe-dvi-target-libjava \ + maybe-dvi-target-zlib \ + maybe-dvi-target-boehm-gc \ + maybe-dvi-target-qthreads \ + maybe-dvi-target-rda \ + maybe-dvi-target-libada + +# GCC, the eternal special case +.PHONY: maybe-dvi-gcc dvi-gcc +maybe-dvi-gcc: +dvi-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-dvi-ash dvi-ash +maybe-dvi-ash: + +dvi-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-autoconf dvi-autoconf +maybe-dvi-autoconf: + +dvi-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-automake dvi-automake +maybe-dvi-automake: + +dvi-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bash dvi-bash +maybe-dvi-bash: + +dvi-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bfd dvi-bfd +maybe-dvi-bfd: + +dvi-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-opcodes dvi-opcodes +maybe-dvi-opcodes: + +dvi-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-binutils dvi-binutils +maybe-dvi-binutils: + +dvi-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bison dvi-bison +maybe-dvi-bison: + +dvi-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-byacc dvi-byacc +maybe-dvi-byacc: + +dvi-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-bzip2 dvi-bzip2 +maybe-dvi-bzip2: + +dvi-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dejagnu dvi-dejagnu +maybe-dvi-dejagnu: + +dvi-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-diff dvi-diff +maybe-dvi-diff: + +dvi-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-dosutils dvi-dosutils +maybe-dvi-dosutils: + +dvi-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-etc dvi-etc +maybe-dvi-etc: + +dvi-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fastjar dvi-fastjar +maybe-dvi-fastjar: + +dvi-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-fileutils dvi-fileutils +maybe-dvi-fileutils: + +dvi-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-findutils dvi-findutils +maybe-dvi-findutils: + +dvi-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-find dvi-find +maybe-dvi-find: + +dvi-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-flex dvi-flex +maybe-dvi-flex: + +dvi-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gas dvi-gas +maybe-dvi-gas: + +dvi-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gawk dvi-gawk +maybe-dvi-gawk: + +dvi-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gettext dvi-gettext +maybe-dvi-gettext: + +dvi-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gnuserv dvi-gnuserv +maybe-dvi-gnuserv: + +dvi-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gprof dvi-gprof +maybe-dvi-gprof: + +dvi-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gzip dvi-gzip +maybe-dvi-gzip: + +dvi-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-hello dvi-hello +maybe-dvi-hello: + +dvi-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-indent dvi-indent +maybe-dvi-indent: + +dvi-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-intl dvi-intl +maybe-dvi-intl: + +dvi-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tcl dvi-tcl +maybe-dvi-tcl: + +dvi-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-itcl dvi-itcl +maybe-dvi-itcl: + +dvi-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-ld dvi-ld +maybe-dvi-ld: + +dvi-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libgui dvi-libgui +maybe-dvi-libgui: + +dvi-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libiberty dvi-libiberty +maybe-dvi-libiberty: + +dvi-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtool dvi-libtool +maybe-dvi-libtool: + +dvi-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-m4 dvi-m4 +maybe-dvi-m4: + +dvi-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-make dvi-make +maybe-dvi-make: + +dvi-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-mmalloc dvi-mmalloc +maybe-dvi-mmalloc: + +dvi-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-patch dvi-patch +maybe-dvi-patch: + +dvi-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-perl dvi-perl +maybe-dvi-perl: + +dvi-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-prms dvi-prms +maybe-dvi-prms: + +dvi-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-rcs dvi-rcs +maybe-dvi-rcs: + +dvi-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-readline dvi-readline +maybe-dvi-readline: + +dvi-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-release dvi-release +maybe-dvi-release: + +dvi-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-recode dvi-recode +maybe-dvi-recode: + +dvi-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sed dvi-sed +maybe-dvi-sed: + +dvi-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-send-pr dvi-send-pr +maybe-dvi-send-pr: + +dvi-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-shellutils dvi-shellutils +maybe-dvi-shellutils: + +dvi-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sid dvi-sid +maybe-dvi-sid: + +dvi-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-sim dvi-sim +maybe-dvi-sim: + +dvi-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tar dvi-tar +maybe-dvi-tar: + +dvi-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-texinfo dvi-texinfo +maybe-dvi-texinfo: + +dvi-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-textutils dvi-textutils +maybe-dvi-textutils: + +dvi-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-time dvi-time +maybe-dvi-time: + +dvi-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-uudecode dvi-uudecode +maybe-dvi-uudecode: + +dvi-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-wdiff dvi-wdiff +maybe-dvi-wdiff: + +dvi-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zip dvi-zip +maybe-dvi-zip: + +dvi-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-zlib dvi-zlib +maybe-dvi-zlib: + +dvi-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-gdb dvi-gdb +maybe-dvi-gdb: + +dvi-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-expect dvi-expect +maybe-dvi-expect: + +dvi-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-guile dvi-guile +maybe-dvi-guile: + +dvi-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tk dvi-tk +maybe-dvi-tk: + +dvi-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-tix dvi-tix +maybe-dvi-tix: + +dvi-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-libtermcap dvi-libtermcap +maybe-dvi-libtermcap: + +dvi-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-utils dvi-utils +maybe-dvi-utils: + +dvi-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-dvi-target-libstdc++-v3 dvi-target-libstdc++-v3 +maybe-dvi-target-libstdc++-v3: + +dvi-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-newlib dvi-target-newlib +maybe-dvi-target-newlib: + +dvi-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libf2c dvi-target-libf2c +maybe-dvi-target-libf2c: + +dvi-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libobjc dvi-target-libobjc +maybe-dvi-target-libobjc: + +dvi-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libtermcap dvi-target-libtermcap +maybe-dvi-target-libtermcap: + +dvi-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-winsup dvi-target-winsup +maybe-dvi-target-winsup: + +dvi-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libgloss dvi-target-libgloss +maybe-dvi-target-libgloss: + +dvi-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libiberty dvi-target-libiberty +maybe-dvi-target-libiberty: + +dvi-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-gperf dvi-target-gperf +maybe-dvi-target-gperf: + +dvi-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-examples dvi-target-examples +maybe-dvi-target-examples: + +dvi-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libffi dvi-target-libffi +maybe-dvi-target-libffi: + +dvi-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libjava dvi-target-libjava +maybe-dvi-target-libjava: + +dvi-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-zlib dvi-target-zlib +maybe-dvi-target-zlib: + +dvi-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-boehm-gc dvi-target-boehm-gc +maybe-dvi-target-boehm-gc: + +dvi-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-qthreads dvi-target-qthreads +maybe-dvi-target-qthreads: + +dvi-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-rda dvi-target-rda +maybe-dvi-target-rda: + +dvi-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + +.PHONY: maybe-dvi-target-libada dvi-target-libada +maybe-dvi-target-libada: + +dvi-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + dvi) \ + || exit 1 + + + +.PHONY: do-TAGS +do-TAGS: TAGS-host TAGS-target + +.PHONY: TAGS-host +TAGS-host: maybe-TAGS-gcc \ + maybe-TAGS-ash \ + maybe-TAGS-autoconf \ + maybe-TAGS-automake \ + maybe-TAGS-bash \ + maybe-TAGS-bfd \ + maybe-TAGS-opcodes \ + maybe-TAGS-binutils \ + maybe-TAGS-bison \ + maybe-TAGS-byacc \ + maybe-TAGS-bzip2 \ + maybe-TAGS-dejagnu \ + maybe-TAGS-diff \ + maybe-TAGS-dosutils \ + maybe-TAGS-etc \ + maybe-TAGS-fastjar \ + maybe-TAGS-fileutils \ + maybe-TAGS-findutils \ + maybe-TAGS-find \ + maybe-TAGS-flex \ + maybe-TAGS-gas \ + maybe-TAGS-gawk \ + maybe-TAGS-gettext \ + maybe-TAGS-gnuserv \ + maybe-TAGS-gprof \ + maybe-TAGS-gzip \ + maybe-TAGS-hello \ + maybe-TAGS-indent \ + maybe-TAGS-intl \ + maybe-TAGS-tcl \ + maybe-TAGS-itcl \ + maybe-TAGS-ld \ + maybe-TAGS-libgui \ + maybe-TAGS-libiberty \ + maybe-TAGS-libtool \ + maybe-TAGS-m4 \ + maybe-TAGS-make \ + maybe-TAGS-mmalloc \ + maybe-TAGS-patch \ + maybe-TAGS-perl \ + maybe-TAGS-prms \ + maybe-TAGS-rcs \ + maybe-TAGS-readline \ + maybe-TAGS-release \ + maybe-TAGS-recode \ + maybe-TAGS-sed \ + maybe-TAGS-send-pr \ + maybe-TAGS-shellutils \ + maybe-TAGS-sid \ + maybe-TAGS-sim \ + maybe-TAGS-tar \ + maybe-TAGS-texinfo \ + maybe-TAGS-textutils \ + maybe-TAGS-time \ + maybe-TAGS-uudecode \ + maybe-TAGS-wdiff \ + maybe-TAGS-zip \ + maybe-TAGS-zlib \ + maybe-TAGS-gdb \ + maybe-TAGS-expect \ + maybe-TAGS-guile \ + maybe-TAGS-tk \ + maybe-TAGS-tix \ + maybe-TAGS-libtermcap \ + maybe-TAGS-utils + +.PHONY: TAGS-target +TAGS-target: \ + maybe-TAGS-target-libstdc++-v3 \ + maybe-TAGS-target-newlib \ + maybe-TAGS-target-libf2c \ + maybe-TAGS-target-libobjc \ + maybe-TAGS-target-libtermcap \ + maybe-TAGS-target-winsup \ + maybe-TAGS-target-libgloss \ + maybe-TAGS-target-libiberty \ + maybe-TAGS-target-gperf \ + maybe-TAGS-target-examples \ + maybe-TAGS-target-libffi \ + maybe-TAGS-target-libjava \ + maybe-TAGS-target-zlib \ + maybe-TAGS-target-boehm-gc \ + maybe-TAGS-target-qthreads \ + maybe-TAGS-target-rda \ + maybe-TAGS-target-libada + +# GCC, the eternal special case +.PHONY: maybe-TAGS-gcc TAGS-gcc +maybe-TAGS-gcc: +TAGS-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-TAGS-ash TAGS-ash +maybe-TAGS-ash: + +TAGS-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-autoconf TAGS-autoconf +maybe-TAGS-autoconf: + +TAGS-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-automake TAGS-automake +maybe-TAGS-automake: + +TAGS-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bash TAGS-bash +maybe-TAGS-bash: + +TAGS-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bfd TAGS-bfd +maybe-TAGS-bfd: + +TAGS-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-opcodes TAGS-opcodes +maybe-TAGS-opcodes: + +TAGS-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-binutils TAGS-binutils +maybe-TAGS-binutils: + +TAGS-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bison TAGS-bison +maybe-TAGS-bison: + +TAGS-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-byacc TAGS-byacc +maybe-TAGS-byacc: + +TAGS-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-bzip2 TAGS-bzip2 +maybe-TAGS-bzip2: + +TAGS-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dejagnu TAGS-dejagnu +maybe-TAGS-dejagnu: + +TAGS-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-diff TAGS-diff +maybe-TAGS-diff: + +TAGS-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-dosutils TAGS-dosutils +maybe-TAGS-dosutils: + +TAGS-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-etc TAGS-etc +maybe-TAGS-etc: + +TAGS-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fastjar TAGS-fastjar +maybe-TAGS-fastjar: + +TAGS-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-fileutils TAGS-fileutils +maybe-TAGS-fileutils: + +TAGS-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-findutils TAGS-findutils +maybe-TAGS-findutils: + +TAGS-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-find TAGS-find +maybe-TAGS-find: + +TAGS-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-flex TAGS-flex +maybe-TAGS-flex: + +TAGS-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gas TAGS-gas +maybe-TAGS-gas: + +TAGS-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gawk TAGS-gawk +maybe-TAGS-gawk: + +TAGS-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gettext TAGS-gettext +maybe-TAGS-gettext: + +TAGS-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gnuserv TAGS-gnuserv +maybe-TAGS-gnuserv: + +TAGS-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gprof TAGS-gprof +maybe-TAGS-gprof: + +TAGS-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gzip TAGS-gzip +maybe-TAGS-gzip: + +TAGS-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-hello TAGS-hello +maybe-TAGS-hello: + +TAGS-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-indent TAGS-indent +maybe-TAGS-indent: + +TAGS-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-intl TAGS-intl +maybe-TAGS-intl: + +TAGS-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tcl TAGS-tcl +maybe-TAGS-tcl: + +TAGS-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-itcl TAGS-itcl +maybe-TAGS-itcl: + +TAGS-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-ld TAGS-ld +maybe-TAGS-ld: + +TAGS-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libgui TAGS-libgui +maybe-TAGS-libgui: + +TAGS-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libiberty TAGS-libiberty +maybe-TAGS-libiberty: + +TAGS-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtool TAGS-libtool +maybe-TAGS-libtool: + +TAGS-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-m4 TAGS-m4 +maybe-TAGS-m4: + +TAGS-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-make TAGS-make +maybe-TAGS-make: + +TAGS-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-mmalloc TAGS-mmalloc +maybe-TAGS-mmalloc: + +TAGS-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-patch TAGS-patch +maybe-TAGS-patch: + +TAGS-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-perl TAGS-perl +maybe-TAGS-perl: + +TAGS-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-prms TAGS-prms +maybe-TAGS-prms: + +TAGS-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-rcs TAGS-rcs +maybe-TAGS-rcs: + +TAGS-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-readline TAGS-readline +maybe-TAGS-readline: + +TAGS-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-release TAGS-release +maybe-TAGS-release: + +TAGS-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-recode TAGS-recode +maybe-TAGS-recode: + +TAGS-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sed TAGS-sed +maybe-TAGS-sed: + +TAGS-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-send-pr TAGS-send-pr +maybe-TAGS-send-pr: + +TAGS-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-shellutils TAGS-shellutils +maybe-TAGS-shellutils: + +TAGS-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sid TAGS-sid +maybe-TAGS-sid: + +TAGS-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-sim TAGS-sim +maybe-TAGS-sim: + +TAGS-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tar TAGS-tar +maybe-TAGS-tar: + +TAGS-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-texinfo TAGS-texinfo +maybe-TAGS-texinfo: + +TAGS-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-textutils TAGS-textutils +maybe-TAGS-textutils: + +TAGS-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-time TAGS-time +maybe-TAGS-time: + +TAGS-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-uudecode TAGS-uudecode +maybe-TAGS-uudecode: + +TAGS-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-wdiff TAGS-wdiff +maybe-TAGS-wdiff: + +TAGS-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zip TAGS-zip +maybe-TAGS-zip: + +TAGS-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-zlib TAGS-zlib +maybe-TAGS-zlib: + +TAGS-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-gdb TAGS-gdb +maybe-TAGS-gdb: + +TAGS-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-expect TAGS-expect +maybe-TAGS-expect: + +TAGS-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-guile TAGS-guile +maybe-TAGS-guile: + +TAGS-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tk TAGS-tk +maybe-TAGS-tk: + +TAGS-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-tix TAGS-tix +maybe-TAGS-tix: + +TAGS-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-libtermcap TAGS-libtermcap +maybe-TAGS-libtermcap: + +TAGS-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-utils TAGS-utils +maybe-TAGS-utils: + +TAGS-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-TAGS-target-libstdc++-v3 TAGS-target-libstdc++-v3 +maybe-TAGS-target-libstdc++-v3: + +TAGS-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib +maybe-TAGS-target-newlib: + +TAGS-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libf2c TAGS-target-libf2c +maybe-TAGS-target-libf2c: + +TAGS-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libobjc TAGS-target-libobjc +maybe-TAGS-target-libobjc: + +TAGS-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libtermcap TAGS-target-libtermcap +maybe-TAGS-target-libtermcap: + +TAGS-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-winsup TAGS-target-winsup +maybe-TAGS-target-winsup: + +TAGS-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libgloss TAGS-target-libgloss +maybe-TAGS-target-libgloss: + +TAGS-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libiberty TAGS-target-libiberty +maybe-TAGS-target-libiberty: + +TAGS-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-gperf TAGS-target-gperf +maybe-TAGS-target-gperf: + +TAGS-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-examples TAGS-target-examples +maybe-TAGS-target-examples: + +TAGS-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libffi TAGS-target-libffi +maybe-TAGS-target-libffi: + +TAGS-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libjava TAGS-target-libjava +maybe-TAGS-target-libjava: + +TAGS-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-zlib TAGS-target-zlib +maybe-TAGS-target-zlib: + +TAGS-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-boehm-gc TAGS-target-boehm-gc +maybe-TAGS-target-boehm-gc: + +TAGS-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-qthreads TAGS-target-qthreads +maybe-TAGS-target-qthreads: + +TAGS-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-rda TAGS-target-rda +maybe-TAGS-target-rda: + +TAGS-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + +.PHONY: maybe-TAGS-target-libada TAGS-target-libada +maybe-TAGS-target-libada: + +TAGS-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + TAGS) \ + || exit 1 + + + +.PHONY: do-install-info +do-install-info: install-info-host install-info-target + +.PHONY: install-info-host +install-info-host: maybe-install-info-gcc \ + maybe-install-info-ash \ + maybe-install-info-autoconf \ + maybe-install-info-automake \ + maybe-install-info-bash \ + maybe-install-info-bfd \ + maybe-install-info-opcodes \ + maybe-install-info-binutils \ + maybe-install-info-bison \ + maybe-install-info-byacc \ + maybe-install-info-bzip2 \ + maybe-install-info-dejagnu \ + maybe-install-info-diff \ + maybe-install-info-dosutils \ + maybe-install-info-etc \ + maybe-install-info-fastjar \ + maybe-install-info-fileutils \ + maybe-install-info-findutils \ + maybe-install-info-find \ + maybe-install-info-flex \ + maybe-install-info-gas \ + maybe-install-info-gawk \ + maybe-install-info-gettext \ + maybe-install-info-gnuserv \ + maybe-install-info-gprof \ + maybe-install-info-gzip \ + maybe-install-info-hello \ + maybe-install-info-indent \ + maybe-install-info-intl \ + maybe-install-info-tcl \ + maybe-install-info-itcl \ + maybe-install-info-ld \ + maybe-install-info-libgui \ + maybe-install-info-libiberty \ + maybe-install-info-libtool \ + maybe-install-info-m4 \ + maybe-install-info-make \ + maybe-install-info-mmalloc \ + maybe-install-info-patch \ + maybe-install-info-perl \ + maybe-install-info-prms \ + maybe-install-info-rcs \ + maybe-install-info-readline \ + maybe-install-info-release \ + maybe-install-info-recode \ + maybe-install-info-sed \ + maybe-install-info-send-pr \ + maybe-install-info-shellutils \ + maybe-install-info-sid \ + maybe-install-info-sim \ + maybe-install-info-tar \ + maybe-install-info-texinfo \ + maybe-install-info-textutils \ + maybe-install-info-time \ + maybe-install-info-uudecode \ + maybe-install-info-wdiff \ + maybe-install-info-zip \ + maybe-install-info-zlib \ + maybe-install-info-gdb \ + maybe-install-info-expect \ + maybe-install-info-guile \ + maybe-install-info-tk \ + maybe-install-info-tix \ + maybe-install-info-libtermcap \ + maybe-install-info-utils + +.PHONY: install-info-target +install-info-target: \ + maybe-install-info-target-libstdc++-v3 \ + maybe-install-info-target-newlib \ + maybe-install-info-target-libf2c \ + maybe-install-info-target-libobjc \ + maybe-install-info-target-libtermcap \ + maybe-install-info-target-winsup \ + maybe-install-info-target-libgloss \ + maybe-install-info-target-libiberty \ + maybe-install-info-target-gperf \ + maybe-install-info-target-examples \ + maybe-install-info-target-libffi \ + maybe-install-info-target-libjava \ + maybe-install-info-target-zlib \ + maybe-install-info-target-boehm-gc \ + maybe-install-info-target-qthreads \ + maybe-install-info-target-rda \ + maybe-install-info-target-libada + +# GCC, the eternal special case +.PHONY: maybe-install-info-gcc install-info-gcc +maybe-install-info-gcc: +install-info-gcc: \ + configure-gcc \ + info-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-install-info-ash install-info-ash +maybe-install-info-ash: + +install-info-ash: \ + configure-ash \ + info-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-autoconf install-info-autoconf +maybe-install-info-autoconf: + +install-info-autoconf: \ + configure-autoconf \ + info-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-automake install-info-automake +maybe-install-info-automake: + +install-info-automake: \ + configure-automake \ + info-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bash install-info-bash +maybe-install-info-bash: + +install-info-bash: \ + configure-bash \ + info-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bfd install-info-bfd +maybe-install-info-bfd: + +install-info-bfd: \ + configure-bfd \ + info-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-opcodes install-info-opcodes +maybe-install-info-opcodes: + +install-info-opcodes: \ + configure-opcodes \ + info-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-binutils install-info-binutils +maybe-install-info-binutils: + +install-info-binutils: \ + configure-binutils \ + info-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bison install-info-bison +maybe-install-info-bison: + +install-info-bison: \ + configure-bison \ + info-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-byacc install-info-byacc +maybe-install-info-byacc: + +install-info-byacc: \ + configure-byacc \ + info-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-bzip2 install-info-bzip2 +maybe-install-info-bzip2: + +install-info-bzip2: \ + configure-bzip2 \ + info-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dejagnu install-info-dejagnu +maybe-install-info-dejagnu: + +install-info-dejagnu: \ + configure-dejagnu \ + info-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-diff install-info-diff +maybe-install-info-diff: + +install-info-diff: \ + configure-diff \ + info-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-dosutils install-info-dosutils +maybe-install-info-dosutils: + +install-info-dosutils: \ + configure-dosutils \ + info-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-etc install-info-etc +maybe-install-info-etc: + +install-info-etc: \ + configure-etc \ + info-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fastjar install-info-fastjar +maybe-install-info-fastjar: + +install-info-fastjar: \ + configure-fastjar \ + info-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-fileutils install-info-fileutils +maybe-install-info-fileutils: + +install-info-fileutils: \ + configure-fileutils \ + info-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-findutils install-info-findutils +maybe-install-info-findutils: + +install-info-findutils: \ + configure-findutils \ + info-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-find install-info-find +maybe-install-info-find: + +install-info-find: \ + configure-find \ + info-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-flex install-info-flex +maybe-install-info-flex: + +install-info-flex: \ + configure-flex \ + info-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gas install-info-gas +maybe-install-info-gas: + +install-info-gas: \ + configure-gas \ + info-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gawk install-info-gawk +maybe-install-info-gawk: + +install-info-gawk: \ + configure-gawk \ + info-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gettext install-info-gettext +maybe-install-info-gettext: + +install-info-gettext: \ + configure-gettext \ + info-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gnuserv install-info-gnuserv +maybe-install-info-gnuserv: + +install-info-gnuserv: \ + configure-gnuserv \ + info-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gprof install-info-gprof +maybe-install-info-gprof: + +install-info-gprof: \ + configure-gprof \ + info-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gzip install-info-gzip +maybe-install-info-gzip: + +install-info-gzip: \ + configure-gzip \ + info-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-hello install-info-hello +maybe-install-info-hello: + +install-info-hello: \ + configure-hello \ + info-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-indent install-info-indent +maybe-install-info-indent: + +install-info-indent: \ + configure-indent \ + info-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-intl install-info-intl +maybe-install-info-intl: + +install-info-intl: \ + configure-intl \ + info-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tcl install-info-tcl +maybe-install-info-tcl: + +install-info-tcl: \ + configure-tcl \ + info-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-itcl install-info-itcl +maybe-install-info-itcl: + +install-info-itcl: \ + configure-itcl \ + info-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-ld install-info-ld +maybe-install-info-ld: + +install-info-ld: \ + configure-ld \ + info-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libgui install-info-libgui +maybe-install-info-libgui: + +install-info-libgui: \ + configure-libgui \ + info-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libiberty install-info-libiberty +maybe-install-info-libiberty: + +install-info-libiberty: \ + configure-libiberty \ + info-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtool install-info-libtool +maybe-install-info-libtool: + +install-info-libtool: \ + configure-libtool \ + info-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-m4 install-info-m4 +maybe-install-info-m4: + +install-info-m4: \ + configure-m4 \ + info-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-make install-info-make +maybe-install-info-make: + +install-info-make: \ + configure-make \ + info-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-mmalloc install-info-mmalloc +maybe-install-info-mmalloc: + +install-info-mmalloc: \ + configure-mmalloc \ + info-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-patch install-info-patch +maybe-install-info-patch: + +install-info-patch: \ + configure-patch \ + info-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-perl install-info-perl +maybe-install-info-perl: + +install-info-perl: \ + configure-perl \ + info-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-prms install-info-prms +maybe-install-info-prms: + +install-info-prms: \ + configure-prms \ + info-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-rcs install-info-rcs +maybe-install-info-rcs: + +install-info-rcs: \ + configure-rcs \ + info-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-readline install-info-readline +maybe-install-info-readline: + +install-info-readline: \ + configure-readline \ + info-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-release install-info-release +maybe-install-info-release: + +install-info-release: \ + configure-release \ + info-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-recode install-info-recode +maybe-install-info-recode: + +install-info-recode: \ + configure-recode \ + info-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sed install-info-sed +maybe-install-info-sed: + +install-info-sed: \ + configure-sed \ + info-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-send-pr install-info-send-pr +maybe-install-info-send-pr: + +install-info-send-pr: \ + configure-send-pr \ + info-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-shellutils install-info-shellutils +maybe-install-info-shellutils: + +install-info-shellutils: \ + configure-shellutils \ + info-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sid install-info-sid +maybe-install-info-sid: + +install-info-sid: \ + configure-sid \ + info-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-sim install-info-sim +maybe-install-info-sim: + +install-info-sim: \ + configure-sim \ + info-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tar install-info-tar +maybe-install-info-tar: + +install-info-tar: \ + configure-tar \ + info-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-texinfo install-info-texinfo +maybe-install-info-texinfo: + +install-info-texinfo: \ + configure-texinfo \ + info-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-textutils install-info-textutils +maybe-install-info-textutils: + +install-info-textutils: \ + configure-textutils \ + info-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-time install-info-time +maybe-install-info-time: + +install-info-time: \ + configure-time \ + info-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-uudecode install-info-uudecode +maybe-install-info-uudecode: + +install-info-uudecode: \ + configure-uudecode \ + info-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-wdiff install-info-wdiff +maybe-install-info-wdiff: + +install-info-wdiff: \ + configure-wdiff \ + info-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zip install-info-zip +maybe-install-info-zip: + +install-info-zip: \ + configure-zip \ + info-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-zlib install-info-zlib +maybe-install-info-zlib: + +install-info-zlib: \ + configure-zlib \ + info-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-gdb install-info-gdb +maybe-install-info-gdb: + +install-info-gdb: \ + configure-gdb \ + info-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-expect install-info-expect +maybe-install-info-expect: + +install-info-expect: \ + configure-expect \ + info-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-guile install-info-guile +maybe-install-info-guile: + +install-info-guile: \ + configure-guile \ + info-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tk install-info-tk +maybe-install-info-tk: + +install-info-tk: \ + configure-tk \ + info-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-tix install-info-tix +maybe-install-info-tix: + +install-info-tix: \ + configure-tix \ + info-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-libtermcap install-info-libtermcap +maybe-install-info-libtermcap: + +install-info-libtermcap: \ + configure-libtermcap \ + info-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-utils install-info-utils +maybe-install-info-utils: + +install-info-utils: \ + configure-utils \ + info-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-install-info-target-libstdc++-v3 install-info-target-libstdc++-v3 +maybe-install-info-target-libstdc++-v3: + +install-info-target-libstdc++-v3: \ + configure-target-libstdc++-v3 \ + info-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-newlib install-info-target-newlib +maybe-install-info-target-newlib: + +install-info-target-newlib: \ + configure-target-newlib \ + info-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libf2c install-info-target-libf2c +maybe-install-info-target-libf2c: + +install-info-target-libf2c: \ + configure-target-libf2c \ + info-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libobjc install-info-target-libobjc +maybe-install-info-target-libobjc: + +install-info-target-libobjc: \ + configure-target-libobjc \ + info-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libtermcap install-info-target-libtermcap +maybe-install-info-target-libtermcap: + +install-info-target-libtermcap: \ + configure-target-libtermcap \ + info-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-winsup install-info-target-winsup +maybe-install-info-target-winsup: + +install-info-target-winsup: \ + configure-target-winsup \ + info-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libgloss install-info-target-libgloss +maybe-install-info-target-libgloss: + +install-info-target-libgloss: \ + configure-target-libgloss \ + info-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libiberty install-info-target-libiberty +maybe-install-info-target-libiberty: + +install-info-target-libiberty: \ + configure-target-libiberty \ + info-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-gperf install-info-target-gperf +maybe-install-info-target-gperf: + +install-info-target-gperf: \ + configure-target-gperf \ + info-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-examples install-info-target-examples +maybe-install-info-target-examples: + +install-info-target-examples: \ + configure-target-examples \ + info-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libffi install-info-target-libffi +maybe-install-info-target-libffi: + +install-info-target-libffi: \ + configure-target-libffi \ + info-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libjava install-info-target-libjava +maybe-install-info-target-libjava: + +install-info-target-libjava: \ + configure-target-libjava \ + info-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-zlib install-info-target-zlib +maybe-install-info-target-zlib: + +install-info-target-zlib: \ + configure-target-zlib \ + info-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-boehm-gc install-info-target-boehm-gc +maybe-install-info-target-boehm-gc: + +install-info-target-boehm-gc: \ + configure-target-boehm-gc \ + info-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-qthreads install-info-target-qthreads +maybe-install-info-target-qthreads: + +install-info-target-qthreads: \ + configure-target-qthreads \ + info-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-rda install-info-target-rda +maybe-install-info-target-rda: + +install-info-target-rda: \ + configure-target-rda \ + info-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + +.PHONY: maybe-install-info-target-libada install-info-target-libada +maybe-install-info-target-libada: + +install-info-target-libada: \ + configure-target-libada \ + info-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + install-info) \ + || exit 1 + + + +.PHONY: do-installcheck +do-installcheck: installcheck-host installcheck-target + +.PHONY: installcheck-host +installcheck-host: maybe-installcheck-gcc \ + maybe-installcheck-ash \ + maybe-installcheck-autoconf \ + maybe-installcheck-automake \ + maybe-installcheck-bash \ + maybe-installcheck-bfd \ + maybe-installcheck-opcodes \ + maybe-installcheck-binutils \ + maybe-installcheck-bison \ + maybe-installcheck-byacc \ + maybe-installcheck-bzip2 \ + maybe-installcheck-dejagnu \ + maybe-installcheck-diff \ + maybe-installcheck-dosutils \ + maybe-installcheck-etc \ + maybe-installcheck-fastjar \ + maybe-installcheck-fileutils \ + maybe-installcheck-findutils \ + maybe-installcheck-find \ + maybe-installcheck-flex \ + maybe-installcheck-gas \ + maybe-installcheck-gawk \ + maybe-installcheck-gettext \ + maybe-installcheck-gnuserv \ + maybe-installcheck-gprof \ + maybe-installcheck-gzip \ + maybe-installcheck-hello \ + maybe-installcheck-indent \ + maybe-installcheck-intl \ + maybe-installcheck-tcl \ + maybe-installcheck-itcl \ + maybe-installcheck-ld \ + maybe-installcheck-libgui \ + maybe-installcheck-libiberty \ + maybe-installcheck-libtool \ + maybe-installcheck-m4 \ + maybe-installcheck-make \ + maybe-installcheck-mmalloc \ + maybe-installcheck-patch \ + maybe-installcheck-perl \ + maybe-installcheck-prms \ + maybe-installcheck-rcs \ + maybe-installcheck-readline \ + maybe-installcheck-release \ + maybe-installcheck-recode \ + maybe-installcheck-sed \ + maybe-installcheck-send-pr \ + maybe-installcheck-shellutils \ + maybe-installcheck-sid \ + maybe-installcheck-sim \ + maybe-installcheck-tar \ + maybe-installcheck-texinfo \ + maybe-installcheck-textutils \ + maybe-installcheck-time \ + maybe-installcheck-uudecode \ + maybe-installcheck-wdiff \ + maybe-installcheck-zip \ + maybe-installcheck-zlib \ + maybe-installcheck-gdb \ + maybe-installcheck-expect \ + maybe-installcheck-guile \ + maybe-installcheck-tk \ + maybe-installcheck-tix \ + maybe-installcheck-libtermcap \ + maybe-installcheck-utils + +.PHONY: installcheck-target +installcheck-target: \ + maybe-installcheck-target-libstdc++-v3 \ + maybe-installcheck-target-newlib \ + maybe-installcheck-target-libf2c \ + maybe-installcheck-target-libobjc \ + maybe-installcheck-target-libtermcap \ + maybe-installcheck-target-winsup \ + maybe-installcheck-target-libgloss \ + maybe-installcheck-target-libiberty \ + maybe-installcheck-target-gperf \ + maybe-installcheck-target-examples \ + maybe-installcheck-target-libffi \ + maybe-installcheck-target-libjava \ + maybe-installcheck-target-zlib \ + maybe-installcheck-target-boehm-gc \ + maybe-installcheck-target-qthreads \ + maybe-installcheck-target-rda \ + maybe-installcheck-target-libada + +# GCC, the eternal special case +.PHONY: maybe-installcheck-gcc installcheck-gcc +maybe-installcheck-gcc: +installcheck-gcc: \ + configure-gcc + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-installcheck-ash installcheck-ash +maybe-installcheck-ash: + +installcheck-ash: \ + configure-ash + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-autoconf installcheck-autoconf +maybe-installcheck-autoconf: + +installcheck-autoconf: \ + configure-autoconf + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-automake installcheck-automake +maybe-installcheck-automake: + +installcheck-automake: \ + configure-automake + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bash installcheck-bash +maybe-installcheck-bash: + +installcheck-bash: \ + configure-bash + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bfd installcheck-bfd +maybe-installcheck-bfd: + +installcheck-bfd: \ + configure-bfd + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-opcodes installcheck-opcodes +maybe-installcheck-opcodes: + +installcheck-opcodes: \ + configure-opcodes + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-binutils installcheck-binutils +maybe-installcheck-binutils: + +installcheck-binutils: \ + configure-binutils + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bison installcheck-bison +maybe-installcheck-bison: + +installcheck-bison: \ + configure-bison + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-byacc installcheck-byacc +maybe-installcheck-byacc: + +installcheck-byacc: \ + configure-byacc + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-bzip2 installcheck-bzip2 +maybe-installcheck-bzip2: + +installcheck-bzip2: \ + configure-bzip2 + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dejagnu installcheck-dejagnu +maybe-installcheck-dejagnu: + +installcheck-dejagnu: \ + configure-dejagnu + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-diff installcheck-diff +maybe-installcheck-diff: + +installcheck-diff: \ + configure-diff + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-dosutils installcheck-dosutils +maybe-installcheck-dosutils: + +installcheck-dosutils: \ + configure-dosutils + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-etc installcheck-etc +maybe-installcheck-etc: + +installcheck-etc: \ + configure-etc + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fastjar installcheck-fastjar +maybe-installcheck-fastjar: + +installcheck-fastjar: \ + configure-fastjar + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-fileutils installcheck-fileutils +maybe-installcheck-fileutils: + +installcheck-fileutils: \ + configure-fileutils + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-findutils installcheck-findutils +maybe-installcheck-findutils: + +installcheck-findutils: \ + configure-findutils + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-find installcheck-find +maybe-installcheck-find: + +installcheck-find: \ + configure-find + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-flex installcheck-flex +maybe-installcheck-flex: + +installcheck-flex: \ + configure-flex + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gas installcheck-gas +maybe-installcheck-gas: + +installcheck-gas: \ + configure-gas + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gawk installcheck-gawk +maybe-installcheck-gawk: + +installcheck-gawk: \ + configure-gawk + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gettext installcheck-gettext +maybe-installcheck-gettext: + +installcheck-gettext: \ + configure-gettext + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gnuserv installcheck-gnuserv +maybe-installcheck-gnuserv: + +installcheck-gnuserv: \ + configure-gnuserv + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gprof installcheck-gprof +maybe-installcheck-gprof: + +installcheck-gprof: \ + configure-gprof + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gzip installcheck-gzip +maybe-installcheck-gzip: + +installcheck-gzip: \ + configure-gzip + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-hello installcheck-hello +maybe-installcheck-hello: + +installcheck-hello: \ + configure-hello + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-indent installcheck-indent +maybe-installcheck-indent: + +installcheck-indent: \ + configure-indent + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-intl installcheck-intl +maybe-installcheck-intl: + +installcheck-intl: \ + configure-intl + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tcl installcheck-tcl +maybe-installcheck-tcl: + +installcheck-tcl: \ + configure-tcl + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-itcl installcheck-itcl +maybe-installcheck-itcl: + +installcheck-itcl: \ + configure-itcl + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-ld installcheck-ld +maybe-installcheck-ld: + +installcheck-ld: \ + configure-ld + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libgui installcheck-libgui +maybe-installcheck-libgui: + +installcheck-libgui: \ + configure-libgui + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libiberty installcheck-libiberty +maybe-installcheck-libiberty: + +installcheck-libiberty: \ + configure-libiberty + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtool installcheck-libtool +maybe-installcheck-libtool: + +installcheck-libtool: \ + configure-libtool + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-m4 installcheck-m4 +maybe-installcheck-m4: + +installcheck-m4: \ + configure-m4 + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-make installcheck-make +maybe-installcheck-make: + +installcheck-make: \ + configure-make + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-mmalloc installcheck-mmalloc +maybe-installcheck-mmalloc: + +installcheck-mmalloc: \ + configure-mmalloc + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-patch installcheck-patch +maybe-installcheck-patch: + +installcheck-patch: \ + configure-patch + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-perl installcheck-perl +maybe-installcheck-perl: + +installcheck-perl: \ + configure-perl + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-prms installcheck-prms +maybe-installcheck-prms: + +installcheck-prms: \ + configure-prms + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-rcs installcheck-rcs +maybe-installcheck-rcs: + +installcheck-rcs: \ + configure-rcs + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-readline installcheck-readline +maybe-installcheck-readline: + +installcheck-readline: \ + configure-readline + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-release installcheck-release +maybe-installcheck-release: + +installcheck-release: \ + configure-release + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-recode installcheck-recode +maybe-installcheck-recode: + +installcheck-recode: \ + configure-recode + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sed installcheck-sed +maybe-installcheck-sed: + +installcheck-sed: \ + configure-sed + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-send-pr installcheck-send-pr +maybe-installcheck-send-pr: + +installcheck-send-pr: \ + configure-send-pr + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-shellutils installcheck-shellutils +maybe-installcheck-shellutils: + +installcheck-shellutils: \ + configure-shellutils + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sid installcheck-sid +maybe-installcheck-sid: + +installcheck-sid: \ + configure-sid + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-sim installcheck-sim +maybe-installcheck-sim: + +installcheck-sim: \ + configure-sim + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tar installcheck-tar +maybe-installcheck-tar: + +installcheck-tar: \ + configure-tar + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-texinfo installcheck-texinfo +maybe-installcheck-texinfo: + +installcheck-texinfo: \ + configure-texinfo + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-textutils installcheck-textutils +maybe-installcheck-textutils: + +installcheck-textutils: \ + configure-textutils + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-time installcheck-time +maybe-installcheck-time: + +installcheck-time: \ + configure-time + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-uudecode installcheck-uudecode +maybe-installcheck-uudecode: + +installcheck-uudecode: \ + configure-uudecode + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-wdiff installcheck-wdiff +maybe-installcheck-wdiff: + +installcheck-wdiff: \ + configure-wdiff + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zip installcheck-zip +maybe-installcheck-zip: + +installcheck-zip: \ + configure-zip + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-zlib installcheck-zlib +maybe-installcheck-zlib: + +installcheck-zlib: \ + configure-zlib + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-gdb installcheck-gdb +maybe-installcheck-gdb: + +installcheck-gdb: \ + configure-gdb + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-expect installcheck-expect +maybe-installcheck-expect: + +installcheck-expect: \ + configure-expect + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-guile installcheck-guile +maybe-installcheck-guile: + +installcheck-guile: \ + configure-guile + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tk installcheck-tk +maybe-installcheck-tk: + +installcheck-tk: \ + configure-tk + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-tix installcheck-tix +maybe-installcheck-tix: + +installcheck-tix: \ + configure-tix + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-libtermcap installcheck-libtermcap +maybe-installcheck-libtermcap: + +installcheck-libtermcap: \ + configure-libtermcap + @[ -f ./libtermcap/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in libtermcap" ; \ + (cd libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-utils installcheck-utils +maybe-installcheck-utils: + +installcheck-utils: \ + configure-utils + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-installcheck-target-libstdc++-v3 installcheck-target-libstdc++-v3 +maybe-installcheck-target-libstdc++-v3: + +installcheck-target-libstdc++-v3: \ + configure-target-libstdc++-v3 + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib +maybe-installcheck-target-newlib: + +installcheck-target-newlib: \ + configure-target-newlib + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libf2c installcheck-target-libf2c +maybe-installcheck-target-libf2c: + +installcheck-target-libf2c: \ + configure-target-libf2c + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libobjc installcheck-target-libobjc +maybe-installcheck-target-libobjc: + +installcheck-target-libobjc: \ + configure-target-libobjc + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libtermcap installcheck-target-libtermcap +maybe-installcheck-target-libtermcap: + +installcheck-target-libtermcap: \ + configure-target-libtermcap + @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-winsup installcheck-target-winsup +maybe-installcheck-target-winsup: + +installcheck-target-winsup: \ + configure-target-winsup + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libgloss installcheck-target-libgloss +maybe-installcheck-target-libgloss: + +installcheck-target-libgloss: \ + configure-target-libgloss + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libiberty installcheck-target-libiberty +maybe-installcheck-target-libiberty: + +installcheck-target-libiberty: \ + configure-target-libiberty + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-gperf installcheck-target-gperf +maybe-installcheck-target-gperf: + +installcheck-target-gperf: \ + configure-target-gperf + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-examples installcheck-target-examples +maybe-installcheck-target-examples: + +installcheck-target-examples: \ + configure-target-examples + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libffi installcheck-target-libffi +maybe-installcheck-target-libffi: + +installcheck-target-libffi: \ + configure-target-libffi + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libjava installcheck-target-libjava +maybe-installcheck-target-libjava: + +installcheck-target-libjava: \ + configure-target-libjava + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-zlib installcheck-target-zlib +maybe-installcheck-target-zlib: + +installcheck-target-zlib: \ + configure-target-zlib + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-boehm-gc installcheck-target-boehm-gc +maybe-installcheck-target-boehm-gc: + +installcheck-target-boehm-gc: \ + configure-target-boehm-gc + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-qthreads installcheck-target-qthreads +maybe-installcheck-target-qthreads: + +installcheck-target-qthreads: \ + configure-target-qthreads + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-rda installcheck-target-rda +maybe-installcheck-target-rda: + +installcheck-target-rda: \ + configure-target-rda + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + +.PHONY: maybe-installcheck-target-libada installcheck-target-libada +maybe-installcheck-target-libada: + +installcheck-target-libada: \ + configure-target-libada + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + installcheck) \ + || exit 1 + + + +.PHONY: do-mostlyclean +do-mostlyclean: mostlyclean-host mostlyclean-target + +.PHONY: mostlyclean-host +mostlyclean-host: maybe-mostlyclean-gcc \ + maybe-mostlyclean-ash \ + maybe-mostlyclean-autoconf \ + maybe-mostlyclean-automake \ + maybe-mostlyclean-bash \ + maybe-mostlyclean-bfd \ + maybe-mostlyclean-opcodes \ + maybe-mostlyclean-binutils \ + maybe-mostlyclean-bison \ + maybe-mostlyclean-byacc \ + maybe-mostlyclean-bzip2 \ + maybe-mostlyclean-dejagnu \ + maybe-mostlyclean-diff \ + maybe-mostlyclean-dosutils \ + maybe-mostlyclean-etc \ + maybe-mostlyclean-fastjar \ + maybe-mostlyclean-fileutils \ + maybe-mostlyclean-findutils \ + maybe-mostlyclean-find \ + maybe-mostlyclean-flex \ + maybe-mostlyclean-gas \ + maybe-mostlyclean-gawk \ + maybe-mostlyclean-gettext \ + maybe-mostlyclean-gnuserv \ + maybe-mostlyclean-gprof \ + maybe-mostlyclean-gzip \ + maybe-mostlyclean-hello \ + maybe-mostlyclean-indent \ + maybe-mostlyclean-intl \ + maybe-mostlyclean-tcl \ + maybe-mostlyclean-itcl \ + maybe-mostlyclean-ld \ + maybe-mostlyclean-libgui \ + maybe-mostlyclean-libiberty \ + maybe-mostlyclean-libtool \ + maybe-mostlyclean-m4 \ + maybe-mostlyclean-make \ + maybe-mostlyclean-mmalloc \ + maybe-mostlyclean-patch \ + maybe-mostlyclean-perl \ + maybe-mostlyclean-prms \ + maybe-mostlyclean-rcs \ + maybe-mostlyclean-readline \ + maybe-mostlyclean-release \ + maybe-mostlyclean-recode \ + maybe-mostlyclean-sed \ + maybe-mostlyclean-send-pr \ + maybe-mostlyclean-shellutils \ + maybe-mostlyclean-sid \ + maybe-mostlyclean-sim \ + maybe-mostlyclean-tar \ + maybe-mostlyclean-texinfo \ + maybe-mostlyclean-textutils \ + maybe-mostlyclean-time \ + maybe-mostlyclean-uudecode \ + maybe-mostlyclean-wdiff \ + maybe-mostlyclean-zip \ + maybe-mostlyclean-zlib \ + maybe-mostlyclean-gdb \ + maybe-mostlyclean-expect \ + maybe-mostlyclean-guile \ + maybe-mostlyclean-tk \ + maybe-mostlyclean-tix \ + maybe-mostlyclean-libtermcap \ + maybe-mostlyclean-utils + +.PHONY: mostlyclean-target +mostlyclean-target: \ + maybe-mostlyclean-target-libstdc++-v3 \ + maybe-mostlyclean-target-newlib \ + maybe-mostlyclean-target-libf2c \ + maybe-mostlyclean-target-libobjc \ + maybe-mostlyclean-target-libtermcap \ + maybe-mostlyclean-target-winsup \ + maybe-mostlyclean-target-libgloss \ + maybe-mostlyclean-target-libiberty \ + maybe-mostlyclean-target-gperf \ + maybe-mostlyclean-target-examples \ + maybe-mostlyclean-target-libffi \ + maybe-mostlyclean-target-libjava \ + maybe-mostlyclean-target-zlib \ + maybe-mostlyclean-target-boehm-gc \ + maybe-mostlyclean-target-qthreads \ + maybe-mostlyclean-target-rda \ + maybe-mostlyclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-mostlyclean-gcc mostlyclean-gcc +maybe-mostlyclean-gcc: +mostlyclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-mostlyclean-ash mostlyclean-ash +maybe-mostlyclean-ash: + +mostlyclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-autoconf mostlyclean-autoconf +maybe-mostlyclean-autoconf: + +mostlyclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-automake mostlyclean-automake +maybe-mostlyclean-automake: + +mostlyclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bash mostlyclean-bash +maybe-mostlyclean-bash: + +mostlyclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bfd mostlyclean-bfd +maybe-mostlyclean-bfd: + +mostlyclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-opcodes mostlyclean-opcodes +maybe-mostlyclean-opcodes: + +mostlyclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-binutils mostlyclean-binutils +maybe-mostlyclean-binutils: + +mostlyclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bison mostlyclean-bison +maybe-mostlyclean-bison: + +mostlyclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-byacc mostlyclean-byacc +maybe-mostlyclean-byacc: + +mostlyclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-bzip2 mostlyclean-bzip2 +maybe-mostlyclean-bzip2: + +mostlyclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dejagnu mostlyclean-dejagnu +maybe-mostlyclean-dejagnu: + +mostlyclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-diff mostlyclean-diff +maybe-mostlyclean-diff: + +mostlyclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-dosutils mostlyclean-dosutils +maybe-mostlyclean-dosutils: + +mostlyclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-etc mostlyclean-etc +maybe-mostlyclean-etc: + +mostlyclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fastjar mostlyclean-fastjar +maybe-mostlyclean-fastjar: + +mostlyclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-fileutils mostlyclean-fileutils +maybe-mostlyclean-fileutils: + +mostlyclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-findutils mostlyclean-findutils +maybe-mostlyclean-findutils: + +mostlyclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-find mostlyclean-find +maybe-mostlyclean-find: + +mostlyclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-flex mostlyclean-flex +maybe-mostlyclean-flex: + +mostlyclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gas mostlyclean-gas +maybe-mostlyclean-gas: + +mostlyclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gawk mostlyclean-gawk +maybe-mostlyclean-gawk: + +mostlyclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gettext mostlyclean-gettext +maybe-mostlyclean-gettext: + +mostlyclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gnuserv mostlyclean-gnuserv +maybe-mostlyclean-gnuserv: + +mostlyclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gprof mostlyclean-gprof +maybe-mostlyclean-gprof: + +mostlyclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gzip mostlyclean-gzip +maybe-mostlyclean-gzip: + +mostlyclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-hello mostlyclean-hello +maybe-mostlyclean-hello: + +mostlyclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-indent mostlyclean-indent +maybe-mostlyclean-indent: + +mostlyclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-intl mostlyclean-intl +maybe-mostlyclean-intl: + +mostlyclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tcl mostlyclean-tcl +maybe-mostlyclean-tcl: + +# tcl doesn't support mostlyclean. +mostlyclean-tcl: + + +.PHONY: maybe-mostlyclean-itcl mostlyclean-itcl +maybe-mostlyclean-itcl: + +mostlyclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-ld mostlyclean-ld +maybe-mostlyclean-ld: + +mostlyclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libgui mostlyclean-libgui +maybe-mostlyclean-libgui: + +mostlyclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libiberty mostlyclean-libiberty +maybe-mostlyclean-libiberty: + +mostlyclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtool mostlyclean-libtool +maybe-mostlyclean-libtool: + +mostlyclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-m4 mostlyclean-m4 +maybe-mostlyclean-m4: + +mostlyclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-make mostlyclean-make +maybe-mostlyclean-make: + +mostlyclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-mmalloc mostlyclean-mmalloc +maybe-mostlyclean-mmalloc: + +mostlyclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-patch mostlyclean-patch +maybe-mostlyclean-patch: + +mostlyclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-perl mostlyclean-perl +maybe-mostlyclean-perl: + +mostlyclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-prms mostlyclean-prms +maybe-mostlyclean-prms: + +mostlyclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-rcs mostlyclean-rcs +maybe-mostlyclean-rcs: + +mostlyclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-readline mostlyclean-readline +maybe-mostlyclean-readline: + +mostlyclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-release mostlyclean-release +maybe-mostlyclean-release: + +mostlyclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-recode mostlyclean-recode +maybe-mostlyclean-recode: + +mostlyclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sed mostlyclean-sed +maybe-mostlyclean-sed: + +mostlyclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-send-pr mostlyclean-send-pr +maybe-mostlyclean-send-pr: + +mostlyclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-shellutils mostlyclean-shellutils +maybe-mostlyclean-shellutils: + +mostlyclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sid mostlyclean-sid +maybe-mostlyclean-sid: + +mostlyclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-sim mostlyclean-sim +maybe-mostlyclean-sim: + +mostlyclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tar mostlyclean-tar +maybe-mostlyclean-tar: + +mostlyclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-texinfo mostlyclean-texinfo +maybe-mostlyclean-texinfo: + +mostlyclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-textutils mostlyclean-textutils +maybe-mostlyclean-textutils: + +mostlyclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-time mostlyclean-time +maybe-mostlyclean-time: + +mostlyclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-uudecode mostlyclean-uudecode +maybe-mostlyclean-uudecode: + +mostlyclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-wdiff mostlyclean-wdiff +maybe-mostlyclean-wdiff: + +mostlyclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zip mostlyclean-zip +maybe-mostlyclean-zip: + +mostlyclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-zlib mostlyclean-zlib +maybe-mostlyclean-zlib: + +mostlyclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-gdb mostlyclean-gdb +maybe-mostlyclean-gdb: + +mostlyclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-expect mostlyclean-expect +maybe-mostlyclean-expect: + +mostlyclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-guile mostlyclean-guile +maybe-mostlyclean-guile: + +mostlyclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tk mostlyclean-tk +maybe-mostlyclean-tk: + +mostlyclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-tix mostlyclean-tix +maybe-mostlyclean-tix: + +mostlyclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-libtermcap mostlyclean-libtermcap +maybe-mostlyclean-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-libtermcap: + + +.PHONY: maybe-mostlyclean-utils mostlyclean-utils +maybe-mostlyclean-utils: + +mostlyclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-mostlyclean-target-libstdc++-v3 mostlyclean-target-libstdc++-v3 +maybe-mostlyclean-target-libstdc++-v3: + +mostlyclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib +maybe-mostlyclean-target-newlib: + +mostlyclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libf2c mostlyclean-target-libf2c +maybe-mostlyclean-target-libf2c: + +mostlyclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libobjc mostlyclean-target-libobjc +maybe-mostlyclean-target-libobjc: + +mostlyclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libtermcap mostlyclean-target-libtermcap +maybe-mostlyclean-target-libtermcap: + +# libtermcap doesn't support mostlyclean. +mostlyclean-target-libtermcap: + + +.PHONY: maybe-mostlyclean-target-winsup mostlyclean-target-winsup +maybe-mostlyclean-target-winsup: + +mostlyclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libgloss mostlyclean-target-libgloss +maybe-mostlyclean-target-libgloss: + +mostlyclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libiberty mostlyclean-target-libiberty +maybe-mostlyclean-target-libiberty: + +mostlyclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-gperf mostlyclean-target-gperf +maybe-mostlyclean-target-gperf: + +mostlyclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-examples mostlyclean-target-examples +maybe-mostlyclean-target-examples: + +mostlyclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libffi mostlyclean-target-libffi +maybe-mostlyclean-target-libffi: + +mostlyclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libjava mostlyclean-target-libjava +maybe-mostlyclean-target-libjava: + +mostlyclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-zlib mostlyclean-target-zlib +maybe-mostlyclean-target-zlib: + +mostlyclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-boehm-gc mostlyclean-target-boehm-gc +maybe-mostlyclean-target-boehm-gc: + +mostlyclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-qthreads mostlyclean-target-qthreads +maybe-mostlyclean-target-qthreads: + +mostlyclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-rda mostlyclean-target-rda +maybe-mostlyclean-target-rda: + +mostlyclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + +.PHONY: maybe-mostlyclean-target-libada mostlyclean-target-libada +maybe-mostlyclean-target-libada: + +mostlyclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + mostlyclean) \ + || exit 1 + + + +.PHONY: do-clean +do-clean: clean-host clean-target + +.PHONY: clean-host +clean-host: maybe-clean-gcc \ + maybe-clean-ash \ + maybe-clean-autoconf \ + maybe-clean-automake \ + maybe-clean-bash \ + maybe-clean-bfd \ + maybe-clean-opcodes \ + maybe-clean-binutils \ + maybe-clean-bison \ + maybe-clean-byacc \ + maybe-clean-bzip2 \ + maybe-clean-dejagnu \ + maybe-clean-diff \ + maybe-clean-dosutils \ + maybe-clean-etc \ + maybe-clean-fastjar \ + maybe-clean-fileutils \ + maybe-clean-findutils \ + maybe-clean-find \ + maybe-clean-flex \ + maybe-clean-gas \ + maybe-clean-gawk \ + maybe-clean-gettext \ + maybe-clean-gnuserv \ + maybe-clean-gprof \ + maybe-clean-gzip \ + maybe-clean-hello \ + maybe-clean-indent \ + maybe-clean-intl \ + maybe-clean-tcl \ + maybe-clean-itcl \ + maybe-clean-ld \ + maybe-clean-libgui \ + maybe-clean-libiberty \ + maybe-clean-libtool \ + maybe-clean-m4 \ + maybe-clean-make \ + maybe-clean-mmalloc \ + maybe-clean-patch \ + maybe-clean-perl \ + maybe-clean-prms \ + maybe-clean-rcs \ + maybe-clean-readline \ + maybe-clean-release \ + maybe-clean-recode \ + maybe-clean-sed \ + maybe-clean-send-pr \ + maybe-clean-shellutils \ + maybe-clean-sid \ + maybe-clean-sim \ + maybe-clean-tar \ + maybe-clean-texinfo \ + maybe-clean-textutils \ + maybe-clean-time \ + maybe-clean-uudecode \ + maybe-clean-wdiff \ + maybe-clean-zip \ + maybe-clean-zlib \ + maybe-clean-gdb \ + maybe-clean-expect \ + maybe-clean-guile \ + maybe-clean-tk \ + maybe-clean-tix \ + maybe-clean-libtermcap \ + maybe-clean-utils + +.PHONY: clean-target +clean-target: \ + maybe-clean-target-libstdc++-v3 \ + maybe-clean-target-newlib \ + maybe-clean-target-libf2c \ + maybe-clean-target-libobjc \ + maybe-clean-target-libtermcap \ + maybe-clean-target-winsup \ + maybe-clean-target-libgloss \ + maybe-clean-target-libiberty \ + maybe-clean-target-gperf \ + maybe-clean-target-examples \ + maybe-clean-target-libffi \ + maybe-clean-target-libjava \ + maybe-clean-target-zlib \ + maybe-clean-target-boehm-gc \ + maybe-clean-target-qthreads \ + maybe-clean-target-rda \ + maybe-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-clean-gcc clean-gcc +maybe-clean-gcc: +clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-clean-ash clean-ash +maybe-clean-ash: + +clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-autoconf clean-autoconf +maybe-clean-autoconf: + +clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-automake clean-automake +maybe-clean-automake: + +clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bash clean-bash +maybe-clean-bash: + +clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bfd clean-bfd +maybe-clean-bfd: + +clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-opcodes clean-opcodes +maybe-clean-opcodes: + +clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-binutils clean-binutils +maybe-clean-binutils: + +clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bison clean-bison +maybe-clean-bison: + +clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-byacc clean-byacc +maybe-clean-byacc: + +clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-bzip2 clean-bzip2 +maybe-clean-bzip2: + +clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dejagnu clean-dejagnu +maybe-clean-dejagnu: + +clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-diff clean-diff +maybe-clean-diff: + +clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-dosutils clean-dosutils +maybe-clean-dosutils: + +clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-etc clean-etc +maybe-clean-etc: + +clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fastjar clean-fastjar +maybe-clean-fastjar: + +clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-fileutils clean-fileutils +maybe-clean-fileutils: + +clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-findutils clean-findutils +maybe-clean-findutils: + +clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-find clean-find +maybe-clean-find: + +clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-flex clean-flex +maybe-clean-flex: + +clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gas clean-gas +maybe-clean-gas: + +clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gawk clean-gawk +maybe-clean-gawk: + +clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gettext clean-gettext +maybe-clean-gettext: + +clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gnuserv clean-gnuserv +maybe-clean-gnuserv: + +clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gprof clean-gprof +maybe-clean-gprof: + +clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gzip clean-gzip +maybe-clean-gzip: + +clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-hello clean-hello +maybe-clean-hello: + +clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-indent clean-indent +maybe-clean-indent: + +clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-intl clean-intl +maybe-clean-intl: + +clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tcl clean-tcl +maybe-clean-tcl: + +clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-itcl clean-itcl +maybe-clean-itcl: + +clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-ld clean-ld +maybe-clean-ld: + +clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libgui clean-libgui +maybe-clean-libgui: + +clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libiberty clean-libiberty +maybe-clean-libiberty: + +clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtool clean-libtool +maybe-clean-libtool: + +clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-m4 clean-m4 +maybe-clean-m4: + +clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-make clean-make +maybe-clean-make: + +clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-mmalloc clean-mmalloc +maybe-clean-mmalloc: + +clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-patch clean-patch +maybe-clean-patch: + +clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-perl clean-perl +maybe-clean-perl: + +clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-prms clean-prms +maybe-clean-prms: + +clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-rcs clean-rcs +maybe-clean-rcs: + +clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-readline clean-readline +maybe-clean-readline: + +clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-release clean-release +maybe-clean-release: + +clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-recode clean-recode +maybe-clean-recode: + +clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sed clean-sed +maybe-clean-sed: + +clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-send-pr clean-send-pr +maybe-clean-send-pr: + +clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-shellutils clean-shellutils +maybe-clean-shellutils: + +clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sid clean-sid +maybe-clean-sid: + +clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-sim clean-sim +maybe-clean-sim: + +clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tar clean-tar +maybe-clean-tar: + +clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-texinfo clean-texinfo +maybe-clean-texinfo: + +clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-textutils clean-textutils +maybe-clean-textutils: + +clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-time clean-time +maybe-clean-time: + +clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-uudecode clean-uudecode +maybe-clean-uudecode: + +clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-wdiff clean-wdiff +maybe-clean-wdiff: + +clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zip clean-zip +maybe-clean-zip: + +clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-zlib clean-zlib +maybe-clean-zlib: + +clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-gdb clean-gdb +maybe-clean-gdb: + +clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-expect clean-expect +maybe-clean-expect: + +clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-guile clean-guile +maybe-clean-guile: + +clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tk clean-tk +maybe-clean-tk: + +clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-tix clean-tix +maybe-clean-tix: + +clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-libtermcap clean-libtermcap +maybe-clean-libtermcap: + +# libtermcap doesn't support clean. +clean-libtermcap: + + +.PHONY: maybe-clean-utils clean-utils +maybe-clean-utils: + +clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-clean-target-libstdc++-v3 clean-target-libstdc++-v3 +maybe-clean-target-libstdc++-v3: + +clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-newlib clean-target-newlib +maybe-clean-target-newlib: + +clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libf2c clean-target-libf2c +maybe-clean-target-libf2c: + +clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libobjc clean-target-libobjc +maybe-clean-target-libobjc: + +clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libtermcap clean-target-libtermcap +maybe-clean-target-libtermcap: + +# libtermcap doesn't support clean. +clean-target-libtermcap: + + +.PHONY: maybe-clean-target-winsup clean-target-winsup +maybe-clean-target-winsup: + +clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libgloss clean-target-libgloss +maybe-clean-target-libgloss: + +clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libiberty clean-target-libiberty +maybe-clean-target-libiberty: + +clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-gperf clean-target-gperf +maybe-clean-target-gperf: + +clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-examples clean-target-examples +maybe-clean-target-examples: + +clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libffi clean-target-libffi +maybe-clean-target-libffi: + +clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libjava clean-target-libjava +maybe-clean-target-libjava: + +clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-zlib clean-target-zlib +maybe-clean-target-zlib: + +clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-boehm-gc clean-target-boehm-gc +maybe-clean-target-boehm-gc: + +clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-qthreads clean-target-qthreads +maybe-clean-target-qthreads: + +clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-rda clean-target-rda +maybe-clean-target-rda: + +clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + +.PHONY: maybe-clean-target-libada clean-target-libada +maybe-clean-target-libada: + +clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + clean) \ + || exit 1 + + + +.PHONY: do-distclean +do-distclean: distclean-host distclean-target + +.PHONY: distclean-host +distclean-host: maybe-distclean-gcc \ + maybe-distclean-ash \ + maybe-distclean-autoconf \ + maybe-distclean-automake \ + maybe-distclean-bash \ + maybe-distclean-bfd \ + maybe-distclean-opcodes \ + maybe-distclean-binutils \ + maybe-distclean-bison \ + maybe-distclean-byacc \ + maybe-distclean-bzip2 \ + maybe-distclean-dejagnu \ + maybe-distclean-diff \ + maybe-distclean-dosutils \ + maybe-distclean-etc \ + maybe-distclean-fastjar \ + maybe-distclean-fileutils \ + maybe-distclean-findutils \ + maybe-distclean-find \ + maybe-distclean-flex \ + maybe-distclean-gas \ + maybe-distclean-gawk \ + maybe-distclean-gettext \ + maybe-distclean-gnuserv \ + maybe-distclean-gprof \ + maybe-distclean-gzip \ + maybe-distclean-hello \ + maybe-distclean-indent \ + maybe-distclean-intl \ + maybe-distclean-tcl \ + maybe-distclean-itcl \ + maybe-distclean-ld \ + maybe-distclean-libgui \ + maybe-distclean-libiberty \ + maybe-distclean-libtool \ + maybe-distclean-m4 \ + maybe-distclean-make \ + maybe-distclean-mmalloc \ + maybe-distclean-patch \ + maybe-distclean-perl \ + maybe-distclean-prms \ + maybe-distclean-rcs \ + maybe-distclean-readline \ + maybe-distclean-release \ + maybe-distclean-recode \ + maybe-distclean-sed \ + maybe-distclean-send-pr \ + maybe-distclean-shellutils \ + maybe-distclean-sid \ + maybe-distclean-sim \ + maybe-distclean-tar \ + maybe-distclean-texinfo \ + maybe-distclean-textutils \ + maybe-distclean-time \ + maybe-distclean-uudecode \ + maybe-distclean-wdiff \ + maybe-distclean-zip \ + maybe-distclean-zlib \ + maybe-distclean-gdb \ + maybe-distclean-expect \ + maybe-distclean-guile \ + maybe-distclean-tk \ + maybe-distclean-tix \ + maybe-distclean-libtermcap \ + maybe-distclean-utils + +.PHONY: distclean-target +distclean-target: \ + maybe-distclean-target-libstdc++-v3 \ + maybe-distclean-target-newlib \ + maybe-distclean-target-libf2c \ + maybe-distclean-target-libobjc \ + maybe-distclean-target-libtermcap \ + maybe-distclean-target-winsup \ + maybe-distclean-target-libgloss \ + maybe-distclean-target-libiberty \ + maybe-distclean-target-gperf \ + maybe-distclean-target-examples \ + maybe-distclean-target-libffi \ + maybe-distclean-target-libjava \ + maybe-distclean-target-zlib \ + maybe-distclean-target-boehm-gc \ + maybe-distclean-target-qthreads \ + maybe-distclean-target-rda \ + maybe-distclean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-distclean-gcc distclean-gcc +maybe-distclean-gcc: +distclean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-distclean-ash distclean-ash +maybe-distclean-ash: + +distclean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-autoconf distclean-autoconf +maybe-distclean-autoconf: + +distclean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-automake distclean-automake +maybe-distclean-automake: + +distclean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bash distclean-bash +maybe-distclean-bash: + +distclean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bfd distclean-bfd +maybe-distclean-bfd: + +distclean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-opcodes distclean-opcodes +maybe-distclean-opcodes: + +distclean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-binutils distclean-binutils +maybe-distclean-binutils: + +distclean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bison distclean-bison +maybe-distclean-bison: + +distclean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-byacc distclean-byacc +maybe-distclean-byacc: + +distclean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-bzip2 distclean-bzip2 +maybe-distclean-bzip2: + +distclean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dejagnu distclean-dejagnu +maybe-distclean-dejagnu: + +distclean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-diff distclean-diff +maybe-distclean-diff: + +distclean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-dosutils distclean-dosutils +maybe-distclean-dosutils: + +distclean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-etc distclean-etc +maybe-distclean-etc: + +distclean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fastjar distclean-fastjar +maybe-distclean-fastjar: + +distclean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-fileutils distclean-fileutils +maybe-distclean-fileutils: + +distclean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-findutils distclean-findutils +maybe-distclean-findutils: + +distclean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-find distclean-find +maybe-distclean-find: + +distclean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-flex distclean-flex +maybe-distclean-flex: + +distclean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gas distclean-gas +maybe-distclean-gas: + +distclean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gawk distclean-gawk +maybe-distclean-gawk: + +distclean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gettext distclean-gettext +maybe-distclean-gettext: + +distclean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gnuserv distclean-gnuserv +maybe-distclean-gnuserv: + +distclean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gprof distclean-gprof +maybe-distclean-gprof: + +distclean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gzip distclean-gzip +maybe-distclean-gzip: + +distclean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-hello distclean-hello +maybe-distclean-hello: + +distclean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-indent distclean-indent +maybe-distclean-indent: + +distclean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-intl distclean-intl +maybe-distclean-intl: + +distclean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tcl distclean-tcl +maybe-distclean-tcl: + +distclean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-itcl distclean-itcl +maybe-distclean-itcl: + +distclean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-ld distclean-ld +maybe-distclean-ld: + +distclean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libgui distclean-libgui +maybe-distclean-libgui: + +distclean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libiberty distclean-libiberty +maybe-distclean-libiberty: + +distclean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtool distclean-libtool +maybe-distclean-libtool: + +distclean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-m4 distclean-m4 +maybe-distclean-m4: + +distclean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-make distclean-make +maybe-distclean-make: + +distclean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-mmalloc distclean-mmalloc +maybe-distclean-mmalloc: + +distclean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-patch distclean-patch +maybe-distclean-patch: + +distclean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-perl distclean-perl +maybe-distclean-perl: + +distclean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-prms distclean-prms +maybe-distclean-prms: + +distclean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-rcs distclean-rcs +maybe-distclean-rcs: + +distclean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-readline distclean-readline +maybe-distclean-readline: + +distclean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-release distclean-release +maybe-distclean-release: + +distclean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-recode distclean-recode +maybe-distclean-recode: + +distclean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sed distclean-sed +maybe-distclean-sed: + +distclean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-send-pr distclean-send-pr +maybe-distclean-send-pr: + +distclean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-shellutils distclean-shellutils +maybe-distclean-shellutils: + +distclean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sid distclean-sid +maybe-distclean-sid: + +distclean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-sim distclean-sim +maybe-distclean-sim: + +distclean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tar distclean-tar +maybe-distclean-tar: + +distclean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-texinfo distclean-texinfo +maybe-distclean-texinfo: + +distclean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-textutils distclean-textutils +maybe-distclean-textutils: + +distclean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-time distclean-time +maybe-distclean-time: + +distclean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-uudecode distclean-uudecode +maybe-distclean-uudecode: + +distclean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-wdiff distclean-wdiff +maybe-distclean-wdiff: + +distclean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zip distclean-zip +maybe-distclean-zip: + +distclean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-zlib distclean-zlib +maybe-distclean-zlib: + +distclean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-gdb distclean-gdb +maybe-distclean-gdb: + +distclean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-expect distclean-expect +maybe-distclean-expect: + +distclean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-guile distclean-guile +maybe-distclean-guile: + +distclean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tk distclean-tk +maybe-distclean-tk: + +distclean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-tix distclean-tix +maybe-distclean-tix: + +distclean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-libtermcap distclean-libtermcap +maybe-distclean-libtermcap: + +# libtermcap doesn't support distclean. +distclean-libtermcap: + + +.PHONY: maybe-distclean-utils distclean-utils +maybe-distclean-utils: + +distclean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-distclean-target-libstdc++-v3 distclean-target-libstdc++-v3 +maybe-distclean-target-libstdc++-v3: + +distclean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-newlib distclean-target-newlib +maybe-distclean-target-newlib: + +distclean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libf2c distclean-target-libf2c +maybe-distclean-target-libf2c: + +distclean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libobjc distclean-target-libobjc +maybe-distclean-target-libobjc: + +distclean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libtermcap distclean-target-libtermcap +maybe-distclean-target-libtermcap: + +# libtermcap doesn't support distclean. +distclean-target-libtermcap: + + +.PHONY: maybe-distclean-target-winsup distclean-target-winsup +maybe-distclean-target-winsup: + +distclean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libgloss distclean-target-libgloss +maybe-distclean-target-libgloss: + +distclean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libiberty distclean-target-libiberty +maybe-distclean-target-libiberty: + +distclean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-gperf distclean-target-gperf +maybe-distclean-target-gperf: + +distclean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-examples distclean-target-examples +maybe-distclean-target-examples: + +distclean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libffi distclean-target-libffi +maybe-distclean-target-libffi: + +distclean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libjava distclean-target-libjava +maybe-distclean-target-libjava: + +distclean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-zlib distclean-target-zlib +maybe-distclean-target-zlib: + +distclean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-boehm-gc distclean-target-boehm-gc +maybe-distclean-target-boehm-gc: + +distclean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-qthreads distclean-target-qthreads +maybe-distclean-target-qthreads: + +distclean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-rda distclean-target-rda +maybe-distclean-target-rda: + +distclean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + +.PHONY: maybe-distclean-target-libada distclean-target-libada +maybe-distclean-target-libada: + +distclean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + distclean) \ + || exit 1 + + + +.PHONY: do-maintainer-clean +do-maintainer-clean: maintainer-clean-host maintainer-clean-target + +.PHONY: maintainer-clean-host +maintainer-clean-host: maybe-maintainer-clean-gcc \ + maybe-maintainer-clean-ash \ + maybe-maintainer-clean-autoconf \ + maybe-maintainer-clean-automake \ + maybe-maintainer-clean-bash \ + maybe-maintainer-clean-bfd \ + maybe-maintainer-clean-opcodes \ + maybe-maintainer-clean-binutils \ + maybe-maintainer-clean-bison \ + maybe-maintainer-clean-byacc \ + maybe-maintainer-clean-bzip2 \ + maybe-maintainer-clean-dejagnu \ + maybe-maintainer-clean-diff \ + maybe-maintainer-clean-dosutils \ + maybe-maintainer-clean-etc \ + maybe-maintainer-clean-fastjar \ + maybe-maintainer-clean-fileutils \ + maybe-maintainer-clean-findutils \ + maybe-maintainer-clean-find \ + maybe-maintainer-clean-flex \ + maybe-maintainer-clean-gas \ + maybe-maintainer-clean-gawk \ + maybe-maintainer-clean-gettext \ + maybe-maintainer-clean-gnuserv \ + maybe-maintainer-clean-gprof \ + maybe-maintainer-clean-gzip \ + maybe-maintainer-clean-hello \ + maybe-maintainer-clean-indent \ + maybe-maintainer-clean-intl \ + maybe-maintainer-clean-tcl \ + maybe-maintainer-clean-itcl \ + maybe-maintainer-clean-ld \ + maybe-maintainer-clean-libgui \ + maybe-maintainer-clean-libiberty \ + maybe-maintainer-clean-libtool \ + maybe-maintainer-clean-m4 \ + maybe-maintainer-clean-make \ + maybe-maintainer-clean-mmalloc \ + maybe-maintainer-clean-patch \ + maybe-maintainer-clean-perl \ + maybe-maintainer-clean-prms \ + maybe-maintainer-clean-rcs \ + maybe-maintainer-clean-readline \ + maybe-maintainer-clean-release \ + maybe-maintainer-clean-recode \ + maybe-maintainer-clean-sed \ + maybe-maintainer-clean-send-pr \ + maybe-maintainer-clean-shellutils \ + maybe-maintainer-clean-sid \ + maybe-maintainer-clean-sim \ + maybe-maintainer-clean-tar \ + maybe-maintainer-clean-texinfo \ + maybe-maintainer-clean-textutils \ + maybe-maintainer-clean-time \ + maybe-maintainer-clean-uudecode \ + maybe-maintainer-clean-wdiff \ + maybe-maintainer-clean-zip \ + maybe-maintainer-clean-zlib \ + maybe-maintainer-clean-gdb \ + maybe-maintainer-clean-expect \ + maybe-maintainer-clean-guile \ + maybe-maintainer-clean-tk \ + maybe-maintainer-clean-tix \ + maybe-maintainer-clean-libtermcap \ + maybe-maintainer-clean-utils + +.PHONY: maintainer-clean-target +maintainer-clean-target: \ + maybe-maintainer-clean-target-libstdc++-v3 \ + maybe-maintainer-clean-target-newlib \ + maybe-maintainer-clean-target-libf2c \ + maybe-maintainer-clean-target-libobjc \ + maybe-maintainer-clean-target-libtermcap \ + maybe-maintainer-clean-target-winsup \ + maybe-maintainer-clean-target-libgloss \ + maybe-maintainer-clean-target-libiberty \ + maybe-maintainer-clean-target-gperf \ + maybe-maintainer-clean-target-examples \ + maybe-maintainer-clean-target-libffi \ + maybe-maintainer-clean-target-libjava \ + maybe-maintainer-clean-target-zlib \ + maybe-maintainer-clean-target-boehm-gc \ + maybe-maintainer-clean-target-qthreads \ + maybe-maintainer-clean-target-rda \ + maybe-maintainer-clean-target-libada + +# GCC, the eternal special case +.PHONY: maybe-maintainer-clean-gcc maintainer-clean-gcc +maybe-maintainer-clean-gcc: +maintainer-clean-gcc: + @[ -f ./gcc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_GCC_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gcc" ; \ + (cd gcc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + +# Host modules. + +.PHONY: maybe-maintainer-clean-ash maintainer-clean-ash +maybe-maintainer-clean-ash: + +maintainer-clean-ash: + @[ -f ./ash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ash" ; \ + (cd ash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-autoconf maintainer-clean-autoconf +maybe-maintainer-clean-autoconf: + +maintainer-clean-autoconf: + @[ -f ./autoconf/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in autoconf" ; \ + (cd autoconf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-automake maintainer-clean-automake +maybe-maintainer-clean-automake: + +maintainer-clean-automake: + @[ -f ./automake/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in automake" ; \ + (cd automake && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bash maintainer-clean-bash +maybe-maintainer-clean-bash: + +maintainer-clean-bash: + @[ -f ./bash/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bash" ; \ + (cd bash && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bfd maintainer-clean-bfd +maybe-maintainer-clean-bfd: + +maintainer-clean-bfd: + @[ -f ./bfd/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bfd" ; \ + (cd bfd && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-opcodes maintainer-clean-opcodes +maybe-maintainer-clean-opcodes: + +maintainer-clean-opcodes: + @[ -f ./opcodes/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in opcodes" ; \ + (cd opcodes && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-binutils maintainer-clean-binutils +maybe-maintainer-clean-binutils: + +maintainer-clean-binutils: + @[ -f ./binutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in binutils" ; \ + (cd binutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bison maintainer-clean-bison +maybe-maintainer-clean-bison: + +maintainer-clean-bison: + @[ -f ./bison/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bison" ; \ + (cd bison && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-byacc maintainer-clean-byacc +maybe-maintainer-clean-byacc: + +maintainer-clean-byacc: + @[ -f ./byacc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in byacc" ; \ + (cd byacc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-bzip2 maintainer-clean-bzip2 +maybe-maintainer-clean-bzip2: + +maintainer-clean-bzip2: + @[ -f ./bzip2/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in bzip2" ; \ + (cd bzip2 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dejagnu maintainer-clean-dejagnu +maybe-maintainer-clean-dejagnu: + +maintainer-clean-dejagnu: + @[ -f ./dejagnu/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dejagnu" ; \ + (cd dejagnu && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-diff maintainer-clean-diff +maybe-maintainer-clean-diff: + +maintainer-clean-diff: + @[ -f ./diff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in diff" ; \ + (cd diff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-dosutils maintainer-clean-dosutils +maybe-maintainer-clean-dosutils: + +maintainer-clean-dosutils: + @[ -f ./dosutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in dosutils" ; \ + (cd dosutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-etc maintainer-clean-etc +maybe-maintainer-clean-etc: + +maintainer-clean-etc: + @[ -f ./etc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in etc" ; \ + (cd etc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fastjar maintainer-clean-fastjar +maybe-maintainer-clean-fastjar: + +maintainer-clean-fastjar: + @[ -f ./fastjar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fastjar" ; \ + (cd fastjar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-fileutils maintainer-clean-fileutils +maybe-maintainer-clean-fileutils: + +maintainer-clean-fileutils: + @[ -f ./fileutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in fileutils" ; \ + (cd fileutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-findutils maintainer-clean-findutils +maybe-maintainer-clean-findutils: + +maintainer-clean-findutils: + @[ -f ./findutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in findutils" ; \ + (cd findutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-find maintainer-clean-find +maybe-maintainer-clean-find: + +maintainer-clean-find: + @[ -f ./find/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in find" ; \ + (cd find && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-flex maintainer-clean-flex +maybe-maintainer-clean-flex: + +maintainer-clean-flex: + @[ -f ./flex/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in flex" ; \ + (cd flex && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gas maintainer-clean-gas +maybe-maintainer-clean-gas: + +maintainer-clean-gas: + @[ -f ./gas/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gas" ; \ + (cd gas && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gawk maintainer-clean-gawk +maybe-maintainer-clean-gawk: + +maintainer-clean-gawk: + @[ -f ./gawk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gawk" ; \ + (cd gawk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gettext maintainer-clean-gettext +maybe-maintainer-clean-gettext: + +maintainer-clean-gettext: + @[ -f ./gettext/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gettext" ; \ + (cd gettext && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gnuserv maintainer-clean-gnuserv +maybe-maintainer-clean-gnuserv: + +maintainer-clean-gnuserv: + @[ -f ./gnuserv/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gnuserv" ; \ + (cd gnuserv && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gprof maintainer-clean-gprof +maybe-maintainer-clean-gprof: + +maintainer-clean-gprof: + @[ -f ./gprof/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprof" ; \ + (cd gprof && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gzip maintainer-clean-gzip +maybe-maintainer-clean-gzip: + +maintainer-clean-gzip: + @[ -f ./gzip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gzip" ; \ + (cd gzip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-hello maintainer-clean-hello +maybe-maintainer-clean-hello: + +maintainer-clean-hello: + @[ -f ./hello/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in hello" ; \ + (cd hello && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-indent maintainer-clean-indent +maybe-maintainer-clean-indent: + +maintainer-clean-indent: + @[ -f ./indent/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in indent" ; \ + (cd indent && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-intl maintainer-clean-intl +maybe-maintainer-clean-intl: + +maintainer-clean-intl: + @[ -f ./intl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in intl" ; \ + (cd intl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tcl maintainer-clean-tcl +maybe-maintainer-clean-tcl: + +maintainer-clean-tcl: + @[ -f ./tcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tcl" ; \ + (cd tcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-itcl maintainer-clean-itcl +maybe-maintainer-clean-itcl: + +maintainer-clean-itcl: + @[ -f ./itcl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in itcl" ; \ + (cd itcl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-ld maintainer-clean-ld +maybe-maintainer-clean-ld: + +maintainer-clean-ld: + @[ -f ./ld/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in ld" ; \ + (cd ld && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libgui maintainer-clean-libgui +maybe-maintainer-clean-libgui: + +maintainer-clean-libgui: + @[ -f ./libgui/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libgui" ; \ + (cd libgui && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libiberty maintainer-clean-libiberty +maybe-maintainer-clean-libiberty: + +maintainer-clean-libiberty: + @[ -f ./libiberty/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libiberty" ; \ + (cd libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtool maintainer-clean-libtool +maybe-maintainer-clean-libtool: + +maintainer-clean-libtool: + @[ -f ./libtool/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libtool" ; \ + (cd libtool && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-m4 maintainer-clean-m4 +maybe-maintainer-clean-m4: + +maintainer-clean-m4: + @[ -f ./m4/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in m4" ; \ + (cd m4 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-make maintainer-clean-make +maybe-maintainer-clean-make: + +maintainer-clean-make: + @[ -f ./make/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in make" ; \ + (cd make && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-mmalloc maintainer-clean-mmalloc +maybe-maintainer-clean-mmalloc: + +maintainer-clean-mmalloc: + @[ -f ./mmalloc/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in mmalloc" ; \ + (cd mmalloc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-patch maintainer-clean-patch +maybe-maintainer-clean-patch: + +maintainer-clean-patch: + @[ -f ./patch/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in patch" ; \ + (cd patch && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-perl maintainer-clean-perl +maybe-maintainer-clean-perl: + +maintainer-clean-perl: + @[ -f ./perl/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in perl" ; \ + (cd perl && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-prms maintainer-clean-prms +maybe-maintainer-clean-prms: + +maintainer-clean-prms: + @[ -f ./prms/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in prms" ; \ + (cd prms && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-rcs maintainer-clean-rcs +maybe-maintainer-clean-rcs: + +maintainer-clean-rcs: + @[ -f ./rcs/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in rcs" ; \ + (cd rcs && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +maybe-maintainer-clean-readline: + +maintainer-clean-readline: + @[ -f ./readline/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in readline" ; \ + (cd readline && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-release maintainer-clean-release +maybe-maintainer-clean-release: + +maintainer-clean-release: + @[ -f ./release/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in release" ; \ + (cd release && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-recode maintainer-clean-recode +maybe-maintainer-clean-recode: + +maintainer-clean-recode: + @[ -f ./recode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in recode" ; \ + (cd recode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sed maintainer-clean-sed +maybe-maintainer-clean-sed: + +maintainer-clean-sed: + @[ -f ./sed/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sed" ; \ + (cd sed && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-send-pr maintainer-clean-send-pr +maybe-maintainer-clean-send-pr: + +maintainer-clean-send-pr: + @[ -f ./send-pr/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in send-pr" ; \ + (cd send-pr && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-shellutils maintainer-clean-shellutils +maybe-maintainer-clean-shellutils: + +maintainer-clean-shellutils: + @[ -f ./shellutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in shellutils" ; \ + (cd shellutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sid maintainer-clean-sid +maybe-maintainer-clean-sid: + +maintainer-clean-sid: + @[ -f ./sid/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sid" ; \ + (cd sid && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-sim maintainer-clean-sim +maybe-maintainer-clean-sim: + +maintainer-clean-sim: + @[ -f ./sim/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in sim" ; \ + (cd sim && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tar maintainer-clean-tar +maybe-maintainer-clean-tar: + +maintainer-clean-tar: + @[ -f ./tar/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tar" ; \ + (cd tar && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-texinfo maintainer-clean-texinfo +maybe-maintainer-clean-texinfo: + +maintainer-clean-texinfo: + @[ -f ./texinfo/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in texinfo" ; \ + (cd texinfo && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-textutils maintainer-clean-textutils +maybe-maintainer-clean-textutils: + +maintainer-clean-textutils: + @[ -f ./textutils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in textutils" ; \ + (cd textutils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-time maintainer-clean-time +maybe-maintainer-clean-time: + +maintainer-clean-time: + @[ -f ./time/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in time" ; \ + (cd time && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-uudecode maintainer-clean-uudecode +maybe-maintainer-clean-uudecode: + +maintainer-clean-uudecode: + @[ -f ./uudecode/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in uudecode" ; \ + (cd uudecode && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-wdiff maintainer-clean-wdiff +maybe-maintainer-clean-wdiff: + +maintainer-clean-wdiff: + @[ -f ./wdiff/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in wdiff" ; \ + (cd wdiff && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zip maintainer-clean-zip +maybe-maintainer-clean-zip: + +maintainer-clean-zip: + @[ -f ./zip/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zip" ; \ + (cd zip && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-zlib maintainer-clean-zlib +maybe-maintainer-clean-zlib: + +maintainer-clean-zlib: + @[ -f ./zlib/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in zlib" ; \ + (cd zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-gdb maintainer-clean-gdb +maybe-maintainer-clean-gdb: + +maintainer-clean-gdb: + @[ -f ./gdb/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gdb" ; \ + (cd gdb && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-expect maintainer-clean-expect +maybe-maintainer-clean-expect: + +maintainer-clean-expect: + @[ -f ./expect/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in expect" ; \ + (cd expect && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-guile maintainer-clean-guile +maybe-maintainer-clean-guile: + +maintainer-clean-guile: + @[ -f ./guile/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in guile" ; \ + (cd guile && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tk maintainer-clean-tk +maybe-maintainer-clean-tk: + +maintainer-clean-tk: + @[ -f ./tk/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tk" ; \ + (cd tk && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-tix maintainer-clean-tix +maybe-maintainer-clean-tix: + +maintainer-clean-tix: + @[ -f ./tix/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in tix" ; \ + (cd tix && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-libtermcap maintainer-clean-libtermcap +maybe-maintainer-clean-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-libtermcap: + + +.PHONY: maybe-maintainer-clean-utils maintainer-clean-utils +maybe-maintainer-clean-utils: + +maintainer-clean-utils: + @[ -f ./utils/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + for flag in $(EXTRA_HOST_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in utils" ; \ + (cd utils && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + +# Target modules. + +.PHONY: maybe-maintainer-clean-target-libstdc++-v3 maintainer-clean-target-libstdc++-v3 +maybe-maintainer-clean-target-libstdc++-v3: + +maintainer-clean-target-libstdc++-v3: + @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib +maybe-maintainer-clean-target-newlib: + +maintainer-clean-target-newlib: + @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libf2c maintainer-clean-target-libf2c +maybe-maintainer-clean-target-libf2c: + +maintainer-clean-target-libf2c: + @[ -f $(TARGET_SUBDIR)/libf2c/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libf2c" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libobjc maintainer-clean-target-libobjc +maybe-maintainer-clean-target-libobjc: + +maintainer-clean-target-libobjc: + @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libtermcap maintainer-clean-target-libtermcap +maybe-maintainer-clean-target-libtermcap: + +# libtermcap doesn't support maintainer-clean. +maintainer-clean-target-libtermcap: + + +.PHONY: maybe-maintainer-clean-target-winsup maintainer-clean-target-winsup +maybe-maintainer-clean-target-winsup: + +maintainer-clean-target-winsup: + @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libgloss maintainer-clean-target-libgloss +maybe-maintainer-clean-target-libgloss: + +maintainer-clean-target-libgloss: + @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libiberty maintainer-clean-target-libiberty +maybe-maintainer-clean-target-libiberty: + +maintainer-clean-target-libiberty: + @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libiberty" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-gperf maintainer-clean-target-gperf +maybe-maintainer-clean-target-gperf: + +maintainer-clean-target-gperf: + @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/gperf" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-examples maintainer-clean-target-examples +maybe-maintainer-clean-target-examples: + +maintainer-clean-target-examples: + @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/examples" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libffi maintainer-clean-target-libffi +maybe-maintainer-clean-target-libffi: + +maintainer-clean-target-libffi: + @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libjava maintainer-clean-target-libjava +maybe-maintainer-clean-target-libjava: + +maintainer-clean-target-libjava: + @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-zlib maintainer-clean-target-zlib +maybe-maintainer-clean-target-zlib: + +maintainer-clean-target-zlib: + @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-boehm-gc maintainer-clean-target-boehm-gc +maybe-maintainer-clean-target-boehm-gc: + +maintainer-clean-target-boehm-gc: + @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-qthreads maintainer-clean-target-qthreads +maybe-maintainer-clean-target-qthreads: + +maintainer-clean-target-qthreads: + @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/qthreads" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-rda maintainer-clean-target-rda +maybe-maintainer-clean-target-rda: + +maintainer-clean-target-rda: + @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + +.PHONY: maybe-maintainer-clean-target-libada maintainer-clean-target-libada +maybe-maintainer-clean-target-libada: + +maintainer-clean-target-libada: + @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \ + for flag in $(EXTRA_TARGET_FLAGS); do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ + maintainer-clean) \ + || exit 1 + + + + +# Here are the targets which correspond to the do-X targets. + +.PHONY: info installcheck dvi install-info +.PHONY: clean distclean mostlyclean maintainer-clean realclean +.PHONY: local-clean local-distclean local-maintainer-clean +info: do-info +installcheck: do-installcheck +dvi: do-dvi + +# Make sure makeinfo is built before we do a `make info', if we're +# in fact building texinfo. +do-info: maybe-all-texinfo + +install-info: do-install-info dir.info + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + if [ -f dir.info ] ; then \ + $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \ + else true ; fi + +local-clean: + -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log + +local-distclean: + -rm -f Makefile config.status config.cache mh-frag mt-frag + -rm -f multilib.out multilib.tmp maybedep.tmp serdep.tmp + -if [ "$(TARGET_SUBDIR)" != "." ]; then \ + rm -rf $(TARGET_SUBDIR); \ + else true; fi + -rm -rf $(BUILD_SUBDIR) + -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile + -rm -f texinfo/doc/Makefile texinfo/po/POTFILES + -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null + -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null + -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null + +local-maintainer-clean: + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +clean: do-clean local-clean +mostlyclean: do-mostlyclean local-clean +distclean: do-distclean local-clean local-distclean +maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean +maintainer-clean: local-distclean +realclean: maintainer-clean + +# Extra dependency for clean-target, owing to the mixed nature of gcc +clean-target: clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc + +# Check target. + +.PHONY: check do-check +check: do-check + +# Only include modules actually being configured and built. +do-check: maybe-check-gcc \ + maybe-check-ash \ + maybe-check-autoconf \ + maybe-check-automake \ + maybe-check-bash \ + maybe-check-bfd \ + maybe-check-opcodes \ + maybe-check-binutils \ + maybe-check-bison \ + maybe-check-byacc \ + maybe-check-bzip2 \ + maybe-check-dejagnu \ + maybe-check-diff \ + maybe-check-dosutils \ + maybe-check-etc \ + maybe-check-fastjar \ + maybe-check-fileutils \ + maybe-check-findutils \ + maybe-check-find \ + maybe-check-flex \ + maybe-check-gas \ + maybe-check-gawk \ + maybe-check-gettext \ + maybe-check-gnuserv \ + maybe-check-gprof \ + maybe-check-gzip \ + maybe-check-hello \ + maybe-check-indent \ + maybe-check-intl \ + maybe-check-tcl \ + maybe-check-itcl \ + maybe-check-ld \ + maybe-check-libgui \ + maybe-check-libiberty \ + maybe-check-libtool \ + maybe-check-m4 \ + maybe-check-make \ + maybe-check-mmalloc \ + maybe-check-patch \ + maybe-check-perl \ + maybe-check-prms \ + maybe-check-rcs \ + maybe-check-readline \ + maybe-check-release \ + maybe-check-recode \ + maybe-check-sed \ + maybe-check-send-pr \ + maybe-check-shellutils \ + maybe-check-sid \ + maybe-check-sim \ + maybe-check-tar \ + maybe-check-texinfo \ + maybe-check-textutils \ + maybe-check-time \ + maybe-check-uudecode \ + maybe-check-wdiff \ + maybe-check-zip \ + maybe-check-zlib \ + maybe-check-gdb \ + maybe-check-expect \ + maybe-check-guile \ + maybe-check-tk \ + maybe-check-tix \ + maybe-check-libtermcap \ + maybe-check-utils \ + maybe-check-target-libstdc++-v3 \ + maybe-check-target-newlib \ + maybe-check-target-libf2c \ + maybe-check-target-libobjc \ + maybe-check-target-libtermcap \ + maybe-check-target-winsup \ + maybe-check-target-libgloss \ + maybe-check-target-libiberty \ + maybe-check-target-gperf \ + maybe-check-target-examples \ + maybe-check-target-libffi \ + maybe-check-target-libjava \ + maybe-check-target-zlib \ + maybe-check-target-boehm-gc \ + maybe-check-target-qthreads \ + maybe-check-target-rda \ + maybe-check-target-libada + +# Automated reporting of test results. + +warning.log: build.log + $(srcdir)/contrib/warn_summary build.log > $@ + +mail-report.log: + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +mail-report-with-warnings.log: warning.log + if test x'$(BOOT_CFLAGS)' != x''; then \ + BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ + fi; \ + $(srcdir)/contrib/test_summary -t -i warning.log >$@ + chmod +x $@ + echo If you really want to send e-mail, run ./$@ now + +# Installation targets. + +.PHONY: install uninstall +install: installdirs install-host install-target + +.PHONY: install-host-nogcc +install-host-nogcc: \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-host +install-host: maybe-install-gcc \ + maybe-install-ash \ + maybe-install-autoconf \ + maybe-install-automake \ + maybe-install-bash \ + maybe-install-bfd \ + maybe-install-opcodes \ + maybe-install-binutils \ + maybe-install-bison \ + maybe-install-byacc \ + maybe-install-bzip2 \ + maybe-install-dejagnu \ + maybe-install-diff \ + maybe-install-dosutils \ + maybe-install-etc \ + maybe-install-fastjar \ + maybe-install-fileutils \ + maybe-install-findutils \ + maybe-install-find \ + maybe-install-flex \ + maybe-install-gas \ + maybe-install-gawk \ + maybe-install-gettext \ + maybe-install-gnuserv \ + maybe-install-gprof \ + maybe-install-gzip \ + maybe-install-hello \ + maybe-install-indent \ + maybe-install-intl \ + maybe-install-tcl \ + maybe-install-itcl \ + maybe-install-ld \ + maybe-install-libgui \ + maybe-install-libiberty \ + maybe-install-libtool \ + maybe-install-m4 \ + maybe-install-make \ + maybe-install-mmalloc \ + maybe-install-patch \ + maybe-install-perl \ + maybe-install-prms \ + maybe-install-rcs \ + maybe-install-readline \ + maybe-install-release \ + maybe-install-recode \ + maybe-install-sed \ + maybe-install-send-pr \ + maybe-install-shellutils \ + maybe-install-sid \ + maybe-install-sim \ + maybe-install-tar \ + maybe-install-texinfo \ + maybe-install-textutils \ + maybe-install-time \ + maybe-install-uudecode \ + maybe-install-wdiff \ + maybe-install-zip \ + maybe-install-zlib \ + maybe-install-gdb \ + maybe-install-expect \ + maybe-install-guile \ + maybe-install-tk \ + maybe-install-tix \ + maybe-install-libtermcap \ + maybe-install-utils + +.PHONY: install-target +install-target: \ + maybe-install-target-libstdc++-v3 \ + maybe-install-target-newlib \ + maybe-install-target-libf2c \ + maybe-install-target-libobjc \ + maybe-install-target-libtermcap \ + maybe-install-target-winsup \ + maybe-install-target-libgloss \ + maybe-install-target-libiberty \ + maybe-install-target-gperf \ + maybe-install-target-examples \ + maybe-install-target-libffi \ + maybe-install-target-libjava \ + maybe-install-target-zlib \ + maybe-install-target-boehm-gc \ + maybe-install-target-qthreads \ + maybe-install-target-rda \ + maybe-install-target-libada + +uninstall: + @echo "the uninstall target is not supported in this tree" + +.PHONY: install.all +install.all: install-no-fixedincludes + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}` ; export r ; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ + else \ + true ; \ + fi + +# install-no-fixedincludes is used because Cygnus can not distribute +# the fixed header files. +.PHONY: install-no-fixedincludes +install-no-fixedincludes: installdirs install-host-nogcc \ + install-target gcc-no-fixedincludes + +### other supporting targets + +MAKEDIRS= \ + $(DESTDIR)$(prefix) \ + $(DESTDIR)$(exec_prefix) +.PHONY: installdirs +installdirs: mkinstalldirs + $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) + +dir.info: do-install-info + if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ + $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ + mv -f dir.info.new dir.info ; \ + else true ; \ + fi + +dist: + @echo "Building a full distribution of this tree isn't done" + @echo "via 'make dist'. Check out the etc/ subdirectory" + +etags tags: TAGS + +# Right now this just builds TAGS in each subdirectory. emacs19 has the +# ability to use several tags files at once, so there is probably no need +# to combine them into one big TAGS file (like CVS 1.3 does). We could +# (if we felt like it) have this Makefile write a piece of elisp which +# the user could load to tell emacs19 where all the TAGS files we just +# built are. +TAGS: do-TAGS + +# -------------------------------------- +# Modules which run on the build machine +# -------------------------------------- + +.PHONY: configure-build-libiberty maybe-configure-build-libiberty +maybe-configure-build-libiberty: +configure-build-libiberty: + @test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/libiberty; \ + cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 + +.PHONY: all-build-libiberty maybe-all-build-libiberty +maybe-all-build-libiberty: +all-build-libiberty: configure-build-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all) + + +# -------------------------------------- +# Modules which run on the host machine +# -------------------------------------- + +.PHONY: configure-ash maybe-configure-ash +maybe-configure-ash: +configure-ash: + @test ! -f ash/Makefile || exit 0; \ + [ -d ash ] || mkdir ash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ash; \ + cd ash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ash"; \ + libsrcdir="$$s/ash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ash maybe-all-ash +maybe-all-ash: +all-ash: configure-ash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ash maybe-check-ash +maybe-check-ash: + +check-ash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ash maybe-install-ash +maybe-install-ash: + +install-ash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-autoconf maybe-configure-autoconf +maybe-configure-autoconf: +configure-autoconf: + @test ! -f autoconf/Makefile || exit 0; \ + [ -d autoconf ] || mkdir autoconf; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in autoconf; \ + cd autoconf || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/autoconf"; \ + libsrcdir="$$s/autoconf";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-autoconf maybe-all-autoconf +maybe-all-autoconf: +all-autoconf: configure-autoconf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-autoconf maybe-check-autoconf +maybe-check-autoconf: + +check-autoconf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-autoconf maybe-install-autoconf +maybe-install-autoconf: + +install-autoconf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd autoconf && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-automake maybe-configure-automake +maybe-configure-automake: +configure-automake: + @test ! -f automake/Makefile || exit 0; \ + [ -d automake ] || mkdir automake; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in automake; \ + cd automake || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/automake"; \ + libsrcdir="$$s/automake";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-automake maybe-all-automake +maybe-all-automake: +all-automake: configure-automake + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-automake maybe-check-automake +maybe-check-automake: + +check-automake: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-automake maybe-install-automake +maybe-install-automake: + +install-automake: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd automake && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bash maybe-configure-bash +maybe-configure-bash: +configure-bash: + @test ! -f bash/Makefile || exit 0; \ + [ -d bash ] || mkdir bash; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bash; \ + cd bash || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bash"; \ + libsrcdir="$$s/bash";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bash maybe-all-bash +maybe-all-bash: +all-bash: configure-bash + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bash maybe-check-bash +maybe-check-bash: + +check-bash: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bash maybe-install-bash +maybe-install-bash: + +install-bash: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bash && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bfd maybe-configure-bfd +maybe-configure-bfd: +configure-bfd: + @test ! -f bfd/Makefile || exit 0; \ + [ -d bfd ] || mkdir bfd; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bfd; \ + cd bfd || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bfd"; \ + libsrcdir="$$s/bfd";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bfd maybe-all-bfd +maybe-all-bfd: +all-bfd: configure-bfd + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bfd maybe-check-bfd +maybe-check-bfd: + +check-bfd: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bfd maybe-install-bfd +maybe-install-bfd: + +install-bfd: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bfd && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-opcodes maybe-configure-opcodes +maybe-configure-opcodes: +configure-opcodes: + @test ! -f opcodes/Makefile || exit 0; \ + [ -d opcodes ] || mkdir opcodes; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in opcodes; \ + cd opcodes || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/opcodes"; \ + libsrcdir="$$s/opcodes";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-opcodes maybe-all-opcodes +maybe-all-opcodes: +all-opcodes: configure-opcodes + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-opcodes maybe-check-opcodes +maybe-check-opcodes: + +check-opcodes: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-opcodes maybe-install-opcodes +maybe-install-opcodes: + +install-opcodes: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd opcodes && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-binutils maybe-configure-binutils +maybe-configure-binutils: +configure-binutils: + @test ! -f binutils/Makefile || exit 0; \ + [ -d binutils ] || mkdir binutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in binutils; \ + cd binutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/binutils"; \ + libsrcdir="$$s/binutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-binutils maybe-all-binutils +maybe-all-binutils: +all-binutils: configure-binutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-binutils maybe-check-binutils +maybe-check-binutils: + +check-binutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-binutils maybe-install-binutils +maybe-install-binutils: + +install-binutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd binutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bison maybe-configure-bison +maybe-configure-bison: +configure-bison: + @test ! -f bison/Makefile || exit 0; \ + [ -d bison ] || mkdir bison; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bison; \ + cd bison || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bison"; \ + libsrcdir="$$s/bison";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bison maybe-all-bison +maybe-all-bison: +all-bison: configure-bison + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bison maybe-check-bison +maybe-check-bison: + +# This module is only tested in a native toolchain. +check-bison: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-bison maybe-install-bison +maybe-install-bison: + +install-bison: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bison && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-byacc maybe-configure-byacc +maybe-configure-byacc: +configure-byacc: + @test ! -f byacc/Makefile || exit 0; \ + [ -d byacc ] || mkdir byacc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in byacc; \ + cd byacc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/byacc"; \ + libsrcdir="$$s/byacc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-byacc maybe-all-byacc +maybe-all-byacc: +all-byacc: configure-byacc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-byacc maybe-check-byacc +maybe-check-byacc: + +# This module is only tested in a native toolchain. +check-byacc: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-byacc maybe-install-byacc +maybe-install-byacc: + +install-byacc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd byacc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-bzip2 maybe-configure-bzip2 +maybe-configure-bzip2: +configure-bzip2: + @test ! -f bzip2/Makefile || exit 0; \ + [ -d bzip2 ] || mkdir bzip2; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in bzip2; \ + cd bzip2 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/bzip2"; \ + libsrcdir="$$s/bzip2";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-bzip2 maybe-all-bzip2 +maybe-all-bzip2: +all-bzip2: configure-bzip2 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-bzip2 maybe-check-bzip2 +maybe-check-bzip2: + +check-bzip2: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-bzip2 maybe-install-bzip2 +maybe-install-bzip2: + +install-bzip2: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd bzip2 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dejagnu maybe-configure-dejagnu +maybe-configure-dejagnu: +configure-dejagnu: + @test ! -f dejagnu/Makefile || exit 0; \ + [ -d dejagnu ] || mkdir dejagnu; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dejagnu; \ + cd dejagnu || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dejagnu"; \ + libsrcdir="$$s/dejagnu";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dejagnu maybe-all-dejagnu +maybe-all-dejagnu: +all-dejagnu: configure-dejagnu + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dejagnu maybe-check-dejagnu +maybe-check-dejagnu: + +check-dejagnu: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-dejagnu maybe-install-dejagnu +maybe-install-dejagnu: + +install-dejagnu: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dejagnu && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-diff maybe-configure-diff +maybe-configure-diff: +configure-diff: + @test ! -f diff/Makefile || exit 0; \ + [ -d diff ] || mkdir diff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in diff; \ + cd diff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/diff"; \ + libsrcdir="$$s/diff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-diff maybe-all-diff +maybe-all-diff: +all-diff: configure-diff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-diff maybe-check-diff +maybe-check-diff: + +check-diff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-diff maybe-install-diff +maybe-install-diff: + +install-diff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd diff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-dosutils maybe-configure-dosutils +maybe-configure-dosutils: +configure-dosutils: + @test ! -f dosutils/Makefile || exit 0; \ + [ -d dosutils ] || mkdir dosutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in dosutils; \ + cd dosutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/dosutils"; \ + libsrcdir="$$s/dosutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-dosutils maybe-all-dosutils +maybe-all-dosutils: +all-dosutils: configure-dosutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-dosutils maybe-check-dosutils +maybe-check-dosutils: + +check-dosutils: + + +.PHONY: install-dosutils maybe-install-dosutils +maybe-install-dosutils: + +install-dosutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd dosutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-etc maybe-configure-etc +maybe-configure-etc: +configure-etc: + @test ! -f etc/Makefile || exit 0; \ + [ -d etc ] || mkdir etc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in etc; \ + cd etc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/etc"; \ + libsrcdir="$$s/etc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-etc maybe-all-etc +maybe-all-etc: +all-etc: configure-etc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-etc maybe-check-etc +maybe-check-etc: + +check-etc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-etc maybe-install-etc +maybe-install-etc: + +install-etc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd etc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fastjar maybe-configure-fastjar +maybe-configure-fastjar: +configure-fastjar: + @test ! -f fastjar/Makefile || exit 0; \ + [ -d fastjar ] || mkdir fastjar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fastjar; \ + cd fastjar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fastjar"; \ + libsrcdir="$$s/fastjar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fastjar maybe-all-fastjar +maybe-all-fastjar: +all-fastjar: configure-fastjar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fastjar maybe-check-fastjar +maybe-check-fastjar: + +# This module is only tested in a native toolchain. +check-fastjar: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-fastjar maybe-install-fastjar +maybe-install-fastjar: + +install-fastjar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fastjar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-fileutils maybe-configure-fileutils +maybe-configure-fileutils: +configure-fileutils: + @test ! -f fileutils/Makefile || exit 0; \ + [ -d fileutils ] || mkdir fileutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in fileutils; \ + cd fileutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/fileutils"; \ + libsrcdir="$$s/fileutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-fileutils maybe-all-fileutils +maybe-all-fileutils: +all-fileutils: configure-fileutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-fileutils maybe-check-fileutils +maybe-check-fileutils: + +check-fileutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-fileutils maybe-install-fileutils +maybe-install-fileutils: + +install-fileutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd fileutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-findutils maybe-configure-findutils +maybe-configure-findutils: +configure-findutils: + @test ! -f findutils/Makefile || exit 0; \ + [ -d findutils ] || mkdir findutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in findutils; \ + cd findutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/findutils"; \ + libsrcdir="$$s/findutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-findutils maybe-all-findutils +maybe-all-findutils: +all-findutils: configure-findutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-findutils maybe-check-findutils +maybe-check-findutils: + +check-findutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-findutils maybe-install-findutils +maybe-install-findutils: + +install-findutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd findutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-find maybe-configure-find +maybe-configure-find: +configure-find: + @test ! -f find/Makefile || exit 0; \ + [ -d find ] || mkdir find; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in find; \ + cd find || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/find"; \ + libsrcdir="$$s/find";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-find maybe-all-find +maybe-all-find: +all-find: configure-find + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-find maybe-check-find +maybe-check-find: + +check-find: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-find maybe-install-find +maybe-install-find: + +install-find: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd find && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-flex maybe-configure-flex +maybe-configure-flex: +configure-flex: + @test ! -f flex/Makefile || exit 0; \ + [ -d flex ] || mkdir flex; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in flex; \ + cd flex || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/flex"; \ + libsrcdir="$$s/flex";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-flex maybe-all-flex +maybe-all-flex: +all-flex: configure-flex + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-flex maybe-check-flex +maybe-check-flex: + +# This module is only tested in a native toolchain. +check-flex: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-flex maybe-install-flex +maybe-install-flex: + +install-flex: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd flex && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gas maybe-configure-gas +maybe-configure-gas: +configure-gas: + @test ! -f gas/Makefile || exit 0; \ + [ -d gas ] || mkdir gas; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gas; \ + cd gas || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gas"; \ + libsrcdir="$$s/gas";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gas maybe-all-gas +maybe-all-gas: +all-gas: configure-gas + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gas maybe-check-gas +maybe-check-gas: + +check-gas: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gas maybe-install-gas +maybe-install-gas: + +install-gas: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gas && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gawk maybe-configure-gawk +maybe-configure-gawk: +configure-gawk: + @test ! -f gawk/Makefile || exit 0; \ + [ -d gawk ] || mkdir gawk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gawk; \ + cd gawk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gawk"; \ + libsrcdir="$$s/gawk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gawk maybe-all-gawk +maybe-all-gawk: +all-gawk: configure-gawk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gawk maybe-check-gawk +maybe-check-gawk: + +check-gawk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gawk maybe-install-gawk +maybe-install-gawk: + +install-gawk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gawk && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gettext maybe-configure-gettext +maybe-configure-gettext: +configure-gettext: + @test ! -f gettext/Makefile || exit 0; \ + [ -d gettext ] || mkdir gettext; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gettext; \ + cd gettext || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gettext"; \ + libsrcdir="$$s/gettext";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gettext maybe-all-gettext +maybe-all-gettext: +all-gettext: configure-gettext + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gettext maybe-check-gettext +maybe-check-gettext: + +check-gettext: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gettext maybe-install-gettext +maybe-install-gettext: + +install-gettext: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gettext && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gnuserv maybe-configure-gnuserv +maybe-configure-gnuserv: +configure-gnuserv: + @test ! -f gnuserv/Makefile || exit 0; \ + [ -d gnuserv ] || mkdir gnuserv; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gnuserv; \ + cd gnuserv || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gnuserv"; \ + libsrcdir="$$s/gnuserv";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gnuserv maybe-all-gnuserv +maybe-all-gnuserv: +all-gnuserv: configure-gnuserv + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gnuserv maybe-check-gnuserv +maybe-check-gnuserv: + +check-gnuserv: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gnuserv maybe-install-gnuserv +maybe-install-gnuserv: + +install-gnuserv: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gnuserv && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gprof maybe-configure-gprof +maybe-configure-gprof: +configure-gprof: + @test ! -f gprof/Makefile || exit 0; \ + [ -d gprof ] || mkdir gprof; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gprof; \ + cd gprof || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gprof"; \ + libsrcdir="$$s/gprof";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gprof maybe-all-gprof +maybe-all-gprof: +all-gprof: configure-gprof + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gprof maybe-check-gprof +maybe-check-gprof: + +check-gprof: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gprof maybe-install-gprof +maybe-install-gprof: + +install-gprof: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gprof && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-gzip maybe-configure-gzip +maybe-configure-gzip: +configure-gzip: + @test ! -f gzip/Makefile || exit 0; \ + [ -d gzip ] || mkdir gzip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gzip; \ + cd gzip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gzip"; \ + libsrcdir="$$s/gzip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gzip maybe-all-gzip +maybe-all-gzip: +all-gzip: configure-gzip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-gzip maybe-check-gzip +maybe-check-gzip: + +check-gzip: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-gzip maybe-install-gzip +maybe-install-gzip: + +install-gzip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gzip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-hello maybe-configure-hello +maybe-configure-hello: +configure-hello: + @test ! -f hello/Makefile || exit 0; \ + [ -d hello ] || mkdir hello; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in hello; \ + cd hello || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/hello"; \ + libsrcdir="$$s/hello";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-hello maybe-all-hello +maybe-all-hello: +all-hello: configure-hello + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-hello maybe-check-hello +maybe-check-hello: + +check-hello: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-hello maybe-install-hello +maybe-install-hello: + +install-hello: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd hello && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-indent maybe-configure-indent +maybe-configure-indent: +configure-indent: + @test ! -f indent/Makefile || exit 0; \ + [ -d indent ] || mkdir indent; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in indent; \ + cd indent || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/indent"; \ + libsrcdir="$$s/indent";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-indent maybe-all-indent +maybe-all-indent: +all-indent: configure-indent + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-indent maybe-check-indent +maybe-check-indent: + +check-indent: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-indent maybe-install-indent +maybe-install-indent: + +install-indent: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd indent && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-intl maybe-configure-intl +maybe-configure-intl: +configure-intl: + @test ! -f intl/Makefile || exit 0; \ + [ -d intl ] || mkdir intl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in intl; \ + cd intl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/intl"; \ + libsrcdir="$$s/intl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-intl maybe-all-intl +maybe-all-intl: +all-intl: configure-intl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-intl maybe-check-intl +maybe-check-intl: + +check-intl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-intl maybe-install-intl +maybe-install-intl: + +install-intl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd intl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tcl maybe-configure-tcl +maybe-configure-tcl: +configure-tcl: + @test ! -f tcl/Makefile || exit 0; \ + [ -d tcl ] || mkdir tcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tcl; \ + cd tcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tcl"; \ + libsrcdir="$$s/tcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tcl maybe-all-tcl +maybe-all-tcl: +all-tcl: configure-tcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tcl maybe-check-tcl +maybe-check-tcl: + +check-tcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tcl maybe-install-tcl +maybe-install-tcl: + +install-tcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-itcl maybe-configure-itcl +maybe-configure-itcl: +configure-itcl: + @test ! -f itcl/Makefile || exit 0; \ + [ -d itcl ] || mkdir itcl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in itcl; \ + cd itcl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/itcl"; \ + libsrcdir="$$s/itcl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-itcl maybe-all-itcl +maybe-all-itcl: +all-itcl: configure-itcl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-itcl maybe-check-itcl +maybe-check-itcl: + +check-itcl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-itcl maybe-install-itcl +maybe-install-itcl: + +install-itcl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd itcl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-ld maybe-configure-ld +maybe-configure-ld: +configure-ld: + @test ! -f ld/Makefile || exit 0; \ + [ -d ld ] || mkdir ld; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in ld; \ + cd ld || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/ld"; \ + libsrcdir="$$s/ld";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-ld maybe-all-ld +maybe-all-ld: +all-ld: configure-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-ld maybe-check-ld +maybe-check-ld: + +check-ld: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-ld maybe-install-ld +maybe-install-ld: + +install-ld: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd ld && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libgui maybe-configure-libgui +maybe-configure-libgui: +configure-libgui: + @test ! -f libgui/Makefile || exit 0; \ + [ -d libgui ] || mkdir libgui; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libgui; \ + cd libgui || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libgui"; \ + libsrcdir="$$s/libgui";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libgui maybe-all-libgui +maybe-all-libgui: +all-libgui: configure-libgui + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libgui maybe-check-libgui +maybe-check-libgui: + +check-libgui: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libgui maybe-install-libgui +maybe-install-libgui: + +install-libgui: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libgui && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libiberty maybe-configure-libiberty +maybe-configure-libiberty: +configure-libiberty: + @test ! -f libiberty/Makefile || exit 0; \ + [ -d libiberty ] || mkdir libiberty; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libiberty; \ + cd libiberty || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libiberty"; \ + libsrcdir="$$s/libiberty";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libiberty maybe-all-libiberty +maybe-all-libiberty: +all-libiberty: configure-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libiberty maybe-check-libiberty +maybe-check-libiberty: + +check-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libiberty maybe-install-libiberty +maybe-install-libiberty: + +install-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libiberty && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-libtool maybe-configure-libtool +maybe-configure-libtool: +configure-libtool: + @test ! -f libtool/Makefile || exit 0; \ + [ -d libtool ] || mkdir libtool; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtool; \ + cd libtool || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtool"; \ + libsrcdir="$$s/libtool";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtool maybe-all-libtool +maybe-all-libtool: +all-libtool: configure-libtool + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtool maybe-check-libtool +maybe-check-libtool: + +check-libtool: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-libtool maybe-install-libtool +maybe-install-libtool: + +install-libtool: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtool && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-m4 maybe-configure-m4 +maybe-configure-m4: +configure-m4: + @test ! -f m4/Makefile || exit 0; \ + [ -d m4 ] || mkdir m4; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in m4; \ + cd m4 || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/m4"; \ + libsrcdir="$$s/m4";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-m4 maybe-all-m4 +maybe-all-m4: +all-m4: configure-m4 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-m4 maybe-check-m4 +maybe-check-m4: + +check-m4: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-m4 maybe-install-m4 +maybe-install-m4: + +install-m4: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd m4 && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-make maybe-configure-make +maybe-configure-make: +configure-make: + @test ! -f make/Makefile || exit 0; \ + [ -d make ] || mkdir make; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in make; \ + cd make || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/make"; \ + libsrcdir="$$s/make";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-make maybe-all-make +maybe-all-make: +all-make: configure-make + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-make maybe-check-make +maybe-check-make: + +check-make: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-make maybe-install-make +maybe-install-make: + +install-make: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd make && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-mmalloc maybe-configure-mmalloc +maybe-configure-mmalloc: +configure-mmalloc: + @test ! -f mmalloc/Makefile || exit 0; \ + [ -d mmalloc ] || mkdir mmalloc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in mmalloc; \ + cd mmalloc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/mmalloc"; \ + libsrcdir="$$s/mmalloc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-mmalloc maybe-all-mmalloc +maybe-all-mmalloc: +all-mmalloc: configure-mmalloc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-mmalloc maybe-check-mmalloc +maybe-check-mmalloc: + +check-mmalloc: + + +.PHONY: install-mmalloc maybe-install-mmalloc +maybe-install-mmalloc: + +install-mmalloc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd mmalloc && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-patch maybe-configure-patch +maybe-configure-patch: +configure-patch: + @test ! -f patch/Makefile || exit 0; \ + [ -d patch ] || mkdir patch; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in patch; \ + cd patch || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/patch"; \ + libsrcdir="$$s/patch";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-patch maybe-all-patch +maybe-all-patch: +all-patch: configure-patch + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-patch maybe-check-patch +maybe-check-patch: + +check-patch: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-patch maybe-install-patch +maybe-install-patch: + +install-patch: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd patch && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-perl maybe-configure-perl +maybe-configure-perl: +configure-perl: + @test ! -f perl/Makefile || exit 0; \ + [ -d perl ] || mkdir perl; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in perl; \ + cd perl || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/perl"; \ + libsrcdir="$$s/perl";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-perl maybe-all-perl +maybe-all-perl: +all-perl: configure-perl + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-perl maybe-check-perl +maybe-check-perl: + +check-perl: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-perl maybe-install-perl +maybe-install-perl: + +install-perl: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd perl && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-prms maybe-configure-prms +maybe-configure-prms: +configure-prms: + @test ! -f prms/Makefile || exit 0; \ + [ -d prms ] || mkdir prms; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in prms; \ + cd prms || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/prms"; \ + libsrcdir="$$s/prms";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-prms maybe-all-prms +maybe-all-prms: +all-prms: configure-prms + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-prms maybe-check-prms +maybe-check-prms: + +check-prms: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-prms maybe-install-prms +maybe-install-prms: + +install-prms: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd prms && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-rcs maybe-configure-rcs +maybe-configure-rcs: +configure-rcs: + @test ! -f rcs/Makefile || exit 0; \ + [ -d rcs ] || mkdir rcs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in rcs; \ + cd rcs || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/rcs"; \ + libsrcdir="$$s/rcs";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-rcs maybe-all-rcs +maybe-all-rcs: +all-rcs: configure-rcs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-rcs maybe-check-rcs +maybe-check-rcs: + +check-rcs: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-rcs maybe-install-rcs +maybe-install-rcs: + +install-rcs: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd rcs && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-readline maybe-configure-readline +maybe-configure-readline: +configure-readline: + @test ! -f readline/Makefile || exit 0; \ + [ -d readline ] || mkdir readline; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in readline; \ + cd readline || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/readline"; \ + libsrcdir="$$s/readline";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-readline maybe-all-readline +maybe-all-readline: +all-readline: configure-readline + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-readline maybe-check-readline +maybe-check-readline: + +check-readline: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-readline maybe-install-readline +maybe-install-readline: + +install-readline: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-release maybe-configure-release +maybe-configure-release: +configure-release: + @test ! -f release/Makefile || exit 0; \ + [ -d release ] || mkdir release; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in release; \ + cd release || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/release"; \ + libsrcdir="$$s/release";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-release maybe-all-release +maybe-all-release: +all-release: configure-release + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd release && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-release maybe-check-release +maybe-check-release: + +check-release: + + +.PHONY: install-release maybe-install-release +maybe-install-release: + +install-release: + + +.PHONY: configure-recode maybe-configure-recode +maybe-configure-recode: +configure-recode: + @test ! -f recode/Makefile || exit 0; \ + [ -d recode ] || mkdir recode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in recode; \ + cd recode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/recode"; \ + libsrcdir="$$s/recode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-recode maybe-all-recode +maybe-all-recode: +all-recode: configure-recode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-recode maybe-check-recode +maybe-check-recode: + +check-recode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-recode maybe-install-recode +maybe-install-recode: + +install-recode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd recode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sed maybe-configure-sed +maybe-configure-sed: +configure-sed: + @test ! -f sed/Makefile || exit 0; \ + [ -d sed ] || mkdir sed; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sed; \ + cd sed || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sed"; \ + libsrcdir="$$s/sed";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sed maybe-all-sed +maybe-all-sed: +all-sed: configure-sed + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sed maybe-check-sed +maybe-check-sed: + +check-sed: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sed maybe-install-sed +maybe-install-sed: + +install-sed: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sed && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-send-pr maybe-configure-send-pr +maybe-configure-send-pr: +configure-send-pr: + @test ! -f send-pr/Makefile || exit 0; \ + [ -d send-pr ] || mkdir send-pr; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in send-pr; \ + cd send-pr || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/send-pr"; \ + libsrcdir="$$s/send-pr";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-send-pr maybe-all-send-pr +maybe-all-send-pr: +all-send-pr: configure-send-pr + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-send-pr maybe-check-send-pr +maybe-check-send-pr: + +check-send-pr: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-send-pr maybe-install-send-pr +maybe-install-send-pr: + +install-send-pr: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd send-pr && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-shellutils maybe-configure-shellutils +maybe-configure-shellutils: +configure-shellutils: + @test ! -f shellutils/Makefile || exit 0; \ + [ -d shellutils ] || mkdir shellutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in shellutils; \ + cd shellutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/shellutils"; \ + libsrcdir="$$s/shellutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-shellutils maybe-all-shellutils +maybe-all-shellutils: +all-shellutils: configure-shellutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-shellutils maybe-check-shellutils +maybe-check-shellutils: + +check-shellutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-shellutils maybe-install-shellutils +maybe-install-shellutils: + +install-shellutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd shellutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sid maybe-configure-sid +maybe-configure-sid: +configure-sid: + @test ! -f sid/Makefile || exit 0; \ + [ -d sid ] || mkdir sid; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sid; \ + cd sid || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sid"; \ + libsrcdir="$$s/sid";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sid maybe-all-sid +maybe-all-sid: +all-sid: configure-sid + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sid maybe-check-sid +maybe-check-sid: + +check-sid: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sid maybe-install-sid +maybe-install-sid: + +install-sid: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sid && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-sim maybe-configure-sim +maybe-configure-sim: +configure-sim: + @test ! -f sim/Makefile || exit 0; \ + [ -d sim ] || mkdir sim; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in sim; \ + cd sim || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/sim"; \ + libsrcdir="$$s/sim";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-sim maybe-all-sim +maybe-all-sim: +all-sim: configure-sim + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-sim maybe-check-sim +maybe-check-sim: + +check-sim: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-sim maybe-install-sim +maybe-install-sim: + +install-sim: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd sim && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-tar maybe-configure-tar +maybe-configure-tar: +configure-tar: + @test ! -f tar/Makefile || exit 0; \ + [ -d tar ] || mkdir tar; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tar; \ + cd tar || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tar"; \ + libsrcdir="$$s/tar";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tar maybe-all-tar +maybe-all-tar: +all-tar: configure-tar + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-tar maybe-check-tar +maybe-check-tar: + +check-tar: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-tar maybe-install-tar +maybe-install-tar: + +install-tar: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tar && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-texinfo maybe-configure-texinfo +maybe-configure-texinfo: +configure-texinfo: + @test ! -f texinfo/Makefile || exit 0; \ + [ -d texinfo ] || mkdir texinfo; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in texinfo; \ + cd texinfo || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/texinfo"; \ + libsrcdir="$$s/texinfo";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-texinfo maybe-all-texinfo +maybe-all-texinfo: +all-texinfo: configure-texinfo + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-texinfo maybe-check-texinfo +maybe-check-texinfo: + +check-texinfo: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd texinfo && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-texinfo maybe-install-texinfo +maybe-install-texinfo: + +install-texinfo: + + +.PHONY: configure-textutils maybe-configure-textutils +maybe-configure-textutils: +configure-textutils: + @test ! -f textutils/Makefile || exit 0; \ + [ -d textutils ] || mkdir textutils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in textutils; \ + cd textutils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/textutils"; \ + libsrcdir="$$s/textutils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-textutils maybe-all-textutils +maybe-all-textutils: +all-textutils: configure-textutils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-textutils maybe-check-textutils +maybe-check-textutils: + +check-textutils: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-textutils maybe-install-textutils +maybe-install-textutils: + +install-textutils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd textutils && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-time maybe-configure-time +maybe-configure-time: +configure-time: + @test ! -f time/Makefile || exit 0; \ + [ -d time ] || mkdir time; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in time; \ + cd time || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/time"; \ + libsrcdir="$$s/time";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-time maybe-all-time +maybe-all-time: +all-time: configure-time + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-time maybe-check-time +maybe-check-time: + +check-time: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-time maybe-install-time +maybe-install-time: + +install-time: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd time && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-uudecode maybe-configure-uudecode +maybe-configure-uudecode: +configure-uudecode: + @test ! -f uudecode/Makefile || exit 0; \ + [ -d uudecode ] || mkdir uudecode; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in uudecode; \ + cd uudecode || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/uudecode"; \ + libsrcdir="$$s/uudecode";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-uudecode maybe-all-uudecode +maybe-all-uudecode: +all-uudecode: configure-uudecode + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-uudecode maybe-check-uudecode +maybe-check-uudecode: + +check-uudecode: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-uudecode maybe-install-uudecode +maybe-install-uudecode: + +install-uudecode: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd uudecode && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-wdiff maybe-configure-wdiff +maybe-configure-wdiff: +configure-wdiff: + @test ! -f wdiff/Makefile || exit 0; \ + [ -d wdiff ] || mkdir wdiff; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in wdiff; \ + cd wdiff || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/wdiff"; \ + libsrcdir="$$s/wdiff";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-wdiff maybe-all-wdiff +maybe-all-wdiff: +all-wdiff: configure-wdiff + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-wdiff maybe-check-wdiff +maybe-check-wdiff: + +check-wdiff: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) check) + + +.PHONY: install-wdiff maybe-install-wdiff +maybe-install-wdiff: + +install-wdiff: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd wdiff && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zip maybe-configure-zip +maybe-configure-zip: +configure-zip: + @test ! -f zip/Makefile || exit 0; \ + [ -d zip ] || mkdir zip; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zip; \ + cd zip || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zip"; \ + libsrcdir="$$s/zip";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zip maybe-all-zip +maybe-all-zip: +all-zip: configure-zip + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zip maybe-check-zip +maybe-check-zip: + +# This module is only tested in a native toolchain. +check-zip: + @if [ '$(host)' = '$(target)' ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) check); \ + fi + + +.PHONY: install-zip maybe-install-zip +maybe-install-zip: + +install-zip: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zip && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-zlib maybe-configure-zlib +maybe-configure-zlib: +configure-zlib: + @test ! -f zlib/Makefile || exit 0; \ + [ -d zlib ] || mkdir zlib; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in zlib; \ + cd zlib || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/zlib"; \ + libsrcdir="$$s/zlib";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-zlib maybe-all-zlib +maybe-all-zlib: +all-zlib: configure-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd zlib && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-zlib maybe-check-zlib +maybe-check-zlib: + +check-zlib: + + +.PHONY: install-zlib maybe-install-zlib +maybe-install-zlib: + +install-zlib: + + +.PHONY: configure-gdb maybe-configure-gdb +maybe-configure-gdb: +configure-gdb: + @test ! -f gdb/Makefile || exit 0; \ + [ -d gdb ] || mkdir gdb; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gdb; \ + cd gdb || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gdb"; \ + libsrcdir="$$s/gdb";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-gdb maybe-all-gdb +maybe-all-gdb: +all-gdb: configure-gdb + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-gdb maybe-check-gdb +maybe-check-gdb: + +check-gdb: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-gdb maybe-install-gdb +maybe-install-gdb: + +install-gdb: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gdb && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-expect maybe-configure-expect +maybe-configure-expect: +configure-expect: + @test ! -f expect/Makefile || exit 0; \ + [ -d expect ] || mkdir expect; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in expect; \ + cd expect || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/expect"; \ + libsrcdir="$$s/expect";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-expect maybe-all-expect +maybe-all-expect: +all-expect: configure-expect + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-expect maybe-check-expect +maybe-check-expect: + +check-expect: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-expect maybe-install-expect +maybe-install-expect: + +install-expect: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd expect && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-guile maybe-configure-guile +maybe-configure-guile: +configure-guile: + @test ! -f guile/Makefile || exit 0; \ + [ -d guile ] || mkdir guile; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in guile; \ + cd guile || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/guile"; \ + libsrcdir="$$s/guile";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-guile maybe-all-guile +maybe-all-guile: +all-guile: configure-guile + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-guile maybe-check-guile +maybe-check-guile: + +check-guile: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-guile maybe-install-guile +maybe-install-guile: + +install-guile: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd guile && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tk maybe-configure-tk +maybe-configure-tk: +configure-tk: + @test ! -f tk/Makefile || exit 0; \ + [ -d tk ] || mkdir tk; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tk; \ + cd tk || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tk"; \ + libsrcdir="$$s/tk";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tk maybe-all-tk +maybe-all-tk: +all-tk: configure-tk + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tk maybe-check-tk +maybe-check-tk: + +check-tk: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tk maybe-install-tk +maybe-install-tk: + +install-tk: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tk && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-tix maybe-configure-tix +maybe-configure-tix: +configure-tix: + @test ! -f tix/Makefile || exit 0; \ + [ -d tix ] || mkdir tix; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in tix; \ + cd tix || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/tix"; \ + libsrcdir="$$s/tix";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-tix maybe-all-tix +maybe-all-tix: +all-tix: configure-tix + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all) + +.PHONY: check-tix maybe-check-tix +maybe-check-tix: + +check-tix: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check) + + +.PHONY: install-tix maybe-install-tix +maybe-install-tix: + +install-tix: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd tix && $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install) + + +.PHONY: configure-libtermcap maybe-configure-libtermcap +maybe-configure-libtermcap: +configure-libtermcap: + @test ! -f libtermcap/Makefile || exit 0; \ + [ -d libtermcap ] || mkdir libtermcap; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in libtermcap; \ + cd libtermcap || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/libtermcap"; \ + libsrcdir="$$s/libtermcap";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-libtermcap maybe-all-libtermcap +maybe-all-libtermcap: +all-libtermcap: configure-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-libtermcap maybe-check-libtermcap +maybe-check-libtermcap: + +check-libtermcap: + + +.PHONY: install-libtermcap maybe-install-libtermcap +maybe-install-libtermcap: + +install-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd libtermcap && $(MAKE) $(FLAGS_TO_PASS) install) + + +.PHONY: configure-utils maybe-configure-utils +maybe-configure-utils: +configure-utils: + @test ! -f utils/Makefile || exit 0; \ + [ -d utils ] || mkdir utils; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in utils; \ + cd utils || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/utils"; \ + libsrcdir="$$s/utils";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +.PHONY: all-utils maybe-all-utils +maybe-all-utils: +all-utils: configure-utils + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) all) + +.PHONY: check-utils maybe-check-utils +maybe-check-utils: + +check-utils: + + +.PHONY: install-utils maybe-install-utils +maybe-install-utils: + +install-utils: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd utils && $(MAKE) $(FLAGS_TO_PASS) install) + + + +# --------------------------------------- +# Modules which run on the target machine +# --------------------------------------- + +.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3 +maybe-configure-target-libstdc++-v3: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libstdc++-v3/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + rm -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + +configure-target-libstdc++-v3: $(TARGET_SUBDIR)/libstdc++-v3/multilib.out + @test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \ + cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \ + libsrcdir="$$s/libstdc++-v3"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3 +maybe-all-target-libstdc++-v3: +all-target-libstdc++-v3: configure-target-libstdc++-v3 + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libstdc++-v3 maybe-check-target-libstdc++-v3 +maybe-check-target-libstdc++-v3: + +check-target-libstdc++-v3: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libstdc++-v3 maybe-install-target-libstdc++-v3 +maybe-install-target-libstdc++-v3: + +install-target-libstdc++-v3: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-newlib maybe-configure-target-newlib +maybe-configure-target-newlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + rm -f $(TARGET_SUBDIR)/newlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/newlib/multilib.out + +configure-target-newlib: $(TARGET_SUBDIR)/newlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/newlib; \ + cd "$(TARGET_SUBDIR)/newlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/newlib"; \ + libsrcdir="$$s/newlib"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-newlib maybe-all-target-newlib +maybe-all-target-newlib: +all-target-newlib: configure-target-newlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-newlib maybe-check-target-newlib +maybe-check-target-newlib: + +check-target-newlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-newlib maybe-install-target-newlib +maybe-install-target-newlib: + +install-target-newlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/newlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libf2c maybe-configure-target-libf2c +maybe-configure-target-libf2c: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libf2c/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + rm -f $(TARGET_SUBDIR)/libf2c/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libf2c/multilib.out + +configure-target-libf2c: $(TARGET_SUBDIR)/libf2c/multilib.out + @test ! -f $(TARGET_SUBDIR)/libf2c/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libf2c ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libf2c; \ + cd "$(TARGET_SUBDIR)/libf2c" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libf2c"; \ + libsrcdir="$$s/libf2c"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libf2c maybe-all-target-libf2c +maybe-all-target-libf2c: +all-target-libf2c: configure-target-libf2c + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libf2c maybe-check-target-libf2c +maybe-check-target-libf2c: + +check-target-libf2c: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libf2c maybe-install-target-libf2c +maybe-install-target-libf2c: + +install-target-libf2c: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libf2c && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libobjc maybe-configure-target-libobjc +maybe-configure-target-libobjc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libobjc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + rm -f $(TARGET_SUBDIR)/libobjc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libobjc/multilib.out + +configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out + @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libobjc; \ + cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libobjc"; \ + libsrcdir="$$s/libobjc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libobjc maybe-all-target-libobjc +maybe-all-target-libobjc: +all-target-libobjc: configure-target-libobjc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libobjc maybe-check-target-libobjc +maybe-check-target-libobjc: + +check-target-libobjc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libobjc maybe-install-target-libobjc +maybe-install-target-libobjc: + +install-target-libobjc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libobjc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap +maybe-configure-target-libtermcap: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libtermcap/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + rm -f $(TARGET_SUBDIR)/libtermcap/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libtermcap/multilib.out + +configure-target-libtermcap: $(TARGET_SUBDIR)/libtermcap/multilib.out + @test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libtermcap; \ + cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/libtermcap "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/libtermcap"; \ + libsrcdir="$$s/libtermcap"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libtermcap maybe-all-target-libtermcap +maybe-all-target-libtermcap: +all-target-libtermcap: configure-target-libtermcap + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libtermcap maybe-check-target-libtermcap +maybe-check-target-libtermcap: + +# Dummy target for uncheckable module. +check-target-libtermcap: + + +.PHONY: install-target-libtermcap maybe-install-target-libtermcap +maybe-install-target-libtermcap: + +install-target-libtermcap: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libtermcap && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-winsup maybe-configure-target-winsup +maybe-configure-target-winsup: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/winsup/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + rm -f $(TARGET_SUBDIR)/winsup/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/winsup/multilib.out + +configure-target-winsup: $(TARGET_SUBDIR)/winsup/multilib.out + @test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/winsup; \ + cd "$(TARGET_SUBDIR)/winsup" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/winsup"; \ + libsrcdir="$$s/winsup"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-winsup maybe-all-target-winsup +maybe-all-target-winsup: +all-target-winsup: configure-target-winsup + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-winsup maybe-check-target-winsup +maybe-check-target-winsup: + +check-target-winsup: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-winsup maybe-install-target-winsup +maybe-install-target-winsup: + +install-target-winsup: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/winsup && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libgloss maybe-configure-target-libgloss +maybe-configure-target-libgloss: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libgloss/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + rm -f $(TARGET_SUBDIR)/libgloss/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libgloss/multilib.out + +configure-target-libgloss: $(TARGET_SUBDIR)/libgloss/multilib.out + @test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libgloss; \ + cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libgloss"; \ + libsrcdir="$$s/libgloss"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libgloss maybe-all-target-libgloss +maybe-all-target-libgloss: +all-target-libgloss: configure-target-libgloss + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libgloss maybe-check-target-libgloss +maybe-check-target-libgloss: + +# Dummy target for uncheckable module. +check-target-libgloss: + + +.PHONY: install-target-libgloss maybe-install-target-libgloss +maybe-install-target-libgloss: + +install-target-libgloss: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libgloss && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libiberty maybe-configure-target-libiberty +maybe-configure-target-libiberty: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libiberty/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + rm -f $(TARGET_SUBDIR)/libiberty/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libiberty/multilib.out + +configure-target-libiberty: $(TARGET_SUBDIR)/libiberty/multilib.out + @test ! -f $(TARGET_SUBDIR)/libiberty/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libiberty ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libiberty; \ + cd "$(TARGET_SUBDIR)/libiberty" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libiberty"; \ + libsrcdir="$$s/libiberty"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libiberty maybe-all-target-libiberty +maybe-all-target-libiberty: +all-target-libiberty: configure-target-libiberty + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libiberty maybe-check-target-libiberty +maybe-check-target-libiberty: + +check-target-libiberty: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libiberty maybe-install-target-libiberty +maybe-install-target-libiberty: + +install-target-libiberty: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libiberty && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-gperf maybe-configure-target-gperf +maybe-configure-target-gperf: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/gperf/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + rm -f $(TARGET_SUBDIR)/gperf/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/gperf/multilib.out + +configure-target-gperf: $(TARGET_SUBDIR)/gperf/multilib.out + @test ! -f $(TARGET_SUBDIR)/gperf/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/gperf ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/gperf; \ + cd "$(TARGET_SUBDIR)/gperf" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/gperf"; \ + libsrcdir="$$s/gperf"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-gperf maybe-all-target-gperf +maybe-all-target-gperf: +all-target-gperf: configure-target-gperf + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-gperf maybe-check-target-gperf +maybe-check-target-gperf: + +check-target-gperf: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-gperf maybe-install-target-gperf +maybe-install-target-gperf: + +install-target-gperf: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/gperf && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-examples maybe-configure-target-examples +maybe-configure-target-examples: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/examples/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + rm -f $(TARGET_SUBDIR)/examples/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/examples/multilib.out + +configure-target-examples: $(TARGET_SUBDIR)/examples/multilib.out + @test ! -f $(TARGET_SUBDIR)/examples/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/examples ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/examples; \ + cd "$(TARGET_SUBDIR)/examples" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/examples"; \ + libsrcdir="$$s/examples"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-examples maybe-all-target-examples +maybe-all-target-examples: +all-target-examples: configure-target-examples + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/examples && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-examples maybe-check-target-examples +maybe-check-target-examples: + +# Dummy target for uncheckable module. +check-target-examples: + + +.PHONY: install-target-examples maybe-install-target-examples +maybe-install-target-examples: + +# Dummy target for uninstallable. +install-target-examples: + + +.PHONY: configure-target-libffi maybe-configure-target-libffi +maybe-configure-target-libffi: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libffi/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + rm -f $(TARGET_SUBDIR)/libffi/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libffi/multilib.out + +configure-target-libffi: $(TARGET_SUBDIR)/libffi/multilib.out + @test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libffi; \ + cd "$(TARGET_SUBDIR)/libffi" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libffi"; \ + libsrcdir="$$s/libffi"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libffi maybe-all-target-libffi +maybe-all-target-libffi: +all-target-libffi: configure-target-libffi + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libffi maybe-check-target-libffi +maybe-check-target-libffi: + +check-target-libffi: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libffi maybe-install-target-libffi +maybe-install-target-libffi: + +install-target-libffi: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libffi && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libjava maybe-configure-target-libjava +maybe-configure-target-libjava: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libjava/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + rm -f $(TARGET_SUBDIR)/libjava/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libjava/multilib.out + +configure-target-libjava: $(TARGET_SUBDIR)/libjava/multilib.out + @test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \ + CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libjava; \ + cd "$(TARGET_SUBDIR)/libjava" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libjava"; \ + libsrcdir="$$s/libjava"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libjava maybe-all-target-libjava +maybe-all-target-libjava: +all-target-libjava: configure-target-libjava + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' all) + +.PHONY: check-target-libjava maybe-check-target-libjava +maybe-check-target-libjava: + +check-target-libjava: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' check) + + +.PHONY: install-target-libjava maybe-install-target-libjava +maybe-install-target-libjava: + +install-target-libjava: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libjava && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-zlib maybe-configure-target-zlib +maybe-configure-target-zlib: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/zlib/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + rm -f $(TARGET_SUBDIR)/zlib/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/zlib/multilib.out + +configure-target-zlib: $(TARGET_SUBDIR)/zlib/multilib.out + @test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/zlib; \ + cd "$(TARGET_SUBDIR)/zlib" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + if [ "$(srcdir)" = "." ] ; then \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/zlib "no-such-file" ; then \ + if [ -f Makefile ]; then \ + if $(MAKE) distclean; then \ + true; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + else \ + exit 1; \ + fi; \ + else \ + true; \ + fi; \ + srcdiroption="--srcdir=."; \ + libsrcdir="."; \ + else \ + srcdiroption="--srcdir=$${topdir}/zlib"; \ + libsrcdir="$$s/zlib"; \ + fi; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-zlib maybe-all-target-zlib +maybe-all-target-zlib: +all-target-zlib: configure-target-zlib + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-zlib maybe-check-target-zlib +maybe-check-target-zlib: + +check-target-zlib: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-zlib maybe-install-target-zlib +maybe-install-target-zlib: + +install-target-zlib: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/zlib && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc +maybe-configure-target-boehm-gc: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/boehm-gc/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + rm -f $(TARGET_SUBDIR)/boehm-gc/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/boehm-gc/multilib.out + +configure-target-boehm-gc: $(TARGET_SUBDIR)/boehm-gc/multilib.out + @test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \ + cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/boehm-gc"; \ + libsrcdir="$$s/boehm-gc"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc +maybe-all-target-boehm-gc: +all-target-boehm-gc: configure-target-boehm-gc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-boehm-gc maybe-check-target-boehm-gc +maybe-check-target-boehm-gc: + +check-target-boehm-gc: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-boehm-gc maybe-install-target-boehm-gc +maybe-install-target-boehm-gc: + +install-target-boehm-gc: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/boehm-gc && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-qthreads maybe-configure-target-qthreads +maybe-configure-target-qthreads: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/qthreads/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + rm -f $(TARGET_SUBDIR)/qthreads/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/qthreads/multilib.out + +configure-target-qthreads: $(TARGET_SUBDIR)/qthreads/multilib.out + @test ! -f $(TARGET_SUBDIR)/qthreads/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/qthreads ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/qthreads; \ + cd "$(TARGET_SUBDIR)/qthreads" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/qthreads"; \ + libsrcdir="$$s/qthreads"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-qthreads maybe-all-target-qthreads +maybe-all-target-qthreads: +all-target-qthreads: configure-target-qthreads + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-qthreads maybe-check-target-qthreads +maybe-check-target-qthreads: + +check-target-qthreads: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-qthreads maybe-install-target-qthreads +maybe-install-target-qthreads: + +install-target-qthreads: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/qthreads && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-rda maybe-configure-target-rda +maybe-configure-target-rda: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/rda/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + rm -f $(TARGET_SUBDIR)/rda/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/rda/multilib.out + +configure-target-rda: $(TARGET_SUBDIR)/rda/multilib.out + @test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/rda; \ + cd "$(TARGET_SUBDIR)/rda" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/rda"; \ + libsrcdir="$$s/rda"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-rda maybe-all-target-rda +maybe-all-target-rda: +all-target-rda: configure-target-rda + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-rda maybe-check-target-rda +maybe-check-target-rda: + +check-target-rda: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-rda maybe-install-target-rda +maybe-install-target-rda: + +install-target-rda: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/rda && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + +.PHONY: configure-target-libada maybe-configure-target-libada +maybe-configure-target-libada: + +# There's only one multilib.out. Cleverer subdirs shouldn't need it copied. +$(TARGET_SUBDIR)/libada/multilib.out: multilib.out + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + rm -f $(TARGET_SUBDIR)/libada/Makefile || : ; \ + cp multilib.out $(TARGET_SUBDIR)/libada/multilib.out + +configure-target-libada: $(TARGET_SUBDIR)/libada/multilib.out + @test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + AR="$(AR_FOR_TARGET)"; export AR; \ + AS="$(AS_FOR_TARGET)"; export AS; \ + CC="$(CC_FOR_TARGET)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ + CXX="$(CXX_FOR_TARGET)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ + LD="$(LD_FOR_TARGET)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ + NM="$(NM_FOR_TARGET)"; export NM; \ + RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + echo Configuring in $(TARGET_SUBDIR)/libada; \ + cd "$(TARGET_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) \ + topdir=$(srcdir) ;; \ + *) \ + case "$(TARGET_SUBDIR)" in \ + .) topdir="../$(srcdir)" ;; \ + *) topdir="../../$(srcdir)" ;; \ + esac ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(TARGET_CONFIGARGS) $${srcdiroption} \ + --with-target-subdir="$(TARGET_SUBDIR)" \ + || exit 1 + +.PHONY: all-target-libada maybe-all-target-libada +maybe-all-target-libada: +all-target-libada: configure-target-libada + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) all) + +.PHONY: check-target-libada maybe-check-target-libada +maybe-check-target-libada: + +check-target-libada: + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check) + + +.PHONY: install-target-libada maybe-install-target-libada +maybe-install-target-libada: + +install-target-libada: installdirs + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd $(TARGET_SUBDIR)/libada && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + + +# ---------- +# GCC module +# ---------- + +# Unfortunately, while gcc _should_ be a host module, +# libgcc is a target module, and gen* programs are +# build modules. So GCC is a sort of hybrid. + +# gcc is the only module which uses GCC_FLAGS_TO_PASS. +# Don't use shared host config.cache, as it will confuse later +# directories; GCC wants slightly different values for some +# precious variables. *sigh* +.PHONY: configure-gcc maybe-configure-gcc +maybe-configure-gcc: +configure-gcc: + @test ! -f gcc/Makefile || exit 0; \ + [ -d gcc ] || mkdir gcc; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + CC="$(CC)"; export CC; \ + CFLAGS="$(CFLAGS)"; export CFLAGS; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CXX="$(CXX)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \ + TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \ + AR="$(AR)"; export AR; \ + AS="$(AS)"; export AS; \ + CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ + LD="$(LD)"; export LD; \ + NM="$(NM)"; export NM; \ + RANLIB="$(RANLIB)"; export RANLIB; \ + WINDRES="$(WINDRES)"; export WINDRES; \ + OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ + OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ + echo Configuring in gcc; \ + cd gcc || exit 1; \ + case $(srcdir) in \ + \.) \ + srcdiroption="--srcdir=."; \ + libsrcdir=".";; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + *) \ + srcdiroption="--srcdir=../$(srcdir)/gcc"; \ + libsrcdir="$$s/gcc";; \ + esac; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) $${srcdiroption} \ + || exit 1 + +# Don't 'make all' in gcc if it's already been made by 'bootstrap'; that +# causes trouble. This wart will be fixed eventually by moving +# the bootstrap behavior to this file. +.PHONY: all-gcc maybe-all-gcc +maybe-all-gcc: +all-gcc: configure-gcc + @if [ -f gcc/stage_last ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \ + else \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ + fi + +# Building GCC uses some tools for rebuilding "source" files +# like texinfo, bison/byacc, etc. So we must depend on those. +# +# While building GCC, it may be necessary to run various target +# programs like the assembler, linker, etc. So we depend on +# those too. +# +# In theory, on an SMP all those dependencies can be resolved +# in parallel. +# +GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap +.PHONY: $(GCC_STRAP_TARGETS) +$(GCC_STRAP_TARGETS): all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + case "$@" in \ + *bootstrap4-lean ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3-lean ;; \ + *bootstrap4 ) \ + msg="Comparing stage3 and stage4 of the compiler"; \ + compare=compare3 ;; \ + *-lean ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare-lean ;; \ + * ) \ + msg="Comparing stage2 and stage3 of the compiler"; \ + compare=compare ;; \ + esac; \ + $(SET_LIB_PATH) \ + echo "$$msg"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + +profiledbootstrap: all-bootstrap configure-gcc + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Bootstrapping the compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries and training compiler"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building feedback based compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build + +.PHONY: cross +cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + echo "Building the C and C++ compiler"; \ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + echo "Building runtime libraries"; \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ + LANGUAGES="c c++" all + +.PHONY: check-gcc maybe-check-gcc +maybe-check-gcc: +check-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ + else \ + true; \ + fi + +.PHONY: check-gcc-c++ +check-gcc-c++: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ + else \ + true; \ + fi + +.PHONY: check-c++ +check-c++: check-target-libstdc++-v3 check-gcc-c++ + +.PHONY: install-gcc maybe-install-gcc +maybe-install-gcc: +install-gcc: + @if [ -f ./gcc/Makefile ] ; then \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(SET_LIB_PATH) \ + (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + else \ + true; \ + fi + +# Install the gcc headers files, but not the fixed include files, +# which Cygnus is not allowed to distribute. This rule is very +# dependent on the workings of the gcc Makefile.in. +.PHONY: gcc-no-fixedincludes +gcc-no-fixedincludes: + @if [ -f ./gcc/Makefile ]; then \ + rm -rf gcc/tmp-include; \ + mv gcc/include gcc/tmp-include 2>/dev/null; \ + mkdir gcc/include; \ + cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ + touch gcc/stmp-fixinc gcc/include/fixed; \ + rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ + $(SET_LIB_PATH) \ + (cd ./gcc && \ + $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ + rm -rf gcc/include; \ + mv gcc/tmp-include gcc/include 2>/dev/null; \ + else true; fi + +# -------------------------------------- +# Dependencies between different modules +# -------------------------------------- + +# There are two types of dependencies here: 'hard' dependencies, where one +# module simply won't build without the other; and 'soft' dependencies, where +# if the depended-on module is missing, the depending module will do without +# or find a substitute somewhere (perhaps installed). Soft dependencies +# are specified by depending on a 'maybe-' target. If you're not sure, +# it's safer to use a soft dependency. + +# Host modules specific to gcc. +# GCC needs to identify certain tools. +# GCC also needs the information exported by the intl configure script. +configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex +all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib +# This is a slightly kludgy method of getting dependencies on +# all-build-libiberty correct; it would be better to build it every time. +all-gcc: maybe-all-build-libiberty +all-bootstrap: maybe-all-libiberty maybe-all-intl maybe-all-texinfo maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib + +# Host modules specific to gdb. +# GDB needs to know that the simulator is being built. +configure-gdb: maybe-configure-itcl maybe-configure-tcl maybe-configure-tk maybe-configure-sim +GDB_TK = @GDB_TK@ +all-gdb: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-mmalloc maybe-all-readline maybe-all-bison maybe-all-byacc maybe-all-sim $(gdbnlmrequirements) $(GDB_TK) +install-gdb: maybe-install-tcl maybe-install-tk maybe-install-itcl maybe-install-tix maybe-install-libgui +configure-libgui: maybe-configure-tcl maybe-configure-tk +all-libgui: maybe-all-tcl maybe-all-tk maybe-all-itcl + +# Host modules specific to binutils. +configure-bfd: configure-libiberty +all-bfd: maybe-all-libiberty maybe-all-intl +all-binutils: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-flex maybe-all-bison maybe-all-byacc maybe-all-intl +# We put install-opcodes before install-binutils because the installed +# binutils might be on PATH, and they might need the shared opcodes +# library. +install-binutils: maybe-install-opcodes +# libopcodes depends on libbfd +install-opcodes: maybe-install-bfd +all-gas: maybe-all-libiberty maybe-all-opcodes maybe-all-bfd maybe-all-intl +all-gprof: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-intl +all-ld: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-bison maybe-all-byacc maybe-all-flex maybe-all-intl +all-opcodes: maybe-all-bfd maybe-all-libiberty + +# Other host modules in the 'src' repository. +all-dejagnu: maybe-all-tcl maybe-all-expect maybe-all-tk +configure-expect: maybe-configure-tcl maybe-configure-tk +all-expect: maybe-all-tcl maybe-all-tk +configure-itcl: maybe-configure-tcl maybe-configure-tk +all-itcl: maybe-all-tcl maybe-all-tk +# We put install-tcl before install-itcl because itcl wants to run a +# program on installation which uses the Tcl libraries. +install-itcl: maybe-install-tcl +all-sid: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-tcl maybe-all-tk +install-sid: maybe-install-tcl maybe-install-tk +all-sim: maybe-all-libiberty maybe-all-bfd maybe-all-opcodes maybe-all-readline maybe-configure-gdb +configure-tk: maybe-configure-tcl +all-tk: maybe-all-tcl +configure-tix: maybe-configure-tcl maybe-configure-tk +all-tix: maybe-all-tcl maybe-all-tk +all-texinfo: maybe-all-libiberty + +# Other host modules. Warning, these are not well tested. +all-autoconf: maybe-all-m4 maybe-all-texinfo +all-automake: maybe-all-m4 maybe-all-texinfo +all-bison: maybe-all-texinfo +all-diff: maybe-all-libiberty +all-fastjar: maybe-all-zlib maybe-all-libiberty +all-fileutils: maybe-all-libiberty +all-flex: maybe-all-libiberty maybe-all-bison maybe-all-byacc +all-gzip: maybe-all-libiberty +all-hello: maybe-all-libiberty +all-m4: maybe-all-libiberty maybe-all-texinfo +all-make: maybe-all-libiberty maybe-all-intl +all-patch: maybe-all-libiberty +all-prms: maybe-all-libiberty +all-recode: maybe-all-libiberty +all-sed: maybe-all-libiberty +all-send-pr: maybe-all-prms +all-tar: maybe-all-libiberty +all-uudecode: maybe-all-libiberty + +ALL_GCC = maybe-all-gcc +ALL_GCC_C = $(ALL_GCC) maybe-all-target-newlib maybe-all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 + +# Target modules specific to gcc. +configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads +configure-target-fastjar: maybe-configure-target-zlib +all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty +configure-target-libada: $(ALL_GCC_C) +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: maybe-all-target-libiberty +configure-target-libffi: $(ALL_GCC_C) +configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: maybe-all-target-libiberty +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: maybe-all-target-libiberty +configure-target-zlib: $(ALL_GCC_C) + +# Target modules in the 'src' repository. +configure-target-examples: $(ALL_GCC_C) +configure-target-libgloss: $(ALL_GCC) +all-target-libgloss: maybe-configure-target-newlib +configure-target-libiberty: $(ALL_GCC) +configure-target-libtermcap: $(ALL_GCC_C) +configure-target-newlib: $(ALL_GCC) +configure-target-rda: $(ALL_GCC_C) +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap + +# Other target modules. Warning, these are not well tested. +configure-target-gperf: $(ALL_GCC_CXX) +all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 +configure-target-qthreads: $(ALL_GCC_C) + +# Dependencies of maybe-foo on foo. These are used because, for example, +# all-gcc only depends on all-gas if gas is present and being configured. +@maybe_dependencies@ + +# Serialization dependencies. Host configures don't work well in parallel to +# each other, due to contention over config.cache. Target configures and +# build configures are similar. +@serialization_dependencies@ + +# -------------------------------- +# Regenerating top level configury +# -------------------------------- + +# Multilib.out tells target dirs what multilibs they should build. +# There is really only one copy. We use the 'timestamp' method to +# work around various timestamp bugs on some systems. +# We use move-if-change so that it's only considered updated when it +# actually changes, because it has to depend on a phony target. +multilib.out: maybe-all-gcc + @r=`${PWD_COMMAND}`; export r; \ + echo "Checking multilib configuration..."; \ + $(CC_FOR_TARGET) --print-multi-lib > multilib.tmp 2> /dev/null ; \ + $(SHELL) $(srcdir)/move-if-change multilib.tmp multilib.out ; \ + +# Rebuilding Makefile.in, using autogen. +AUTOGEN = autogen +$(srcdir)/Makefile.in: @MAINT@ $(srcdir)/Makefile.tpl $(srcdir)/Makefile.def + cd $(srcdir) && $(AUTOGEN) Makefile.def + +# Rebuilding Makefile. +Makefile: $(srcdir)/Makefile.in config.status + CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +config.status: configure $(gcc_version_trigger) + CONFIG_SHELL="$(SHELL)" $(SHELL) ./config.status --recheck + +# Rebuilding configure. +AUTOCONF = autoconf +$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4 + cd $(srcdir) && $(AUTOCONF) + +# ------------------------------ +# Special directives to GNU Make +# ------------------------------ + +# Don't pass command-line variables to submakes. +.NOEXPORT: +MAKEOVERRIDES= + +# end of Makefile.in diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb_interface.c /tmp/e3X06Fy51n/crash-4.0-4.9/gdb_interface.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/gdb_interface.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/gdb_interface.c 2007-11-19 15:01:37.000000000 -0600 @@ -251,7 +251,7 @@ * Patch gdb's symbol values with the correct values from either * the System.map or non-debug vmlinux, whichever is in effect. */ - if ((pc->flags & SYSMAP) || + if ((pc->flags & SYSMAP) || (kt->flags & (RELOC_SET|RELOC_FORCE)) || (pc->namelist_debug && !pc->debuginfo_file)) { req->command = GNU_PATCH_SYMBOL_VALUES; req->flags = GNU_RETURN_ON_ERROR; @@ -647,7 +647,7 @@ }; #define RESTRICTED_GDB_COMMAND \ - "restricted gdb command: %s\n%s\"%s\" may only be used in a .gdbinit file or in a command file.\n%sThe .gdbinit file is read automatically during %s initialization.\n%sOther user-defined command files may be read interactively during\n%s%s runtime by using the gdb \"source\" command." + "restricted gdb command: %s\n%s\"%s\" may only be used in a .gdbinit file or in a command file.\n%sThe .gdbinit file is read automatically during %s initialization.\n%sOther user-defined command files may be read interactively during\n%s%s runtime by using the gdb \"source\" command.\n" static int is_restricted_command(char *cmd, ulong flags) diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/help.c /tmp/e3X06Fy51n/crash-4.0-4.9/help.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/help.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/help.c 2007-11-19 15:01:37.000000000 -0600 @@ -105,34 +105,33 @@ void program_usage(int form) { - int i; - char **p; - FILE *less; + if (form == SHORT_FORM) { + fprintf(fp, program_usage_info[0], pc->program_name); + fprintf(fp, "\nEnter \"%s -h\" for details.\n", + pc->program_name); + clean_exit(1); + } else { + FILE *scroll; + char *scroll_command; + char **p; + + if ((scroll_command = setup_scroll_command()) && + (scroll = popen(scroll_command, "w"))) + fp = scroll; + else + scroll = NULL; - if (form == LONG_FORM) - less = popen("/usr/bin/less", "w"); - else - less = NULL; - - p = program_usage_info; - - if (form == LONG_FORM) { - if (less) - fp = less; - for (i = 0; program_usage_info[i]; i++, p++) { - fprintf(fp, *p, pc->program_name); + for (p = program_usage_info; *p; p++) { + fprintf(fp, *p, pc->program_name); fprintf(fp, "\n"); } - } else { - fprintf(fp, *p, pc->program_name); - fprintf(fp, "\nEnter \"%s -h\" for details.\n", - pc->program_name); - } - fflush(fp); - if (less) - pclose(less); + fflush(fp); - clean_exit(1); + if (scroll) + pclose(scroll); + + clean_exit(0); + } } @@ -152,8 +151,10 @@ } for (ext = extension_table; ext; ext = ext->next) { - for (cp = ext->command_table; cp->name; cp++) - pc->ncmds++; + for (cp = ext->command_table; cp->name; cp++) { + if (!(cp->flags & (CLEANUP|HIDDEN_COMMAND))) + pc->ncmds++; + } } if (!pc->cmdlist) { @@ -193,8 +194,10 @@ } for (ext = extension_table; ext; ext = ext->next) { - for (cp = ext->command_table; cp->name; cp++) - pc->cmdlist[cnt++] = cp->name; + for (cp = ext->command_table; cp->name; cp++) { + if (!(cp->flags & (CLEANUP|HIDDEN_COMMAND))) + pc->cmdlist[cnt++] = cp->name; + } } if (cnt > pc->cmdlistsz) @@ -393,7 +396,7 @@ if (oflag) dump_offset_table(args[optind], FALSE); else - cmd_usage(args[optind], COMPLETE_HELP); + cmd_usage(args[optind], COMPLETE_HELP|MUST_HELP); optind++; } while (args[optind]); } @@ -655,6 +658,10 @@ " argument is entered, the current value of the %s variable is shown. These", " are the %s variables, acceptable arguments, and purpose:\n", " scroll on | off controls output scrolling.", +" scroll less /usr/bin/less as the output scrolling program.", +" scroll more /bin/more as the output scrolling program.", +" scroll CRASHPAGER use CRASHPAGER environment variable as the", +" output scrolling program.", " radix 10 | 16 sets output radix to 10 or 16.", " refresh on | off controls internal task list refresh.", " print_max number set maximum number of array elements to print.", @@ -700,11 +707,11 @@ " STATE: TASK_RUNNING (PANIC)\n", " Turn off output scrolling:\n", " %s> set scroll off", -" scroll: off", +" scroll: off (/usr/bin/less)", " ", " Show the current state of %s internal variables:\n", " %s> set -v", -" scroll: on", +" scroll: on (/usr/bin/less)", " radix: 10 (decimal)", " refresh: on", " print_max: 256", @@ -794,7 +801,7 @@ char *help_ps[] = { "ps", "display process status information", -"[-k|-u][-s][-p|-c|-t|-l|-a|-g] [pid | taskp | command] ...", +"[-k|-u][-s][-p|-c|-t|-l|-a|-g|-r] [pid | taskp | command] ...", " This command displays process status for selected, or all, processes" , " in the system. If no arguments are entered, the process data is", " is displayed for all processes. Selected process identifiers can be", @@ -830,8 +837,8 @@ " angle bracket (\">\") preceding its information.", " ", " Alternatively, information regarding parent-child relationships,", -" per-task time usage data, argument/environment data, or thread groups", -" may be displayed:", +" per-task time usage data, argument/environment data, thread groups,", +" or resource limits may be displayed:", " ", " -p display the parental hierarchy of selected, or all, tasks.", " -c display the children of selected, or all, tasks.", @@ -843,6 +850,7 @@ " -a display the command line arguments and environment strings of", " selected, or all, user-mode tasks.", " -g display tasks by thread group, of selected, or all, tasks.", +" -r display resource limits (rlimits) of selected, or all, tasks.", "\nEXAMPLES", " Show the process status of all current tasks:\n", " %s> ps", @@ -1086,6 +1094,22 @@ " PID: 2529 TASK: 1003f0c37f0 CPU: 1 COMMAND: \"multi-thread\"", " PID: 2530 TASK: 10035597030 CPU: 1 COMMAND: \"multi-thread\"", " PID: 2531 TASK: 100184be7f0 CPU: 1 COMMAND: \"multi-thread\"", +" ", +" Display the resource limits of \"bash\" task 13896:\n", +" %s> ps -r 13896", +" PID: 13896 TASK: cf402000 CPU: 0 COMMAND: \"bash\"", +" RLIMIT CURRENT MAXIMUM", +" CPU (unlimited) (unlimited)", +" FSIZE (unlimited) (unlimited)", +" DATA (unlimited) (unlimited)", +" STACK 10485760 (unlimited)", +" CORE (unlimited) (unlimited)", +" RSS (unlimited) (unlimited)", +" NPROC 4091 4091", +" NOFILE 1024 1024", +" MEMLOCK 4096 4096", +" AS (unlimited) (unlimited)", +" LOCKS (unlimited) (unlimited)", NULL }; @@ -1505,13 +1529,20 @@ " ", " Below is an example shared object file consisting of just one command, ", " called \"echo\", which simply echoes back all arguments passed to it.", -" Note the comments contained within it for further details. To build it,", -" cut and paste the following output into a file, and call it, for example,", -" \"echo.c\". Then compile like so:", +" Note the comments contained within it for further details. Cut and paste", +" the following output into a file, and call it, for example, \"echo.c\".", +" Then compiled in either of two manners. Either manually like so:", +" ", +" gcc -nostartfiles -shared -rdynamic -o echo.so echo.c -fPIC -D $(TARGET_CFLAGS)", +" ", +" where must be one of the MACHINE_TYPE #define's in defs.h,", +" and where $(TARGET_CFLAGS) is the same as it is declared in the top-level", +" Makefile after a build is completed. Or alternatively, the \"echo.c\" file", +" can be copied into the \"extensions\" subdirectory, and compiled automatically", +" like so:", " ", -" gcc -nostartfiles -shared -rdynamic -o echo.so echo.c -fPIC -D", +" make extensions", " ", -" where must be one of the MACHINE_TYPE #define's in defs.h.", " The echo.so file may be dynamically linked into %s during runtime, or", " during initialization by putting \"extend echo.so\" into a .%src file", " located in the current directory, or in the user's $HOME directory.", @@ -1625,7 +1656,7 @@ " PROCESSOR SPEED: 1993 Mhz", " HZ: 100", " PAGE SIZE: 4096", -" L1 CACHE SIZE: 32", +// " L1 CACHE SIZE: 32", " KERNEL VIRTUAL BASE: c0000000", " KERNEL VMALLOC BASE: e0800000", " KERNEL STACK SIZE: 8192", @@ -2006,7 +2037,7 @@ char *help_irq[] = { "irq", "IRQ data", -"[-d | -b | [index ...]]", +"[[[index ...] | -u] | -d | -b]", " This command collaborates the data in an irq_desc_t, along with its", " associated hw_interrupt_type and irqaction structure data, into a", " consolidated per-IRQ display. Alternatively, the intel interrupt", @@ -2014,6 +2045,7 @@ " If no index value argument(s) nor any options are entered, the IRQ", " data for all IRQs will be displayed.\n", " index a valid IRQ index.", +" -u dump data for in-use IRQs only.", " -d dump the intel interrupt descriptor table.", " -b dump bottom half data.", "\nEXAMPLES", @@ -3841,7 +3873,10 @@ " -i displays general memory usage information", " -s displays basic kmalloc() slab data.", " -S displays all kmalloc() slab data, including all slab objects,", -" and whether each object is in use or is free.", +" and whether each object is in use or is free. If CONFIG_SLUB,", +" slab data for each per-cpu slab is displayed, along with the", +" address of each kmem_cache_node, its count of full and partial", +" slabs, and a list of all tracked slabs.", " -v displays the vmlist entries.", " -V displays the kernel vm_stat table.", " -n display memory node data (if supported).", @@ -3856,9 +3891,12 @@ " address when used without any flag, the address can be a kernel virtual,", " or physical address; a search is made through the symbol table,", " the kmalloc() slab subsystem, the free list, the page_hash_table,", -" the vmalloc() vmlist subsystem, and the mem_map array. If found", -" in any of those areas, the information will be dumped in the", -" same manner as if the flags were used.", +" the vmalloc() vmlist subsystem, the current set of task_structs", +" and kernel stacks, and the mem_map array. If found in any of", +" those areas, the information will be dumped in the same manner as", +" if the location-specific flags were used; if contained within a", +" curent task_struct or kernel stack, that task's context will be", +" displayed.", " address when used with -s or -S, searches the kmalloc() slab subsystem", " for the slab containing of this virtual address, showing whether", " it is in use or free.", @@ -4881,21 +4919,22 @@ void cmd_usage(char *cmd, int helpflag) { - int i; - int found; - char **p; + char **p, *scroll_command; struct command_table_entry *cp; char buf[BUFSIZE]; - struct alias_data *ad; - FILE *less; + FILE *scroll; + int i; - if (helpflag & PIPE_TO_LESS) { - if ((less = popen("/usr/bin/less", "w")) != NULL) - fp = less; - helpflag &= ~PIPE_TO_LESS; - } else - less = NULL; - + if (helpflag & PIPE_TO_SCROLL) { + if ((scroll_command = setup_scroll_command()) && + (scroll = popen(scroll_command, "w"))) + fp = scroll; + else + scroll = NULL; + } else { + scroll_command = NULL; + scroll = NULL; + } if (STREQ(cmd, "copying")) { display_copying_info(); @@ -4938,46 +4977,50 @@ goto done_usage; } - found = FALSE; -retry: - if ((cp = get_command_table_entry(cmd))) { - if ((p = cp->help_data)) - found = TRUE; - } + /* look up command, possibly through an alias */ + for (;;) { + struct alias_data *ad; + + cp = get_command_table_entry(cmd); + if (cp != NULL) + break; /* found command */ + + /* try for an alias */ + ad = is_alias(cmd); + if (ad == NULL) + break; /* neither command nor alias */ - /* - * Check for alias names or gdb commands. - */ - if (!found) { - if ((ad = is_alias(cmd))) { - cmd = ad->args[0]; - goto retry; - } + cmd = ad->args[0]; + cp = get_command_table_entry(cmd); + } - if (helpflag == SYNOPSIS) { - fprintf(fp, - "No usage data for the \"%s\" command is available.\n", + if (cp == NULL || (p = cp->help_data) == NULL) { + if (helpflag & SYNOPSIS) { + fprintf(fp, + "No usage data for the \"%s\" command" + " is available.\n", cmd); RESTART(); } - if (STREQ(pc->curcmd, "help")) { - if (cp) - fprintf(fp, - "No help data for the \"%s\" command is available.\n", + if (helpflag & MUST_HELP) { + if (cp || !(pc->flags & GDB_INIT)) + fprintf(fp, + "No help data for the \"%s\" command" + " is available.\n", cmd); else if (!gdb_pass_through(concat_args(buf, 0, FALSE), NULL, GNU_RETURN_ON_ERROR)) fprintf(fp, - "No help data for \"%s\" is available.\n", - cmd); + "No help data for \"%s\" is available.\n", + cmd); } goto done_usage; } p++; - if (helpflag == SYNOPSIS) { + if (helpflag & SYNOPSIS) { p++; fprintf(fp, "Usage: %s ", cmd); fprintf(fp, *p, pc->program_name, pc->program_name); @@ -5008,10 +5051,12 @@ done_usage: - if (less) { - fflush(less); - pclose(less); + if (scroll) { + fflush(scroll); + pclose(scroll); } + if (scroll_command) + FREEBUF(scroll_command); } @@ -5159,7 +5204,7 @@ "Copyright (C) 2005, 2006 Fujitsu Limited", "Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.", "Copyright (C) 2005 NEC Corporation", -"Copyright (C) 1999, 2002 Silicon Graphics, Inc.", +"Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.", "Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.", "This program is free software, covered by the GNU General Public License,", "and you are welcome to change it and/or distribute copies of it under", diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/ia64.c /tmp/e3X06Fy51n/crash-4.0-4.9/ia64.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/ia64.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/ia64.c 2007-11-19 15:01:37.000000000 -0600 @@ -71,8 +71,6 @@ static int ia64_vtop_4l_xen_wpt(ulong, physaddr_t *paddr, ulong *pgd, int, int); static int ia64_vtop_xen_wpt(ulong, physaddr_t *paddr, ulong *pgd, int, int); static int ia64_xen_kdump_p2m_create(struct xen_kdump_data *); -static char *ia64_xen_kdump_load_page(ulong, char *); -static ulong ia64_xen_kdump_page_mfn(ulong); static int ia64_xendump_p2m_create(struct xendump_data *); static void ia64_debug_dump_page(FILE *, char *, char *); static char *ia64_xendump_load_page(ulong, struct xendump_data *); @@ -2317,7 +2315,7 @@ fprintf(fp, "(unknown)\n"); fprintf(fp, " HZ: %d\n", machdep->hz); fprintf(fp, " PAGE SIZE: %d\n", PAGESIZE()); - fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); +// fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); fprintf(fp, " KERNEL STACK SIZE: %ld\n", STACKSIZE()); fprintf(fp, " KERNEL CACHED REGION: %lx\n", (ulong)KERNEL_CACHED_REGION << REGION_SHIFT); @@ -3812,7 +3810,16 @@ phys_start); } return; - } + } else if (LKCD_DUMPFILE()) { + + if (lkcd_get_kernel_start(&phys_start)) { + machdep->machspec->phys_start = phys_start; + if (CRASHDEBUG(1)) + fprintf(fp, + "LKCD dump: phys_start: %lx\n", + phys_start); + } + } if ((vd = get_kdump_vmcore_data())) { /* @@ -3855,32 +3862,97 @@ * From the xen vmcore, create an index of mfns for each page that makes * up the dom0 kernel's complete phys_to_machine_mapping[max_pfn] array. */ - static int ia64_xen_kdump_p2m_create(struct xen_kdump_data *xkd) { - error(FATAL, "ia64_xen_kdump_p2m_create: TBD\n"); + /* + * Temporarily read physical (machine) addresses from vmcore by + * going directly to read_netdump() instead of via read_kdump(). + */ + pc->readmem = read_netdump; - /* dummy calls for clean "make [wW]arn" */ - ia64_xen_kdump_load_page(0, NULL); - ia64_xen_kdump_page_mfn(0); - ia64_debug_dump_page(NULL, NULL, NULL); + if (CRASHDEBUG(1)) + fprintf(fp, "ia64_xen_kdump_p2m_create: p2m_mfn: %lx\n", xkd->p2m_mfn); - return FALSE; -} + if ((xkd->p2m_mfn_frame_list = (ulong *)malloc(PAGESIZE())) == NULL) + error(FATAL, "cannot malloc p2m_frame_list"); -static char * -ia64_xen_kdump_load_page(ulong kvaddr, char *pgbuf) -{ - error(FATAL, "ia64_xen_kdump_load_page: TBD\n"); - return NULL; + if (!readmem(PTOB(xkd->p2m_mfn), PHYSADDR, xkd->p2m_mfn_frame_list, PAGESIZE(), + "xen kdump p2m mfn page", RETURN_ON_ERROR)) + error(FATAL, "cannot read xen kdump p2m mfn page\n"); + + xkd->p2m_frames = PAGESIZE()/sizeof(ulong); + + pc->readmem = read_kdump; + + return TRUE; } -static ulong -ia64_xen_kdump_page_mfn(ulong kvaddr) +physaddr_t +ia64_xen_kdump_p2m(struct xen_kdump_data *xkd, physaddr_t pseudo) { - error(FATAL, "ia64_xen_kdump_page_mfn: TBD\n"); - return 0; + ulong pgd_idx, pte_idx; + ulong pmd, pte; + physaddr_t paddr; + + /* + * Temporarily read physical (machine) addresses from vmcore by + * going directly to read_netdump() instead of via read_kdump(). + */ + pc->readmem = read_netdump; + + xkd->accesses += 2; + + pgd_idx = (pseudo >> PGDIR_SHIFT_3L) & (PTRS_PER_PGD - 1); + pmd = xkd->p2m_mfn_frame_list[pgd_idx] & _PFN_MASK; + if (!pmd) { + paddr = P2M_FAILURE; + goto out; + } + + pmd += ((pseudo >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) * sizeof(ulong); + if (pmd != xkd->last_pmd_read) { + if (!readmem(pmd, PHYSADDR, &pte, sizeof(ulong), + "ia64_xen_kdump_p2m pmd", RETURN_ON_ERROR)) { + xkd->last_pmd_read = BADADDR; + xkd->last_mfn_read = BADADDR; + paddr = P2M_FAILURE; + goto out; + } + xkd->last_pmd_read = pmd; + } else { + pte = xkd->last_mfn_read; + xkd->cache_hits++; + } + pte = pte & _PFN_MASK; + if (!pte) { + paddr = P2M_FAILURE; + goto out; + } + + if (pte != xkd->last_mfn_read) { + if (!readmem(pte, PHYSADDR, xkd->page, PAGESIZE(), + "ia64_xen_kdump_p2m pte page", RETURN_ON_ERROR)) { + xkd->last_pmd_read = BADADDR; + xkd->last_mfn_read = BADADDR; + paddr = P2M_FAILURE; + goto out; + } + xkd->last_mfn_read = pte; + } else + xkd->cache_hits++; + + pte_idx = (pseudo >> PAGESHIFT()) & (PTRS_PER_PTE - 1); + paddr = *(((ulong *)xkd->page) + pte_idx); + if (!(paddr & _PAGE_P)) { + paddr = P2M_FAILURE; + goto out; + } + paddr = (paddr & _PFN_MASK) | PAGEOFFSET(pseudo); + +out: + pc->readmem = read_kdump; + return paddr; } #include "xendump.h" @@ -4000,7 +4072,7 @@ } /* frametable virtual address */ - addr = kvaddr - VIRT_FRAME_TABLE_ADDR; + addr = kvaddr - xhmachdep->frame_table; dirp = symbol_value("frametable_pg_dir"); dirp += ((addr >> PGDIR_SHIFT_3L) & (PTRS_PER_PGD - 1)) * sizeof(ulong); @@ -4032,6 +4104,7 @@ ia64_post_init_hyper(void) { struct machine_specific *ms; + ulong frame_table; ms = &ia64_machine_specific; @@ -4064,6 +4137,14 @@ ms->unwind = ia64_old_unwind; } ms->unwind_init(); + + if (symbol_exists("frame_table")) { + frame_table = symbol_value("frame_table"); + readmem(frame_table, KVADDR, &xhmachdep->frame_table, sizeof(ulong), + "frame_table virtual address", FAULT_ON_ERROR); + } else { + error(FATAL, "cannot find frame_table virtual address."); + } } int diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/kernel.c /tmp/e3X06Fy51n/crash-4.0-4.9/kernel.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/kernel.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/kernel.c 2007-11-19 15:01:37.000000000 -0600 @@ -51,7 +51,6 @@ static int BUG_x86_64(void); - /* * Gather a few kernel basics. */ @@ -62,6 +61,7 @@ char *p1, *p2, buf[BUFSIZE]; struct syment *sp1, *sp2; char *rqstruct; + char *irq_desc_type_name; if (pc->flags & KERNEL_DEBUG_QUERY) return; @@ -165,11 +165,14 @@ verify_version(); if (symbol_exists("__per_cpu_offset")) { - i = get_array_length("__per_cpu_offset", NULL, 0); - get_symbol_data("__per_cpu_offset", - sizeof(long)*(i <= NR_CPUS ? i : NR_CPUS), - &kt->__per_cpu_offset[0]); - kt->flags |= PER_CPU_OFF; + if (LKCD_KERNTYPES()) + i = get_cpus_possible(); + else + i = get_array_length("__per_cpu_offset", NULL, 0); + get_symbol_data("__per_cpu_offset", + sizeof(long)*((i && (i <= NR_CPUS)) ? i : NR_CPUS), + &kt->__per_cpu_offset[0]); + kt->flags |= PER_CPU_OFF; } if (STRUCT_EXISTS("runqueue")) rqstruct = "runqueue"; @@ -216,6 +219,8 @@ STRUCT_SIZE_INIT(runqueue, rqstruct); STRUCT_SIZE_INIT(prio_array, "prio_array"); + MEMBER_OFFSET_INIT(rq_cfs, "rq", "cfs"); + /* * In 2.4, smp_send_stop() sets smp_num_cpus back to 1 * in some, but not all, architectures. So if a count @@ -278,13 +283,19 @@ STRUCT_SIZE_INIT(hlist_head, "hlist_head"); STRUCT_SIZE_INIT(hlist_node, "hlist_node"); - MEMBER_OFFSET_INIT(irq_desc_t_status, "irq_desc_t", "status"); - if (MEMBER_EXISTS("irq_desc_t", "handler")) - MEMBER_OFFSET_INIT(irq_desc_t_handler, "irq_desc_t", "handler"); + if (STRUCT_EXISTS("irq_desc_t")) + irq_desc_type_name = "irq_desc_t"; + else + irq_desc_type_name = "irq_desc"; + + STRUCT_SIZE_INIT(irq_desc_t, irq_desc_type_name); + MEMBER_OFFSET_INIT(irq_desc_t_status, irq_desc_type_name, "status"); + if (MEMBER_EXISTS(irq_desc_type_name, "handler")) + MEMBER_OFFSET_INIT(irq_desc_t_handler, irq_desc_type_name, "handler"); else - MEMBER_OFFSET_INIT(irq_desc_t_chip, "irq_desc_t", "chip"); - MEMBER_OFFSET_INIT(irq_desc_t_action, "irq_desc_t", "action"); - MEMBER_OFFSET_INIT(irq_desc_t_depth, "irq_desc_t", "depth"); + MEMBER_OFFSET_INIT(irq_desc_t_chip, irq_desc_type_name, "chip"); + MEMBER_OFFSET_INIT(irq_desc_t_action, irq_desc_type_name, "action"); + MEMBER_OFFSET_INIT(irq_desc_t_depth, irq_desc_type_name, "depth"); if (STRUCT_EXISTS("hw_interrupt_type")) { MEMBER_OFFSET_INIT(hw_interrupt_type_typename, "hw_interrupt_type", "typename"); @@ -346,8 +357,6 @@ MEMBER_OFFSET_INIT(irqaction_dev_id, "irqaction", "dev_id"); MEMBER_OFFSET_INIT(irqaction_next, "irqaction", "next"); - STRUCT_SIZE_INIT(irq_desc_t, "irq_desc_t"); - STRUCT_SIZE_INIT(irq_cpustat_t, "irq_cpustat_t"); MEMBER_OFFSET_INIT(irq_cpustat_t___softirq_active, "irq_cpustat_t", "__softirq_active"); @@ -381,8 +390,12 @@ STRUCT_SIZE_INIT(__wait_queue, "__wait_queue"); if (VALID_STRUCT(__wait_queue)) { - MEMBER_OFFSET_INIT(__wait_queue_task, - "__wait_queue", "task"); + if (MEMBER_EXISTS("__wait_queue", "task")) + MEMBER_OFFSET_INIT(__wait_queue_task, + "__wait_queue", "task"); + else + MEMBER_OFFSET_INIT(__wait_queue_task, + "__wait_queue", "private"); MEMBER_OFFSET_INIT(__wait_queue_head_task_list, "__wait_queue_head", "task_list"); MEMBER_OFFSET_INIT(__wait_queue_task_list, @@ -717,6 +730,10 @@ if (pc->flags & KERNEL_DEBUG_QUERY) return; + /* the kerntypes may not match in terms of gcc version or SMP */ + if (LKCD_KERNTYPES()) + return; + if (!strlen(kt->utsname.version)) return; @@ -2089,6 +2106,11 @@ return; } + /* try to get it from the header */ + if (get_lkcd_regs_for_cpu(bt, eip, esp) == 0) + return; + + /* if that fails: do guessing */ sysrq_eip = sysrq_esp = 0; for (i = 0, up = (ulong *)bt->stackbuf; i < LONGS_PER_STACK; i++, up++){ @@ -2999,6 +3021,18 @@ retbuf = search_directory_tree(dir, file); if (!retbuf) { + sprintf(dir, "/lib/modules/%s/updates", kt->utsname.release); + if (!(retbuf = search_directory_tree(dir, file))) { + switch (kt->flags & (KMOD_V1|KMOD_V2)) + { + case KMOD_V2: + sprintf(file, "%s.ko", modref); + retbuf = search_directory_tree(dir, file); + } + } + } + + if (!retbuf) { sprintf(dir, "/lib/modules/%s", kt->utsname.release); if (!(retbuf = search_directory_tree(dir, file))) { switch (kt->flags & (KMOD_V1|KMOD_V2)) @@ -3098,7 +3132,7 @@ dump_log(int msg_level) { int i; - ulong log_buf, log_start, logged_chars; + ulong log_buf, logged_chars; char *buf; char last; ulong index; @@ -3125,13 +3159,16 @@ buf = GETBUF(log_buf_len); log_wrap = FALSE; - get_symbol_data("log_start", sizeof(ulong), &log_start); get_symbol_data("logged_chars", sizeof(ulong), &logged_chars); readmem(log_buf, KVADDR, buf, log_buf_len, "log_buf contents", FAULT_ON_ERROR); - log_start &= log_buf_len-1; - index = (logged_chars < log_buf_len) ? 0 : log_start; + if (logged_chars < log_buf_len) { + index = 0; + } else { + get_symbol_data("log_end", sizeof(ulong), &index); + index &= log_buf_len-1; + } if ((logged_chars < log_buf_len) && (index == 0) && (buf[index] == '<')) loglevel = TRUE; @@ -3669,7 +3706,7 @@ others = 0; uts = &kt->utsname; - fprintf(fp, " flags: %lx (", kt->flags); + fprintf(fp, " flags: %lx\n (", kt->flags); if (kt->flags & NO_MODULE_ACCESS) fprintf(fp, "%sNO_MODULE_ACCESS", others++ ? "|" : ""); if (kt->flags & TVEC_BASES_V1) @@ -3722,6 +3759,10 @@ fprintf(fp, "%sDWARF_UNWIND_MODULES", others++ ? "|" : ""); if (kt->flags & BUGVERBOSE_OFF) fprintf(fp, "%sBUGVERBOSE_OFF", others++ ? "|" : ""); + if (kt->flags & RELOC_SET) + fprintf(fp, "%sRELOC_SET", others++ ? "|" : ""); + if (kt->flags & RELOC_FORCE) + fprintf(fp, "%sRELOC_FORCE", others++ ? "|" : ""); fprintf(fp, ")\n"); fprintf(fp, " stext: %lx\n", kt->stext); fprintf(fp, " etext: %lx\n", kt->etext); @@ -3763,6 +3804,7 @@ fprintf(fp, " gcc_version: %d.%d.%d\n", kt->gcc_version[0], kt->gcc_version[1], kt->gcc_version[2]); fprintf(fp, " BUG_bytes: %d\n", kt->BUG_bytes); + fprintf(fp, " relocate: %lx\n", kt->relocate); fprintf(fp, " runq_siblings: %d\n", kt->runq_siblings); fprintf(fp, " __rq_idx[NR_CPUS]: "); nr_cpus = kt->kernel_NR_CPUS ? kt->kernel_NR_CPUS : NR_CPUS; @@ -3852,7 +3894,7 @@ if (machine_type("S390") || machine_type("S390X")) command_not_supported(); - while ((c = getopt(argcnt, args, "db")) != EOF) { + while ((c = getopt(argcnt, args, "dbu")) != EOF) { switch(c) { case 'd': @@ -3882,6 +3924,17 @@ kt->display_bh(); return; + case 'u': + pc->curcmd_flags |= IRQ_IN_USE; + if (kernel_symbol_exists("no_irq_chip")) + pc->curcmd_private = (ulonglong)symbol_value("no_irq_chip"); + else if (kernel_symbol_exists("no_irq_type")) + pc->curcmd_private = (ulonglong)symbol_value("no_irq_type"); + else + error(WARNING, + "irq: -u option ignored: \"no_irq_chip\" or \"no_irq_type\" symbols do not exist\n"); + break; + default: argerrs++; break; @@ -3900,6 +3953,8 @@ return; } + pc->curcmd_flags &= ~IRQ_IN_USE; + while (args[optind]) { i = dtoi(args[optind], FAULT_ON_ERROR, NULL); if (i >= nr_irqs) @@ -3953,6 +4008,9 @@ readmem(irq_desc_addr + OFFSET(irq_desc_t_depth), KVADDR, &depth, sizeof(int), "irq_desc entry", FAULT_ON_ERROR); + if (!action && (handler == (ulong)pc->curcmd_private)) + return; + fprintf(fp, " IRQ: %d\n", irq); fprintf(fp, " STATUS: %x %s", status, status ? "(" : ""); others = 0; @@ -5467,8 +5525,12 @@ if (!symbol_exists("cpu_online_map")) return 0; - len = get_symbol_type("cpu_online_map", NULL, &req) == TYPE_CODE_UNDEF ? - sizeof(ulong) : req.length; + if (LKCD_KERNTYPES()) { + if ((len = STRUCT_SIZE("cpumask_t")) < 0) + error(FATAL, "cannot determine type cpumask_t\n"); + } else + len = get_symbol_type("cpu_online_map", NULL, &req) == + TYPE_CODE_UNDEF ? sizeof(ulong) : req.length; buf = GETBUF(len); online = 0; @@ -5489,6 +5551,47 @@ } /* + * For kernels containing at least the cpu_possible_map, used + * to determine the cpu count (of online and offline cpus). + */ +int +get_cpus_possible() +{ + int i, len, possible; + struct gnu_request req; + char *buf; + ulong *maskptr; + + if (!symbol_exists("cpu_possible_map")) + return 0; + + if (LKCD_KERNTYPES()) { + if ((len = STRUCT_SIZE("cpumask_t")) < 0) + error(FATAL, "cannot determine type cpumask_t\n"); + } else + len = get_symbol_type("cpu_possible_map", NULL, &req) == + TYPE_CODE_UNDEF ? sizeof(ulong) : req.length; + buf = GETBUF(len); + + possible = 0; + + if (readmem(symbol_value("cpu_possible_map"), KVADDR, buf, len, + "cpu_possible_map", RETURN_ON_ERROR)) { + + maskptr = (ulong *)buf; + for (i = 0; i < (len/sizeof(ulong)); i++, maskptr++) + possible += count_bits_long(*maskptr); + + FREEBUF(buf); + if (CRASHDEBUG(1)) + error(INFO, "get_cpus_possible: possible: %d\n", + possible); + } + + return possible; +} + +/* * Xen machine-address to pseudo-physical-page translator. */ ulonglong diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_common.c /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_common.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_common.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_common.c 2007-11-19 15:01:37.000000000 -0600 @@ -64,7 +64,7 @@ for (i = 0; i < lkcd->fix_addr_num; i++) { if ( (addr >=lkcd->fix_addr[i].task) && - (addr <= lkcd->fix_addr[i].task + STACKSIZE())){ + (addr < lkcd->fix_addr[i].task + STACKSIZE())){ offset = addr - lkcd->fix_addr[i].task; addr = lkcd->fix_addr[i].saddr + offset; @@ -708,14 +708,15 @@ if (lkcd->zones[ii].start == zone) { if (lkcd->zones[ii].pages[page].offset != 0) { if (lkcd->zones[ii].pages[page].offset != off) { - error(INFO, "conflicting page: zone %lld, " + if (CRASHDEBUG(1)) + error(INFO, "LKCD: conflicting page: zone %lld, " "page %lld: %lld, %lld != %lld\n", (unsigned long long)zone, (unsigned long long)page, (unsigned long long)paddr, (unsigned long long)off, (unsigned long long)lkcd->zones[ii].pages[page].offset); - abort(); + return -1; } ret = 0; } else { @@ -787,6 +788,27 @@ } +#ifdef IA64 + +int +lkcd_get_kernel_start(ulong *addr) +{ + if (!addr) + return 0; + + switch (lkcd->version) + { + case LKCD_DUMP_V8: + case LKCD_DUMP_V9: + return lkcd_get_kernel_start_v8(addr); + + default: + return 0; + } +} + +#endif + int lkcd_lseek(physaddr_t paddr) @@ -1244,7 +1266,7 @@ unsigned char *source, ulong sourcelen) { ulong retlen = destlen; - int rc; + int rc = FALSE; switch (uncompress(dest, &retlen, source, sourcelen)) { @@ -1401,3 +1423,15 @@ } } +int +get_lkcd_regs_for_cpu(struct bt_info *bt, ulong *eip, ulong *esp) +{ + switch (lkcd->version) { + case LKCD_DUMP_V8: + case LKCD_DUMP_V9: + return get_lkcd_regs_for_cpu_v8(bt, eip, esp); + default: + return -1; + } +} + diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_dump_v8.h /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_dump_v8.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_dump_v8.h 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_dump_v8.h 2007-11-19 15:01:37.000000000 -0600 @@ -235,4 +235,304 @@ int stack_offset; } lkcdinfo_t; +/* + * + * machine specific dump headers + * + */ + +/* + * IA64 --------------------------------------------------------- + */ + +#if defined(IA64) + +#define DUMP_ASM_MAGIC_NUMBER 0xdeaddeadULL /* magic number */ +#define DUMP_ASM_VERSION_NUMBER 0x5 /* version number */ + + +struct pt_regs { + /* The following registers are saved by SAVE_MIN: */ + unsigned long b6; /* scratch */ + unsigned long b7; /* scratch */ + + unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */ + unsigned long ar_ssd; /* reserved for future use (scratch) */ + + unsigned long r8; /* scratch (return value register 0) */ + unsigned long r9; /* scratch (return value register 1) */ + unsigned long r10; /* scratch (return value register 2) */ + unsigned long r11; /* scratch (return value register 3) */ + + unsigned long cr_ipsr; /* interrupted task's psr */ + unsigned long cr_iip; /* interrupted task's instruction pointer */ + unsigned long cr_ifs; /* interrupted task's function state */ + + unsigned long ar_unat; /* interrupted task's NaT register (preserved) */ + unsigned long ar_pfs; /* prev function state */ + unsigned long ar_rsc; /* RSE configuration */ + /* The following two are valid only if cr_ipsr.cpl > 0: */ + unsigned long ar_rnat; /* RSE NaT */ + unsigned long ar_bspstore; /* RSE bspstore */ + + unsigned long pr; /* 64 predicate registers (1 bit each) */ + unsigned long b0; /* return pointer (bp) */ + unsigned long loadrs; /* size of dirty partition << 16 */ + + unsigned long r1; /* the gp pointer */ + unsigned long r12; /* interrupted task's memory stack pointer */ + unsigned long r13; /* thread pointer */ + + unsigned long ar_fpsr; /* floating point status (preserved) */ + unsigned long r15; /* scratch */ + + /* The remaining registers are NOT saved for system calls. */ + + unsigned long r14; /* scratch */ + unsigned long r2; /* scratch */ + unsigned long r3; /* scratch */ + + /* The following registers are saved by SAVE_REST: */ + unsigned long r16; /* scratch */ + unsigned long r17; /* scratch */ + unsigned long r18; /* scratch */ + unsigned long r19; /* scratch */ + unsigned long r20; /* scratch */ + unsigned long r21; /* scratch */ + unsigned long r22; /* scratch */ + unsigned long r23; /* scratch */ + unsigned long r24; /* scratch */ + unsigned long r25; /* scratch */ + unsigned long r26; /* scratch */ + unsigned long r27; /* scratch */ + unsigned long r28; /* scratch */ + unsigned long r29; /* scratch */ + unsigned long r30; /* scratch */ + unsigned long r31; /* scratch */ + + unsigned long ar_ccv; /* compare/exchange value (scratch) */ + + /* + * Floating point registers that the kernel considers scratch: + */ + struct ia64_fpreg f6; /* scratch */ + struct ia64_fpreg f7; /* scratch */ + struct ia64_fpreg f8; /* scratch */ + struct ia64_fpreg f9; /* scratch */ + struct ia64_fpreg f10; /* scratch */ + struct ia64_fpreg f11; /* scratch */ +}; + + + +/* + * Structure: dump_header_asm_t + * Function: This is the header for architecture-specific stuff. It + * follows right after the dump header. + * + */ +typedef struct _dump_header_asm_s { + + /* the dump magic number -- unique to verify dump is valid */ + uint64_t dha_magic_number; + + /* the version number of this dump */ + uint32_t dha_version; + + /* the size of this header (in case we can't read it) */ + uint32_t dha_header_size; + + /* pointer to pt_regs, (OLD: (struct pt_regs *, NEW: (uint64_t)) */ + uint64_t dha_pt_regs; + + /* the dump registers */ + struct pt_regs dha_regs; + + /* the rnat register saved after flushrs */ + uint64_t dha_rnat; + + /* the pfs register saved after flushrs */ + uint64_t dha_pfs; + + /* the bspstore register saved after flushrs */ + uint64_t dha_bspstore; + + /* smp specific */ + uint32_t dha_smp_num_cpus; + uint32_t dha_dumping_cpu; + struct pt_regs dha_smp_regs[NR_CPUS]; + uint64_t dha_smp_current_task[NR_CPUS]; + uint64_t dha_stack[NR_CPUS]; + uint64_t dha_stack_ptr[NR_CPUS]; + + /* load address of kernel */ + uint64_t dha_kernel_addr; + +} __attribute__((packed)) dump_header_asm_t; + +struct dump_CPU_info_ia64 { + struct pt_regs dha_smp_regs; + uint64_t dha_smp_current_task; + uint64_t dha_stack; + uint64_t dha_stack_ptr; +} __attribute__((packed)) dump_CPU_info_ia64_t; + +typedef struct dump_CPU_info_ia64 dump_CPU_info_t; + +/* + * i386 --------------------------------------------------------- + */ + +#elif defined(X86) + +#define DUMP_ASM_MAGIC_NUMBER 0xdeaddeadULL /* magic number */ +#define DUMP_ASM_VERSION_NUMBER 0x5 /* version number */ + + +struct pt_regs { + long ebx; + long ecx; + long edx; + long esi; + long edi; + long ebp; + long eax; + int xds; + int xes; + long orig_eax; + long eip; + int xcs; + long eflags; + long esp; + int xss; +}; + +/* + * Structure: __dump_header_asm + * Function: This is the header for architecture-specific stuff. It + * follows right after the dump header. + */ +typedef struct _dump_header_asm_s { + /* the dump magic number -- unique to verify dump is valid */ + uint64_t dha_magic_number; + + /* the version number of this dump */ + uint32_t dha_version; + + /* the size of this header (in case we can't read it) */ + uint32_t dha_header_size; + + /* the esp for i386 systems */ + uint32_t dha_esp; + + /* the eip for i386 systems */ + uint32_t dha_eip; + + /* the dump registers */ + struct pt_regs dha_regs; + + /* smp specific */ + uint32_t dha_smp_num_cpus; + uint32_t dha_dumping_cpu; + struct pt_regs dha_smp_regs[NR_CPUS]; + uint32_t dha_smp_current_task[NR_CPUS]; + uint32_t dha_stack[NR_CPUS]; + uint32_t dha_stack_ptr[NR_CPUS]; +} __attribute__((packed)) dump_header_asm_t; + +/* + * CPU specific part of dump_header_asm_t + */ +typedef struct dump_CPU_info_s { + struct pt_regs dha_smp_regs; + uint64_t dha_smp_current_task; + uint64_t dha_stack; + uint64_t dha_stack_ptr; +} __attribute__ ((packed)) dump_CPU_info_t; + + +/* + * x86-64 --------------------------------------------------------- + */ + +#elif defined(X86_64) + +/* definitions */ +#define DUMP_ASM_MAGIC_NUMBER 0xdeaddeadULL /* magic number */ +#define DUMP_ASM_VERSION_NUMBER 0x2 /* version number */ + + +struct pt_regs { + unsigned long r15; + unsigned long r14; + unsigned long r13; + unsigned long r12; + unsigned long rbp; + unsigned long rbx; +/* arguments: non interrupts/non tracing syscalls only save upto here*/ + unsigned long r11; + unsigned long r10; + unsigned long r9; + unsigned long r8; + unsigned long rax; + unsigned long rcx; + unsigned long rdx; + unsigned long rsi; + unsigned long rdi; + unsigned long orig_rax; +/* end of arguments */ +/* cpu exception frame or undefined */ + unsigned long rip; + unsigned long cs; + unsigned long eflags; + unsigned long rsp; + unsigned long ss; +/* top of stack page */ +}; + +/* + * Structure: dump_header_asm_t + * Function: This is the header for architecture-specific stuff. It + * follows right after the dump header. + */ +typedef struct _dump_header_asm_s { + + /* the dump magic number -- unique to verify dump is valid */ + uint64_t dha_magic_number; + + /* the version number of this dump */ + uint32_t dha_version; + + /* the size of this header (in case we can't read it) */ + uint32_t dha_header_size; + + /* the dump registers */ + struct pt_regs dha_regs; + + /* smp specific */ + uint32_t dha_smp_num_cpus; + int dha_dumping_cpu; + struct pt_regs dha_smp_regs[NR_CPUS]; + uint64_t dha_smp_current_task[NR_CPUS]; + uint64_t dha_stack[NR_CPUS]; + uint64_t dha_stack_ptr[NR_CPUS]; +} __attribute__((packed)) dump_header_asm_t; + + +/* + * CPU specific part of dump_header_asm_t + */ +typedef struct dump_CPU_info_s { + struct pt_regs dha_smp_regs; + uint64_t dha_smp_current_task; + uint64_t dha_stack; + uint64_t dha_stack_ptr; +} __attribute__ ((packed)) dump_CPU_info_t; + +#else + +#define HAVE_NO_DUMP_HEADER_ASM 1 + +#endif + #endif /* _DUMP_H */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_fix_mem.c /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_fix_mem.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_fix_mem.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_fix_mem.c 2007-11-19 15:01:37.000000000 -0600 @@ -20,21 +20,13 @@ #define LKCD_COMMON #include "defs.h" -#include "lkcd_fix_mem.h" +#include "lkcd_dump_v8.h" static int fix_addr(dump_header_asm_t *); int -fix_addr_v8(int fd) +fix_addr_v8(dump_header_asm_t *dha) { - static dump_header_asm_t dump_header_asm_v8 = { 0 }; - dump_header_asm_t *dha; - dha = &dump_header_asm_v8; - - if (read(lkcd->fd, dha, sizeof(dump_header_asm_t)) != - sizeof(dump_header_asm_t)) - return -1; - fix_addr(dha); return 0; @@ -59,14 +51,6 @@ static int fix_addr(dump_header_asm_t *dha) { - - - if (dha->dha_header_size != sizeof(dump_header_asm_t)) { - error(INFO, "LKCD machine specific dump header doesn't match crash version\n"); - error(INFO, "traceback of currently executing threads may not work\n\n"); - } - - lkcd->dump_header_asm = dha; @@ -83,7 +67,7 @@ if (dha->dha_stack[i] && dha->dha_smp_current_task[i]) { lkcd->fix_addr[i].task = (ulong)dha->dha_smp_current_task[i]; lkcd->fix_addr[i].saddr = (ulong)dha->dha_stack[i]; - lkcd->fix_addr[i].sw = (ulong)dha->dha_switch_stack[i]; + lkcd->fix_addr[i].sw = (ulong)dha->dha_stack_ptr[i]; /* remember the highest non-zero entry */ lkcd->fix_addr_num = i + 1; } else { @@ -113,4 +97,14 @@ return 0; } +int lkcd_get_kernel_start_v8(ulong *addr) +{ + if (!addr) + return 0; + + *addr = ((dump_header_asm_t *)lkcd->dump_header_asm)->dha_kernel_addr; + + return 1; +} + #endif // IA64 diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_fix_mem.h /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_fix_mem.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_fix_mem.h 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_fix_mem.h 2007-11-19 15:01:37.000000000 -0600 @@ -1,3 +1,5 @@ +/* OBSOLETE */ + #ifdef IA64 #define UTSNAME_ENTRY_SZ 65 diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_v8.c /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_v8.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_v8.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_v8.c 2007-11-19 15:01:37.000000000 -0600 @@ -23,11 +23,186 @@ #include "lkcd_dump_v8.h" /* REMIND */ static dump_header_t dump_header_v8 = { 0 }; -// static dump_header_asm_t dump_header_asm_v8 = { 0 }; +#ifndef HAVE_NO_DUMP_HEADER_ASM +static dump_header_asm_t dump_header_asm_v8 = { 0 }; +#endif static dump_page_t dump_page = { 0 }; static void mclx_cache_page_headers_v8(void); static off_t lkcd_offset_to_first_page = LKCD_OFFSET_TO_FIRST_PAGE; +#if defined(X86_64) + +int +get_lkcd_regs_for_cpu_arch(int cpu, ulong *eip, ulong *esp) +{ + if (eip) + *eip = dump_header_asm_v8.dha_smp_regs[cpu].rip; + if (esp) + *esp = dump_header_asm_v8.dha_smp_regs[cpu].rsp; + + return 0; +} + +#elif defined(X86) + +int +get_lkcd_regs_for_cpu_arch(int cpu, ulong *eip, ulong *esp) +{ + if (eip) + *eip = dump_header_asm_v8.dha_smp_regs[cpu].eip; + if (esp) + *esp = dump_header_asm_v8.dha_smp_regs[cpu].esp; + + return 0; +} + +#else + +int +get_lkcd_regs_for_cpu_arch(int cpu, ulong *eip, ulong *esp) +{ + return -1; +} + +#endif + + + +int +get_lkcd_regs_for_cpu_v8(struct bt_info *bt, ulong *eip, ulong *esp) +{ + int cpu = bt->tc->processor; + + if (!bt || !bt->tc) { + fprintf(stderr, "get_lkcd_regs_for_cpu_v8: invalid tc " + "(CPU=%d)\n", cpu); + return -EINVAL; + } + + if (cpu >= NR_CPUS) { + fprintf(stderr, "get_lkcd_regs_for_cpu_v8, cpu (%d) too high\n", cpu); + return -EINVAL; + } + + return get_lkcd_regs_for_cpu_arch(cpu, eip, esp); +} + + +#ifndef HAVE_NO_DUMP_HEADER_ASM +int +lkcd_dump_init_v8_arch(dump_header_t *dh) +{ + off_t ret_of; + ssize_t ret_sz; + uint32_t hdr_size, offset, nr_cpus; + dump_header_asm_t arch_hdr; + char *hdr_buf = NULL; + + ret_of = lseek(lkcd->fd, dh->dh_header_size + + offsetof(dump_header_asm_t, dha_header_size), + SEEK_SET); + if (ret_of < 0) { + perror("lseek failed in " __FILE__ ":" STR(__LINE__)); + goto err; + } + + ret_sz = read(lkcd->fd, (char *)&hdr_size, sizeof(hdr_size)); + if (ret_sz != sizeof(hdr_size)) { + perror("Reading hdr_size failed in " __FILE__ ":" STR(__LINE__)); + goto err; + } + + ret_of = lseek(lkcd->fd, dh->dh_header_size, SEEK_SET); + if (ret_of < 0) { + perror("lseek failed in " __FILE__ ":" STR(__LINE__)); + goto err; + } + + hdr_buf = (char *)malloc(hdr_size); + if (!hdr_buf) { + perror("Could not allocate memory for dump header\n"); + goto err; + } + + ret_sz = read(lkcd->fd, (char *)hdr_buf, hdr_size); + if (ret_sz != hdr_size) { + perror("Could not read header " __FILE__ ":" STR(__LINE__)); + goto err; + } + + + /* + * Though we have KL_NR_CPUS is 128, the header size is different + * CONFIG_NR_CPUS might be different in the kernel. Hence, need + * to find out how many CPUs are configured. + */ + offset = offsetof(dump_header_asm_t, dha_smp_regs[0]); + nr_cpus = (hdr_size - offset) / sizeof(dump_CPU_info_t); + + /* check for CPU overflow */ + if (nr_cpus > NR_CPUS) { + fprintf(stderr, "CPU number too high %d (%s:%d)\n", + nr_cpus, __FILE__, __LINE__); + goto err; + } + + /* parts that don't depend on the number of CPUs */ + memcpy(&arch_hdr, (void *)hdr_buf, offset); + + /* registers */ + memcpy(&arch_hdr.dha_smp_regs, (void *)&hdr_buf[offset], + nr_cpus * sizeof(struct pt_regs)); + offset += nr_cpus * sizeof(struct pt_regs); + + /* current task */ + memcpy(&arch_hdr.dha_smp_current_task, (void *)&hdr_buf[offset], + nr_cpus * sizeof(&arch_hdr.dha_smp_current_task[0])); + offset += nr_cpus * sizeof(&arch_hdr.dha_smp_current_task[0]); + + /* stack */ + memcpy(&arch_hdr.dha_stack, (void *)&hdr_buf[offset], + nr_cpus * sizeof(&arch_hdr.dha_stack[0])); + offset += nr_cpus * sizeof(&arch_hdr.dha_stack[0]); + + /* stack_ptr */ + memcpy(&arch_hdr.dha_stack_ptr, (void *)&hdr_buf[offset], + nr_cpus * sizeof(&arch_hdr.dha_stack_ptr[0])); + offset += nr_cpus * sizeof(&arch_hdr.dha_stack_ptr[0]); + + if (arch_hdr.dha_magic_number != DUMP_ASM_MAGIC_NUMBER) { + fprintf(stderr, "Invalid magic number for x86_64\n"); + goto err; + } + + /* + * read the kernel load address on IA64 -- other architectures have + * no relocatable kernel at the lifetime of LKCD + */ +#ifdef IA64 + memcpy(&arch_hdr.dha_kernel_addr, (void *)&hdr_buf[offset], sizeof(uint64_t)); +#endif + + memcpy(&dump_header_asm_v8, &arch_hdr, sizeof(dump_header_asm_t)); + + return 0; + +err: + free(hdr_buf); + return -1; +} + +#else /* architecture that has no lkcd_dump_init_v8 */ + +int +lkcd_dump_init_v8_arch(dump_header_t *dh) +{ + return 0; +} + +#endif + + + /* * Verify and initialize the LKCD environment, storing the common data * in the global lkcd_environment structure. @@ -69,8 +244,14 @@ lkcd->dump_header = dh; if (lkcd->debug) dump_lkcd_environment(LKCD_DUMP_HEADER_ONLY); + + if (lkcd_dump_init_v8_arch(dh) != 0) { + fprintf(stderr, "Warning: Failed to initialise " + "arch specific dump code\n"); + } + #ifdef IA64 - if ( (fix_addr_v8(fd) == -1) ) + if ( (fix_addr_v8(&dump_header_asm_v8) == -1) ) return FALSE; #endif diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_x86_trace.c /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_x86_trace.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/lkcd_x86_trace.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/lkcd_x86_trace.c 2007-11-19 15:01:37.000000000 -0600 @@ -1424,7 +1424,8 @@ #ifdef REDHAT if (XEN_HYPER_MODE()) { func_name = kl_funcname(pc); - if (STREQ(func_name, "idle_loop") || STREQ(func_name, "hypercall")) { + if (STREQ(func_name, "idle_loop") || STREQ(func_name, "hypercall") + || STREQ(func_name, "handle_exception")) { UPDATE_FRAME(func_name, pc, 0, sp, bp, asp, 0, 0, bp - sp, 0); return(trace->nframes); } @@ -1681,7 +1682,9 @@ } } if (func_name && XEN_HYPER_MODE()) { - if (STREQ(func_name, "continue_nmi")) { + if (STREQ(func_name, "continue_nmi") || + STREQ(func_name, "vmx_asm_vmexit_handler") || + STREQ(func_name, "deferred_nmi")) { /* Interrupt frame */ sp = curframe->fp + 4; asp = (uaddr_t*)((uaddr_t)sbp + (STACK_SIZE - @@ -1697,6 +1700,8 @@ sp = curframe->fp + 4; bp = sp + get_framesize(pc, bt); func_name = kl_funcname(pc); + if (!func_name) + return trace->nframes; continue; } } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/main.c /tmp/e3X06Fy51n/crash-4.0-4.9/main.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/main.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/main.c 2007-11-19 15:01:37.000000000 -0600 @@ -27,12 +27,12 @@ static void check_xen_hyper(void); static struct option long_options[] = { - {"memory_module", 1, 0, 0}, - {"memory_device", 1, 0, 0}, + {"memory_module", required_argument, 0, 0}, + {"memory_device", required_argument, 0, 0}, {"no_kallsyms", 0, 0, 0}, {"no_modules", 0, 0, 0}, {"no_namelist_gzip", 0, 0, 0}, - {"help", 0, 0, 0}, + {"help", optional_argument, 0, 'h'}, {"data_debug", 0, 0, 0}, {"no_data_debug", 0, 0, 0}, {"no_crashrc", 0, 0, 0}, @@ -40,15 +40,21 @@ {"kmem_cache_delay", 0, 0, 0}, {"readnow", 0, 0, 0}, {"smp", 0, 0, 0}, - {"machdep", 1, 0, 0}, + {"machdep", required_argument, 0, 0}, {"version", 0, 0, 0}, {"buildinfo", 0, 0, 0}, {"shadow_page_tables", 0, 0, 0}, - {"cpus", 1, 0, 0}, + {"cpus", required_argument, 0, 0}, {"no_ikconfig", 0, 0, 0}, {"hyper", 0, 0, 0}, - {"p2m_mfn", 1, 0, 0}, + {"p2m_mfn", required_argument, 0, 0}, {"zero_excluded", 0, 0, 0}, + {"no_panic", 0, 0, 0}, + {"more", 0, 0, 0}, + {"less", 0, 0, 0}, + {"CRASHPAGER", 0, 0, 0}, + {"no_scroll", 0, 0, 0}, + {"reloc", required_argument, 0, 0}, {0, 0, 0, 0} }; @@ -64,7 +70,7 @@ */ opterr = 0; optind = 0; - while((c = getopt_long(argc, argv, "LgH:h:e:i:sSvc:d:tfp:m:", + while((c = getopt_long(argc, argv, "Lkgh::e:i:sSvc:d:tfp:m:", long_options, &option_index)) != -1) { switch (c) { @@ -73,60 +79,55 @@ "memory_module")) pc->memory_module = optarg; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "memory_device")) pc->memory_device = optarg; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_kallsyms")) kt->flags |= NO_KALLSYMS; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_modules")) kt->flags |= NO_MODULE_ACCESS; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_ikconfig")) kt->flags |= NO_IKCONFIG; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_namelist_gzip")) pc->flags |= NAMELIST_NO_GZIP; - if (STREQ(long_options[option_index].name, "help")) { - program_usage(LONG_FORM); - clean_exit(0); - } - - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "data_debug")) pc->flags |= DATADEBUG; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_data_debug")) pc->flags &= ~DATADEBUG; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "no_kmem_cache")) vt->flags |= KMEM_CACHE_UNAVAIL; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "kmem_cache_delay")) vt->flags |= KMEM_CACHE_DELAY; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "readnow")) pc->flags |= READNOW; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "smp")) kt->flags |= SMP; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "machdep")) machdep->cmdline_arg = optarg; - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "version")) { pc->flags |= VERSION_QUERY; display_version(); @@ -134,28 +135,69 @@ clean_exit(0); } - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "buildinfo")) { dump_build_data(); clean_exit(0); } - if (STREQ(long_options[option_index].name, + else if (STREQ(long_options[option_index].name, "shadow_page_tables")) kt->xen_flags |= SHADOW_PAGE_TABLES; - if (STREQ(long_options[option_index].name, "cpus")) + else if (STREQ(long_options[option_index].name, "cpus")) kt->cpus_override = optarg; - if (STREQ(long_options[option_index].name, "hyper")) + else if (STREQ(long_options[option_index].name, "hyper")) pc->flags |= XEN_HYPER; - if (STREQ(long_options[option_index].name, "p2m_mfn")) + else if (STREQ(long_options[option_index].name, "p2m_mfn")) xen_kdump_p2m_mfn(optarg); - if (STREQ(long_options[option_index].name, "zero_excluded")) + else if (STREQ(long_options[option_index].name, "zero_excluded")) *diskdump_flags |= ZERO_EXCLUDED; + else if (STREQ(long_options[option_index].name, "no_panic")) + tt->flags |= PANIC_TASK_NOT_FOUND; + + else if (STREQ(long_options[option_index].name, "more")) { + if ((pc->scroll_command != SCROLL_NONE) && + file_exists("/bin/more", NULL)) + pc->scroll_command = SCROLL_MORE; + } + + else if (STREQ(long_options[option_index].name, "less")) { + if ((pc->scroll_command != SCROLL_NONE) && + file_exists("/usr/bin/less", NULL)) + pc->scroll_command = SCROLL_LESS; + } + + else if (STREQ(long_options[option_index].name, "CRASHPAGER")) { + if ((pc->scroll_command != SCROLL_NONE) && + CRASHPAGER_valid()) + pc->scroll_command = SCROLL_CRASHPAGER; + } + + else if (STREQ(long_options[option_index].name, "no_scroll")) + pc->flags &= ~SCROLL; + + else if (STREQ(long_options[option_index].name, "no_crashrc")) + pc->flags |= NOCRASHRC; + + else if (STREQ(long_options[option_index].name, "reloc")) { + if (!calculate(optarg, &kt->relocate, NULL, 0)) { + error(INFO, "invalid --reloc argument: %s\n", + optarg); + program_usage(SHORT_FORM); + } + kt->flags |= RELOC_SET; + } + + else { + error(INFO, "internal error: option %s unhandled\n", + long_options[option_index].name); + program_usage(SHORT_FORM); + } break; case 'f': @@ -166,14 +208,25 @@ pc->flags |= KERNEL_DEBUG_QUERY; break; - case 'H': - cmd_usage(optarg, COMPLETE_HELP); - clean_exit(0); - case 'h': - cmd_usage(optarg, COMPLETE_HELP|PIPE_TO_LESS); + /* note: long_getopt's handling of optional arguments is weak. + * To it, an optional argument must be part of the same argument + * as the flag itself (eg. --help=commands or -hcommands). + * We want to accept "--help commands" or "-h commands". + * So we must do that part ourselves. + */ + if (optarg != NULL) + cmd_usage(optarg, COMPLETE_HELP|PIPE_TO_SCROLL|MUST_HELP); + else if (argv[optind] != NULL && argv[optind][0] != '-') + cmd_usage(argv[optind++], COMPLETE_HELP|PIPE_TO_SCROLL|MUST_HELP); + else + program_usage(LONG_FORM); clean_exit(0); + case 'k': + pc->flags |= KERNTYPES; + break; + case 'e': if (STREQ(optarg, "vi")) pc->editing_mode = "vi"; @@ -235,13 +288,9 @@ break; default: - if (STREQ(argv[optind-1], "-h")) - program_usage(LONG_FORM); - else { - error(INFO, "invalid option: %s\n", - argv[optind-1]); - program_usage(SHORT_FORM); - } + error(INFO, "invalid option: %s\n", + argv[optind-1]); + program_usage(SHORT_FORM); } } opterr = 1; @@ -302,8 +351,14 @@ } pc->flags |= NETDUMP; pc->dumpfile = argv[optind]; - pc->readmem = read_netdump; - pc->writemem = write_netdump; + + if (is_sadump_xen()) { + pc->readmem = read_kdump; + pc->writemem = write_kdump; + } else { + pc->readmem = read_netdump; + pc->writemem = write_netdump; + } } else if (is_kdump(argv[optind], KDUMP_LOCAL)) { if (pc->flags & MEMORY_SOURCES) { @@ -736,7 +791,10 @@ * Set up the default scrolling behavior for terminal output. */ if (isatty(fileno(stdout))) { - if (file_exists("/usr/bin/less", NULL)) { + if (CRASHPAGER_valid()) { + pc->flags |= SCROLL; + pc->scroll_command = SCROLL_CRASHPAGER; + } else if (file_exists("/usr/bin/less", NULL)) { pc->flags |= SCROLL; pc->scroll_command = SCROLL_LESS; } else if (file_exists("/bin/more", NULL)) { @@ -993,6 +1051,9 @@ if (pc->flags & PLEASE_WAIT) sprintf(&buf[strlen(buf)], "%sPLEASE_WAIT", others++ ? "|" : ""); + if (pc->flags & IFILE_ERROR) + sprintf(&buf[strlen(buf)], + "%sIFILE_ERROR", others++ ? "|" : ""); if (pc->flags) strcat(buf, ")"); @@ -1056,10 +1117,36 @@ fprintf(fp, " ifile_pipe: %lx\n", (ulong)pc->ifile_pipe); fprintf(fp, " ifile_ofile: %lx\n", (ulong)pc->ifile_ofile); fprintf(fp, " input_file: %s\n", pc->input_file); - fprintf(fp, " scroll_command: %s\n", - pc->scroll_command == SCROLL_NONE ? "(none)" : - pc->scroll_command == SCROLL_LESS ? - "/usr/bin/less" : "/bin/more"); + fprintf(fp, "ifile_in_progress: %lx (", pc->ifile_in_progress); + others = 0; + if (pc->ifile_in_progress & RCHOME_IFILE) + fprintf(fp, "%sRCHOME_IFILE", others++ ? "|" : ""); + if (pc->ifile_in_progress & RCLOCAL_IFILE) + fprintf(fp, "%sRCLOCAL_IFILE", others++ ? "|" : ""); + if (pc->ifile_in_progress & CMDLINE_IFILE) + fprintf(fp, "%sCMDLINE_IFILE", others++ ? "|" : ""); + if (pc->ifile_in_progress & RUNTIME_IFILE) + fprintf(fp, "%sRUNTIME_IFILE", others++ ? "|" : ""); + fprintf(fp, ")\n"); + fprintf(fp, " ifile_offset: %lld\n", (ulonglong)pc->ifile_offset); + fprintf(fp, "runtime_ifile_cmd: %s\n", pc->runtime_ifile_cmd ? + pc->runtime_ifile_cmd : "(unused)"); + fprintf(fp, " scroll_command: "); + switch (pc->scroll_command) + { + case SCROLL_NONE: + fprintf(fp, "SCROLL_NONE\n"); + break; + case SCROLL_LESS: + fprintf(fp, "SCROLL_LESS\n"); + break; + case SCROLL_MORE: + fprintf(fp, "SCROLL_MORE\n"); + break; + case SCROLL_CRASHPAGER: + fprintf(fp, "SCROLL_CRASHPAGER (%s)\n", getenv("CRASHPAGER")); + break; + } buf[0] = NULLCHAR; fprintf(fp, " redirect: %lx ", pc->redirect); @@ -1161,6 +1248,8 @@ fprintf(fp, "%sBAD_INSTRUCTION", others ? "|" : ""); if (pc->curcmd_flags & UD2A_INSTRUCTION) fprintf(fp, "%sUD2A_INSTRUCTION", others ? "|" : ""); + if (pc->curcmd_flags & IRQ_IN_USE) + fprintf(fp, "%sIRQ_IN_USE", others ? "|" : ""); fprintf(fp, ")\n"); fprintf(fp, " curcmd_private: %llx\n", pc->curcmd_private); fprintf(fp, " sigint_cnt: %d\n", pc->sigint_cnt); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/Makefile /tmp/e3X06Fy51n/crash-4.0-4.9/Makefile --- /tmp/9GqrqL2m5z/crash-4.0-4.1/Makefile 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/Makefile 2007-11-19 15:01:37.000000000 -0600 @@ -66,7 +66,8 @@ MCORE_HFILES=va_server.h vas_crash.h REDHAT_HFILES=netdump.h diskdump.h xendump.h LKCD_DUMP_HFILES=lkcd_vmdump_v1.h lkcd_vmdump_v2_v3.h lkcd_dump_v5.h \ - lkcd_dump_v7.h lkcd_dump_v8.h lkcd_fix_mem.h + lkcd_dump_v7.h lkcd_dump_v8.h +LKCD_OBSOLETE_HFILES=lkcd_fix_mem.h LKCD_TRACE_HFILES=lkcd_x86_trace.h IBM_HFILES=ibm_common.h UNWIND_HFILES=unwind.h unwind_i.h rse.h unwind_x86.h unwind_x86_64.h @@ -84,7 +85,8 @@ SOURCE_FILES=${CFILES} ${GENERIC_HFILES} ${MCORE_HFILES} \ ${REDHAT_CFILES} ${REDHAT_HFILES} ${UNWIND_HFILES} \ - ${LKCD_DUMP_HFILES} ${LKCD_TRACE_HFILES} ${IBM_HFILES} + ${LKCD_DUMP_HFILES} ${LKCD_TRACE_HFILES} ${LKCD_OBSOLETE_HFILES}\ + ${IBM_HFILES} OBJECT_FILES=main.o tools.o global_data.o memory.o filesys.o help.o task.o \ build_data.o kernel.o test.o gdb_interface.o net.o dev.o \ @@ -103,8 +105,38 @@ # directory. EXTENSIONS=extensions -EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c ${EXTENSIONS}/dminfo.c -EXTENSION_OBJECT_FILES=echo.so dminfo.so +EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c ${EXTENSIONS}/dminfo.c \ + ${EXTENSIONS}/libsial/Makefile \ + ${EXTENSIONS}/libsial/mkbaseop.c \ + ${EXTENSIONS}/libsial/README \ + ${EXTENSIONS}/libsial/README.sial \ + ${EXTENSIONS}/libsial/sial_alloc.c \ + ${EXTENSIONS}/libsial/sial_api.c \ + ${EXTENSIONS}/libsial/sial_api.h \ + ${EXTENSIONS}/libsial/sial_builtin.c \ + ${EXTENSIONS}/libsial/sial_case.c \ + ${EXTENSIONS}/libsial/sial_define.c \ + ${EXTENSIONS}/libsial/sial_func.c \ + ${EXTENSIONS}/libsial/sial.h \ + ${EXTENSIONS}/libsial/sial_input.c \ + ${EXTENSIONS}/libsial/sial.l \ + ${EXTENSIONS}/libsial/sial-lsed \ + ${EXTENSIONS}/libsial/sial_member.c \ + ${EXTENSIONS}/libsial/sial_node.c \ + ${EXTENSIONS}/libsial/sial_num.c \ + ${EXTENSIONS}/libsial/sial_op.c \ + ${EXTENSIONS}/libsial/sialpp.l \ + ${EXTENSIONS}/libsial/sialpp-lsed \ + ${EXTENSIONS}/libsial/sialpp.y \ + ${EXTENSIONS}/libsial/sial_print.c \ + ${EXTENSIONS}/libsial/sial_stat.c \ + ${EXTENSIONS}/libsial/sial_str.c \ + ${EXTENSIONS}/libsial/sial_type.c \ + ${EXTENSIONS}/libsial/sial_util.c \ + ${EXTENSIONS}/libsial/sial_var.c \ + ${EXTENSIONS}/libsial/sial.y \ + ${EXTENSIONS}/sial.c \ + ${EXTENSIONS}/sial.mk DAEMON_OBJECT_FILES=remote_daemon.o va_server.o va_server_v1.o \ lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \ @@ -251,6 +283,7 @@ clean: rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES} + @(cd extensions; make --no-print-directory -i clean) make_build_data: force cc -c ${CFLAGS} build_data.c ${WARNING_OPTIONS} ${WARNING_ERROR} @@ -406,7 +439,7 @@ cc -c ${CFLAGS} -DREDHAT -DUNWIND_V3 unwind.c -o unwind_v3.o ${WARNING_OPTIONS} ${WARNING_ERROR} lkcd_fix_mem.o: ${GENERIC_HFILES} ${LKCD_HFILES} lkcd_fix_mem.c - cc -c ${CFLAGS} lkcd_fix_mem.c ${WARNING_OPTIONS} ${WARNING_ERROR} + cc -c ${CFLAGS} -DMCLX lkcd_fix_mem.c ${WARNING_OPTIONS} ${WARNING_ERROR} xen_hyper.o: ${GENERIC_HFILES} xen_hyper.c cc -c ${CFLAGS} xen_hyper.c ${WARNING_OPTIONS} ${WARNING_ERROR} @@ -446,7 +479,7 @@ show_files: @if [ -f ${PROGRAM} ]; then \ - ./${PROGRAM} --no_crashrc -h README > README; fi + ./${PROGRAM} --no_scroll --no_crashrc -h README > README; echo $?; fi @echo ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} COPYING README \ .rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} @@ -459,7 +492,7 @@ do_tar: @if [ -f ${PROGRAM} ]; then \ - ./${PROGRAM} --no_crashrc -h README > README; fi + ./${PROGRAM} --no_scroll --no_crashrc -h README > README; fi tar cvzf ${PROGRAM}.tar.gz ${TAR_FILES} ${GDB_FILES} ${GDB_PATCH_FILES} @echo; ls -l ${PROGRAM}.tar.gz @@ -470,7 +503,7 @@ # spec file will have its own release number, which will in turn get passed # to the "all" target upon the initial build. -RELEASE=4.0-4.1 +RELEASE=4.0-4.9 release: make_configure @if [ "`id --user`" != "0" ]; then \ @@ -498,7 +531,7 @@ @tar cf - ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} COPYING \ .rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} | (cd ./RELDIR/${PROGRAM}-${RELEASE}; tar xf -) @cp ${GDB}.tar.gz ./RELDIR/${PROGRAM}-${RELEASE} - @./${PROGRAM} --no_crashrc -h README > ./RELDIR/${PROGRAM}-${RELEASE}/README + @./${PROGRAM} --no_scroll --no_crashrc -h README > ./RELDIR/${PROGRAM}-${RELEASE}/README @(cd ./RELDIR; find . -exec chown root {} ";") @(cd ./RELDIR; find . -exec chgrp root {} ";") @(cd ./RELDIR; find . -exec touch {} ";") @@ -543,4 +576,4 @@ @make --no-print-directory do_extensions do_extensions: - @(cd extensions; make -i OBJECTS="$(EXTENSION_OBJECT_FILES)" TARGET=$(TARGET)) + @(cd extensions; make -i TARGET=$(TARGET) TARGET_CFLAGS=$(TARGET_CFLAGS)) diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/memory.c /tmp/e3X06Fy51n/crash-4.0-4.9/memory.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/memory.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/memory.c 2007-11-19 15:01:37.000000000 -0600 @@ -35,11 +35,14 @@ ulong order; ulong slabsize; ulong num_slabs; + ulong objects; ulonglong spec_addr; ulong flags; ulong size; + ulong objsize; int memtype; int free; + int slab_offset; char *reqname; char *curname; ulong *addrlist; @@ -53,12 +56,14 @@ int errors; int calls; int cpu; + int cache_count; ulong get_shared; ulong get_totalram; ulong get_buffers; ulong get_slabs; char *slab_buf; char *cache_buf; + ulong *cache_list; struct vmlist { ulong addr; ulong size; @@ -79,20 +84,26 @@ static void dump_page_hash_table(struct meminfo *); static void kmem_search(struct meminfo *); static void kmem_cache_init(void); +static void kmem_cache_init_slub(void); static ulong max_cpudata_limit(ulong, ulong *); static int ignore_cache(struct meminfo *, char *); static char *is_kmem_cache_addr(ulong, char *); +static char *is_kmem_cache_addr_slub(ulong, char *); static void kmem_cache_list(void); static void dump_kmem_cache(struct meminfo *); static void dump_kmem_cache_percpu_v1(struct meminfo *); static void dump_kmem_cache_percpu_v2(struct meminfo *); +static void dump_kmem_cache_slub(struct meminfo *); static void dump_kmem_cache_info_v2(struct meminfo *); +static void kmem_cache_list_slub(void); static char *vaddr_to_kmem_cache(ulong, char *); static ulong vaddr_to_slab(ulong); static void do_slab_chain(int, struct meminfo *); static void do_slab_chain_percpu_v1(long, struct meminfo *); static void do_slab_chain_percpu_v2(long, struct meminfo *); static void do_slab_chain_percpu_v2_nodes(long, struct meminfo *); +static void do_slab_slub(struct meminfo *, int); +static void do_kmem_cache_slub(struct meminfo *); static void save_slab_data(struct meminfo *); static int slab_data_saved(struct meminfo *); static void dump_saved_slab_data(void); @@ -155,6 +166,14 @@ static int dump_vm_stat(char *, long *); static int generic_read_dumpfile(ulonglong, void *, long, char *, ulong); static int generic_write_dumpfile(ulonglong, void *, long, char *, ulong); +static int page_to_nid(ulong); +static int get_kmem_cache_list(ulong **); +static int get_kmem_cache_slub_data(long, struct meminfo *); +static ulong compound_head(ulong); +static long count_partial(ulong); +static ulong get_freepointer(struct meminfo *, void *); +char *is_slab_page(struct meminfo *, char *); +static void do_node_lists_slub(struct meminfo *, ulong, int); /* * Memory display modes specific to this file. @@ -258,7 +277,16 @@ MEMBER_OFFSET_INIT(page_count, "page", "_count"); MEMBER_OFFSET_INIT(page_flags, "page", "flags"); MEMBER_OFFSET_INIT(page_mapping, "page", "mapping"); + if (INVALID_MEMBER(page_mapping)) + ANON_MEMBER_OFFSET_INIT(page_mapping, "page", "mapping"); + if (INVALID_MEMBER(page_mapping) && + (THIS_KERNEL_VERSION < LINUX(2,6,17)) && + MEMBER_EXISTS("page", "_mapcount")) + ASSIGN_OFFSET(page_mapping) = MEMBER_OFFSET("page", "_mapcount") + + STRUCT_SIZE("atomic_t") + sizeof(ulong); MEMBER_OFFSET_INIT(page_index, "page", "index"); + if (INVALID_MEMBER(page_index)) + ANON_MEMBER_OFFSET_INIT(page_mapping, "page", "index"); MEMBER_OFFSET_INIT(page_buffers, "page", "buffers"); MEMBER_OFFSET_INIT(page_lru, "page", "lru"); MEMBER_OFFSET_INIT(page_pte, "page", "pte"); @@ -408,6 +436,45 @@ MEMBER_OFFSET_INIT(kmem_list3_free_objects, "kmem_list3", "free_objects"); MEMBER_OFFSET_INIT(kmem_list3_shared, "kmem_list3", "shared"); + } else if (MEMBER_EXISTS("kmem_cache", "cpu_slab") && + STRUCT_EXISTS("kmem_cache_node")) { + vt->flags |= KMALLOC_SLUB; + + STRUCT_SIZE_INIT(kmem_cache, "kmem_cache"); + MEMBER_OFFSET_INIT(kmem_cache_size, "kmem_cache", "size"); + MEMBER_OFFSET_INIT(kmem_cache_objsize, "kmem_cache", "objsize"); + MEMBER_OFFSET_INIT(kmem_cache_offset, "kmem_cache", "offset"); + MEMBER_OFFSET_INIT(kmem_cache_order, "kmem_cache", "order"); + MEMBER_OFFSET_INIT(kmem_cache_local_node, "kmem_cache", "local_node"); + MEMBER_OFFSET_INIT(kmem_cache_objects, "kmem_cache", "objects"); + MEMBER_OFFSET_INIT(kmem_cache_inuse, "kmem_cache", "inuse"); + MEMBER_OFFSET_INIT(kmem_cache_align, "kmem_cache", "align"); + MEMBER_OFFSET_INIT(kmem_cache_node, "kmem_cache", "node"); + MEMBER_OFFSET_INIT(kmem_cache_cpu_slab, "kmem_cache", "cpu_slab"); + MEMBER_OFFSET_INIT(kmem_cache_list, "kmem_cache", "list"); + MEMBER_OFFSET_INIT(kmem_cache_name, "kmem_cache", "name"); + ANON_MEMBER_OFFSET_INIT(page_inuse, "page", "inuse"); + ANON_MEMBER_OFFSET_INIT(page_offset, "page", "offset"); + ANON_MEMBER_OFFSET_INIT(page_lockless_freelist, "page", + "lockless_freelist"); + ANON_MEMBER_OFFSET_INIT(page_slab, "page", "slab"); + ANON_MEMBER_OFFSET_INIT(page_first_page, "page", "first_page"); + ANON_MEMBER_OFFSET_INIT(page_freelist, "page", "freelist"); + if (VALID_MEMBER(kmem_cache_node)) { + ARRAY_LENGTH_INIT(len, NULL, "kmem_cache.node", NULL, 0); + vt->flags |= CONFIG_NUMA; + } + ARRAY_LENGTH_INIT(len, NULL, "kmem_cache.cpu_slab", NULL, 0); + + STRUCT_SIZE_INIT(kmem_cache_node, "kmem_cache_node"); + MEMBER_OFFSET_INIT(kmem_cache_node_nr_partial, + "kmem_cache_node", "nr_partial"); + MEMBER_OFFSET_INIT(kmem_cache_node_nr_slabs, + "kmem_cache_node", "nr_slabs"); + MEMBER_OFFSET_INIT(kmem_cache_node_partial, + "kmem_cache_node", "partial"); + MEMBER_OFFSET_INIT(kmem_cache_node_full, + "kmem_cache_node", "full"); } else { MEMBER_OFFSET_INIT(kmem_cache_s_c_nextp, "kmem_cache_s", "c_nextp"); @@ -447,9 +514,12 @@ } if (!kt->kernel_NR_CPUS) { - kt->kernel_NR_CPUS = ARRAY_LENGTH(kmem_cache_s_cpudata) ? - ARRAY_LENGTH(kmem_cache_s_cpudata) : - ARRAY_LENGTH(kmem_cache_s_array); + if (ARRAY_LENGTH(kmem_cache_s_cpudata)) + kt->kernel_NR_CPUS = ARRAY_LENGTH(kmem_cache_s_cpudata); + else if (ARRAY_LENGTH(kmem_cache_s_array)) + kt->kernel_NR_CPUS = ARRAY_LENGTH(kmem_cache_s_array); + else if (ARRAY_LENGTH(kmem_cache_cpu_slab)) + kt->kernel_NR_CPUS = ARRAY_LENGTH(kmem_cache_cpu_slab); } if (kt->kernel_NR_CPUS > NR_CPUS) { @@ -494,12 +564,12 @@ get_symbol_data("high_memory", sizeof(ulong), &vt->high_memory); - if (kernel_symbol_exists("mem_map")) { + if (kernel_symbol_exists("mem_section")) + vt->flags |= SPARSEMEM; + else if (kernel_symbol_exists("mem_map")) { get_symbol_data("mem_map", sizeof(char *), &vt->mem_map); vt->flags |= FLATMEM; - } else if (kernel_symbol_exists("mem_section")) - vt->flags |= SPARSEMEM; - else + } else vt->flags |= DISCONTIGMEM; sparse_mem_init(); @@ -706,6 +776,8 @@ vt->dump_kmem_cache = dump_kmem_cache_percpu_v1; else if (vt->flags & PERCPU_KMALLOC_V2) vt->dump_kmem_cache = dump_kmem_cache_percpu_v2; + else if (vt->flags & KMALLOC_SLUB) + vt->dump_kmem_cache = dump_kmem_cache_slub; else vt->dump_kmem_cache = dump_kmem_cache; @@ -3316,6 +3388,8 @@ #define GET_VMLIST_COUNT (ADDRESS_SPECIFIED << 16) #define GET_VMLIST (ADDRESS_SPECIFIED << 17) #define SLAB_DATA_NOSAVE (ADDRESS_SPECIFIED << 18) +#define GET_SLUB_SLABS (ADDRESS_SPECIFIED << 19) +#define GET_SLUB_OBJECTS (ADDRESS_SPECIFIED << 20) #define GET_ALL \ (GET_SHARED_PAGES|GET_TOTALRAM_PAGES|GET_BUFFERS_PAGES|GET_SLAB_PAGES) @@ -3516,6 +3590,8 @@ } else { meminfo.spec_addr = value[i]; meminfo.flags = ADDRESS_SPECIFIED; + if (Sflag && (vt->flags & KMALLOC_SLUB)) + meminfo.flags |= VERBOSE; if (meminfo.calls++) fprintf(fp, "\n"); vt->dump_kmem_cache(&meminfo); @@ -3589,24 +3665,25 @@ } if (sflag == 1) { - if (vt->flags & KMEM_CACHE_UNAVAIL) - error(FATAL, - "kmem cache slab subsystem not available\n"); if (STREQ(meminfo.reqname, "list")) kmem_cache_list(); + else if (vt->flags & KMEM_CACHE_UNAVAIL) + error(FATAL, + "kmem cache slab subsystem not available\n"); else vt->dump_kmem_cache(&meminfo); } if (Sflag == 1) { - if (vt->flags & KMEM_CACHE_UNAVAIL) - error(FATAL, - "kmem cache slab subsystem not available\n"); - meminfo.flags = VERBOSE; if (STREQ(meminfo.reqname, "list")) kmem_cache_list(); - else + else if (vt->flags & KMEM_CACHE_UNAVAIL) + error(FATAL, + "kmem cache slab subsystem not available\n"); + else { + meminfo.flags = VERBOSE; vt->dump_kmem_cache(&meminfo); + } } if (vflag == 1) @@ -3695,6 +3772,20 @@ } else if (THIS_KERNEL_VERSION >= LINUX(2,6,0)) vt->PG_slab = 7; + if (vt->flags & KMALLOC_SLUB) { + /* + * PG_slab and the following are hardwired for + * now -- at least until I can come up with + * better way. (PG_slab test below fails because + * slub.c uses lower-bit PG_active and PG_error) + */ +#define PG_compound 14 /* Part of a compound page */ +#define PG_reclaim 17 /* To be reclaimed asap */ + vt->PG_head_tail_mask = ((1L << PG_compound) | (1L << PG_reclaim)); + + return; + } + if (try_get_symbol_data("vm_area_cachep", sizeof(void *), &vaddr) && phys_to_page((physaddr_t)VTOP(vaddr), &pageptr) && readmem(pageptr, KVADDR, buf, SIZE(page), @@ -3922,7 +4013,7 @@ pp = section_mem_map_addr(section); pp = sparse_decode_mem_map(pp, section_nr); - phys = section_nr * PAGES_PER_SECTION() * PAGESIZE(); + phys = (physaddr_t) section_nr * PAGES_PER_SECTION() * PAGESIZE(); section_size = PAGES_PER_SECTION(); for (i = 0; i < section_size; @@ -5736,7 +5827,7 @@ continue; } - if ((i == 0) && (vt->flags & NODES)) { + if ((i == 0) && ((vt->flags & NODES) || (vt->numnodes > 1))) { if (n) { fprintf(fp, "\n"); pad_line(fp, @@ -5786,7 +5877,7 @@ zone_start_paddr = PTOB(zone_start_pfn); if (!VALID_MEMBER(zone_zone_mem_map)) { - if (IS_SPARSEMEM()) { + if (IS_SPARSEMEM() || IS_DISCONTIGMEM()) { zone_mem_map = 0; if (size) { phys = PTOB(zone_start_pfn); @@ -6177,6 +6268,11 @@ if (vm_stat_init()) { if (dump_vm_stat("NR_SLAB", &nr_slab)) get_slabs = nr_slab; + else if (dump_vm_stat("NR_SLAB_RECLAIMABLE", &nr_slab)) { + get_slabs = nr_slab; + if (dump_vm_stat("NR_SLAB_UNRECLAIMABLE", &nr_slab)) + get_slabs += nr_slab; + } } fprintf(fp, kmeminfo_hdr); @@ -6803,6 +6899,9 @@ return NULL; } + if (vt->flags & KMALLOC_SLUB) + return is_kmem_cache_addr_slub(vaddr, kbuf); + name_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? OFFSET(kmem_cache_s_name) : OFFSET(kmem_cache_s_c_name); next_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? @@ -6825,13 +6924,14 @@ if (!read_string(name, kbuf, BUFSIZE-1)) { if (vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2)) - error(FATAL, + error(WARNING, "cannot read kmem_cache_s.name string at %lx\n", name); else - error(FATAL, + error(WARNING, "cannot read kmem_cache_s.c_name string at %lx\n", name); + sprintf(kbuf, "(unknown)"); } } FREEBUF(cache_buf); @@ -6866,6 +6966,11 @@ return; } + if (vt->flags & KMALLOC_SLUB) { + kmem_cache_list_slub(); + return; + } + name_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? OFFSET(kmem_cache_s_name) : OFFSET(kmem_cache_s_c_name); next_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? @@ -6887,13 +6992,14 @@ if (!read_string(name, buf, BUFSIZE-1)) { if (vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2)) - error(FATAL, + error(WARNING, "cannot read kmem_cache_s.name string at %lx\n", name); else - error(FATAL, + error(WARNING, "cannot read kmem_cache_s.c_name string at %lx\n", name); + sprintf(buf, "(unknown)"); } } @@ -6934,7 +7040,11 @@ return NULL; } - if (VALID_MEMBER(page_next)) + if (vt->flags & KMALLOC_SLUB) { + readmem(compound_head(page)+OFFSET(page_slab), + KVADDR, &cache, sizeof(void *), + "page.slab", FAULT_ON_ERROR); + } else if (VALID_MEMBER(page_next)) readmem(page+OFFSET(page_next), KVADDR, &cache, sizeof(void *), "page.next", FAULT_ON_ERROR); @@ -6979,7 +7089,9 @@ slab = 0; - if (VALID_MEMBER(page_prev)) + if (vt->flags & KMALLOC_SLUB) + slab = compound_head(page); + else if (VALID_MEMBER(page_prev)) readmem(page+OFFSET(page_prev), KVADDR, &slab, sizeof(void *), "page.prev", FAULT_ON_ERROR); @@ -7002,9 +7114,9 @@ * Initialize any data required for scouring the kmalloc subsystem more * efficiently. */ -char slab_hdr[BUFSIZE] = { 0 }; -char kmem_cache_hdr[BUFSIZE] = { 0 }; -char free_inuse_hdr[BUFSIZE] = { 0 }; +char slab_hdr[100] = { 0 }; +char kmem_cache_hdr[100] = { 0 }; +char free_inuse_hdr[100] = { 0 }; static void kmem_cache_init(void) @@ -7024,11 +7136,18 @@ please_wait("gathering kmem slab cache data"); - if (!strlen(slab_hdr)) - sprintf(slab_hdr, - "SLAB%sMEMORY%sTOTAL ALLOCATED FREE\n", - space(VADDR_PRLEN > 8 ? 14 : 6), - space(VADDR_PRLEN > 8 ? 12 : 4)); + if (!strlen(slab_hdr)) { + if (vt->flags & KMALLOC_SLUB) + sprintf(slab_hdr, + "SLAB%sMEMORY%sNODE TOTAL ALLOCATED FREE\n", + space(VADDR_PRLEN > 8 ? 14 : 6), + space(VADDR_PRLEN > 8 ? 12 : 4)); + else + sprintf(slab_hdr, + "SLAB%sMEMORY%sTOTAL ALLOCATED FREE\n", + space(VADDR_PRLEN > 8 ? 14 : 6), + space(VADDR_PRLEN > 8 ? 12 : 4)); + } if (!strlen(kmem_cache_hdr)) sprintf(kmem_cache_hdr, @@ -7038,6 +7157,11 @@ if (!strlen(free_inuse_hdr)) sprintf(free_inuse_hdr, "FREE / [ALLOCATED]\n"); + if (vt->flags & KMALLOC_SLUB) { + kmem_cache_init_slub(); + return; + } + num_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? OFFSET(kmem_cache_s_num) : OFFSET(kmem_cache_s_c_num); next_offset = vt->flags & (PERCPU_KMALLOC_V1|PERCPU_KMALLOC_V2) ? @@ -7453,10 +7577,12 @@ } else { name = ULONG(si->cache_buf + OFFSET(kmem_cache_s_c_name)); - if (!read_string(name, buf, BUFSIZE-1)) - error(FATAL, + if (!read_string(name, buf, BUFSIZE-1)) { + error(WARNING, "cannot read kmem_cache_s.c_name string at %lx\n", name); + sprintf(buf, "(unknown)"); + } } if (reqname && !STREQ(reqname, buf)) @@ -7651,10 +7777,12 @@ readmem(si->cache+OFFSET(kmem_cache_s_name), KVADDR, &name, sizeof(ulong), "name", FAULT_ON_ERROR); - if (!read_string(name, buf, BUFSIZE-1)) - error(FATAL, + if (!read_string(name, buf, BUFSIZE-1)) { + error(WARNING, "cannot read kmem_cache_s.name string at %lx\n", name); + sprintf(buf, "(unknown)"); + } } if (reqname && !STREQ(reqname, buf)) @@ -7871,10 +7999,12 @@ readmem(si->cache+OFFSET(kmem_cache_s_name), KVADDR, &name, sizeof(ulong), "name", FAULT_ON_ERROR); - if (!read_string(name, buf, BUFSIZE-1)) - error(FATAL, + if (!read_string(name, buf, BUFSIZE-1)) { + error(WARNING, "cannot read kmem_cache_s.name string at %lx\n", name); + sprintf(buf, "(unknown)"); + } } if (reqname && !STREQ(reqname, buf)) @@ -9943,6 +10073,8 @@ ulong vaddr, orig_flags; physaddr_t paddr; ulong offset; + ulong task; + struct task_context *tc; switch (mi->memtype) { @@ -9977,7 +10109,7 @@ if ((mi->memtype == KVADDR) && IS_VMALLOC_ADDR(mi->spec_addr)) { if (kvtop(NULL, mi->spec_addr, &paddr, 0)) { mi->flags = orig_flags; - dump_vmlist(mi); + dump_vmlist(mi); fprintf(fp, "\n"); mi->spec_addr = paddr; mi->memtype = PHYSADDR; @@ -10020,6 +10152,14 @@ vt->dump_kmem_cache(&tmp_meminfo); fprintf(fp, "\n"); } + if ((vaddr != BADADDR) && is_slab_page(mi, buf)) { + BZERO(&tmp_meminfo, sizeof(struct meminfo)); + tmp_meminfo.spec_addr = vaddr; + tmp_meminfo.memtype = KVADDR; + tmp_meminfo.flags = mi->flags; + vt->dump_kmem_cache(&tmp_meminfo); + fprintf(fp, "\n"); + } /* * Check free list. @@ -10041,8 +10181,22 @@ fprintf(fp, "\n"); } + /* + * Check whether it's a current task or stack address. + */ + if ((mi->memtype == KVADDR) && (task = vaddr_in_task_struct(vaddr)) && + (tc = task_to_context(task))) { + show_context(tc); + fprintf(fp, "\n"); + } else if ((mi->memtype == KVADDR) && (task = stkptr_to_task(vaddr)) && + (tc = task_to_context(task))) { + show_context(tc); + fprintf(fp, "\n"); + } + mem_map: mi->flags = orig_flags; + pc->curcmd_flags &= ~HEADER_PRINTED; dump_mem_map(mi); if (!mi->retval) @@ -10286,6 +10440,10 @@ fprintf(fp, "%sPERCPU_KMALLOC_V2_NODES", others++ ? "|" : "");\ if (vt->flags & VM_STAT) fprintf(fp, "%sVM_STAT", others++ ? "|" : "");\ + if (vt->flags & KMALLOC_SLUB) + fprintf(fp, "%sKMALLOC_SLUB", others++ ? "|" : "");\ + if (vt->flags & CONFIG_NUMA) + fprintf(fp, "%sCONFIG_NUMA", others++ ? "|" : "");\ fprintf(fp, ")\n"); if (vt->kernel_pgd[0] == vt->kernel_pgd[1]) @@ -10317,7 +10475,9 @@ fprintf(fp, " kmem_cache_namelen: %d\n", vt->kmem_cache_namelen); fprintf(fp, "kmem_cache_nodelist_len: %ld\n", vt->kmem_cache_len_nodes); fprintf(fp, " PG_reserved: %lx\n", vt->PG_reserved); - fprintf(fp, " PG_slab: %ld\n", vt->PG_slab); + fprintf(fp, " PG_slab: %ld (%lx)\n", vt->PG_slab, + (ulong)1 << vt->PG_slab); + fprintf(fp, " PG_head_tail_mask: %lx\n", vt->PG_head_tail_mask); fprintf(fp, " paddr_prlen: %d\n", vt->paddr_prlen); fprintf(fp, " numnodes: %d\n", vt->numnodes); fprintf(fp, " nr_zones: %d\n", vt->nr_zones); @@ -10353,6 +10513,8 @@ fprintf(fp, "dump_kmem_cache_percpu_v1()\n"); else if (vt->dump_kmem_cache == dump_kmem_cache_percpu_v2) fprintf(fp, "dump_kmem_cache_percpu_v2()\n"); + else if (vt->dump_kmem_cache == dump_kmem_cache_slub) + fprintf(fp, "dump_kmem_cache_slub()\n"); else fprintf(fp, "%lx (unknown)\n", (ulong)vt->dump_kmem_cache); fprintf(fp, " slab_data: %lx\n", (ulong)vt->slab_data); @@ -10362,6 +10524,7 @@ fprintf(fp, " last_swap_read: %lx\n", vt->last_swap_read); fprintf(fp, " swap_info_struct: %lx\n", (ulong)vt->swap_info_struct); fprintf(fp, " mem_sec: %lx\n", (ulong)vt->mem_sec); + fprintf(fp, " mem_section: %lx\n", (ulong)vt->mem_section); fprintf(fp, " ZONE_HIGHMEM: %d\n", vt->ZONE_HIGHMEM); fprintf(fp, "node_online_map_len: %d\n", vt->node_online_map_len); if (vt->node_online_map_len) { @@ -11673,8 +11836,12 @@ } } - if (n != vt->numnodes) - error(FATAL, "numnodes out of sync with pgdat_list?\n"); + if (n != vt->numnodes) { + if (CRASHDEBUG(2)) + error(NOTE, "changing numnodes from %d to %d\n", + vt->numnodes, n); + vt->numnodes = n; + } if (!initialize && IS_SPARSEMEM()) dump_mem_sections(); @@ -11887,22 +12054,22 @@ int l1_cache_size(void) { - ulong cache_cache; + ulong cache; ulong c_align; int colour_off; int retval; - cache_cache = symbol_value("cache_cache"); - retval = -1; if (VALID_MEMBER(kmem_cache_s_c_align)) { - readmem(cache_cache+OFFSET(kmem_cache_s_c_align), + cache = symbol_value("cache_cache"); + readmem(cache+OFFSET(kmem_cache_s_c_align), KVADDR, &c_align, sizeof(ulong), "c_align", FAULT_ON_ERROR); retval = (int)c_align; } else if (VALID_MEMBER(kmem_cache_s_colour_off)) { - readmem(cache_cache+OFFSET(kmem_cache_s_colour_off), + cache = symbol_value("cache_cache"); + readmem(cache+OFFSET(kmem_cache_s_colour_off), KVADDR, &colour_off, sizeof(int), "colour_off", FAULT_ON_ERROR); retval = colour_off; @@ -12044,30 +12211,26 @@ fprintf(fp, "PAGES_PER_SECTION = %ld\n", PAGES_PER_SECTION()); } - if (!(vt->mem_sec = malloc(mem_section_size))) + if (!(vt->mem_sec = (void *)malloc(mem_section_size))) error(FATAL, "cannot malloc mem_sec cache\n"); + if (!(vt->mem_section = (char *)malloc(SIZE(mem_section)))) + error(FATAL, "cannot malloc mem_section cache\n"); addr = symbol_value("mem_section"); readmem(addr, KVADDR,vt->mem_sec ,mem_section_size, "memory section root table", FAULT_ON_ERROR); } -char -*read_mem_section(ulong addr) +char * +read_mem_section(ulong addr) { - static char *mem_section; - - if (!mem_section) { - mem_section = GETBUF(SIZE(mem_section)); - } - if (!IS_KVADDR(addr)) return 0; - readmem(addr, KVADDR, mem_section, SIZE(mem_section), + readmem(addr, KVADDR, vt->mem_section, SIZE(mem_section), "memory section", FAULT_ON_ERROR); - return mem_section; + return vt->mem_section; } ulong @@ -12083,7 +12246,9 @@ addr = mem_sec[SECTION_NR_TO_ROOT(nr)] + (nr & SECTION_ROOT_MASK()) * SIZE(mem_section); else - addr = mem_sec[0] + (nr & SECTION_ROOT_MASK()) * SIZE(mem_section); + addr = symbol_value("mem_section") + + (SECTIONS_PER_ROOT() * SECTION_NR_TO_ROOT(nr) + + (nr & SECTION_ROOT_MASK())) * SIZE(mem_section); if (!IS_KVADDR(addr)) return 0; @@ -12253,8 +12418,12 @@ if (!symbol_exists("node_online_map")) return 0; - len = get_symbol_type("node_online_map", NULL, &req) == TYPE_CODE_UNDEF ? - sizeof(ulong) : req.length; + if (LKCD_KERNTYPES()) { + if ((len = STRUCT_SIZE("nodemask_t")) < 0) + error(FATAL, "cannot determine type nodemask_t\n"); + } else + len = get_symbol_type("node_online_map", NULL, &req) + == TYPE_CODE_UNDEF ? sizeof(ulong) : req.length; if (!(vt->node_online_map = (ulong *)malloc(len))) error(FATAL, "cannot malloc node_online_map\n"); @@ -12323,27 +12492,36 @@ /* * Default -- look for type: struct pglist_data node_data[] */ - if (get_symbol_type("node_data", NULL, NULL) != TYPE_CODE_ARRAY) - goto pgdat2; + if (LKCD_KERNTYPES()) { + if (!kernel_symbol_exists("node_data")) + goto pgdat2; + /* + * Just index into node_data[] without checking that it is + * an array; kerntypes have no such symbol information. + */ + } else { + if (get_symbol_type("node_data", NULL, NULL) != TYPE_CODE_ARRAY) + goto pgdat2; - open_tmpfile(); - sprintf(buf, "whatis node_data"); - if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { - close_tmpfile(); - goto pgdat2; - } - rewind(pc->tmpfile); - while (fgets(buf, BUFSIZE, pc->tmpfile)) { - if (STRNEQ(buf, "type = ")) - break; - } - close_tmpfile(); + open_tmpfile(); + sprintf(buf, "whatis node_data"); + if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { + close_tmpfile(); + goto pgdat2; + } + rewind(pc->tmpfile); + while (fgets(buf, BUFSIZE, pc->tmpfile)) { + if (STRNEQ(buf, "type = ")) + break; + } + close_tmpfile(); - if ((!strstr(buf, "struct pglist_data *") && - !strstr(buf, "pg_data_t *")) || - (count_chars(buf, '[') != 1) || - (count_chars(buf, ']') != 1)) - goto pgdat2; + if ((!strstr(buf, "struct pglist_data *") && + !strstr(buf, "pg_data_t *")) || + (count_chars(buf, '[') != 1) || + (count_chars(buf, ']') != 1)) + goto pgdat2; + } if (!readmem(symbol_value("node_data") + (node * sizeof(void *)), KVADDR, &pgdat, sizeof(void *), "node_data", RETURN_ON_ERROR) || @@ -12353,27 +12531,32 @@ return pgdat; pgdat2: - if (get_symbol_type("pgdat_list", NULL, NULL) != TYPE_CODE_ARRAY) - goto pgdat3; + if (LKCD_KERNTYPES()) { + if (!kernel_symbol_exists("pgdat_list")) + goto pgdat3; + } else { + if (get_symbol_type("pgdat_list",NULL,NULL) != TYPE_CODE_ARRAY) + goto pgdat3; - open_tmpfile(); - sprintf(buf, "whatis pgdat_list"); - if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { - close_tmpfile(); - goto pgdat3; - } - rewind(pc->tmpfile); - while (fgets(buf, BUFSIZE, pc->tmpfile)) { - if (STRNEQ(buf, "type = ")) - break; - } - close_tmpfile(); + open_tmpfile(); + sprintf(buf, "whatis pgdat_list"); + if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { + close_tmpfile(); + goto pgdat3; + } + rewind(pc->tmpfile); + while (fgets(buf, BUFSIZE, pc->tmpfile)) { + if (STRNEQ(buf, "type = ")) + break; + } + close_tmpfile(); - if ((!strstr(buf, "struct pglist_data *") && - !strstr(buf, "pg_data_t *")) || - (count_chars(buf, '[') != 1) || - (count_chars(buf, ']') != 1)) - goto pgdat3; + if ((!strstr(buf, "struct pglist_data *") && + !strstr(buf, "pg_data_t *")) || + (count_chars(buf, '[') != 1) || + (count_chars(buf, ']') != 1)) + goto pgdat3; + } if (!readmem(symbol_value("pgdat_list") + (node * sizeof(void *)), KVADDR, &pgdat, sizeof(void *), "pgdat_list", RETURN_ON_ERROR) || @@ -12410,27 +12593,36 @@ /* * look for type: type = atomic_long_t [] */ - if (!symbol_exists("vm_stat") || - get_symbol_type("vm_stat", NULL, NULL) != TYPE_CODE_ARRAY) - goto bailout; - - open_tmpfile(); - sprintf(buf, "whatis vm_stat"); - if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { - close_tmpfile(); - goto bailout; - } - rewind(pc->tmpfile); - while (fgets(buf, BUFSIZE, pc->tmpfile)) { - if (STRNEQ(buf, "type = ")) - break; - } - close_tmpfile(); + if (LKCD_KERNTYPES()) { + if (!symbol_exists("vm_stat")) + goto bailout; + /* + * Just assume that vm_stat is an array; there is + * no symbol info in a kerntypes file. + */ + } else { + if (!symbol_exists("vm_stat") || + get_symbol_type("vm_stat", NULL, NULL) != TYPE_CODE_ARRAY) + goto bailout; + + open_tmpfile(); + sprintf(buf, "whatis vm_stat"); + if (!gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { + close_tmpfile(); + goto bailout; + } + rewind(pc->tmpfile); + while (fgets(buf, BUFSIZE, pc->tmpfile)) { + if (STRNEQ(buf, "type = ")) + break; + } + close_tmpfile(); - if (!strstr(buf, "atomic_long_t") || - (count_chars(buf, '[') != 1) || - (count_chars(buf, ']') != 1)) - goto bailout; + if (!strstr(buf, "atomic_long_t") || + (count_chars(buf, '[') != 1) || + (count_chars(buf, ']') != 1)) + goto bailout; + } open_tmpfile(); req = (struct gnu_request *)GETBUF(sizeof(struct gnu_request)); @@ -12514,7 +12706,7 @@ if (!item) { vp = (ulong *)buf; for (i = 0; i < vt->nr_vm_stat_items; i++) - fprintf(fp, "%20s: %ld\n", vt->vm_stat_items[i], vp[i]); + fprintf(fp, "%21s: %ld\n", vt->vm_stat_items[i], vp[i]); return TRUE; } @@ -12528,3 +12720,783 @@ return FALSE; } + +/* + * Support for slub.c slab cache. + */ +static void +kmem_cache_init_slub(void) +{ + if (CRASHDEBUG(1) && + !(vt->flags & CONFIG_NUMA) && (vt->numnodes > 1)) + error(WARNING, + "kmem_cache_init_slub: numnodes: %d without CONFIG_NUMA\n", + vt->numnodes); + + vt->flags |= KMEM_CACHE_INIT; +} + +static void +kmem_cache_list_slub(void) +{ + int i, cnt; + ulong *cache_list; + ulong name; + char *cache_buf; + char buf[BUFSIZE]; + + cnt = get_kmem_cache_list(&cache_list); + cache_buf = GETBUF(SIZE(kmem_cache)); + + for (i = 0; i < cnt; i++) { + fprintf(fp, "%lx ", cache_list[i]); + + readmem(cache_list[i], KVADDR, cache_buf, + SIZE(kmem_cache), "kmem_cache buffer", + FAULT_ON_ERROR); + + name = ULONG(cache_buf + OFFSET(kmem_cache_name)); + if (!read_string(name, buf, BUFSIZE-1)) + sprintf(buf, "(unknown)\n"); + + fprintf(fp, "%s\n", buf); + } + + FREEBUF(cache_list); + FREEBUF(cache_buf); +} + +#define DUMP_KMEM_CACHE_INFO_SLUB() dump_kmem_cache_info_slub(si) + +static void +dump_kmem_cache_info_slub(struct meminfo *si) +{ + char b1[BUFSIZE]; + char b2[BUFSIZE]; + int namelen, sizelen, spacelen; + + fprintf(fp, "%s ", + mkstring(b1, VADDR_PRLEN, LJUST|LONG_HEX, MKSTR(si->cache))); + + namelen = strlen(si->curname); + sprintf(b2, "%ld", si->objsize); + sizelen = strlen(b2); + spacelen = 0; + + if (namelen++ > 18) { + spacelen = 29 - namelen - sizelen; + fprintf(fp, "%s%s%ld ", si->curname, + space(spacelen <= 0 ? 1 : spacelen), si->objsize); + if (spacelen > 0) + spacelen = 1; + sprintf(b1, "%c%dld ", '%', 9 + spacelen - 1); + } else { + fprintf(fp, "%-18s %8ld ", si->curname, si->objsize); + sprintf(b1, "%c%dld ", '%', 9); + } + + fprintf(fp, b1, si->inuse); + + fprintf(fp, "%8ld %5ld %4ldk\n", + si->num_slabs * si->objects, + si->num_slabs, si->slabsize/1024); +} + +static void +dump_kmem_cache_slub(struct meminfo *si) +{ + int i; + ulong name; + unsigned int size, objsize, objects, order, offset; + char *reqname, *p1; + char kbuf[BUFSIZE]; + char buf[BUFSIZE]; + + si->cache_count = get_kmem_cache_list(&si->cache_list); + si->cache_buf = GETBUF(SIZE(kmem_cache)); + + if (!si->reqname && + !(si->flags & (ADDRESS_SPECIFIED|GET_SLAB_PAGES))) + fprintf(fp, kmem_cache_hdr); + + if (si->flags & ADDRESS_SPECIFIED) { + if ((p1 = is_slab_page(si, kbuf))) { + si->flags |= VERBOSE; + si->slab = (ulong)si->spec_addr; + } else if (!(p1 = vaddr_to_kmem_cache(si->spec_addr, kbuf))) { + error(INFO, + "address is not allocated in slab subsystem: %lx\n", + si->spec_addr); + goto bailout; + } + + if (si->reqname && (si->reqname != p1)) + error(INFO, + "ignoring pre-selected %s cache for address: %lx\n", + si->reqname, si->spec_addr, si->reqname); + reqname = p1; + } else + reqname = si->reqname; + + for (i = 0; i < si->cache_count; i++) { + if (!readmem(si->cache_list[i], KVADDR, si->cache_buf, + SIZE(kmem_cache), "kmem_cache buffer", RETURN_ON_ERROR)) + goto next_cache; + + name = ULONG(si->cache_buf + OFFSET(kmem_cache_name)); + if (!read_string(name, buf, BUFSIZE-1)) + sprintf(buf, "(unknown)"); + if (reqname) { + if (!STREQ(reqname, buf)) + continue; + fprintf(fp, kmem_cache_hdr); + } + if (ignore_cache(si, buf)) { + fprintf(fp, "%lx %-18s [IGNORED]\n", + si->cache_list[i], buf); + goto next_cache; + } + + objsize = UINT(si->cache_buf + OFFSET(kmem_cache_objsize)); + size = UINT(si->cache_buf + OFFSET(kmem_cache_size)); + objects = UINT(si->cache_buf + OFFSET(kmem_cache_objects)); + order = UINT(si->cache_buf + OFFSET(kmem_cache_order)); + offset = UINT(si->cache_buf + OFFSET(kmem_cache_offset)); + + si->cache = si->cache_list[i]; + si->curname = buf; + si->objsize = objsize; + si->size = size; + si->objects = objects; + si->slabsize = (PAGESIZE() << order); + si->inuse = si->num_slabs = 0; + si->slab_offset = offset; + if (!get_kmem_cache_slub_data(GET_SLUB_SLABS, si) || + !get_kmem_cache_slub_data(GET_SLUB_OBJECTS, si)) + goto next_cache; + + DUMP_KMEM_CACHE_INFO_SLUB(); + + if (si->flags & ADDRESS_SPECIFIED) { + if (!si->slab) + si->slab = vaddr_to_slab(si->spec_addr); + do_slab_slub(si, VERBOSE); + } else if (si->flags & VERBOSE) { + do_kmem_cache_slub(si); + if (!reqname && ((i+1) < si->cache_count)) + fprintf(fp, kmem_cache_hdr); + } + +next_cache: + if (reqname) + break; + } + +bailout: + FREEBUF(si->cache_list); + FREEBUF(si->cache_buf); +} + +/* + * Emulate the total count calculation done by the + * slab_objects() sysfs function in slub.c. + */ +static int +get_kmem_cache_slub_data(long cmd, struct meminfo *si) +{ + int i, n, node; + ulong total_objects, total_slabs; + ulong cpu_slab_ptr, node_ptr; + ulong node_nr_partial, node_nr_slabs; + int full_slabs, objects; + long p; + short inuse; + ulong *nodes, *per_cpu; + + /* + * nodes[n] is not being used (for now) + * per_cpu[n] is a count of cpu_slab pages per node. + */ + nodes = (ulong *)GETBUF(2 * sizeof(ulong) * vt->numnodes); + per_cpu = nodes + vt->numnodes; + + total_slabs = total_objects = 0; + + for (i = 0; i < kt->cpus; i++) { + cpu_slab_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_cpu_slab) + (sizeof(void *)*i)); + if (!cpu_slab_ptr) + continue; + + if ((node = page_to_nid(cpu_slab_ptr)) < 0) + goto bailout; + + switch (cmd) + { + case GET_SLUB_OBJECTS: + if (!readmem(cpu_slab_ptr + OFFSET(page_inuse), + KVADDR, &inuse, sizeof(short), + "page inuse", RETURN_ON_ERROR)) + return FALSE; + total_objects += inuse; + break; + + case GET_SLUB_SLABS: + total_slabs++; + break; + } + per_cpu[node]++; + } + + for (n = 0; n < vt->numnodes; n++) { + if (vt->flags & CONFIG_NUMA) + node_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_node) + + (sizeof(void *)*n)); + else + node_ptr = si->cache + + OFFSET(kmem_cache_local_node); + + if (!readmem(node_ptr + OFFSET(kmem_cache_node_nr_partial), + KVADDR, &node_nr_partial, sizeof(ulong), + "kmem_cache_node nr_partial", RETURN_ON_ERROR)) + goto bailout; + if (!readmem(node_ptr + OFFSET(kmem_cache_node_nr_slabs), + KVADDR, &node_nr_slabs, sizeof(ulong), + "kmem_cache_node nr_slabs", RETURN_ON_ERROR)) + goto bailout; + + switch (cmd) + { + case GET_SLUB_OBJECTS: + if ((p = count_partial(node_ptr)) < 0) + return FALSE; + total_objects += p; + break; + + case GET_SLUB_SLABS: + total_slabs += node_nr_partial; + break; + } + + full_slabs = node_nr_slabs - per_cpu[n] - node_nr_partial; + objects = INT(si->cache_buf + OFFSET(kmem_cache_objects)); + + switch (cmd) + { + case GET_SLUB_OBJECTS: + total_objects += (full_slabs * objects); + break; + + case GET_SLUB_SLABS: + total_slabs += full_slabs; + break; + } + + if (!(vt->flags & CONFIG_NUMA)) + break; + } + + switch (cmd) + { + case GET_SLUB_OBJECTS: + si->inuse = total_objects; + break; + + case GET_SLUB_SLABS: + si->num_slabs = total_slabs; + break; + } + + FREEBUF(nodes); + return TRUE; + +bailout: + FREEBUF(nodes); + return FALSE; +} + + +static void +do_kmem_cache_slub(struct meminfo *si) +{ + int i, n; + ulong cpu_slab_ptr, node_ptr; + ulong node_nr_partial, node_nr_slabs; + ulong *per_cpu; + + per_cpu = (ulong *)GETBUF(sizeof(ulong) * vt->numnodes); + + for (i = 0; i < kt->cpus; i++) { + cpu_slab_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_cpu_slab) + (sizeof(void *)*i)); + + fprintf(fp, "CPU %d SLAB:\n%s", i, + cpu_slab_ptr ? "" : " (empty)\n"); + + if (!cpu_slab_ptr) + continue; + + if ((n = page_to_nid(cpu_slab_ptr)) >= 0) + per_cpu[n]++; + + si->slab = cpu_slab_ptr; + do_slab_slub(si, VERBOSE); + + if (received_SIGINT()) + restart(0); + } + + for (n = 0; n < vt->numnodes; n++) { + if (vt->flags & CONFIG_NUMA) + node_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_node) + + (sizeof(void *)*n)); + else + node_ptr = si->cache + + OFFSET(kmem_cache_local_node); + + if (!readmem(node_ptr + OFFSET(kmem_cache_node_nr_partial), + KVADDR, &node_nr_partial, sizeof(ulong), + "kmem_cache_node nr_partial", RETURN_ON_ERROR)) + break; + if (!readmem(node_ptr + OFFSET(kmem_cache_node_nr_slabs), + KVADDR, &node_nr_slabs, sizeof(ulong), + "kmem_cache_node nr_slabs", RETURN_ON_ERROR)) + break; + + fprintf(fp, "KMEM_CACHE_NODE NODE SLABS PARTIAL PER-CPU\n"); + + fprintf(fp, "%lx%s", node_ptr, space(VADDR_PRLEN > 8 ? 2 : 10)); + fprintf(fp, "%4d %5ld %7ld %7ld\n", + n, node_nr_slabs, node_nr_partial, per_cpu[n]); + + do_node_lists_slub(si, node_ptr, n); + + if (!(vt->flags & CONFIG_NUMA)) + break; + } + + fprintf(fp, "\n"); + + FREEBUF(per_cpu); +} + +#define DUMP_SLAB_INFO_SLUB() \ + { \ + char b1[BUFSIZE], b2[BUFSIZE]; \ + fprintf(fp, " %s %s %4d %5ld %9d %4ld\n", \ + mkstring(b1, VADDR_PRLEN, LJUST|LONG_HEX, MKSTR(si->slab)), \ + mkstring(b2, VADDR_PRLEN, LJUST|LONG_HEX, MKSTR(vaddr)), \ + node, si->objects, inuse, si->objects - inuse); \ + } + +static void +do_slab_slub(struct meminfo *si, int verbose) +{ + physaddr_t paddr; + ulong vaddr; + ushort inuse; + ulong freelist, lockless_freelist, cpu_slab_ptr; + int i, cpu_slab, is_free, node; + ulong p, q; + + if (!si->slab) { + if (CRASHDEBUG(1)) + error(INFO, "-S option not supported for CONFIG_SLUB\n"); + return; + } + + if (!page_to_phys(si->slab, &paddr)) { + error(WARNING, + "%lx: cannot tranlate slab page to physical address\n", + si->slab); + return; + } + node = page_to_nid(si->slab); + + vaddr = PTOV(paddr); + + if (verbose) + fprintf(fp, " %s", slab_hdr); + + if (!readmem(si->slab + OFFSET(page_inuse), KVADDR, &inuse, + sizeof(ushort), "page.inuse", RETURN_ON_ERROR)) + return; + if (!readmem(si->slab + OFFSET(page_freelist), KVADDR, &freelist, + sizeof(void *), "page.freelist", RETURN_ON_ERROR)) + return; + if (!readmem(si->slab + OFFSET(page_lockless_freelist), KVADDR, + &lockless_freelist, sizeof(void *), "page.lockless_freelist", + RETURN_ON_ERROR)) + return; + + DUMP_SLAB_INFO_SLUB(); + + if (!verbose) + return; + + for (i = 0, cpu_slab = -1; i < kt->cpus; i++) { + cpu_slab_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_cpu_slab) + (sizeof(void *)*i)); + if (!cpu_slab_ptr) + continue; + if (cpu_slab_ptr == si->slab) { + cpu_slab = i; + break; + } + } + + fprintf(fp, " %s", free_inuse_hdr); + + for (p = vaddr; p < vaddr + si->objects * si->size; p += si->size) { + is_free = FALSE; + for (is_free = 0, q = freelist; q; + q = get_freepointer(si, (void *)q)) { + if (q == BADADDR) + return; + if (p == q) { + is_free = TRUE; + break; + } + } + + if (si->flags & ADDRESS_SPECIFIED) { + if ((si->spec_addr < p) || + (si->spec_addr >= (p + si->size))) { + if (!(si->flags & VERBOSE)) + continue; + } + } + + fprintf(fp, " %s%lx%s", + is_free ? " " : "[", + p, is_free ? " " : "]"); + if (is_free && (cpu_slab >= 0)) + fprintf(fp, "(cpu %d cache)", cpu_slab); + fprintf(fp, "\n"); + + } +} + +static ulong +get_freepointer(struct meminfo *si, void *object) +{ + ulong vaddr, nextfree; + + vaddr = (ulong)(object + si->slab_offset); + if (!readmem(vaddr, KVADDR, &nextfree, + sizeof(void *), "get_freepointer", RETURN_ON_ERROR)) + return BADADDR; + + return nextfree; +} + +static void +do_node_lists_slub(struct meminfo *si, ulong node_ptr, int node) +{ + ulong next, list_head; + int first; + + list_head = node_ptr + OFFSET(kmem_cache_node_partial); + if (!readmem(list_head, KVADDR, &next, sizeof(ulong), + "kmem_cache_node partial", RETURN_ON_ERROR)) + return; + + fprintf(fp, "NODE %d PARTIAL:\n%s", node, + next == list_head ? " (empty)\n" : ""); + first = 0; + while (next != list_head) { + si->slab = next - OFFSET(page_lru); + if (first++ == 0) + fprintf(fp, " %s", slab_hdr); + do_slab_slub(si, !VERBOSE); + + if (received_SIGINT()) + restart(0); + + if (!readmem(next, KVADDR, &next, sizeof(ulong), + "page.lru.next", RETURN_ON_ERROR)) + return; + } + + if (INVALID_MEMBER(kmem_cache_node_full)) { + fprintf(fp, "NODE %d FULL:\n (not tracked)\n", node); + return; + } + + list_head = node_ptr + OFFSET(kmem_cache_node_full); + if (!readmem(list_head, KVADDR, &next, sizeof(ulong), + "kmem_cache_node full", RETURN_ON_ERROR)) + return; + + fprintf(fp, "NODE %d FULL:\n%s", node, + next == list_head ? " (empty)\n" : ""); + first = 0; + while (next != list_head) { + si->slab = next - OFFSET(page_lru); + if (first++ == 0) + fprintf(fp, " %s", slab_hdr); + do_slab_slub(si, !VERBOSE); + + if (received_SIGINT()) + restart(0); + + if (!readmem(next, KVADDR, &next, sizeof(ulong), + "page.lru.next", RETURN_ON_ERROR)) + return; + } +} + + +static char * +is_kmem_cache_addr_slub(ulong vaddr, char *kbuf) +{ + int i, cnt; + ulong *cache_list; + ulong name; + char *cache_buf; + int found; + + cnt = get_kmem_cache_list(&cache_list); + cache_buf = GETBUF(SIZE(kmem_cache)); + + for (i = 0, found = FALSE; i < cnt; i++) { + if (cache_list[i] != vaddr) + continue; + + if (!readmem(cache_list[i], KVADDR, cache_buf, + SIZE(kmem_cache), "kmem_cache buffer", + RETURN_ON_ERROR)) + break; + + name = ULONG(cache_buf + OFFSET(kmem_cache_name)); + if (!read_string(name, kbuf, BUFSIZE-1)) + sprintf(kbuf, "(unknown)"); + + found = TRUE; + break; + } + + FREEBUF(cache_list); + FREEBUF(cache_buf); + + return (found ? kbuf : NULL); +} + +/* + * Kernel-config-neutral page-to-node evaluator. + */ +static int +page_to_nid(ulong page) +{ + int i; + physaddr_t paddr; + struct node_table *nt; + physaddr_t end_paddr; + + if (!page_to_phys(page, &paddr)) { + error(INFO, "page_to_nid: invalid page: %lx\n", page); + return -1; + } + + for (i = 0; i < vt->numnodes; i++) { + nt = &vt->node_table[i]; + + end_paddr = nt->start_paddr + + ((physaddr_t)nt->size * (physaddr_t)PAGESIZE()); + + if ((paddr >= nt->start_paddr) && (paddr < end_paddr)) + return i; + } + + error(INFO, "page_to_nid: cannot determine node for pages: %lx\n", + page); + + return -1; +} + +/* + * Allocate and fill the passed-in buffer with a list of + * the current kmem_cache structures. + */ +static int +get_kmem_cache_list(ulong **cache_buf) +{ + int cnt; + ulong vaddr; + struct list_data list_data, *ld; + + get_symbol_data("slab_caches", sizeof(void *), &vaddr); + + ld = &list_data; + BZERO(ld, sizeof(struct list_data)); + ld->start = vaddr; + ld->list_head_offset = OFFSET(kmem_cache_list); + ld->end = symbol_value("slab_caches"); + if (CRASHDEBUG(3)) + ld->flags |= VERBOSE; + + hq_open(); + cnt = do_list(ld); + *cache_buf = (ulong *)GETBUF(cnt * sizeof(ulong)); + cnt = retrieve_list(*cache_buf, cnt); + hq_close(); + + return cnt; +} + + +/* + * Get the address of the head page of a compound page. + */ +static ulong +compound_head(ulong page) +{ + ulong flags, first_page;; + + first_page = page; + + if (!readmem(page+OFFSET(page_flags), KVADDR, &flags, sizeof(ulong), + "page.flags", RETURN_ON_ERROR)) + return first_page; + + if ((flags & vt->PG_head_tail_mask) == vt->PG_head_tail_mask) + readmem(page+OFFSET(page_first_page), KVADDR, &first_page, + sizeof(ulong), "page.first_page", RETURN_ON_ERROR); + + return first_page; +} + +long +count_partial(ulong node) +{ + ulong list_head, next; + short inuse; + ulong total_inuse; + + total_inuse = 0; + list_head = node + OFFSET(kmem_cache_node_partial); + if (!readmem(list_head, KVADDR, &next, sizeof(ulong), + "kmem_cache_node.partial", RETURN_ON_ERROR)) + return -1; + + while (next != list_head) { + if (!readmem(next - OFFSET(page_lru) + OFFSET(page_inuse), KVADDR, &inuse, + sizeof(ushort), "page.inuse", RETURN_ON_ERROR)) + return -1; + total_inuse += inuse; + if (!readmem(next, KVADDR, &next, sizeof(ulong), + "page.lru.next", RETURN_ON_ERROR)) + return -1; + } + return total_inuse; +} + +char * +is_slab_page(struct meminfo *si, char *buf) +{ + int i, cnt; + ulong page_slab, page_flags, name; + ulong *cache_list; + char *cache_buf, *retval; + + if (!(vt->flags & KMALLOC_SLUB)) + return NULL; + + if (!is_page_ptr((ulong)si->spec_addr, NULL)) + return NULL; + + if (!readmem(si->spec_addr + OFFSET(page_flags), KVADDR, + &page_flags, sizeof(ulong), "page.flags", + RETURN_ON_ERROR|QUIET)) + return NULL; + + if (!(page_flags & vt->PG_slab)) + return NULL; + + if (!readmem(si->spec_addr + OFFSET(page_slab), KVADDR, + &page_slab, sizeof(ulong), "page.slab", + RETURN_ON_ERROR|QUIET)) + return NULL; + + retval = NULL; + cnt = get_kmem_cache_list(&cache_list); + cache_buf = GETBUF(SIZE(kmem_cache)); + + for (i = 0; i < cnt; i++) { + if (page_slab == cache_list[i]) { + if (!readmem(cache_list[i], KVADDR, cache_buf, + SIZE(kmem_cache), "kmem_cache buffer", + QUIET|RETURN_ON_ERROR)) + goto bailout; + + name = ULONG(cache_buf + OFFSET(kmem_cache_name)); + if (!read_string(name, buf, BUFSIZE-1)) + goto bailout; + + retval = buf; + break; + } + } + +bailout: + FREEBUF(cache_list); + FREEBUF(cache_buf); + + return retval; +} + +#ifdef NOT_USED +ulong +slab_to_kmem_cache_node(struct meminfo *si, ulong slab_page) +{ + int node; + ulong node_ptr; + + if (vt->flags & CONFIG_NUMA) { + node = page_to_nid(slab_page); + node_ptr = ULONG(si->cache_buf + + OFFSET(kmem_cache_node) + + (sizeof(void *)*node)); + } else + node_ptr = si->cache + OFFSET(kmem_cache_local_node); + + return node_ptr; +} + +ulong +get_kmem_cache_by_name(char *request) +{ + int i, cnt; + ulong *cache_list; + ulong name; + char *cache_buf; + char buf[BUFSIZE]; + ulong found; + + cnt = get_kmem_cache_list(&cache_list); + cache_buf = GETBUF(SIZE(kmem_cache)); + found = 0; + + for (i = 0; i < cnt; i++) { + readmem(cache_list[i], KVADDR, cache_buf, + SIZE(kmem_cache), "kmem_cache buffer", + FAULT_ON_ERROR); + + name = ULONG(cache_buf + OFFSET(kmem_cache_name)); + if (!read_string(name, buf, BUFSIZE-1)) + continue; + + if (STREQ(buf, request)) { + found = cache_list[i]; + break; + } + } + + FREEBUF(cache_list); + FREEBUF(cache_buf); + + return found; +} +#endif /* NOT_USED */ diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/netdump.c /tmp/e3X06Fy51n/crash-4.0-4.9/netdump.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/netdump.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/netdump.c 2007-11-19 15:01:37.000000000 -0600 @@ -13,6 +13,8 @@ * Author: David Anderson */ +#define _LARGEFILE64_SOURCE 1 /* stat64() */ + #include "defs.h" #include "netdump.h" @@ -28,6 +30,7 @@ static size_t dump_Elf64_Nhdr(Elf64_Off offset, int); static void get_netdump_regs_ppc64(struct bt_info *, ulong *, ulong *); static physaddr_t xen_kdump_p2m(physaddr_t); +static void check_dumpfile_size(char *); #define ELFSTORE 1 #define ELFREAD 0 @@ -275,6 +278,85 @@ } /* + * Return the e_version number of an ELF file + * (or -1 if its not readable ELF file) + */ +int +file_elf_version(char *file) +{ + int fd, size; + Elf32_Ehdr *elf32; + Elf64_Ehdr *elf64; + char header[MIN_NETDUMP_ELF_HEADER_SIZE]; + char buf[BUFSIZE]; + + if ((fd = open(file, O_RDONLY)) < 0) { + sprintf(buf, "%s: open", file); + perror(buf); + return -1; + } + + size = MIN_NETDUMP_ELF_HEADER_SIZE; + if (read(fd, header, size) != size) { + sprintf(buf, "%s: read", file); + perror(buf); + close(fd); + return -1; + } + close(fd); + + elf32 = (Elf32_Ehdr *)&header[0]; + elf64 = (Elf64_Ehdr *)&header[0]; + + if (STRNEQ(elf32->e_ident, ELFMAG) && + (elf32->e_ident[EI_CLASS] == ELFCLASS32) && + (elf32->e_ident[EI_DATA] == ELFDATA2LSB) && + (elf32->e_ident[EI_VERSION] == EV_CURRENT)) { + return (elf32->e_version); + } else if (STRNEQ(elf64->e_ident, ELFMAG) && + (elf64->e_ident[EI_CLASS] == ELFCLASS64) && + (elf64->e_ident[EI_VERSION] == EV_CURRENT)) { + return (elf64->e_version); + } + + return -1; +} + +/* + * Check whether any PT_LOAD segment goes beyond the file size. + */ +static void +check_dumpfile_size(char *file) +{ + int i; + struct stat64 stat; + struct pt_load_segment *pls; + uint64_t segment_end; + + if (stat64(file, &stat) < 0) + return; + + for (i = 0; i < nd->num_pt_load_segments; i++) { + pls = &nd->pt_load_segments[i]; + + segment_end = pls->file_offset + + (pls->phys_end - pls->phys_start); + + if (segment_end > stat.st_size) { + error(WARNING, "%s: may be truncated or incomplete\n" + " PT_LOAD p_offset: %lld\n" + " p_filesz: %lld\n" + " bytes required: %lld\n" + " dumpfile size: %lld\n\n", + file, pls->file_offset, + pls->phys_end - pls->phys_start, + segment_end, stat.st_size); + return; + } + } +} + +/* * Perform any post-dumpfile determination stuff here. */ int @@ -284,6 +366,9 @@ return FALSE; nd->ofp = fptr; + + check_dumpfile_size(pc->dumpfile); + return TRUE; } @@ -755,11 +840,13 @@ nd->xen_kdump_data->cr3); netdump_print(" last_mfn_read: %lx\n", nd->xen_kdump_data->last_mfn_read); + netdump_print(" last_pmd_read: %lx\n", + nd->xen_kdump_data->last_pmd_read); netdump_print(" page: %lx\n", nd->xen_kdump_data->page); - netdump_print(" accesses: %lx\n", + netdump_print(" accesses: %ld\n", nd->xen_kdump_data->accesses); - netdump_print(" cache_hits: %lx ", + netdump_print(" cache_hits: %ld ", nd->xen_kdump_data->cache_hits); if (nd->xen_kdump_data->accesses) netdump_print("(%ld%%)", @@ -1386,7 +1473,8 @@ if (store) { pc->flags |= XEN_CORE; nd->xen_kdump_data = &xen_kdump_data; - nd->xen_kdump_data->last_mfn_read = BADVAL; + nd->xen_kdump_data->last_mfn_read = UNINITIALIZED; + nd->xen_kdump_data->last_pmd_read = UNINITIALIZED; if ((note->n_type == NT_XEN_KDUMP_CR3) && ((note->n_descsz/sizeof(ulong)) == 1)) { @@ -1574,7 +1662,8 @@ if (store) { pc->flags |= XEN_CORE; nd->xen_kdump_data = &xen_kdump_data; - nd->xen_kdump_data->last_mfn_read = BADVAL; + nd->xen_kdump_data->last_mfn_read = UNINITIALIZED; + nd->xen_kdump_data->last_pmd_read = UNINITIALIZED; if ((note->n_type == NT_XEN_KDUMP_CR3) && ((note->n_descsz/sizeof(ulong)) == 1)) { @@ -1708,7 +1797,6 @@ unsigned long fs_base, gs_base; unsigned long ds,es,fs,gs; }; -#define offsetof(TYPE, MEMBER) ((ulong)&((TYPE *)0)->MEMBER) void get_netdump_regs_x86_64(struct bt_info *bt, ulong *ripp, ulong *rspp) @@ -2091,11 +2179,17 @@ if (pc->curcmd_flags & XEN_MACHINE_ADDR) return pseudo; +#ifdef IA64 + return ia64_xen_kdump_p2m(xkd, pseudo); +#endif + xkd->accesses++; pfn = (ulong)BTOP(pseudo); mfn_idx = pfn / (PAGESIZE()/sizeof(ulong)); frame_idx = pfn % (PAGESIZE()/sizeof(ulong)); + if (mfn_idx >= xkd->p2m_frames) + return P2M_FAILURE; mfn_frame = xkd->p2m_mfn_frame_list[mfn_idx]; if (mfn_frame == xkd->last_mfn_read) @@ -2150,3 +2244,24 @@ } else error(WARNING, "invalid p2m_mfn argument: %s\n", arg); } + +/* + * Fujitsu dom0/HV sadump-generated dumpfile, which requires + * the --p2m_mfn command line argument. + */ +int +is_sadump_xen(void) +{ + if (xen_kdump_data.p2m_mfn) { + if (!XEN_CORE_DUMPFILE()) { + pc->flags |= XEN_CORE; + nd->xen_kdump_data = &xen_kdump_data; + nd->xen_kdump_data->last_mfn_read = UNINITIALIZED; + nd->xen_kdump_data->last_pmd_read = UNINITIALIZED; + nd->xen_kdump_data->flags |= KDUMP_MFN_LIST; + } + return TRUE; + } + + return FALSE; +} diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/netdump.h /tmp/e3X06Fy51n/crash-4.0-4.9/netdump.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/netdump.h 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/netdump.h 2007-11-19 15:01:37.000000000 -0600 @@ -104,6 +104,7 @@ ulong p2m_mfn; char *page; ulong last_mfn_read; + ulong last_pmd_read; ulong cache_hits; ulong accesses; int p2m_frames; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/ppc64.c /tmp/e3X06Fy51n/crash-4.0-4.9/ppc64.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/ppc64.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/ppc64.c 2007-11-19 15:01:37.000000000 -0600 @@ -160,7 +160,8 @@ m->l2_index_size = PMD_INDEX_SIZE_L4_64K; m->l3_index_size = PUD_INDEX_SIZE_L4_64K; m->l4_index_size = PGD_INDEX_SIZE_L4_64K; - m->pte_shift = PTE_SHIFT_L4_64K; + m->pte_shift = symbol_exists("demote_segment_4k") ? + PTE_SHIFT_L4_64K_V2 : PTE_SHIFT_L4_64K_V1; m->l2_masked_bits = PMD_MASKED_BITS_64K; } else { /* 4K pagesize */ @@ -305,7 +306,7 @@ void ppc64_dump_machdep_table(ulong arg) { - int others; + int i, c, others; others = 0; fprintf(fp, " flags: %lx (", machdep->flags); @@ -368,10 +369,41 @@ fprintf(fp, " max_physmem_bits: %ld\n", machdep->max_physmem_bits); fprintf(fp, " sections_per_root: %ld\n", machdep->sections_per_root); fprintf(fp, " machspec: %lx\n", (ulong)machdep->machspec); - fprintf(fp, " pgd_index_size: %d\n", machdep->machspec->l4_index_size); - fprintf(fp, " pud_index_size: %d\n", machdep->machspec->l3_index_size); - fprintf(fp, " pmd_index_size: %d\n", machdep->machspec->l2_index_size); - fprintf(fp, " pte_index_size: %d\n", machdep->machspec->l1_index_size); + fprintf(fp, " hwintrstack[%d]: ", NR_CPUS); + for (c = 0; c < NR_CPUS; c++) { + for (others = 0, i = c; i < NR_CPUS; i++) { + if (machdep->machspec->hwintrstack[i]) + others++; + } + if (!others) { + fprintf(fp, "%s%s", + c && ((c % 4) == 0) ? "\n " : "", + c ? "(remainder unused)" : "(unused)"); + break; + } + + fprintf(fp, "%s%016lx ", + ((c % 4) == 0) ? "\n " : "", + machdep->machspec->hwintrstack[c]); + } + fprintf(fp, "\n"); + fprintf(fp, " hwstackbuf: %lx\n", (ulong)machdep->machspec->hwstackbuf); + fprintf(fp, " hwstacksize: %d\n", machdep->machspec->hwstacksize); + fprintf(fp, " level4: %lx\n", (ulong)machdep->machspec->level4); + fprintf(fp, " last_level4_read: %lx\n", (ulong)machdep->machspec->last_level4_read); + fprintf(fp, " l4_index_size: %d\n", machdep->machspec->l4_index_size); + fprintf(fp, " l3_index_size: %d\n", machdep->machspec->l3_index_size); + fprintf(fp, " l2_index_size: %d\n", machdep->machspec->l2_index_size); + fprintf(fp, " l1_index_size: %d\n", machdep->machspec->l1_index_size); + fprintf(fp, " ptrs_per_l3: %d\n", machdep->machspec->ptrs_per_l3); + fprintf(fp, " ptrs_per_l2: %d\n", machdep->machspec->ptrs_per_l2); + fprintf(fp, " ptrs_per_l1: %d\n", machdep->machspec->ptrs_per_l1); + fprintf(fp, " l4_shift: %d\n", machdep->machspec->l4_shift); + fprintf(fp, " l3_shift: %d\n", machdep->machspec->l3_shift); + fprintf(fp, " l2_shift: %d\n", machdep->machspec->l2_shift); + fprintf(fp, " l1_shift: %d\n", machdep->machspec->l1_shift); + fprintf(fp, " pte_shift: %d\n", machdep->machspec->pte_shift); + fprintf(fp, " l2_masked_bits: %x\n", machdep->machspec->l2_masked_bits); } /* @@ -2107,7 +2139,7 @@ fprintf(fp, "(unknown)\n"); fprintf(fp, " HZ: %d\n", machdep->hz); fprintf(fp, " PAGE SIZE: %d\n", PAGESIZE()); - fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); +// fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); fprintf(fp, "KERNEL VIRTUAL BASE: %lx\n", machdep->kvbase); fprintf(fp, "KERNEL VMALLOC BASE: %lx\n", vt->vmalloc_start); fprintf(fp, " KERNEL STACK SIZE: %ld\n", STACKSIZE()); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/README /tmp/e3X06Fy51n/crash-4.0-4.9/README --- /tmp/9GqrqL2m5z/crash-4.0-4.1/README 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/README 2007-11-19 15:01:37.000000000 -0600 @@ -69,7 +69,7 @@ After the kernel is re-compiled, the uncompressed "vmlinux" kernel that is created in the top-level kernel build directory must be saved. - To build this utility, simply uncompress the tar file, enter the crash-4.0-4.1 + To build this utility, simply uncompress the tar file, enter the crash-4.0-4.9 subdirectory, and type "make". The initial build will take several minutes because the gdb module must be configured and and built. Alternatively, the crash source RPM file may be installed and built, and the resultant crash @@ -89,14 +89,14 @@ $ crash - crash 4.0-4.1 + crash 4.0-4.9 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. Copyright (C) 2004, 2005, 2006 IBM Corporation Copyright (C) 1999-2006 Hewlett-Packard Co Copyright (C) 2005, 2006 Fujitsu Limited Copyright (C) 2006, 2007 VA Linux Systems Japan K.K. Copyright (C) 2005 NEC Corporation - Copyright (C) 1999, 2002 Silicon Graphics, Inc. + Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. This program is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under @@ -114,7 +114,7 @@ KERNEL: /boot/vmlinux DUMPFILE: /dev/mem CPUS: 1 - DATE: Thu Apr 26 16:45:58 2007 + DATE: Mon Nov 19 16:01:36 2007 UPTIME: 10 days, 22:55:18 LOAD AVERAGE: 0.08, 0.03, 0.01 TASKS: 42 @@ -142,7 +142,7 @@ exit log rd task extend mach repeat timer - crash version: 4.0-4.1 gdb version: 6.1 + crash version: 4.0-4.9 gdb version: 6.1 For help on any command above, enter "help ". For help on input options, enter "help input". For help on output options, enter "help output". @@ -155,14 +155,14 @@ $ crash vmlinux vmcore - crash 4.0-4.1 + crash 4.0-4.9 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. Copyright (C) 2004, 2005, 2006 IBM Corporation Copyright (C) 1999-2006 Hewlett-Packard Co Copyright (C) 2005, 2006 Fujitsu Limited Copyright (C) 2006, 2007 VA Linux Systems Japan K.K. Copyright (C) 2005 NEC Corporation - Copyright (C) 1999, 2002 Silicon Graphics, Inc. + Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. This program is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under @@ -202,14 +202,14 @@ $ crash vmlinux.17 lcore.cr.17 - crash 4.0-4.1 + crash 4.0-4.9 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. Copyright (C) 2004, 2005, 2006 IBM Corporation Copyright (C) 1999-2006 Hewlett-Packard Co Copyright (C) 2005, 2006 Fujitsu Limited Copyright (C) 2006, 2007 VA Linux Systems Japan K.K. Copyright (C) 2005 NEC Corporation - Copyright (C) 1999, 2002 Silicon Graphics, Inc. + Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc. Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc. This program is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/.rh_rpm_package /tmp/e3X06Fy51n/crash-4.0-4.9/.rh_rpm_package --- /tmp/9GqrqL2m5z/crash-4.0-4.1/.rh_rpm_package 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/.rh_rpm_package 2007-11-19 15:01:37.000000000 -0600 @@ -1 +1 @@ -4.0-4.1 +4.0-4.9 diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/s390.c /tmp/e3X06Fy51n/crash-4.0-4.9/s390.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/s390.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/s390.c 2007-11-19 15:01:37.000000000 -0600 @@ -21,17 +21,6 @@ #define S390_WORD_SIZE 4 #define S390_ADDR_MASK 0x7fffffff -#define S390_PAGE_SHIFT 12 -#define S390_PAGE_SIZE (1UL << S390_PAGE_SHIFT) -#define S390_PAGE_MASK (~(S390_PAGE_SIZE-1)) - -#define S390_PGDIR_SHIFT 20 -#define S390_PGDIR_SIZE (1UL << S390_PGDIR_SHIFT) -#define S390_PGDIR_MASK (~(S390_PGDIR_SIZE-1)) - -#define S390_PTRS_PER_PGD 2048 -#define S390_PTRS_PER_PTE 256 - #define S390_PMD_BASE_MASK (~((1UL<<6)-1)) #define S390_PT_BASE_MASK S390_PMD_BASE_MASK #define S390_PAGE_BASE_MASK (~((1UL<<12)-1)) @@ -44,26 +33,10 @@ #define S390_PAGE_INVALID 0x400 /* HW invalid */ #define S390_PAGE_INVALID_MASK 0x601ULL /* for linux 2.6 */ #define S390_PAGE_INVALID_NONE 0x401ULL /* for linux 2.6 */ -#define S390_PAGE_TABLE_LEN 0xf /* only full page-tables */ -#define S390_PAGE_TABLE_INV 0x20 /* invalid page-table */ #define S390_PTE_INVALID_MASK 0x80000900 #define S390_PTE_INVALID(x) ((x) & S390_PTE_INVALID_MASK) -#define S390_PMD_INVALID_MASK 0x80000000 -#define S390_PMD_INVALID(x) ((x) & S390_PMD_INVALID_MASK) - -/* pgd/pmd/pte query macros */ -#define s390_pmd_none(x) ((x) & S390_PAGE_TABLE_INV) -#define s390_pmd_bad(x) (((x) & (~S390_PMD_BASE_MASK & \ - ~S390_PAGE_TABLE_INV)) != \ - S390_PAGE_TABLE_LEN) - -#define s390_pte_none(x) (((x) & (S390_PAGE_INVALID | S390_RO_S390 | \ - S390_PAGE_PRESENT)) == \ - S390_PAGE_INVALID) - - #define ASYNC_STACK_SIZE STACKSIZE() // can be 4096 or 8192 #define KERNEL_STACK_SIZE STACKSIZE() // can be 4096 or 8192 @@ -73,8 +46,6 @@ * declarations of static functions */ static void s390_print_lowcore(char*, struct bt_info*,int); -static unsigned long s390_pgd_offset(unsigned long, unsigned long); -static unsigned long s390_pte_offset(unsigned long, unsigned long); static int s390_kvtop(struct task_context *, ulong, physaddr_t *, int); static int s390_uvtop(struct task_context *, ulong, physaddr_t *, int); static int s390_vtop(unsigned long, ulong, physaddr_t*, int); @@ -292,60 +263,87 @@ /* * page table traversal functions */ -static unsigned long -s390_pgd_offset(unsigned long pgd_base, unsigned long vaddr) -{ - unsigned long pgd_off, pmd_base; - pgd_off = ((vaddr >> S390_PGDIR_SHIFT) & (S390_PTRS_PER_PGD - 1)) - * S390_WORD_SIZE; - readmem(pgd_base + pgd_off, PHYSADDR, &pmd_base,sizeof(long), - "pgd_base",FAULT_ON_ERROR); - return pmd_base; -} - -unsigned long s390_pte_offset(unsigned long pte_base, unsigned long vaddr) +/* Segment table traversal function */ +static ulong _kl_sg_table_deref_s390(ulong vaddr, ulong table, int len) { - unsigned pte_off, pte_val; + ulong offset, entry; + + offset = ((vaddr >> 20) & 0x7ffUL) * 4; + if (offset >= (len + 1)*64) + /* Offset is over the table limit. */ + return 0; + readmem(table + offset, KVADDR, &entry, sizeof(entry), "entry", + FAULT_ON_ERROR); - pte_off = ((vaddr >> S390_PAGE_SHIFT) & (S390_PTRS_PER_PTE - 1)) - * S390_WORD_SIZE; - readmem(pte_base + pte_off, PHYSADDR, &pte_val, sizeof(long), - "pte_val",FAULT_ON_ERROR); - return pte_val; + /* + * Check if the segment table entry could be read and doesn't have + * any of the reserved bits set. + */ + if (entry & 0x80000000UL) + return 0; + /* Check if the segment table entry has the invalid bit set. */ + if (entry & 0x40UL) + return 0; + /* Segment table entry is valid and well formed. */ + return entry; +} + +/* Page table traversal function */ +static ulong _kl_pg_table_deref_s390(ulong vaddr, ulong table, int len) +{ + ulong offset, entry; + + offset = ((vaddr >> 12) & 0xffUL) * 4; + if (offset >= (len + 1)*64) + /* Offset is over the table limit. */ + return 0; + readmem(table + offset, KVADDR, &entry, sizeof(entry), "entry", + FAULT_ON_ERROR); + /* + * Check if the page table entry could be read and doesn't have + * any of the reserved bits set. + */ + if (entry & 0x80000900UL) + return 0; + /* Check if the page table entry has the invalid bit set. */ + if (entry & 0x400UL) + return 0; + /* Page table entry is valid and well formed. */ + return entry; } -/* - * Generic vtop function for user and kernel addresses - */ +/* lookup virtual address in page tables */ static int -s390_vtop(unsigned long pgd_base, ulong kvaddr, physaddr_t *paddr, int verbose) +s390_vtop(unsigned long table, ulong vaddr, physaddr_t *phys_addr, int verbose) { - unsigned pte_base, pte_val; + ulong entry, paddr; + int len; - /* get the pgd entry */ - pte_base = s390_pgd_offset(pgd_base,kvaddr); - if(S390_PMD_INVALID(pte_base) || - s390_pmd_bad(pte_base) || - s390_pmd_none(pte_base)) { - *paddr = 0; - return FALSE; - } - /* get the pte */ - pte_base = pte_base & S390_PT_BASE_MASK; - pte_val = s390_pte_offset(pte_base,kvaddr); - if(S390_PTE_INVALID(pte_val) || - s390_pte_none(pte_val)){ - *paddr = 0; + /* + * Get the segment table entry. + * We assume that the segment table length field in the asce + * is set to the maximum value of 127 (which translates to + * a segment table with 2048 entries) and that the addressing + * mode is 31 bit. + */ + entry = _kl_sg_table_deref_s390(vaddr, table, 127); + if (!entry) return FALSE; - } - if(!s390_pte_present(pte_val)){ - /* swapped out */ - *paddr = pte_val; + table = entry & 0x7ffffc00UL; + len = entry & 0xfUL; + + /* Get the page table entry */ + entry = _kl_pg_table_deref_s390(vaddr, table, len); + if (!entry) return FALSE; - } - *paddr = (pte_val & S390_PAGE_BASE_MASK) | - (kvaddr & (~(S390_PAGE_MASK))); + + /* Isolate the page origin from the page table entry. */ + paddr = entry & 0x7ffff000UL; + + /* Add the page offset and return the final value. */ + *phys_addr = paddr + (vaddr & 0xfffUL); + return TRUE; } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/s390x.c /tmp/e3X06Fy51n/crash-4.0-4.9/s390x.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/s390x.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/s390x.c 2007-11-19 15:01:37.000000000 -0600 @@ -20,24 +20,6 @@ #define S390X_WORD_SIZE 8 -#define S390X_PAGE_SHIFT 12 -#define S390X_PAGE_SIZE (1ULL << S390X_PAGE_SHIFT) -#define S390X_PAGE_MASK (~(S390X_PAGE_SIZE-1)) - -#define S390X_PGDIR_SHIFT 31 -#define S390X_PGDIR_SIZE (1ULL << S390X_PGDIR_SHIFT) -#define S390X_PGDIR_MASK (~(S390X_PGDIR_SIZE-1)) - -#define S390X_PMD_SHIFT 20 -#define S390X_PMD_SIZE (1ULL << S390X_PMD_SHIFT) -#define S390X_PMD_MASK (~(S390X_PMD_SIZE-1)) - -#define S390X_PTRS_PER_PGD 2048 -#define S390X_PTRS_PER_PMD 2048 -#define S390X_PTRS_PER_PTE 256 - -#define S390X_PMD_BASE_MASK (~((1ULL<<12)-1)) -#define S390X_PT_BASE_MASK (~((1ULL<<11)-1)) #define S390X_PAGE_BASE_MASK (~((1ULL<<12)-1)) /* Flags used in entries of page dirs and page tables. @@ -48,37 +30,11 @@ #define S390X_PAGE_INVALID 0x400ULL /* HW invalid */ #define S390X_PAGE_INVALID_MASK 0x601ULL /* for linux 2.6 */ #define S390X_PAGE_INVALID_NONE 0x401ULL /* for linux 2.6 */ -#define S390X_PMD_ENTRY_INV 0x20ULL /* invalid segment table entry */ -#define S390X_PGD_ENTRY_INV 0x20ULL /* invalid region table entry */ -#define S390X_PMD_ENTRY 0x00 -#define S390X_PGD_ENTRY_FIRST 0x05 /* first part of pmd is valid */ -#define S390X_PGD_ENTRY_SECOND 0xc7 /* second part of pmd is valid */ -#define S390X_PGD_ENTRY_FULL 0x07 /* complete pmd is valid */ /* bits 52, 55 must contain zeroes in a pte */ #define S390X_PTE_INVALID_MASK 0x900ULL #define S390X_PTE_INVALID(x) ((x) & S390X_PTE_INVALID_MASK) -/* pgd/pmd/pte query macros */ -#define s390x_pgd_none(x) ((x) & S390X_PGD_ENTRY_INV) -#define s390x_pgd_bad(x) !( (((x) & S390X_PGD_ENTRY_FIRST) == \ - S390X_PGD_ENTRY_FIRST) || \ - (((x) & S390X_PGD_ENTRY_SECOND) == \ - S390X_PGD_ENTRY_SECOND) || \ - (((x) & S390X_PGD_ENTRY_FULL) == \ - S390X_PGD_ENTRY_FULL)) - -#define s390x_pmd_none(x) ((x) & S390X_PMD_ENTRY_INV) -#define s390x_pmd_bad(x) (((x) & (~S390X_PT_BASE_MASK & \ - ~S390X_PMD_ENTRY_INV)) != \ - S390X_PMD_ENTRY) - -#define s390x_pte_none(x) (((x) & (S390X_PAGE_INVALID | \ - S390X_PAGE_RO | \ - S390X_PAGE_PRESENT)) == \ - S390X_PAGE_INVALID) - - #define ASYNC_STACK_SIZE STACKSIZE() // can be 8192 or 16384 #define KERNEL_STACK_SIZE STACKSIZE() // can be 8192 or 16384 @@ -88,9 +44,6 @@ * declarations of static functions */ static void s390x_print_lowcore(char*, struct bt_info*,int); -static unsigned long s390x_pgd_offset(unsigned long, unsigned long); -static unsigned long s390x_pmd_offset(unsigned long, unsigned long); -static unsigned long s390x_pte_offset(unsigned long, unsigned long); static int s390x_kvtop(struct task_context *, ulong, physaddr_t *, int); static int s390x_uvtop(struct task_context *, ulong, physaddr_t *, int); static int s390x_vtop(unsigned long, ulong, physaddr_t*, int); @@ -304,81 +257,97 @@ } } -/* +/* * page table traversal functions */ -unsigned long s390x_pgd_offset(unsigned long pgd_base, unsigned long vaddr) -{ - unsigned long pgd_off, pmd_base; - - pgd_off = ((vaddr >> S390X_PGDIR_SHIFT) & - (S390X_PTRS_PER_PGD - 1)) * 8; - readmem(pgd_base + pgd_off, PHYSADDR, &pmd_base, sizeof(long), - "pmd_base",FAULT_ON_ERROR); - - return pmd_base; -} -unsigned long s390x_pmd_offset(unsigned long pmd_base, unsigned long vaddr) -{ - unsigned long pmd_off, pte_base; - - pmd_off = ((vaddr >> S390X_PMD_SHIFT) & (S390X_PTRS_PER_PMD - 1)) - * 8; - readmem(pmd_base + pmd_off, PHYSADDR, &pte_base, sizeof(long), - "pte_base",FAULT_ON_ERROR); - return pte_base; -} - -unsigned long s390x_pte_offset(unsigned long pte_base, unsigned long vaddr) -{ - unsigned long pte_off, pte_val; - - pte_off = ((vaddr >> S390X_PAGE_SHIFT) & (S390X_PTRS_PER_PTE - 1)) - * 8; - readmem(pte_base + pte_off, PHYSADDR, &pte_val, sizeof(long), - "pte_val",FAULT_ON_ERROR); - return pte_val; +/* Region or segment table traversal function */ +static ulong _kl_rsg_table_deref_s390x(ulong vaddr, ulong table, + int len, int level) +{ + ulong offset, entry; + + offset = ((vaddr >> (11*level + 20)) & 0x7ffULL) * 8; + if (offset >= (len + 1)*4096) + /* Offset is over the table limit. */ + return 0; + readmem(table + offset, KVADDR, &entry, sizeof(entry), "entry", + FAULT_ON_ERROR); + /* + * Check if the segment table entry could be read and doesn't have + * any of the reserved bits set. + */ + if ((entry & 0xcULL) != (level << 2)) + return 0; + /* Check if the region table entry has the invalid bit set. */ + if (entry & 0x40ULL) + return 0; + /* Region table entry is valid and well formed. */ + return entry; } -/* - * Generic vtop function for user and kernel addresses - */ -static int -s390x_vtop(unsigned long pgd_base, ulong kvaddr, physaddr_t *paddr, int verbose) +/* Page table traversal function */ +static ulong _kl_pg_table_deref_s390x(ulong vaddr, ulong table) { - unsigned long pmd_base, pte_base, pte_val; + ulong offset, entry; - /* get the pgd entry */ - pmd_base = s390x_pgd_offset(pgd_base,kvaddr); - if(s390x_pgd_bad(pmd_base) || - s390x_pgd_none(pmd_base)){ - *paddr = 0; + offset = ((vaddr >> 12) & 0xffULL) * 8; + readmem(table + offset, KVADDR, &entry, sizeof(entry), "entry", + FAULT_ON_ERROR); + /* + * Check if the page table entry could be read and doesn't have + * any of the reserved bits set. + */ + if (entry & 0x900ULL) + return 0; + /* Check if the page table entry has the invalid bit set. */ + if (entry & 0x400ULL) + return 0; + /* Page table entry is valid and well formed. */ + return entry; +} + +/* lookup virtual address in page tables */ +int s390x_vtop(ulong table, ulong vaddr, physaddr_t *phys_addr, int verbose) +{ + ulong entry, paddr; + int level, len; + + /* + * Walk the region and segment tables. + * We assume that the table length field in the asce is set to the + * maximum value of 3 (which translates to a region first, region + * second, region third or segment table with 2048 entries) and that + * the addressing mode is 64 bit. + */ + len = 3; + /* Read the first entry to find the number of page table levels. */ + readmem(table, KVADDR, &entry, sizeof(entry), "entry", FAULT_ON_ERROR); + level = (entry & 0xcULL) >> 2; + if ((vaddr >> (31 + 11*level)) != 0ULL) { + /* Address too big for the number of page table levels. */ return FALSE; } - /* get the pmd */ - pmd_base = pmd_base & S390X_PMD_BASE_MASK; - pte_base = s390x_pmd_offset(pmd_base,kvaddr); - if(s390x_pmd_bad(pte_base) || - s390x_pmd_none(pte_base)) { - *paddr = 0; - return FALSE; + while (level >= 0) { + entry = _kl_rsg_table_deref_s390x(vaddr, table, len, level); + if (!entry) + return 0; + table = entry & ~0xfffULL; + len = entry & 0x3ULL; + level--; } - /* get the pte */ - pte_base = pte_base & S390X_PT_BASE_MASK; - pte_val = s390x_pte_offset(pte_base,kvaddr); - if (S390X_PTE_INVALID(pte_val) || - s390x_pte_none(pte_val)){ - *paddr = 0; - return FALSE; - } - if(!s390x_pte_present(pte_val)){ - /* swapped out */ - *paddr = pte_val; + + /* Get the page table entry */ + entry = _kl_pg_table_deref_s390x(vaddr, entry & ~0x7ffULL); + if (!entry) return FALSE; - } - *paddr = (pte_val & S390X_PAGE_BASE_MASK) | - (kvaddr & (~(S390X_PAGE_MASK))); + + /* Isolate the page origin from the page table entry. */ + paddr = entry & ~0xfffULL; + + /* Add the page offset and return the final value. */ + *phys_addr = paddr + (vaddr & 0xfffULL); + return TRUE; } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/symbols.c /tmp/e3X06Fy51n/crash-4.0-4.9/symbols.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/symbols.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/symbols.c 2007-11-19 15:01:37.000000000 -0600 @@ -21,6 +21,8 @@ static void store_symbols(bfd *, int, void *, long, unsigned int); static void store_sysmap_symbols(void); +static ulong relocate(ulong, char *, int); +static int relocate_force(ulong, char *); static void strip_module_symbol_end(char *s); static int compare_syms(const void *, const void *); static int compare_mods(const void *, const void *); @@ -71,6 +73,8 @@ #define MODULE_SECTIONS (void *)(2) #define VERIFY_SECTIONS (void *)(3) +#define EV_DWARFEXTRACT 101010101 + #define PARSE_FOR_DATA (1) #define PARSE_FOR_DECLARATION (2) static void parse_for_member(struct datatype_member *, ulong); @@ -115,6 +119,7 @@ static void dump_datatype_member(FILE *, struct datatype_member *); static void dump_datatype_flags(ulong, FILE *); static void dump_enumerator_list(char *); +static long anon_member_offset(char *, char *); static int gdb_whatis(char *); static void do_datatype_declaration(struct datatype_member *, ulong); @@ -144,6 +149,12 @@ if (!bfd_check_format_matches(st->bfd, bfd_object, &matching)) error(FATAL, "cannot determine object file format: %s\n", pc->namelist); + /* + * Check whether the namelist is a kerntypes file built by + * dwarfextract, which places a magic number in e_version. + */ + if (file_elf_version(pc->namelist) == EV_DWARFEXTRACT) + pc->flags |= KERNTYPES; if (pc->flags & SYSMAP) { bfd_map_over_sections(st->bfd, section_header_info, @@ -158,13 +169,16 @@ } store_sysmap_symbols(); return; - } + } else if (LKCD_KERNTYPES()) + error(FATAL, "%s: use of kerntypes requires a system map\n", + pc->namelist); /* * Pull a bait-and-switch on st->bfd if we've got a separate - * .gnu_debuglink file that matches the CRC. + * .gnu_debuglink file that matches the CRC. Not done for kerntypes. */ - if (!(bfd_get_file_flags(st->bfd) & HAS_SYMS)) { + if (!(LKCD_KERNTYPES()) && + !(bfd_get_file_flags(st->bfd) & HAS_SYMS)) { if (!check_gnu_debuglink(st->bfd)) no_debugging_data(FATAL); } @@ -476,6 +490,11 @@ kt->stext_init = (ulong)bfd_get_section_vma(st->bfd, section); kt->etext_init = kt->stext_init + (ulong)bfd_section_size(st->bfd, section); + + if (kt->relocate) { + kt->stext_init -= kt->relocate; + kt->etext_init -= kt->relocate; + } } /* @@ -491,6 +510,7 @@ bfd_byte *from, *fromend; symbol_info syminfo; struct syment *sp; + int first; if ((store = bfd_make_empty_symbol(abfd)) == NULL) error(FATAL, "bfd_make_empty_symbol() failed\n"); @@ -510,6 +530,13 @@ st->symcnt = 0; sp = st->symtable; + if (machine_type("X86")) { + if (!(kt->flags & RELOC_SET)) + kt->flags |= RELOC_FORCE; + } else + kt->flags &= ~RELOC_SET; + + first = 0; from = (bfd_byte *) minisyms; fromend = from + symcount * size; for (; from < fromend; from += size) @@ -521,7 +548,11 @@ bfd_get_symbol_info(abfd, sym, &syminfo); if (machdep->verify_symbol(syminfo.name, syminfo.value, syminfo.type)) { - sp->value = syminfo.value; + if (kt->flags & (RELOC_SET|RELOC_FORCE)) + sp->value = relocate(syminfo.value, + (char *)syminfo.name, !(first++)); + else + sp->value = syminfo.value; sp->type = syminfo.type; namespace_ctl(NAMESPACE_INSTALL, &st->namespace, sp, (char *)syminfo.name); @@ -545,7 +576,7 @@ static void store_sysmap_symbols(void) { - int c; + int c, first; long symcount; char buf[BUFSIZE]; FILE *map; @@ -569,6 +600,10 @@ error(FATAL, "symbol table namespace malloc: %s\n", strerror(errno)); + if (!machine_type("X86")) + kt->flags &= ~RELOC_SET; + + first = 0; st->syment_size = symcount * sizeof(struct syment); st->symcnt = 0; sp = st->symtable; @@ -585,7 +620,11 @@ if (machdep->verify_symbol(syment.name, syment.value, syment.type)) { - sp->value = syment.value; + if (kt->flags & RELOC_SET) + sp->value = relocate(syment.value, + syment.name, !(first++)); + else + sp->value = syment.value; sp->type = syment.type; namespace_ctl(NAMESPACE_INSTALL, &st->namespace, sp, syment.name); @@ -608,6 +647,96 @@ } /* + * Handle x86 kernels configured such that the vmlinux symbols + * are not as loaded into the kernel (not unity-mapped). + */ +static ulong +relocate(ulong symval, char *symname, int first_symbol) +{ + switch (kt->flags & (RELOC_SET|RELOC_FORCE)) + { + case RELOC_SET: + break; + + case RELOC_FORCE: + if (first_symbol && !relocate_force(symval, symname)) + kt->flags &= ~RELOC_FORCE; + break; + } + + return (symval - kt->relocate); +} + +/* + * If no --reloc argument was passed, try to figure it out + * by comparing the first vmlinux kernel symbol with the + * first /proc/kallsyms symbol. (should be "_text") + * + * Live system only (at least for now). + */ +static int +relocate_force(ulong symval, char *symname) +{ + FILE *kp; + char buf[BUFSIZE]; + char *kallsyms[MAXARGS]; + ulong first; + + if (!ACTIVE() || !file_exists("/proc/kallsyms", NULL)) { + if (CRASHDEBUG(1)) + fprintf(fp, + "cannot determine relocation value: %s\n", + !ACTIVE() ? "not a live system" : + "/proc/kallsyms does not exist"); + return FALSE; + } + + if ((kp = fopen("/proc/kallsyms", "r")) == NULL) { + if (CRASHDEBUG(1)) + fprintf(fp, + "cannot open /proc/kallsyms to determine relocation\n"); + return FALSE; + } + + if (!fgets(buf, BUFSIZE, kp) || + (parse_line(buf, kallsyms) != 3) || + !hexadecimal(kallsyms[0], 0)) { + fclose(kp); + if (CRASHDEBUG(1)) + fprintf(fp, + "malformed /proc/kallsyms: cannot determine relocation value\n"); + return FALSE; + } + fclose(kp); + + first = htol(kallsyms[0], RETURN_ON_ERROR, NULL); + + if (CRASHDEBUG(1)) + fprintf(fp, + "RELOCATE: %s @ %lx %s\n" + " %s @ %lx /proc/kallsyms\n", + symname, symval, pc->namelist, + kallsyms[2], first); + + /* + * If the symbols match and have different values, + * force the relocation. + */ + if (STREQ(symname, kallsyms[2])) { + if (symval > first) { + kt->relocate = symval - first; + return TRUE; + } + } + + if (CRASHDEBUG(1)) + fprintf(fp, + "cannot determine relocation value from first symbol\n"); + + return FALSE; +} + +/* * Install all static kernel symbol values into the symval_hash. */ static void @@ -3507,6 +3636,34 @@ } /* + * Return the value of a symbol from a specific module. + */ +ulong +symbol_value_module(char *symbol, char *module) +{ + int i; + struct syment *sp, *sp_end; + struct load_module *lm; + + for (i = 0; i < st->mods_installed; i++) { + lm = &st->load_modules[i]; + + if (!STREQ(module, lm->mod_name)) + continue; + + sp = lm->mod_symtable; + sp_end = lm->mod_symend; + + for ( ; sp < sp_end; sp++) { + if (STREQ(symbol, sp->name)) + return(sp->value); + } + } + + return 0; +} + +/* * Return the symbol name of a given value, with no allowance for offsets. * Returns NULL on failure to allow for testing of a value. */ @@ -3638,6 +3795,7 @@ * #define STRUCT_EXISTS(X) (datatype_info((X), NULL, NULL) >= 0) * #define MEMBER_EXISTS(X,Y) (datatype_info((X), (Y), NULL) >= 0) * #define MEMBER_SIZE(X,Y) datatype_info((X), (Y), MEMBER_SIZE_REQUEST) + * #define ANON_MEMBER_OFFSET(X,Y) datatype_info((X), (Y), ANON_MEMBER_OFFSET_REQUEST) * * to determine structure or union sizes, or member offsets. */ @@ -3650,6 +3808,9 @@ ulong type_found; char buf[BUFSIZE]; + if (dm == ANON_MEMBER_OFFSET_REQUEST) + return anon_member_offset(name, member); + strcpy(buf, name); req = (struct gnu_request *)GETBUF(sizeof(struct gnu_request)); @@ -3778,6 +3939,7 @@ dm->size = size; dm->member_size = member_size; dm->member_typecode = member_typecode; + dm->member_offset = offset; if (req->is_typedef) { dm->flags |= TYPEDEF; } @@ -3799,6 +3961,33 @@ } /* + * Determine the offset of a member in an anonymous union + * in a structure. + */ +static long +anon_member_offset(char *name, char *member) +{ + int c; + char buf[BUFSIZE]; + char *arglist[MAXARGS]; + ulong value; + + value = -1; + sprintf(buf, "print &((struct %s *)0x0)->%s", name, member); + + open_tmpfile(); + if (gdb_pass_through(buf, fp, GNU_RETURN_ON_ERROR)) { + rewind(pc->tmpfile); + if (fgets(buf, BUFSIZE, pc->tmpfile) && + (c = parse_line(strip_linefeeds(buf), arglist))) + value = stol(arglist[c-1], RETURN_ON_ERROR|QUIET, NULL); + } + close_tmpfile(); + + return value; +} + +/* * Get the basic type info for a symbol. Let the caller pass in the * gnu_request structure to have access to the full response; in either * case, return the type code. The member field can be used for structures @@ -5310,7 +5499,8 @@ if ((retval = builtin_array_length(s, 0, two_dim))) return retval; - if (symbol_search(s)) { + /* symbol_search cannot be done with just kernel type information */ + if (!(LKCD_KERNTYPES()) && symbol_search(s)) { if (!two_dim) { req = &gnu_request; if ((get_symbol_type(copy, NULL, req) == @@ -5420,6 +5610,23 @@ } /* + * Get and store the size of a "known" array. + * A wrapper for get_array_length(), for cases in which + * the name of the result to be stored is different from the + * structure.member to be evaluated. + */ +int +get_array_length_alt(char *name, char *s, int *two_dim, long entry_size) +{ + int retval; + + retval = get_array_length(s, two_dim, entry_size); + if (retval) + retval = builtin_array_length(name, retval, two_dim); + return retval; +} + +/* * Designed for use by non-debug kernels, but used by all. */ int @@ -5474,11 +5681,16 @@ lenptr = &array_table.prio_array_queue; else if (STREQ(s, "height_to_maxindex")) lenptr = &array_table.height_to_maxindex; + else if (STREQ(s, "pid_hash")) + lenptr = &array_table.pid_hash; else if (STREQ(s, "free_area")) { lenptr = &array_table.free_area; if (two_dim) dimptr = &array_table.free_area_DIMENSION; - } + } else if (STREQ(s, "kmem_cache.node")) + lenptr = &array_table.kmem_cache_node; + else if (STREQ(s, "kmem_cache.cpu_slab")) + lenptr = &array_table.kmem_cache_cpu_slab; if (!lenptr) /* not stored */ return(len); @@ -5615,6 +5827,8 @@ OFFSET(task_struct_thread_info)); fprintf(fp, " task_struct_nsproxy: %ld\n", OFFSET(task_struct_nsproxy)); + fprintf(fp, " task_struct_rlim: %ld\n", + OFFSET(task_struct_rlim)); fprintf(fp, " thread_info_task: %ld\n", OFFSET(thread_info_task)); @@ -5663,6 +5877,9 @@ OFFSET(signal_struct_action)); fprintf(fp, " signal_struct_shared_pending: %ld\n", OFFSET(signal_struct_shared_pending)); + fprintf(fp, " signal_struct_rlim: %ld\n", + OFFSET(signal_struct_rlim)); + fprintf(fp, " task_struct_start_time: %ld\n", OFFSET(task_struct_start_time)); fprintf(fp, " task_struct_times: %ld\n", @@ -5911,6 +6128,17 @@ fprintf(fp, " page_pte: %ld\n", OFFSET(page_pte)); + fprintf(fp, " page_inuse: %ld\n", + OFFSET(page_inuse)); + fprintf(fp, " page_lockless_freelist: %ld\n", + OFFSET(page_lockless_freelist)); + fprintf(fp, " page_slab: %ld\n", + OFFSET(page_slab)); + fprintf(fp, " page_first_page: %ld\n", + OFFSET(page_first_page)); + fprintf(fp, " page_freelist: %ld\n", + OFFSET(page_freelist)); + fprintf(fp, " swap_info_struct_swap_file: %ld\n", OFFSET(swap_info_struct_swap_file)); fprintf(fp, " swap_info_struct_swap_vfsmnt: %ld\n", @@ -6240,6 +6468,40 @@ fprintf(fp, " slab_free: %ld\n", OFFSET(slab_free)); + fprintf(fp, " kmem_cache_size: %ld\n", + OFFSET(kmem_cache_size)); + fprintf(fp, " kmem_cache_objsize: %ld\n", + OFFSET(kmem_cache_objsize)); + fprintf(fp, " kmem_cache_offset: %ld\n", + OFFSET(kmem_cache_offset)); + fprintf(fp, " kmem_cache_order: %ld\n", + OFFSET(kmem_cache_order)); + fprintf(fp, " kmem_cache_local_node: %ld\n", + OFFSET(kmem_cache_local_node)); + fprintf(fp, " kmem_cache_objects: %ld\n", + OFFSET(kmem_cache_objects)); + fprintf(fp, " kmem_cache_inuse: %ld\n", + OFFSET(kmem_cache_inuse)); + fprintf(fp, " kmem_cache_align: %ld\n", + OFFSET(kmem_cache_align)); + fprintf(fp, " kmem_cache_name: %ld\n", + OFFSET(kmem_cache_name)); + fprintf(fp, " kmem_cache_list: %ld\n", + OFFSET(kmem_cache_list)); + fprintf(fp, " kmem_cache_node: %ld\n", + OFFSET(kmem_cache_node)); + fprintf(fp, " kmem_cache_cpu_slab: %ld\n", + OFFSET(kmem_cache_cpu_slab)); + + fprintf(fp, " kmem_cache_node_nr_partial: %ld\n", + OFFSET(kmem_cache_node_nr_partial)); + fprintf(fp, " kmem_cache_node_nr_slabs: %ld\n", + OFFSET(kmem_cache_node_nr_slabs)); + fprintf(fp, " kmem_cache_node_partial: %ld\n", + OFFSET(kmem_cache_node_partial)); + fprintf(fp, " kmem_cache_node_full: %ld\n", + OFFSET(kmem_cache_node_full)); + fprintf(fp, " net_device_next: %ld\n", OFFSET(net_device_next)); fprintf(fp, " net_device_name: %ld\n", @@ -6586,6 +6848,25 @@ fprintf(fp, " unwind_table_name: %ld\n", OFFSET(unwind_table_name)); + fprintf(fp, " rq_cfs: %ld\n", + OFFSET(rq_cfs)); + fprintf(fp, " rq_rt: %ld\n", + OFFSET(rq_rt)); + fprintf(fp, " rq_nr_running: %ld\n", + OFFSET(rq_nr_running)); + fprintf(fp, " task_struct_se: %ld\n", + OFFSET(task_struct_se)); + fprintf(fp, " sched_entity_run_node: %ld\n", + OFFSET(sched_entity_run_node)); + fprintf(fp, " cfs_rq_nr_running: %ld\n", + OFFSET(cfs_rq_nr_running)); + fprintf(fp, " cfs_rq_rb_leftmost: %ld\n", + OFFSET(cfs_rq_rb_leftmost)); + fprintf(fp, " cfs_rq_tasks_timeline: %ld\n", + OFFSET(cfs_rq_tasks_timeline)); + fprintf(fp, " rt_rq_active: %ld\n", + OFFSET(rt_rq_active)); + fprintf(fp, "\n size_table:\n"); fprintf(fp, " page: %ld\n", SIZE(page)); fprintf(fp, " free_area_struct: %ld\n", @@ -6603,6 +6884,9 @@ fprintf(fp, " array_cache: %ld\n", SIZE(array_cache)); fprintf(fp, " kmem_bufctl_t: %ld\n", SIZE(kmem_bufctl_t)); + fprintf(fp, " kmem_cache: %ld\n", SIZE(kmem_cache)); + fprintf(fp, " kmem_cache_node: %ld\n", SIZE(kmem_cache_node)); + fprintf(fp, " swap_info_struct: %ld\n", SIZE(swap_info_struct)); fprintf(fp, " vm_area_struct: %ld\n", @@ -6731,6 +7015,8 @@ SIZE(pid_link)); fprintf(fp, " unwind_table: %ld\n", SIZE(unwind_table)); + fprintf(fp, " rlimit: %ld\n", + SIZE(rlimit)); fprintf(fp, "\n array_table:\n"); /* @@ -6784,6 +7070,12 @@ get_array_length("prio_array.queue", NULL, SIZE(list_head))); fprintf(fp, " height_to_maxindex: %d\n", ARRAY_LENGTH(height_to_maxindex)); + fprintf(fp, " pid_hash: %d\n", + ARRAY_LENGTH(pid_hash)); + fprintf(fp, " kmem_cache_node: %d\n", + ARRAY_LENGTH(kmem_cache_node)); + fprintf(fp, " kmem_cache_cpu_slab: %d\n", + ARRAY_LENGTH(kmem_cache_cpu_slab)); if (spec) { int in_size_table, in_array_table, arrays, offsets, sizes; @@ -7224,6 +7516,9 @@ char *secname; int i; + if ((store = bfd_make_empty_symbol(bfd)) == NULL) + error(FATAL, "bfd_make_empty_symbol() failed\n"); + s1 = lm->mod_symtable; s2 = lm->mod_symend; while (s1 < s2) { @@ -7511,19 +7806,33 @@ add_symbol_file(struct load_module *lm) { struct gnu_request request, *req; - char buf[BUFSIZE]; + char buf[BUFSIZE]; + int i, len; + char *secname; + + for (i = len = 0; i < lm->mod_sections; i++) + { + secname = lm->mod_section_data[i].name; + if ((lm->mod_section_data[i].flags & SEC_FOUND) && + !STREQ(secname, ".text")) { + sprintf(buf, " -s %s 0x%lx", secname, + lm->mod_section_data[i].offset + lm->mod_base); + len += strlen(buf); + } + } req = &request; BZERO(req, sizeof(struct gnu_request)); req->command = GNU_ADD_SYMBOL_FILE; req->addr = (ulong)lm; - req->buf = buf; + req->buf = GETBUF(len+BUFSIZE); if (!CRASHDEBUG(1)) req->fp = pc->nullfp; st->flags |= ADD_SYMBOL_FILE; - gdb_interface(req); + gdb_interface(req); st->flags &= ~ADD_SYMBOL_FILE; + FREEBUF(req->buf); sprintf(buf, "set complaints 0"); gdb_pass_through(buf, NULL, 0); @@ -8364,6 +8673,10 @@ struct syment *sp_array[200], *sp; if (req->name == PATCH_KERNEL_SYMBOLS_START) { + if (kt->flags & RELOC_FORCE) + error(WARNING, + "\nkernel relocated [%ldMB]: patching %ld gdb minimal_symbol values\n", + kt->relocate >> 20, st->symcnt); fprintf(fp, (pc->flags & SILENT) || !(pc->flags & TTY) ? "" : "\nplease wait... (patching %ld gdb minimal_symbol values) ", st->symcnt); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/task.c /tmp/e3X06Fy51n/crash-4.0-4.9/task.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/task.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/task.c 2007-11-19 15:01:37.000000000 -0600 @@ -34,6 +34,7 @@ static void child_list(ulong); static void show_task_times(struct task_context *, ulong); static void show_task_args(struct task_context *); +static void show_task_rlimit(struct task_context *); static void show_tgid_list(ulong); static int compare_start_time(const void *, const void *); static int start_time_timespec(void); @@ -49,6 +50,15 @@ static void dump_runq(void); static void dump_runqueues(void); static void dump_prio_array(int, ulong, char *); +struct rb_root; +static struct rb_node *rb_first(struct rb_root *); +struct rb_node; +static struct rb_node *rb_next(struct rb_node *); +static struct rb_node *rb_parent(struct rb_node *, struct rb_node *); +static struct rb_node *rb_right(struct rb_node *, struct rb_node *); +static struct rb_node *rb_left(struct rb_node *, struct rb_node *); +static void dump_CFS_runqueues(void); +static void dump_RT_prio_array(int, ulong, char *); static void task_struct_member(struct task_context *,ulong,struct reference *); static void signal_reference(struct task_context *, ulong, struct reference *); static void do_sig_thread_group(ulong); @@ -160,8 +170,15 @@ get_idle_threads(&tt->idle_threads[0], kt->cpus); } - MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", - "thread_info"); + if (MEMBER_EXISTS("task_struct", "thread_info")) + MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", + "thread_info"); + else if (MEMBER_EXISTS("task_struct", "stack")) + MEMBER_OFFSET_INIT(task_struct_thread_info, "task_struct", + "stack"); + else + ASSIGN_OFFSET(task_struct_thread_info) = INVALID_OFFSET; + if (VALID_MEMBER(task_struct_thread_info)) { MEMBER_OFFSET_INIT(thread_info_task, "thread_info", "task"); MEMBER_OFFSET_INIT(thread_info_cpu, "thread_info", "cpu"); @@ -315,11 +332,24 @@ tt->refresh_task_table = refresh_pid_hash_task_table; } else { tt->pidhash_addr = symbol_value("pid_hash"); - if (!get_array_length("pid_hash", NULL, sizeof(void *)) && - VALID_STRUCT(pid_link)) - tt->refresh_task_table = refresh_hlist_task_table_v2; - else - tt->refresh_task_table = refresh_hlist_task_table; + if (LKCD_KERNTYPES()) { + if (VALID_STRUCT(pid_link)) + tt->refresh_task_table = + refresh_hlist_task_table_v2; + else + tt->refresh_task_table = + refresh_hlist_task_table; + builtin_array_length("pid_hash", + tt->pidhash_len, NULL); + } else { + if (!get_array_length("pid_hash", NULL, + sizeof(void *)) && VALID_STRUCT(pid_link)) + tt->refresh_task_table = + refresh_hlist_task_table_v2; + else + tt->refresh_task_table = + refresh_hlist_task_table; + } } tt->flags |= PID_HASH; @@ -2173,7 +2203,7 @@ BZERO(&psinfo, sizeof(struct psinfo)); flag = 0; - while ((c = getopt(argcnt, args, "gstcpkula")) != EOF) { + while ((c = getopt(argcnt, args, "gstcpkular")) != EOF) { switch(c) { case 'k': @@ -2230,6 +2260,11 @@ flag |= PS_KSTACKP; break; + case 'r': + flag &= ~(PS_EXCLUSIVE); + flag |= PS_RLIMIT; + break; + default: argerrs++; break; @@ -2314,6 +2349,10 @@ show_task_args(tc); \ continue; \ } \ + if (flag & PS_RLIMIT) { \ + show_task_rlimit(tc); \ + continue; \ + } \ if (flag & PS_TGID_LIST) { \ show_tgid_list(tc->task); \ continue; \ @@ -2560,6 +2599,120 @@ FREEBUF(buf); } +char *rlim_names[] = { + /* 0 */ "CPU", + /* 1 */ "FSIZE", + /* 2 */ "DATA", + /* 3 */ "STACK", + /* 4 */ "CORE", + /* 5 */ "RSS", + /* 6 */ "NPROC", + /* 7 */ "NOFILE", + /* 8 */ "MEMLOCK", + /* 9 */ "AS", + /* 10 */ "LOCKS", + /* 11 */ "SIGPENDING", + /* 12 */ "MSGQUEUE", + /* 13 */ "NICE", + /* 14 */ "RTPRIO", + NULL, +}; + +#ifndef RLIM_INFINITY +#define RLIM_INFINITY (~0UL) +#endif + +/* + * Show the current and maximum rlimit values. + */ +static void +show_task_rlimit(struct task_context *tc) +{ + int i, j, len1, len2, rlimit_index; + int in_task_struct, in_signal_struct; + char *rlimit_buffer; + ulong *p1, rlim_addr; + char buf1[BUFSIZE]; + char buf2[BUFSIZE]; + char buf3[BUFSIZE]; + + if (!VALID_MEMBER(task_struct_rlim) && !VALID_MEMBER(signal_struct_rlim)) { + MEMBER_OFFSET_INIT(task_struct_rlim, "task_struct", "rlim"); + MEMBER_OFFSET_INIT(signal_struct_rlim, "signal_struct", "rlim"); + STRUCT_SIZE_INIT(rlimit, "rlimit"); + if (!VALID_MEMBER(task_struct_rlim) && + !VALID_MEMBER(signal_struct_rlim)) + error(FATAL, "cannot determine rlimit array location\n"); + } else if (!VALID_STRUCT(rlimit)) + error(FATAL, "cannot determine rlimit structure definition\n"); + + in_task_struct = in_signal_struct = FALSE; + + if (VALID_MEMBER(task_struct_rlim)) { + rlimit_index = get_array_length("task_struct.rlim", NULL, 0); + in_task_struct = TRUE; + } else if (VALID_MEMBER(signal_struct_rlim)) { + if (!VALID_MEMBER(task_struct_signal)) + error(FATAL, "cannot determine rlimit array location\n"); + rlimit_index = get_array_length("signal_struct.rlim", NULL, 0); + in_signal_struct = TRUE; + } + + if (!rlimit_index) + error(FATAL, "cannot determine rlimit array size\n"); + + for (i = len1 = 0; i < rlimit_index; i++) { + if ((j = strlen(rlim_names[i])) > len1) + len1 = j; + } + len2 = strlen("(unlimited)"); + + rlimit_buffer = GETBUF(rlimit_index * SIZE(rlimit)); + + print_task_header(fp, tc, 0); + + fill_task_struct(tc->task); + + if (in_task_struct) { + BCOPY(tt->task_struct + OFFSET(task_struct_rlim), + rlimit_buffer, rlimit_index * SIZE(rlimit)); + } else if (in_signal_struct) { + rlim_addr = ULONG(tt->task_struct + OFFSET(task_struct_signal)); + if (!readmem(rlim_addr + OFFSET(signal_struct_rlim), + KVADDR, rlimit_buffer, rlimit_index * SIZE(rlimit), + "signal_struct rlimit array", RETURN_ON_ERROR)) { + FREEBUF(rlimit_buffer); + return; + } + } + + fprintf(fp, " %s %s %s\n", + mkstring(buf1, len1, RJUST, "RLIMIT"), + mkstring(buf2, len2, CENTER|RJUST, "CURRENT"), + mkstring(buf3, len2, CENTER|RJUST, "MAXIMUM")); + + for (p1 = (ulong *)rlimit_buffer, i = 0; i < rlimit_index; i++) { + fprintf(fp, " %s ", mkstring(buf1, len1, RJUST, + rlim_names[i] ? rlim_names[i] : "(unknown)")); + if (*p1 == (ulong)RLIM_INFINITY) + fprintf(fp, "(unlimited) "); + else + fprintf(fp, "%s ", mkstring(buf1, len2, + CENTER|LJUST|LONG_DEC, MKSTR(*p1))); + p1++; + if (*p1 == (ulong)RLIM_INFINITY) + fprintf(fp, "(unlimited)\n"); + else + fprintf(fp, "%s\n", mkstring(buf1, len2, + CENTER|LJUST|LONG_DEC, MKSTR(*p1))); + p1++; + } + + fprintf(fp, "\n"); + + FREEBUF(rlimit_buffer); +} + /* * Put either the task_struct address or kernel stack pointer into a string. * If the kernel stack pointer is requested, piggy-back on top of the @@ -3314,6 +3467,25 @@ /* + * Return the task if the vaddr is part of a task's task_struct. + */ +ulong +vaddr_in_task_struct(ulong vaddr) +{ + int i; + struct task_context *tc; + + tc = FIRST_CONTEXT(); + for (i = 0; i < RUNNING_TASKS(); i++, tc++) { + if ((vaddr >= tc->task) && + (vaddr < (tc->task + SIZE(task_struct)))) + return tc->task; + } + + return NO_TASK; +} + +/* * Verify whether any task is running a command. */ int @@ -3459,7 +3631,8 @@ fprintf(fp, "(ACTIVE)"); } - if (!(pc->flags & RUNTIME) && (tt->flags & PANIC_TASK_NOT_FOUND) && + if (!(pc->flags & RUNTIME) && !ACTIVE() && + (tt->flags & PANIC_TASK_NOT_FOUND) && !SYSRQ_TASK(tc->task)) { fprintf(fp, "\n"); INDENT(indent); if (machine_type("S390") || machine_type("S390X")) @@ -3893,6 +4066,12 @@ task = NO_TASK; tc = FIRST_CONTEXT(); + /* + * --no_panic command line option + */ + if (tt->flags & PANIC_TASK_NOT_FOUND) + goto use_task_0; + if (symbol_exists("panic_threads") && symbol_exists("panicmsg") && symbol_exists("panic_processor")) { @@ -5683,6 +5862,11 @@ ulong *tlist; struct task_context *tc; + if (VALID_MEMBER(rq_cfs)) { + dump_CFS_runqueues(); + return; + } + if (VALID_MEMBER(runqueue_arrays)) { dump_runqueues(); return; @@ -5855,6 +6039,222 @@ } } +/* + * CFS scheduler uses Red-Black trees to maintain run queue. + */ +struct rb_node +{ + unsigned long rb_parent_color; +#define RB_RED 0 +#define RB_BLACK 1 + struct rb_node *rb_right; + struct rb_node *rb_left; +}; + +struct rb_root +{ + struct rb_node *rb_node; +}; + +static struct rb_node * +rb_first(struct rb_root *root) +{ + struct rb_root rloc; + struct rb_node *n; + struct rb_node nloc; + + readmem((ulong)root, KVADDR, &rloc, sizeof(struct rb_root), + "rb_root", FAULT_ON_ERROR); + + n = rloc.rb_node; + if (!n) + return NULL; + while (rb_left(n, &nloc)) + n = nloc.rb_left; + + return n; +} + +static struct rb_node * +rb_parent(struct rb_node *node, struct rb_node *nloc) +{ + readmem((ulong)node, KVADDR, nloc, sizeof(struct rb_node), + "rb_node", FAULT_ON_ERROR); + + return (struct rb_node *)(nloc->rb_parent_color & ~3); +} + +static struct rb_node * +rb_right(struct rb_node *node, struct rb_node *nloc) +{ + readmem((ulong)node, KVADDR, nloc, sizeof(struct rb_node), + "rb_node", FAULT_ON_ERROR); + + return nloc->rb_right; +} + +static struct rb_node * +rb_left(struct rb_node *node, struct rb_node *nloc) +{ + readmem((ulong)node, KVADDR, nloc, sizeof(struct rb_node), + "rb_node", FAULT_ON_ERROR); + + return nloc->rb_left; +} + +static struct rb_node * +rb_next(struct rb_node *node) +{ + struct rb_node nloc; + struct rb_node *parent; + + parent = rb_parent(node, &nloc); + + if (parent == node) + return NULL; + + if (nloc.rb_right) { + node = nloc.rb_right; + while (rb_left(node, &nloc)) + node = nloc.rb_left; + return node; + } + + while ((parent = rb_parent(node, &nloc)) && (node == rb_right(parent, &nloc))) + node = parent; + + return parent; +} + +static void +dump_CFS_runqueues(void) +{ + int cpu; + ulong runq; + char *runqbuf; + ulong leftmost, tasks_timeline; + struct task_context *tc; + long nr_running, cfs_rq_nr_running; + struct rb_root *root; + struct rb_node *node; + + if (INVALID_MEMBER(rq_rt)) { + MEMBER_OFFSET_INIT(rq_rt, "rq", "rt"); + MEMBER_OFFSET_INIT(rq_nr_running, "rq", "nr_running"); + MEMBER_OFFSET_INIT(task_struct_se, "task_struct", "se"); + MEMBER_OFFSET_INIT(sched_entity_run_node, "sched_entity", + "run_node"); + MEMBER_OFFSET_INIT(cfs_rq_rb_leftmost, "cfs_rq", "rb_leftmost"); + MEMBER_OFFSET_INIT(cfs_rq_nr_running, "cfs_rq", "nr_running"); + MEMBER_OFFSET_INIT(cfs_rq_tasks_timeline, "cfs_rq", + "tasks_timeline"); + MEMBER_OFFSET_INIT(rt_rq_active, "rt_rq", "active"); + MEMBER_OFFSET_INIT(task_struct_run_list, "task_struct", + "run_list"); + } + + if (!symbol_exists("per_cpu__runqueues")) + error(FATAL, "per_cpu__runqueues does not exist\n"); + + runq = symbol_value("per_cpu__runqueues"); + + runqbuf = GETBUF(SIZE(runqueue)); + + for (cpu = 0; cpu < kt->cpus; cpu++) { + if ((kt->flags & SMP) && (kt->flags & PER_CPU_OFF)) { + runq = symbol_value("per_cpu__runqueues") + + kt->__per_cpu_offset[cpu]; + } else + runq = symbol_value("per_cpu__runqueues"); + + fprintf(fp, "RUNQUEUES[%d]: %lx\n", cpu, runq); + + readmem(runq, KVADDR, runqbuf, SIZE(runqueue), + "per-cpu rq", FAULT_ON_ERROR); + leftmost = ULONG(runqbuf + OFFSET(rq_cfs) + + OFFSET(cfs_rq_rb_leftmost)); + tasks_timeline = ULONG(runqbuf + OFFSET(rq_cfs) + + OFFSET(cfs_rq_tasks_timeline)); + nr_running = LONG(runqbuf + OFFSET(rq_nr_running)); + cfs_rq_nr_running = ULONG(runqbuf + OFFSET(rq_cfs) + + OFFSET(cfs_rq_nr_running)); + + dump_RT_prio_array(nr_running != cfs_rq_nr_running, + runq + OFFSET(rq_rt) + OFFSET(rt_rq_active), + &runqbuf[OFFSET(rq_rt) + OFFSET(rt_rq_active)]); + + root = (struct rb_root *)(runq + OFFSET(rq_cfs) + OFFSET(cfs_rq_tasks_timeline)); + fprintf(fp, " CFS RB_ROOT: %lx\n", (ulong)root); + + if (!leftmost) + continue; + + for (node = rb_first(root); node; node = rb_next(node)) { + tc = task_to_context((ulong)node - OFFSET(task_struct_se) - + OFFSET(sched_entity_run_node)); + if (!tc) + continue; + INDENT(2); + print_task_header(fp, tc, FALSE); + } + } +} + +static void +dump_RT_prio_array(int active, ulong k_prio_array, char *u_prio_array) +{ + int i, c, cnt, qheads; + ulong offset, kvaddr, uvaddr; + ulong list_head[2]; + struct list_data list_data, *ld; + struct task_context *tc; + ulong *tlist; + + fprintf(fp, " RT PRIO_ARRAY: %lx\n", k_prio_array); + + if (!active) + return; + + qheads = (i = ARRAY_LENGTH(prio_array_queue)) ? + i : get_array_length("prio_array.queue", NULL, SIZE(list_head)); + + ld = &list_data; + + for (i = 0; i < qheads; i++) { + offset = OFFSET(prio_array_queue) + (i * SIZE(list_head)); + kvaddr = k_prio_array + offset; + uvaddr = (ulong)u_prio_array + offset; + BCOPY((char *)uvaddr, (char *)&list_head[0], sizeof(ulong)*2); + + if (CRASHDEBUG(1)) + fprintf(fp, "prio_array[%d] @ %lx => %lx/%lx\n", + i, kvaddr, list_head[0], list_head[1]); + + if ((list_head[0] == kvaddr) && (list_head[1] == kvaddr)) + continue; + + fprintf(fp, " [%3d] ", i); + + BZERO(ld, sizeof(struct list_data)); + ld->start = list_head[0]; + ld->list_head_offset = OFFSET(task_struct_run_list); + ld->end = kvaddr; + hq_open(); + cnt = do_list(ld); + hq_close(); + tlist = (ulong *)GETBUF((cnt) * sizeof(ulong)); + cnt = retrieve_list(tlist, cnt); + for (c = 0; c < cnt; c++) { + if (!(tc = task_to_context(tlist[c]))) + continue; + if (c) + INDENT(8); + print_task_header(fp, tc, FALSE); + } + FREEBUF(tlist); + } +} + #undef _NSIG #define _NSIG 64 #define _NSIG_BPW machdep->bits diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/tools.c /tmp/e3X06Fy51n/crash-4.0-4.9/tools.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/tools.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/tools.c 2007-11-19 15:01:37.000000000 -0600 @@ -18,7 +18,6 @@ #include "defs.h" #include -static int calculate(char *, ulong *, ulonglong *, ulong); static void print_number(struct number_option *, int, int); static long alloc_hq_entry(void); struct hq_entry; @@ -1845,7 +1844,14 @@ pc->flags |= SCROLL; else if (STREQ(args[optind], "off")) pc->flags &= ~SCROLL; - else if (IS_A_NUMBER(args[optind])) { + else if (STREQ(args[optind], "more")) + pc->scroll_command = SCROLL_MORE; + else if (STREQ(args[optind], "less")) + pc->scroll_command = SCROLL_LESS; + else if (STREQ(args[optind], "CRASHPAGER")) { + if (CRASHPAGER_valid()) + pc->scroll_command = SCROLL_CRASHPAGER; + } else if (IS_A_NUMBER(args[optind])) { value = stol(args[optind], FAULT_ON_ERROR, NULL); if (value) @@ -1856,9 +1862,25 @@ goto invalid_set_command; } - if (runtime) - fprintf(fp, "scroll: %s\n", - pc->flags & SCROLL ? "on" : "off"); + if (runtime) { + fprintf(fp, "scroll: %s ", + pc->flags & SCROLL ? "on" : "off"); + switch (pc->scroll_command) + { + case SCROLL_LESS: + fprintf(fp, "(/usr/bin/less)\n"); + break; + case SCROLL_MORE: + fprintf(fp, "(/bin/more)\n"); + break; + case SCROLL_NONE: + fprintf(fp, "(none)\n"); + break; + case SCROLL_CRASHPAGER: + fprintf(fp, "(CRASHPAGER: %s)\n", getenv("CRASHPAGER")); + break; + } + } return; @@ -2174,7 +2196,23 @@ static void show_options(void) { - fprintf(fp, " scroll: %s\n", pc->flags & SCROLL ? "on" : "off"); + fprintf(fp, " scroll: %s ", + pc->flags & SCROLL ? "on" : "off"); + switch (pc->scroll_command) + { + case SCROLL_LESS: + fprintf(fp, "(/usr/bin/less)\n"); + break; + case SCROLL_MORE: + fprintf(fp, "(/bin/more)\n"); + break; + case SCROLL_NONE: + fprintf(fp, "(none)\n"); + break; + case SCROLL_CRASHPAGER: + fprintf(fp, "(CRASHPAGER: %s)\n", getenv("CRASHPAGER")); + break; + } fprintf(fp, " radix: %d (%s)\n", pc->output_radix, pc->output_radix == 10 ? "decimal" : pc->output_radix == 16 ? "hexadecimal" : "unknown"); @@ -2621,7 +2659,7 @@ * its real value. The allowable multipliers are k, K, m, M, g and G, for * kilobytes, megabytes and gigabytes. */ -static int +int calculate(char *s, ulong *value, ulonglong *llvalue, ulong flags) { ulong factor, bias; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/x86_64.c /tmp/e3X06Fy51n/crash-4.0-4.9/x86_64.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/x86_64.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/x86_64.c 2007-11-19 15:01:37.000000000 -0600 @@ -266,11 +266,15 @@ if ((machdep->machspec->irqstack = (char *) malloc(machdep->machspec->stkinfo.isize)) == NULL) error(FATAL, "cannot malloc irqstack space."); - if (symbol_exists("irq_desc")) - ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc, - "irq_desc", NULL, 0); - else - machdep->nr_irqs = 224; /* NR_IRQS (at least) */ + if (symbol_exists("irq_desc")) { + if (LKCD_KERNTYPES()) + ARRAY_LENGTH_INIT_ALT(machdep->nr_irqs, + "irq_desc", "kernel_stat.irqs", NULL, 0); + else + ARRAY_LENGTH_INIT(machdep->nr_irqs, irq_desc, + "irq_desc", NULL, 0); + } else + machdep->nr_irqs = 224; /* NR_IRQS (at least) */ machdep->vmalloc_start = x86_64_vmalloc_start; machdep->dump_irq = x86_64_dump_irq; if (!machdep->hz) { @@ -521,14 +525,22 @@ cpu_pda_buf = GETBUF(SIZE(x8664_pda)); - if (symbol_exists("_cpu_pda")) { - if (!(nr_pda = get_array_length("_cpu_pda", NULL, 0))) - nr_pda = NR_CPUS; - _cpu_pda = TRUE; + if (LKCD_KERNTYPES()) { + if (symbol_exists("_cpu_pda")) + _cpu_pda = TRUE; + else + _cpu_pda = FALSE; + nr_pda = get_cpus_possible(); } else { - if (!(nr_pda = get_array_length("cpu_pda", NULL, 0))) - nr_pda = NR_CPUS; - _cpu_pda = FALSE; + if (symbol_exists("_cpu_pda")) { + if (!(nr_pda = get_array_length("_cpu_pda", NULL, 0))) + nr_pda = NR_CPUS; + _cpu_pda = TRUE; + } else { + if (!(nr_pda = get_array_length("cpu_pda", NULL, 0))) + nr_pda = NR_CPUS; + _cpu_pda = FALSE; + } } for (i = cpus = 0; i < nr_pda; i++) { @@ -566,8 +578,8 @@ i, level4_pgt, data_offset); } - - if ((i = get_array_length("boot_cpu_stack", NULL, 0))) { + if (!LKCD_KERNTYPES() && + (i = get_array_length("boot_cpu_stack", NULL, 0))) { istacksize = i; } else if ((sp = symbol_search("boot_cpu_stack")) && (nsp = next_symbol(NULL, sp))) { @@ -3415,6 +3427,14 @@ i < (bt->stacktop - bt->stackbase)/sizeof(ulong); i++, up++) { sym = closest_symbol(*up); if (XEN_CORE_DUMPFILE()) { + if (STREQ(sym, "crash_kexec")) { + sp = x86_64_function_called_by((*up)-5); + if (sp && STREQ(sp->name, "machine_kexec")) { + *rip = *up; + *rsp = bt->stackbase + ((char *)(up) - bt->stackbuf); + return; + } + } if (STREQ(sym, "xen_machine_kexec")) { *rip = *up; *rsp = bt->stackbase + ((char *)(up) - bt->stackbuf); @@ -3427,6 +3447,14 @@ STREQ(sym, "crash_kexec") || STREQ(sym, "machine_kexec") || STREQ(sym, "try_crashdump")) { + if (STREQ(sym, "crash_kexec")) { + sp = x86_64_function_called_by((*up)-5); + if (sp && STREQ(sp->name, "machine_kexec")) { + *rip = *up; + *rsp = bt->stackbase + ((char *)(up) - bt->stackbuf); + return; + } + } /* * Use second instance of crash_kexec if it exists. */ @@ -3656,7 +3684,7 @@ return(generic_dump_irq(irq)); } - error(FATAL, "ia64_dump_irq: irq_desc[] does not exist?\n"); + error(FATAL, "x86_64_dump_irq: irq_desc[] does not exist?\n"); } /* @@ -3827,14 +3855,22 @@ cpu_pda_buf = GETBUF(SIZE(x8664_pda)); - if (symbol_exists("_cpu_pda")) { - if (!(nr_pda = get_array_length("_cpu_pda", NULL, 0))) - nr_pda = NR_CPUS; - _cpu_pda = TRUE; + if (LKCD_KERNTYPES()) { + if (symbol_exists("_cpu_pda")) + _cpu_pda = TRUE; + else + _cpu_pda = FALSE; + nr_pda = get_cpus_possible(); } else { - if (!(nr_pda = get_array_length("cpu_pda", NULL, 0))) - nr_pda = NR_CPUS; - _cpu_pda = FALSE; + if (symbol_exists("_cpu_pda")) { + if (!(nr_pda = get_array_length("_cpu_pda", NULL, 0))) + nr_pda = NR_CPUS; + _cpu_pda = TRUE; + } else { + if (!(nr_pda = get_array_length("cpu_pda", NULL, 0))) + nr_pda = NR_CPUS; + _cpu_pda = FALSE; + } } for (i = cpus = 0; i < nr_pda; i++) { if (_cpu_pda) { @@ -3913,7 +3949,7 @@ fprintf(fp, "(unknown)\n"); fprintf(fp, " HZ: %d\n", machdep->hz); fprintf(fp, " PAGE SIZE: %d\n", PAGESIZE()); - fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); +// fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); fprintf(fp, "KERNEL VIRTUAL BASE: %lx\n", machdep->kvbase); fprintf(fp, "KERNEL VMALLOC BASE: %lx\n", vt->vmalloc_start); fprintf(fp, " KERNEL START MAP: %lx\n", __START_KERNEL_map); @@ -5397,7 +5433,7 @@ case POST_GDB: XEN_HYPER_STRUCT_SIZE_INIT(cpuinfo_x86, "cpuinfo_x86"); XEN_HYPER_STRUCT_SIZE_INIT(tss_struct, "tss_struct"); - XEN_HYPER_MEMBER_OFFSET_INIT(tss_struct_rsp0, "tss_struct", "rsp0"); + XEN_HYPER_ASSIGN_OFFSET(tss_struct_rsp0) = MEMBER_OFFSET("tss_struct", "__blh") + sizeof(short unsigned int); XEN_HYPER_MEMBER_OFFSET_INIT(tss_struct_ist, "tss_struct", "ist"); if (symbol_exists("cpu_data")) { xht->cpu_data_address = symbol_value("cpu_data"); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/x86.c /tmp/e3X06Fy51n/crash-4.0-4.9/x86.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/x86.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/x86.c 2007-11-19 15:01:37.000000000 -0600 @@ -3858,7 +3858,7 @@ fprintf(fp, "(unknown)\n"); fprintf(fp, " HZ: %d\n", machdep->hz); fprintf(fp, " PAGE SIZE: %d\n", PAGESIZE()); - fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); +// fprintf(fp, " L1 CACHE SIZE: %d\n", l1_cache_size()); fprintf(fp, "KERNEL VIRTUAL BASE: %lx\n", machdep->kvbase); fprintf(fp, "KERNEL VMALLOC BASE: %lx\n", vt->vmalloc_start); fprintf(fp, " KERNEL STACK SIZE: %ld\n", STACKSIZE()); @@ -4141,9 +4141,9 @@ if (CRASHDEBUG(7)) { up = (ulong *)xkd->page; - for (i = 0; i < 256; i++) { + for (j = 0; j < 256; j++) { fprintf(fp, "%08lx: %08lx %08lx %08lx %08lx\n", - (ulong)((i * 4) * sizeof(ulong)), + (ulong)((j * 4) * sizeof(ulong)), *up, *(up+1), *(up+2), *(up+3)); up += 4; } diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/xendump.c /tmp/e3X06Fy51n/crash-4.0-4.9/xendump.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/xendump.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/xendump.c 2007-11-19 15:01:37.000000000 -0600 @@ -1272,6 +1272,7 @@ int i, b, idx, done; ulong tmp[MAX_BATCH_SIZE]; off_t offset; + size_t size; uint nr_pages; if (xd->flags & XC_CORE_ELF) @@ -1289,9 +1290,8 @@ for (b = 0, idx = -1, done = FALSE; !done && (b < nr_pages); b += MAX_BATCH_SIZE) { - - if (read(xd->xfd, tmp, sizeof(ulong) * MAX_BATCH_SIZE) != - (MAX_BATCH_SIZE * sizeof(ulong))) { + size = sizeof(ulong) * MIN(MAX_BATCH_SIZE, nr_pages - b); + if (read(xd->xfd, tmp, size) != size) { error(INFO, "cannot read index page %d\n", b); return NULL; } @@ -1354,7 +1354,6 @@ struct xen_dumpcore_p2m p2m_batch[MAX_BATCH_SIZE]; offset = xd->xc_core.header.xch_index_offset; - size = sizeof(struct xen_dumpcore_p2m) * MAX_BATCH_SIZE; nr_pages = xd->xc_core.header.xch_nr_pages; if (lseek(xd->xfd, offset, SEEK_SET) == -1) @@ -1362,7 +1361,8 @@ for (b = 0, idx = -1, done = FALSE; !done && (b < nr_pages); b += MAX_BATCH_SIZE) { - + size = sizeof(struct xen_dumpcore_p2m) * + MIN(MAX_BATCH_SIZE, nr_pages - b); if (read(xd->xfd, &p2m_batch[0], size) != size) { error(INFO, "cannot read index page %d\n", b); return NULL; @@ -1422,6 +1422,7 @@ int i, b; ulong tmp[MAX_BATCH_SIZE]; uint nr_pages; + size_t size; if (xd->flags & XC_CORE_ELF) return xc_core_elf_mfn_to_page_index(mfn); @@ -1437,9 +1438,8 @@ nr_pages *= 2; for (b = 0; b < nr_pages; b += MAX_BATCH_SIZE) { - - if (read(xd->xfd, tmp, sizeof(ulong) * MAX_BATCH_SIZE) != - (MAX_BATCH_SIZE * sizeof(ulong))) { + size = sizeof(ulong) * MIN(MAX_BATCH_SIZE, nr_pages - b); + if (read(xd->xfd, tmp, size) != size) { error(INFO, "cannot read index page %d\n", b); return MFN_NOT_FOUND; } @@ -1475,14 +1475,14 @@ struct xen_dumpcore_p2m p2m_batch[MAX_BATCH_SIZE]; offset = xd->xc_core.header.xch_index_offset; - size = sizeof(struct xen_dumpcore_p2m) * MAX_BATCH_SIZE; nr_pages = xd->xc_core.header.xch_nr_pages; if (lseek(xd->xfd, offset, SEEK_SET) == -1) error(FATAL, "cannot lseek to page index\n"); for (b = 0; b < nr_pages; b += MAX_BATCH_SIZE) { - + size = sizeof(struct xen_dumpcore_p2m) * + MIN(MAX_BATCH_SIZE, nr_pages - b); if (read(xd->xfd, &p2m_batch[0], size) != size) { error(INFO, "cannot read index page %d\n", b); return MFN_NOT_FOUND; @@ -1518,6 +1518,7 @@ uint nr_pages; ulong tmp[MAX_BATCH_SIZE]; ulonglong tmp64[MAX_BATCH_SIZE]; + size_t size; if (lseek(xd->xfd, (off_t)xd->xc_core.header.xch_index_offset, SEEK_SET) == -1) { @@ -1563,8 +1564,9 @@ nr_pages = xd->xc_core.header.xch_nr_pages; for (b = 0; b < nr_pages; b += MAX_BATCH_SIZE) { - if (read(xd->xfd, tmp, sizeof(ulong) * MAX_BATCH_SIZE) != - (MAX_BATCH_SIZE * sizeof(ulong))) { + size = sizeof(ulong) * + MIN(MAX_BATCH_SIZE, nr_pages - b); + if (read(xd->xfd, tmp, size) != size) { error(INFO, "cannot read index page %d\n", b); return FALSE; } @@ -1595,8 +1597,9 @@ nr_pages = xd->xc_core.header.xch_nr_pages; for (b = 0; b < nr_pages; b += MAX_BATCH_SIZE) { - if (read(xd->xfd, tmp64, sizeof(ulonglong) * MAX_BATCH_SIZE) != - (MAX_BATCH_SIZE * sizeof(ulonglong))) { + size = sizeof(ulonglong) * + MIN(MAX_BATCH_SIZE, nr_pages - b); + if (read(xd->xfd, tmp64, size) != size) { error(INFO, "cannot read index page %d\n", b); return FALSE; } @@ -1715,7 +1718,6 @@ struct xen_dumpcore_p2m p2m_batch[MAX_BATCH_SIZE]; offset = xd->xc_core.header.xch_index_offset; - size = sizeof(struct xen_dumpcore_p2m) * MAX_BATCH_SIZE; nr_pages = xd->xc_core.header.xch_nr_pages; /* @@ -1744,7 +1746,8 @@ error(FATAL, "cannot lseek to page index\n"); for (b = start_index; b < nr_pages; b += MAX_BATCH_SIZE) { - + size = sizeof(struct xen_dumpcore_p2m) * + MIN(MAX_BATCH_SIZE, nr_pages - b); if (read(xd->xfd, &p2m_batch[0], size) != size) { error(INFO, "cannot read index page %d\n", b); return PFN_NOT_FOUND; @@ -1844,7 +1847,6 @@ uint64_t pfn_batch[MAX_BATCH_SIZE]; offset = xd->xc_core.header.xch_index_offset; - size = sizeof(uint64_t) * MAX_BATCH_SIZE; nr_pages = xd->xc_core.header.xch_nr_pages; /* @@ -1873,7 +1875,7 @@ error(FATAL, "cannot lseek to page index\n"); for (b = start_index; b < nr_pages; b += MAX_BATCH_SIZE) { - + size = sizeof(uint64_t) * MIN(MAX_BATCH_SIZE, nr_pages - b); if (read(xd->xfd, &pfn_batch[0], size) != size) { error(INFO, "cannot read index page %d\n", b); return PFN_NOT_FOUND; @@ -2023,7 +2025,7 @@ case EM_X86_64: if ((elf64->e_ident[EI_DATA] == ELFDATA2LSB) && - machine_type("X86_64")) + (machine_type("X86_64") || machine_type("X86"))) break; else goto bailout; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper.c /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper.c 2007-11-19 15:01:37.000000000 -0600 @@ -51,13 +51,16 @@ machdep->memory_size(); #ifdef IA64 - if((xht->__per_cpu_offset = malloc(sizeof(ulong) * XEN_HYPER_MAX_CPUS())) == NULL) { - error(FATAL, "cannot malloc __per_cpu_offset space.\n"); - } - if (!readmem(symbol_value("__per_cpu_offset"), KVADDR, - xht->__per_cpu_offset, sizeof(ulong) * XEN_HYPER_MAX_CPUS(), - "__per_cpu_offset", RETURN_ON_ERROR)) { - error(FATAL, "cannot read __per_cpu_offset.\n"); + if (symbol_exists("__per_cpu_offset")) { + xht->flags |= XEN_HYPER_SMP; + if((xht->__per_cpu_offset = malloc(sizeof(ulong) * XEN_HYPER_MAX_CPUS())) == NULL) { + error(FATAL, "cannot malloc __per_cpu_offset space.\n"); + } + if (!readmem(symbol_value("__per_cpu_offset"), KVADDR, + xht->__per_cpu_offset, sizeof(ulong) * XEN_HYPER_MAX_CPUS(), + "__per_cpu_offset", RETURN_ON_ERROR)) { + error(FATAL, "cannot read __per_cpu_offset.\n"); + } } #endif @@ -169,6 +172,14 @@ XEN_HYPER_MEMBER_OFFSET_INIT(domain_next_in_list, "domain", "next_in_list"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_domain_flags, "domain", "domain_flags"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_evtchn, "domain", "evtchn"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_hvm, "domain", "is_hvm"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_privileged, "domain", "is_privileged"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_debugger_attached, "domain", "debugger_attached"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_polling, "domain", "is_polling"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_dying, "domain", "is_dying"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_paused_by_controller, "domain", "is_paused_by_controller"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shutting_down, "domain", "is_shutting_down"); + XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shut_down, "domain", "is_shut_down"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_vcpu, "domain", "vcpu"); XEN_HYPER_MEMBER_OFFSET_INIT(domain_arch, "domain", "arch"); @@ -533,9 +544,10 @@ { Elf32_Nhdr *note; char *buf, *bp, *np, *upp; + char *nccp, *xccp; ulong addr; long size; - int i, cpuid; + int i, cpuid, samp_cpuid; /* * NOTE kakuma: It is not clear that what kind of @@ -546,10 +558,13 @@ xhdit->note_ver = XEN_HYPER_ELF_NOTE_V1; else if (STRUCT_EXISTS("crash_note_xen_t")) xhdit->note_ver = XEN_HYPER_ELF_NOTE_V2; - else if (STRUCT_EXISTS("crash_note_xen_core_t")) - xhdit->note_ver = XEN_HYPER_ELF_NOTE_V3; - else { - error(WARNING, "unsupported elf note format.\n"); + else if (STRUCT_EXISTS("crash_xen_core_t")) { + if (STRUCT_EXISTS("crash_note_xen_core_t")) + xhdit->note_ver = XEN_HYPER_ELF_NOTE_V3; + else + xhdit->note_ver = XEN_HYPER_ELF_NOTE_V4; + } else { + error(WARNING, "found unsupported elf note format while checking of xen dumpinfo.\n"); return; } if (!xen_hyper_test_pcpu_id(XEN_HYPER_CRASHING_CPU())) { @@ -557,30 +572,55 @@ return; } + /* allocate a context area */ size = sizeof(struct xen_hyper_dumpinfo_context) * XEN_HYPER_MAX_CPUS(); if((xhdit->context_array = malloc(size)) == NULL) { error(FATAL, "cannot malloc dumpinfo table context space.\n"); } BZERO(xhdit->context_array, size); + size = sizeof(struct xen_hyper_dumpinfo_context_xen_core) * XEN_HYPER_MAX_CPUS(); + if((xhdit->context_xen_core_array = malloc(size)) == NULL) { + error(FATAL, "cannot malloc dumpinfo table context_xen_core_array space.\n"); + } + BZERO(xhdit->context_xen_core_array, size); addr = symbol_value("per_cpu__crash_notes"); for (i = 0; i < XEN_HYPER_MAX_CPUS(); i++) { - xhdit->context_array[i].note = xen_hyper_per_cpu(addr, i); + ulong addr_notes; + + addr_notes = xen_hyper_per_cpu(addr, i); + if (xhdit->note_ver == XEN_HYPER_ELF_NOTE_V4) { + if (!readmem(addr_notes, KVADDR, &(xhdit->context_array[i].note), + sizeof(ulong), "per_cpu__crash_notes", RETURN_ON_ERROR)) { + error(WARNING, "cannot read per_cpu__crash_notes.\n"); + return; + } + } else { + xhdit->context_array[i].note = addr_notes; + } } if (xhdit->note_ver == XEN_HYPER_ELF_NOTE_V1) { xhdit->note_size = XEN_HYPER_SIZE(note_buf_t); + } else if (xhdit->note_ver == XEN_HYPER_ELF_NOTE_V4) { + xhdit->note_size = XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE; } else { xhdit->note_size = XEN_HYPER_SIZE(crash_note_t); } - + /* read a sample note */ buf = GETBUF(xhdit->note_size); - if (!xen_hyper_fill_elf_notes(xhdit->context_array[XEN_HYPER_CRASHING_CPU()].note, + if (xhdit->note_ver == XEN_HYPER_ELF_NOTE_V4) + samp_cpuid = xht->cpu_idxs[0]; + else + samp_cpuid = XEN_HYPER_CRASHING_CPU(); + xhdit->xen_info_cpu = samp_cpuid; + if (!xen_hyper_fill_elf_notes(xhdit->context_array[samp_cpuid].note, buf, XEN_HYPER_ELF_NOTE_FILL_T_NOTE)) { error(FATAL, "cannot read per_cpu__crash_notes.\n"); } bp = buf; + /* Get elf format information for each version. */ switch (xhdit->note_ver) { case XEN_HYPER_ELF_NOTE_V1: /* core data */ @@ -604,19 +644,6 @@ /* xen core */ xhdit->xen_info_offset = XEN_HYPER_OFFSET(crash_note_xen_t_desc); xhdit->xen_info_size = XEN_HYPER_SIZE(crash_note_xen_t); - if((xhdit->crash_note_xen_info_ptr = - malloc(xhdit->xen_info_size)) == NULL) { - error(FATAL, "cannot malloc dumpinfo table " - "crash_note_xen_info_ptr space.\n"); - } - memcpy(xhdit->crash_note_xen_info_ptr, - bp + xhdit->core_size, xhdit->xen_info_size); - xhdit->context_xen_info.note = - xhdit->context_array[XEN_HYPER_CRASHING_CPU()].note + - xhdit->core_size; - xhdit->context_xen_info.pcpu_id = XEN_HYPER_CRASHING_CPU(); - xhdit->context_xen_info.crash_xen_info_ptr = - xhdit->crash_note_xen_info_ptr + xhdit->xen_info_offset; break; case XEN_HYPER_ELF_NOTE_V3: /* core data */ @@ -625,22 +652,57 @@ /* xen core */ xhdit->xen_core_offset = XEN_HYPER_OFFSET(crash_note_xen_core_t_desc); xhdit->xen_core_size = XEN_HYPER_SIZE(crash_note_xen_core_t); - if((xhdit->crash_note_xen_core_ptr = - malloc(xhdit->xen_core_size)) == NULL) { - error(FATAL, "cannot malloc dumpinfo table " - "crash_note_xen_core_ptr space.\n"); - } - memcpy(xhdit->crash_note_xen_core_ptr, - bp + xhdit->core_size, xhdit->xen_core_size); - xhdit->context_xen_core.note = - xhdit->context_array[XEN_HYPER_CRASHING_CPU()].note + - xhdit->core_size; - xhdit->context_xen_core.pcpu_id = XEN_HYPER_CRASHING_CPU(); - xhdit->context_xen_core.crash_xen_core_ptr = - xhdit->crash_note_xen_core_ptr + xhdit->xen_core_offset; /* xen info */ xhdit->xen_info_offset = XEN_HYPER_OFFSET(crash_note_xen_info_t_desc); xhdit->xen_info_size = XEN_HYPER_SIZE(crash_note_xen_info_t); + break; + case XEN_HYPER_ELF_NOTE_V4: + /* core data */ + note = (Elf32_Nhdr *)bp; + np = bp + sizeof(Elf32_Nhdr); + upp = np + note->n_namesz; + upp = (char *)roundup((ulong)upp, 4); + xhdit->core_offset = (Elf_Word)((ulong)upp - (ulong)note); + upp = upp + note->n_descsz; + xhdit->core_size = (Elf_Word)((ulong)upp - (ulong)note); + if (XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE < xhdit->core_size + 32) { + error(WARNING, "note size is assumed on crash is incorrect.(core data)\n"); + return; + } + /* xen core */ + note = (Elf32_Nhdr *)upp; + np = (char *)note + sizeof(Elf32_Nhdr); + upp = np + note->n_namesz; + upp = (char *)roundup((ulong)upp, 4); + xhdit->xen_core_offset = (Elf_Word)((ulong)upp - (ulong)note); + upp = upp + note->n_descsz; + xhdit->xen_core_size = (Elf_Word)((ulong)upp - (ulong)note); + if (XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE < + xhdit->core_size + xhdit->xen_core_size + 32) { + error(WARNING, "note size is assumed on crash is incorrect.(xen core)\n"); + return; + } + /* xen info */ + note = (Elf32_Nhdr *)upp; + np = (char *)note + sizeof(Elf32_Nhdr); + upp = np + note->n_namesz; + upp = (char *)roundup((ulong)upp, 4); + xhdit->xen_info_offset = (Elf_Word)((ulong)upp - (ulong)note); + upp = upp + note->n_descsz; + xhdit->xen_info_size = (Elf_Word)((ulong)upp - (ulong)note); + if (XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE < + xhdit->core_size + xhdit->xen_core_size + xhdit->xen_info_size) { + error(WARNING, "note size is assumed on crash is incorrect.(xen info)\n"); + return; + } + xhdit->note_size = xhdit->core_size + xhdit->xen_core_size + xhdit->xen_info_size; + break; + default: + error(FATAL, "logic error in cheking elf note format occurs.\n"); + } + + /* fill xen info context. */ + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V3) { if((xhdit->crash_note_xen_info_ptr = malloc(xhdit->xen_info_size)) == NULL) { error(FATAL, "cannot malloc dumpinfo table " @@ -650,37 +712,75 @@ bp + xhdit->core_size + xhdit->xen_core_size, xhdit->xen_info_size); xhdit->context_xen_info.note = - xhdit->context_array[XEN_HYPER_CRASHING_CPU()].note + + xhdit->context_array[samp_cpuid].note + xhdit->core_size + xhdit->xen_core_size; - xhdit->context_xen_info.pcpu_id = XEN_HYPER_CRASHING_CPU(); + xhdit->context_xen_info.pcpu_id = samp_cpuid; xhdit->context_xen_info.crash_xen_info_ptr = xhdit->crash_note_xen_info_ptr + xhdit->xen_info_offset; - break; - default: - error(FATAL, "logic error in cheking elf note format occurs.\n"); } - + + /* allocate note core */ size = xhdit->core_size * XEN_HYPER_NR_PCPUS(); if(!(xhdit->crash_note_core_array = malloc(size))) { - error(FATAL, "cannot malloc note_buf_t struct space.\n"); + error(FATAL, "cannot malloc crash_note_core_array space.\n"); } - bp = xhdit->crash_note_core_array; - BZERO(bp, size); + nccp = xhdit->crash_note_core_array; + BZERO(nccp, size); + + /* allocate xen core */ + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V2) { + size = xhdit->xen_core_size * XEN_HYPER_NR_PCPUS(); + if(!(xhdit->crash_note_xen_core_array = malloc(size))) { + error(FATAL, "cannot malloc dumpinfo table " + "crash_note_xen_core_array space.\n"); + } + xccp = xhdit->crash_note_xen_core_array; + BZERO(xccp, size); + } + + /* fill a context. */ for_cpu_indexes(i, cpuid) { + /* fill core context. */ addr = xhdit->context_array[cpuid].note; - if (!xen_hyper_fill_elf_notes(addr, bp, + if (!xen_hyper_fill_elf_notes(addr, nccp, XEN_HYPER_ELF_NOTE_FILL_T_CORE)) { - error(FATAL, "cannot read ELF_Prstatus.\n"); + error(FATAL, "cannot read elf note core.\n"); } xhdit->context_array[cpuid].pcpu_id = cpuid; xhdit->context_array[cpuid].ELF_Prstatus_ptr = - bp + xhdit->core_offset; + nccp + xhdit->core_offset; xhdit->context_array[cpuid].pr_reg_ptr = - bp + xhdit->core_offset + + nccp + xhdit->core_offset + XEN_HYPER_OFFSET(ELF_Prstatus_pr_reg); - bp += xhdit->core_size; + + /* Is there xen core data? */ + if (xhdit->note_ver < XEN_HYPER_ELF_NOTE_V2) { + nccp += xhdit->core_size; + continue; + } + if (xhdit->note_ver == XEN_HYPER_ELF_NOTE_V2 && + cpuid != samp_cpuid) { + xccp += xhdit->xen_core_size; + nccp += xhdit->core_size; + continue; + } + + /* fill xen core context, in case of more elf note V2. */ + xhdit->context_xen_core_array[cpuid].note = + xhdit->context_array[cpuid].note + + xhdit->core_size; + xhdit->context_xen_core_array[cpuid].pcpu_id = cpuid; + xhdit->context_xen_core_array[cpuid].crash_xen_core_ptr = + xccp + xhdit->xen_core_offset; + if (!xen_hyper_fill_elf_notes(xhdit->context_xen_core_array[cpuid].note, + xccp, XEN_HYPER_ELF_NOTE_FILL_T_XEN_CORE)) { + error(FATAL, "cannot read elf note xen core.\n"); + } + xccp += xhdit->xen_core_size; + nccp += xhdit->core_size; } + FREEBUF(buf); } @@ -713,11 +813,14 @@ /* * Fill ELF Notes header here. + * This assume that variable note has a top address of an area for + * specified type. */ char * xen_hyper_fill_elf_notes(ulong note, char *note_buf, int type) { long size; + ulong rp = note; if (type == XEN_HYPER_ELF_NOTE_FILL_T_NOTE) size = xhdit->note_size; @@ -725,6 +828,8 @@ size = xhdit->core_size; else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_CORE) size = xhdit->xen_core_size; + else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_CORE_M) + size = xhdit->core_size + xhdit->xen_core_size; else if (type == XEN_HYPER_ELF_NOTE_FILL_T_PRS) size = XEN_HYPER_SIZE(ELF_Prstatus); else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_REGS) @@ -732,7 +837,7 @@ else return NULL; - if (!readmem(note, KVADDR, note_buf, size, + if (!readmem(rp, KVADDR, note_buf, size, "note_buf_t or crash_note_t", RETURN_ON_ERROR)) { if (type == XEN_HYPER_ELF_NOTE_FILL_T_NOTE) error(WARNING, "cannot fill note_buf_t or crash_note_t.\n"); @@ -740,6 +845,8 @@ error(WARNING, "cannot fill note core.\n"); else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_CORE) error(WARNING, "cannot fill note xen core.\n"); + else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_CORE_M) + error(WARNING, "cannot fill note core & xen core.\n"); else if (type == XEN_HYPER_ELF_NOTE_FILL_T_PRS) error(WARNING, "cannot fill ELF_Prstatus.\n"); else if (type == XEN_HYPER_ELF_NOTE_FILL_T_XEN_REGS) @@ -1051,8 +1158,28 @@ dc->next_in_list = ULONG(dp + XEN_HYPER_OFFSET(domain_next_in_list)); if (XEN_HYPER_VALID_MEMBER(domain_domain_flags)) dc->domain_flags = ULONG(dp + XEN_HYPER_OFFSET(domain_domain_flags)); - else + else if (XEN_HYPER_VALID_MEMBER(domain_is_shut_down)) { + dc->domain_flags = 0; + if (*(dp + XEN_HYPER_OFFSET(domain_is_hvm))) { + dc->domain_flags |= XEN_HYPER_DOMS_HVM; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_privileged))) { + dc->domain_flags |= XEN_HYPER_DOMS_privileged; + } else if (*(dp + XEN_HYPER_OFFSET(domain_debugger_attached))) { + dc->domain_flags |= XEN_HYPER_DOMS_debugging; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_polling))) { + dc->domain_flags |= XEN_HYPER_DOMS_polling; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_paused_by_controller))) { + dc->domain_flags |= XEN_HYPER_DOMS_ctrl_pause; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_dying))) { + dc->domain_flags |= XEN_HYPER_DOMS_dying; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_shutting_down))) { + dc->domain_flags |= XEN_HYPER_DOMS_shuttingdown; + } else if (*(dp + XEN_HYPER_OFFSET(domain_is_shut_down))) { + dc->domain_flags |= XEN_HYPER_DOMS_shutdown; + } + } else { dc->domain_flags = XEN_HYPER_DOMF_ERROR; + } dc->evtchn = ULONG(dp + XEN_HYPER_OFFSET(domain_evtchn)); for (i = 0; i < XEN_HYPER_MAX_VIRT_CPUS; i++) { dc->vcpu[i] = ULONG(dp + XEN_HYPER_OFFSET(domain_vcpu) + i*sizeof(void *)); diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_command.c /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_command.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_command.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_command.c 2007-11-19 15:01:37.000000000 -0600 @@ -429,7 +429,17 @@ } sprintf(buf, " PCID "); mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|RJUST, "ENOTE"); - sprintf(&buf[strlen(buf)], " PID PPID PGRP SID"); +// sprintf(&buf[strlen(buf)], " PID PPID PGRP SID"); + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|RJUST, "CORE"); + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V2) { + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|RJUST, "XEN_CORE"); + } + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V3) { + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|RJUST, "XEN_INFO"); + } fprintf(fp, "%s\n", buf); } if (dia->cnt) { @@ -449,7 +459,7 @@ ulong addr; ulong *regs; long tv_sec, tv_usec; - int pid, i, regcnt; + int i, regcnt; if (!dic || !dic->note) { return; @@ -460,6 +470,7 @@ mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|LONG_HEX|RJUST, MKSTR(dic->note)); +#if 0 pid = INT(note_buf + XEN_HYPER_OFFSET(ELF_Prstatus_pr_pid)); sprintf(&buf[strlen(buf)], " %5d ", pid); pid = INT(note_buf + XEN_HYPER_OFFSET(ELF_Prstatus_pr_ppid)); @@ -468,6 +479,24 @@ sprintf(&buf[strlen(buf)], "%5d ", pid); pid = INT(note_buf + XEN_HYPER_OFFSET(ELF_Prstatus_pr_sid)); sprintf(&buf[strlen(buf)], "%5d", pid); +#endif + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|LONG_HEX|RJUST, + MKSTR(dic->note)); + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V2) { + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|LONG_HEX|RJUST, + MKSTR(dic->note + xhdit->core_size)); + } + if (xhdit->note_ver >= XEN_HYPER_ELF_NOTE_V3) { + strncat(buf, " ", XEN_HYPER_CMD_BUFSIZE-strlen(buf)-1); + if (xhdit->xen_info_cpu == dic->pcpu_id) + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|LONG_HEX|RJUST, + MKSTR(dic->note + xhdit->core_size + xhdit->xen_core_size)); + else + mkstring(&buf[strlen(buf)], VADDR_PRLEN, CENTER|RJUST, "--"); + + } fprintf(fp, "%s\n", buf); @@ -515,7 +544,8 @@ addr = (ulong)note_buf + XEN_HYPER_OFFSET(ELF_Prstatus_pr_reg); regs = (ulong *)addr; - fprintf(fp, "Register information:\n"); + fprintf(fp, "Register information(%lx):\n", + dic->note + xhdit->core_offset + XEN_HYPER_OFFSET(ELF_Prstatus_pr_reg)); for (i = 0; i < regcnt; i++, regs++) { if (xhregt[i] == NULL) { break; @@ -1256,18 +1286,34 @@ if (stat == XEN_HYPER_DOMF_ERROR) { sprintf(buf, verbose ? "(unknown)" : "??"); - } else if (stat & XEN_HYPER_DOMF_shutdown) { - sprintf(buf, verbose ? "DOMAIN_SHUTDOWN" : "SH"); - } else if (stat & XEN_HYPER_DOMF_dying) { - sprintf(buf, verbose ? "DOMAIN_DYING" : "DY"); - } else if (stat & XEN_HYPER_DOMF_ctrl_pause) { - sprintf(buf, verbose ? "DOMAIN_CTRL_PAUSE" : "CP"); - } else if (stat & XEN_HYPER_DOMF_polling) { - sprintf(buf, verbose ? "DOMAIN_POLLING" : "PO"); - } else if (stat & XEN_HYPER_DOMF_paused) { - sprintf(buf, verbose ? "DOMAIN_PAUSED" : "PA"); + } else if (XEN_HYPER_VALID_MEMBER(domain_domain_flags)) { + if (stat & XEN_HYPER_DOMF_shutdown) { + sprintf(buf, verbose ? "DOMAIN_SHUTDOWN" : "SF"); + } else if (stat & XEN_HYPER_DOMF_dying) { + sprintf(buf, verbose ? "DOMAIN_DYING" : "DY"); + } else if (stat & XEN_HYPER_DOMF_ctrl_pause) { + sprintf(buf, verbose ? "DOMAIN_CTRL_PAUSE" : "CP"); + } else if (stat & XEN_HYPER_DOMF_polling) { + sprintf(buf, verbose ? "DOMAIN_POLLING" : "PO"); + } else if (stat & XEN_HYPER_DOMF_paused) { + sprintf(buf, verbose ? "DOMAIN_PAUSED" : "PA"); + } else { + sprintf(buf, verbose ? "DOMAIN_RUNNING" : "RU"); + } } else { - sprintf(buf, verbose ? "DOMAIN_RUNNING" : "RU"); + if (stat & XEN_HYPER_DOMS_shutdown) { + sprintf(buf, verbose ? "DOMAIN_SHUTDOWN" : "SF"); + } else if (stat & XEN_HYPER_DOMS_shuttingdown) { + sprintf(buf, verbose ? "DOMAIN_SHUTTINGDOWN" : "SH"); + } else if (stat & XEN_HYPER_DOMS_dying) { + sprintf(buf, verbose ? "DOMAIN_DYING" : "DY"); + } else if (stat & XEN_HYPER_DOMS_ctrl_pause) { + sprintf(buf, verbose ? "DOMAIN_CTRL_PAUSE" : "CP"); + } else if (stat & XEN_HYPER_DOMS_polling) { + sprintf(buf, verbose ? "DOMAIN_POLLING" : "PO"); + } else { + sprintf(buf, verbose ? "DOMAIN_RUNNING" : "RU"); + } } return buf; diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_defs.h /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_defs.h --- /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_defs.h 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_defs.h 2007-11-19 15:01:37.000000000 -0600 @@ -74,14 +74,13 @@ #define PERCPU_ADDR (DEFAULT_SHAREDINFO_ADDR - PERCPU_PAGE_SIZE) #define DIRECTMAP_VIRT_START (0xf000000000000000) #define DIRECTMAP_VIRT_END PERCPU_ADDR -#define VIRT_FRAME_TABLE_ADDR (0xf300000000000000) -#define VIRT_FRAME_TABLE_END (0xf400000000000000) +#define VIRT_FRAME_TABLE_SIZE (0x0100000000000000) #define PERCPU_VIRT_ADDR(vaddr) \ (((vaddr) >= PERCPU_ADDR) && ((vaddr) < PERCPU_ADDR + PERCPU_PAGE_SIZE)) #define FRAME_TABLE_VIRT_ADDR(vaddr) \ - ((vaddr) >= VIRT_FRAME_TABLE_ADDR && (vaddr) < VIRT_FRAME_TABLE_END) + ((vaddr) >= xhmachdep->frame_table && (vaddr) < xhmachdep->frame_table + VIRT_FRAME_TABLE_SIZE) #undef IA64_RBS_OFFSET #define IA64_RBS_OFFSET ((XEN_HYPER_SIZE(vcpu) + 15) & ~15) @@ -101,6 +100,14 @@ #define XEN_HYPER_ELF_NOTE_V1 1 #define XEN_HYPER_ELF_NOTE_V2 2 #define XEN_HYPER_ELF_NOTE_V3 3 +#define XEN_HYPER_ELF_NOTE_V4 4 + +#ifdef X86 +#define XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE 0x100 +#endif +#if defined(X86_64) || defined(IA64) +#define XEN_HYPER_ELF_NOTE_V4_NOTE_SIZE 0x200 +#endif /* * Xen Hyper @@ -129,7 +136,9 @@ ((ulong)(var) + (((ulong)(cpu))<__per_cpu_offset[cpu])) + ((xht->flags & XEN_HYPER_SMP) ? \ + (ulong)(var) + (xht->__per_cpu_offset[cpu]) : \ + (ulong)(var)) #endif #if defined(X86) || defined(X86_64) @@ -155,6 +164,7 @@ /* Prepared domain ID. */ #define XEN_HYPER_DOMID_IO (0x7FF1U) #define XEN_HYPER_DOMID_XEN (0x7FF2U) + /* Domain flags (domain_flags). */ /* Is this domain privileged? */ #define XEN_HYPER__DOMF_privileged 0 @@ -180,6 +190,32 @@ /* Domain flag error */ #define XEN_HYPER_DOMF_ERROR ((ulong)(-1)) +/* Domain status. */ + /* Is this an HVM guest? */ +#define XEN_HYPER__DOMS_HVM 0 +#define XEN_HYPER_DOMS_HVM (1UL<context_xen_core.note)); - XEN_HYPER_PRI(fp, len, "pcpu_id: ", buf, flag, - (buf, "%u\n", xhdit->context_xen_core.pcpu_id)); - XEN_HYPER_PRI(fp, len, "crash_xen_core_ptr: ", buf, flag, - (buf, "%p\n", xhdit->context_xen_core.crash_xen_core_ptr)); + XEN_HYPER_PRI(fp, len, "context_xen_core_array: ", buf, flag, + (buf, "%p\n", xhdit->context_xen_core_array)); + if (verbose && xhdit->context_xen_core_array) { + xen_hyper_dump_mem((long *)xhdit->context_xen_core_array, + sizeof(struct xen_hyper_dumpinfo_context_xen_core) * + XEN_HYPER_MAX_CPUS(), sizeof(long)); + } XEN_HYPER_PRI_CONST(fp, len, "context_xen_info: ", flag|XEN_HYPER_PRI_LF); XEN_HYPER_PRI(fp, len, "note: ", buf, flag, (buf, "%lx\n", xhdit->context_xen_info.note)); @@ -283,12 +283,13 @@ xhdit->core_size * XEN_HYPER_NR_PCPUS(), sizeof(long)); } - XEN_HYPER_PRI(fp, len, "crash_note_xen_core_ptr: ", buf, flag, - (buf, "%p\n", xhdit->crash_note_xen_core_ptr)); - if (verbose && xhdit->crash_note_xen_core_ptr) { + XEN_HYPER_PRI(fp, len, "crash_note_xen_core_array: ", buf, flag, + (buf, "%p\n", xhdit->crash_note_xen_core_array)); + if (verbose && xhdit->crash_note_xen_core_array) { xen_hyper_dump_mem( - xhdit->crash_note_xen_core_ptr, - xhdit->xen_core_size, sizeof(long)); + xhdit->crash_note_xen_core_array, + xhdit->xen_core_size * XEN_HYPER_NR_PCPUS(), + sizeof(long)); } XEN_HYPER_PRI(fp, len, "crash_note_xen_info_ptr: ", buf, flag, (buf, "%p\n", xhdit->crash_note_xen_info_ptr)); @@ -297,6 +298,8 @@ xhdit->crash_note_xen_info_ptr, xhdit->xen_info_size, sizeof(long)); } + XEN_HYPER_PRI(fp, len, "xen_info_cpu: ", buf, flag, + (buf, "%u\n", xhdit->xen_info_cpu)); XEN_HYPER_PRI(fp, len, "note_size: ", buf, flag, (buf, "%u\n", xhdit->note_size)); XEN_HYPER_PRI(fp, len, "core_offset: ", buf, flag, @@ -320,13 +323,52 @@ xen_hyper_dump_xen_hyper_domain_table(int verbose) { char buf[XEN_HYPER_CMD_BUFSIZE]; - int len, flag; + struct xen_hyper_domain_context *dcca; + int len, flag, i; len = 22; flag = XEN_HYPER_PRI_R; XEN_HYPER_PRI(fp, len, "context_array: ", buf, flag, (buf, "%p\n", xhdt->context_array)); + if (verbose) { + char buf1[XEN_HYPER_CMD_BUFSIZE]; + int j; + for (i = 0, dcca = xhdt->context_array; + i < xhdt->context_array_cnt; i++, dcca++) { + snprintf(buf, XEN_HYPER_CMD_BUFSIZE, "context_array[%d]: ", i); + XEN_HYPER_PRI_CONST(fp, len, buf, flag|XEN_HYPER_PRI_LF); + XEN_HYPER_PRI(fp, len, "domain: ", buf, flag, + (buf, "%lx\n", dcca->domain)); + XEN_HYPER_PRI(fp, len, "domain_id: ", buf, flag, + (buf, "%d\n", dcca->domain_id)); + XEN_HYPER_PRI(fp, len, "tot_pages: ", buf, flag, + (buf, "%x\n", dcca->tot_pages)); + XEN_HYPER_PRI(fp, len, "max_pages: ", buf, flag, + (buf, "%x\n", dcca->max_pages)); + XEN_HYPER_PRI(fp, len, "xenheap_pages: ", buf, flag, + (buf, "%x\n", dcca->xenheap_pages)); + XEN_HYPER_PRI(fp, len, "shared_info: ", buf, flag, + (buf, "%lx\n", dcca->shared_info)); + XEN_HYPER_PRI(fp, len, "sched_priv: ", buf, flag, + (buf, "%lx\n", dcca->sched_priv)); + XEN_HYPER_PRI(fp, len, "next_in_list: ", buf, flag, + (buf, "%lx\n", dcca->next_in_list)); + XEN_HYPER_PRI(fp, len, "domain_flags: ", buf, flag, + (buf, "%lx\n", dcca->domain_flags)); + XEN_HYPER_PRI(fp, len, "evtchn: ", buf, flag, + (buf, "%lx\n", dcca->evtchn)); + XEN_HYPER_PRI(fp, len, "vcpu_cnt: ", buf, flag, + (buf, "%d\n", dcca->vcpu_cnt)); + for (j = 0; j < XEN_HYPER_MAX_VIRT_CPUS; j++) { + snprintf(buf1, XEN_HYPER_CMD_BUFSIZE, "vcpu[%d]: ", j); + XEN_HYPER_PRI(fp, len, buf1, buf, flag, + (buf, "%lx\n", dcca->vcpu[j])); + } + XEN_HYPER_PRI(fp, len, "vcpu_context_array: ", buf, flag, + (buf, "%p\n", dcca->vcpu_context_array)); + } + } XEN_HYPER_PRI(fp, len, "context_array_cnt: ", buf, flag, (buf, "%d\n", xhdt->context_array_cnt)); XEN_HYPER_PRI(fp, len, "running_domains: ", buf, flag, @@ -365,6 +407,57 @@ (buf, "%p\n", xhvct->vcpu_context_arrays)); XEN_HYPER_PRI(fp, len, "vcpu_context_arrays_cnt: ", buf, flag, (buf, "%d\n", xhvct->vcpu_context_arrays_cnt)); + if (verbose) { + struct xen_hyper_vcpu_context_array *vcca; + struct xen_hyper_vcpu_context *vca; + int i, j; + + for (i = 0, vcca = xhvct->vcpu_context_arrays; + i < xhvct->vcpu_context_arrays_cnt; i++, vcca++) { + snprintf(buf, XEN_HYPER_CMD_BUFSIZE, "vcpu_context_arrays[%d]: ", i); + XEN_HYPER_PRI_CONST(fp, len, buf, flag|XEN_HYPER_PRI_LF); + if (vcca->context_array) { + XEN_HYPER_PRI(fp, len, "context_array: ", buf, flag, + (buf, "%p\n", vcca->context_array)); + } else { + XEN_HYPER_PRI(fp, len, "context_array: ", buf, flag, + (buf, "NULL\n")); + } + XEN_HYPER_PRI(fp, len, "context_array_cnt: ", buf, flag, + (buf, "%d\n", vcca->context_array_cnt)); + XEN_HYPER_PRI(fp, len, "context_array_valid: ", buf, flag, + (buf, "%d\n", vcca->context_array_valid)); + for (j = 0, vca = vcca->context_array; + j < vcca->context_array_cnt; j++, vca++) { + snprintf(buf, XEN_HYPER_CMD_BUFSIZE, "context_array[%d]: ", j); + XEN_HYPER_PRI_CONST(fp, len, buf, flag|XEN_HYPER_PRI_LF); + XEN_HYPER_PRI(fp, len, "vcpu: ", buf, flag, + (buf, "%lx\n", vca->vcpu)); + XEN_HYPER_PRI(fp, len, "vcpu_id: ", buf, flag, + (buf, "%d\n", vca->vcpu_id)); + XEN_HYPER_PRI(fp, len, "processor: ", buf, flag, + (buf, "%d\n", vca->processor)); + XEN_HYPER_PRI(fp, len, "vcpu_info: ", buf, flag, + (buf, "%lx\n", vca->vcpu_info)); + XEN_HYPER_PRI(fp, len, "domain: ", buf, flag, + (buf, "%lx\n", vca->domain)); + XEN_HYPER_PRI(fp, len, "next_in_list: ", buf, flag, + (buf, "%lx\n", vca->next_in_list)); + XEN_HYPER_PRI(fp, len, "sleep_tick: ", buf, flag, + (buf, "%lx\n", vca->sleep_tick)); + XEN_HYPER_PRI(fp, len, "sched_priv: ", buf, flag, + (buf, "%lx\n", vca->sched_priv)); + XEN_HYPER_PRI(fp, len, "state: ", buf, flag, + (buf, "%d\n", vca->state)); + XEN_HYPER_PRI(fp, len, "state_entry_time: ", buf, flag, + (buf, "%llux\n", (unsigned long long)(vca->state_entry_time))); + XEN_HYPER_PRI(fp, len, "runstate_guest: ", buf, flag, + (buf, "%lx\n", vca->runstate_guest)); + XEN_HYPER_PRI(fp, len, "vcpu_flags: ", buf, flag, + (buf, "%lx\n", vca->vcpu_flags)); + } + } + } XEN_HYPER_PRI(fp, len, "idle_vcpu: ", buf, flag, (buf, "%lx\n", xhvct->idle_vcpu)); XEN_HYPER_PRI(fp, len, "idle_vcpu_context_array: ", buf, flag, @@ -673,11 +766,29 @@ XEN_HYPER_PRI(fp, len, "domain_next_in_list: ", buf, flag, (buf, "%ld\n", xen_hyper_offset_table.domain_next_in_list)); XEN_HYPER_PRI(fp, len, "domain_domain_flags: ", buf, flag, - (buf, "%ld\n", xen_hyper_offset_table.domain_domain_flags)); + (buf, "%lx\n", xen_hyper_offset_table.domain_domain_flags)); XEN_HYPER_PRI(fp, len, "domain_evtchn: ", buf, flag, (buf, "%ld\n", xen_hyper_offset_table.domain_evtchn)); + XEN_HYPER_PRI(fp, len, "domain_is_hvm: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_hvm)); + XEN_HYPER_PRI(fp, len, "domain_is_privileged: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_privileged)); + XEN_HYPER_PRI(fp, len, "domain_debugger_attached: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_debugger_attached)); + XEN_HYPER_PRI(fp, len, "domain_is_polling: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_polling)); + XEN_HYPER_PRI(fp, len, "domain_is_dying: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_dying)); + XEN_HYPER_PRI(fp, len, "domain_is_paused_by_controller: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_paused_by_controller)); + XEN_HYPER_PRI(fp, len, "domain_is_shutting_down: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_shutting_down)); + XEN_HYPER_PRI(fp, len, "domain_is_shut_down: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_is_shut_down)); XEN_HYPER_PRI(fp, len, "domain_vcpu: ", buf, flag, (buf, "%ld\n", xen_hyper_offset_table.domain_vcpu)); + XEN_HYPER_PRI(fp, len, "domain_arch: ", buf, flag, + (buf, "%ld\n", xen_hyper_offset_table.domain_arch)); #ifdef IA64 XEN_HYPER_PRI(fp, len, "mm_struct_pgd: ", buf, flag, diff -Nru /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_global_data.c /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_global_data.c --- /tmp/9GqrqL2m5z/crash-4.0-4.1/xen_hyper_global_data.c 2007-04-26 15:45:59.000000000 -0500 +++ /tmp/e3X06Fy51n/crash-4.0-4.9/xen_hyper_global_data.c 2007-11-19 15:01:37.000000000 -0600 @@ -130,8 +130,11 @@ " ", " 1. the DOMAIN-ID.", " 2. the struct domain pointer.", -" 3. the domain state (SH, DY, CP, PO, PA, RU).", -" 4. the TYPE of domain.", +" 3. the domain state", +" (SF:fully shut down, SH:shutting down, DY:dying,", +" CP:pause by controller software, PO:polling event channels,", +" PA:pause by the hypervisor, RU:running).", +" 4. the TYPE of domain", " (O:dom_io, X:dom_xen, I:idle domain, 0:domain 0, U:domain U).", " 5. displays max_pages member of domain.", " 6. displays tot_pages member of domain.",